Code Monkey home page Code Monkey logo

zx-spectrum-snake's Introduction

zx-spectrum-snake

A port of the classic Snake/Tron game for the ZX Spectrum 48K, written in C

Menu Game


Game features:

  • Fast, responsive and precise snake movement using WASD keys
  • 9 speed-based skill levels ranging from 1 (slow) to 9 (fast)
  • Pause key for looking at that notification in your phone

Download:

In the RELEASES page there are .TAP / .TZX files available for use in an emulator (such as FUSE and many others)

I have also included a .WAV file for loading on a REAL spectrum (see below)


Compiling the source code:

This game has been developed for the Sinclair ZX Spectrum 48K using the wonderful z88dk zcc C compiler.

https://www.z88dk.org/

z88dk is multiplatform, but I have developed this project on Windows 10 using Visual Studio Code as IDE, and compiling from the command line (CMD). Even if I don't include scripts for other platforms, it should be quite straightforward to compile these sources on a different platform.

I have used version 1.99C of z88dk.

In my computer, I installed z88dk onto at C:\z88dk, as it appears to be NOT relocatable.

I have provided two .BAT scripts:

  • z88dk_set_path.bat for setting the path for the compiler
  • snake_compile.bat for compiling the snake project

The compiler generates a .TAP file ready for opening in an emulator.

I have used Tapir 1.0 for generating a .WAV file and load the game into a REAL spectrum.


Loading on a REAL spectrum

Real Spectrum

Running on a REAL Spectrum!!!

I have a ZX Spectrum 48K for which I have performed the composite video mod, so I can connect it to an old 14 inch CRT TV via SCART. The image quality is good and the 64-column text is readable.

For loading the Spectrum, I use a LG G4 mobile phone connected via mono jack cable, from the earphone port in the phone to the ear port in the Spectrum.

The volume on the phone is set to maximum, and I use the Foobar2000 player for playing the WAV. I have tweaked the Foobar2000 settings, with all the bands in the DSP equalizer set to +6 dB.

Load

With these settings, the red/cyan stripes for the pilot tone have the same width, the load tones are heard clearly through the Spectrum speaker and the game loads OK.

When the red/cyan stripes have different widths, it is usually due to low audio volume, and games may fail to load.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.