Skip to content

RoboRun-NES is platform NES game created in C for homebrew project.

License

Notifications You must be signed in to change notification settings

haseeb-heaven/roborun-nes

Repository files navigation

RoboRun-NES

RoboRUN-NES is open-source 2D-platform game written in C using CC65-compiler for NES homebrew projects to check limitation of C against CC65 Assembly. Initially this was meant to upload in NESDev competition 2021 but unfortunately the deadline was over so couldn't submit there. :(

Game Features :

Multiple Levels with different enemies.
Invincible state with star and player animation.
Countdown timers for low health.
Collision detection with Hitbox mechanism.
Improved Graphics and sounds.
Supports only PAL/Dendy . video region.

Code Features :

Easy to understand and well written.
Uses structures for Player/Enemy/Collectables instead plain c-array/vars.
All libraries used are well documented.

Game title :


Game Help :


Game Total Score :


Gameplay levels :




Final level :


RoboRun-NES gameplay on YouTube :

Directory Structure :

build - Contains final build of game along source code in assembly.
cfg - Contains various configurations that can be used in different type of NES games .
chr - Contains CHR Graphics tileset used in this game.
gfx - Contains all Graphics related items used in game like Player/Enemies levels etc .
lib - Contains libraries used Neslib by Shiru and NesUtils by Doug Fraker and NesClib by myself .
music - Contains music and sound effects created using Famitracker and Famitone2 lib .
sfx - Contains sound effects used in this game also created using Famitracker & Famitone2.
palettes - Contains different palettes used in game.
res - Contains resources for this README. .
scripts - Contains Tiled custom scripts for exporting data directly to C-Code.
src - Contains full source code of this game.
utils - Contains various utils for Meta sprites and Sounds.
tools - Contains various necessary tools used for creating game resources graphics/sounds etc .
.vscode - Contains extensions for Visual studio code to run your NES C-Code directly.

How to build/Run :

PRE-REQUIESTE :

You need to download CC65-compiler first and the it to your system PATH variable. after that add your favourite emulator also to your system path for testing.

Game can be compiled and run using 2 different methods.
1)Windows Batch file method.
2)GNU Make file method.

Batch file method :

Just run Compile.bat file and it will automatically compile and build game along music.
Or run BuildGame.bat provide arguments like this BuildGame.bat RoboRun-NES.c mesen to try on mesen Emulator.

GNU Make file method :

Run command make or make compile then after it run make run.
To clean the build of game run make clean.
To support your own emulator edit Makefile change EMULATOR = fceux to EMULATOR = your emulator.

Software tools used in making this game :

1)Tiled: For game Level designing.
2)FamiTracker: For Sound and music.
3)NES Screen Tool(NESst): For Intros/Outros and game titles.
4)yychr: For game sprites editor.
5)meta2c: For converting meta-tiles and meta-sprites to c code.
6)NES-Sprite-Convertor: For converting resources PNG/BMP to CHR.
Most of these tools can be found under tools directory.

New tools and utilities.

To create this game i had to create some of my own tools so i created some tools/utils and helper library.

1)Tiled export plugins: Helps you to export map created in Tiled to C-File or Assembly file directly.
Check Scripts/Tiled folder for ExportCpp and ExportAsm plugins.

2)NES-Clib: A custom helper library to load HUD and title/intros and randomize palette and more.
Check lib/nesclib.h and lib/nesclib.s

3)Meta-tiles convertor: Converts meta-tiles to c code (Originated by NesDoug).
Check utils/meta2c.exe for source check utils/meta2c.c

NESDev open-source community Contribution list :

1)Shiru: For contributing to various libraries/tools to open-source community.
Work: Neslib,Famitone2,NESst,Space Checker,Sort and more. Check Website

2)NESDoug: For contributing to various tutorials/tools to open-source community.
Work: Open source Platformer games and Utils Nesdoug.h Check Website

3)Mojontwins: For contributing to various games/tools Game engine for C to open-source community.
Work: MK1_NES Game engine,Super Uwol,cheril_perils,sgt_helmet, and tools like mkts,eneexp3,rle44mapMK1 etc. Check Website

4)Chriscpp: For contributing to modular game engine aKa Nes starter kit to open-source community.
Work: Modular Game engine,Nesnet,nes-c-boilerplate and more. Check Website

If you think someone is missing from list then please create PR and expand this list thanks.

VERSION INFO :
RoboRun Version : V 1.0 Dated : 30/03/2021.
RoboRun Version : V 1.1 Dated : 06/04/2021.