Skip to content

Simple rebuilt of the classic Snake game for the NES in C using the cc65 cross compiler.

License

Notifications You must be signed in to change notification settings

sebastiandine/openNES-Snake

Repository files navigation

openNES Snake

Rebuilding classic games for the NES as Open Source

IMG1 IMG2 IMG3

Project Description

This project is the first entry in what I hope will be a long line of projects aimed at recreating classic video games
for the Nintendo Entertainment System on an open source basis.
The purpose of these projects is to get more enthusiastic people interested in programming for the NES by providing code examples and providing a starting point for developing new games from scratch.

This particular project aims to recreate the classic game Snake, also known as Nibbles. As it is the first of its kind in this series of projects, it is reduced to the core mechanics of the original game, in order to avoid information overload for future beginners but also because of the lack of knowledge of the main author at that time 😜.

The project was programmed entirely in C, using Shiru's NESLib and the cc65 cross compiler (for more references see the Toolkit section).

License

This project is licensed under the zlib license. See also the attached README file.

Toolkit

  • cc65 cross compiler v.2.5 - A freeware C compiler for 6502 based systems

  • Shiru's NESLib - An programming library on top of cc65 for more comfortable NES development. See also the more up to date fork here.

  • Tile Molester v.0.16 - A tileset editor, for designing tiles/sprites

  • NES Screen Tool v.2.04 - A tool that allows to create and edit NES nametables, attributes, palettes, patterns (tiles), and metasprites

  • FamiTracker v.0.4.2 - Famous tracker for producing music for the NES/Famicom-systems

  • Doxygen v.1.8.12 - Code documentation tool for C/C++ projects

  • FCEUX v.2.2.3 - Famous NES emulator in the homebrew scene with many debugging utilities.

  • NesDev Forum - You will always find friendly, skilled and helpful people in this community, who are willing to help with problems you are facing during your project.

  • Nerdy Nights Tutorials - Even if it is based on introducing you to assembly, this is the classic lecture for understanding the NES architecture for many years.

How To Build Locally

To build a .NES rom from the project's sources, execute the build script at build/build.sh from the build directory or the script build/build.bat if you are working on Windows. Note that these scripts depend on the cc65 cross compiler, so you need ensure that this is available on your system.

Development Container

This project provides VS Code Development Container configuration at .devcontainer/. Via this configuration, you automatically have a complete development environment for developing NES games.

Notes for Contributors

Feel free to fork this project and extend it. If you find bugs, please submit them as issues so we can discuss together how you can fix them. All your contributions need to include explaining Doxygen comments in order to share your knowledge with future contributors and maintaining the project's code documentation.