/spelunky-ds

Spelunky remake for NintendoDS

Primary LanguageC++OtherNOASSERTION

Spelunky® remake for the NintendoDS.

(a.k.a SpelunkyDS)

Travis build status icon

Works on real NDS! Works on real N3DSXL!

To-do list as for now

  • ✔ Implement shopkeeper logics and randomly spawned shops
  • ✔ Implement damsel
  • ✔ Implement caveman
  • ✔ Implement skeleton
  • ✔ Implement arrow trap
  • ✔ Fix rope logics - if thrown, when it touches bottom of some tile above it or it reaches its maximum travel distance of 8 tiles up, then it should expand to the bottom. Now it's the opposite - it expands as it travels upwards.
  • ✔ Implement cape and jetpack
  • 🗙 Putting project on Travis
  • ✔ Implement 4 layers system - top one for the console and HUD, bottom one for tilemap and the rest for other creatures
  • 🗙 Tune-up the level generator; make it more random; add random events like snake well
  • 🗙 Implement music using streaming from filesystem - I elaborated a bit on this on my blog
  • 🗙 Pausing
  • 🗙 Jars dropping loot
  • 🗙 Ghost when spending too much time on level
  • 🗙 Shake screen when dropping a bomb
  • 🗙 Add github link to the main menu's copyrights sprite - so people would find the current version even if it was downloaded from some other source
  • 🗙 Attempt to make levels a bit bigger (current size is 512x512, what I can probably make is 1024x512 or 512x1024, though not sure of that)

Obviously I omit things like implement Olmec or implement lava city - let's finish cave level first.

Known bugs

  • 🗙 Though overall randomness of the generator is improved it sometimes makes some ugly structures, to be fixed later
  • 🗙 I messed up a bit with collision detection
  • 🗙 Arrow trap is triggered even if there's a tile (or tiles) between some moving object and the trap
  • 🗙 Once thrown chest can't be opened
  • ✔ Sometimes there's a level where there are spikes just hanging in air
  • 🗙 Sometimes you can loose your items (shotgun, pistol) when changing levels
  • 🗙 UI bugs - you can throw rope / drop bomb in scores screen
  • 🗙 Damage system appears to be broken in terms of shopkeeper (you can't throw arrows, rocks, jars, etc on him)
  • ✔ There's a bug when carrying damsel while sprinting through spikes
  • 🗙 There's a bug when jumping on more than one NPC (snake, bat, etc) at the same time
  • 🗙 Displaying loot in level-transition screen
  • 🗙 Shopkeeper is quite dumb, easy to steal
  • 🗙 Bullets can collide with jetpack, so it can work as a bulletproof vest
  • 🗙 Blood drops / bullets can trigger arrow trap
  • 🗙 Game tends to crash after some time of playing (at least on my vanilla DS)

Building

In order to compile this application on your own, you will need [devkitPro](https://devkitpro.org/) with the devkitARM toolchain, plus the necessary tools and libraries. devkitPro includes `dkp-pacman` for easy installation of all components:
 $ dkp-pacman -Syu devkitARM general-tools dstools ndstool libnds libfat-nds

Once everything is downloaded and installed, git clone this repository, navigate to the folder in which it was cloned, and run make to compile the application. If there is an error, let us know.

TroubleShooting

  • If audio does not work, launch the application using TWiLightMenu++

Debugging

To compile SpelunkyDS with assertions fired up, type "make DEBUG=1" when compiling. Debugging seemingly random crashes is possible only on an emulator, which will provide last executed line:

Desmume output

Calling addr2line :

Calling addr2line

What would be nice to add is printing to emulator's console for debugging purposes. libnds ships such function calls (nds/arm9/console.h), but they work only on an emulator called nocash, which is Windows only.

Please contact me if you know any Linux NDS emulator that supports printing to terminal via nocash messages or you know how to log to desmume.

Tools I use

  • C++
  • GNU Make
  • libnds - as included with devkitPro's toolchain https://devkitpro.org/
  • mappy - https://tilemap.co.uk/mappy.php
  • desmume emulator, for testing and debugging
  • R4 card for testing on a real Nintendo DS Hardware
  • gimp, for converting to 256 color (8bit) indexed bmp/png
  • The Spelunky source code (distributed by Derek Yu) for inspiration
  • Spelunky assets, which are taken from the Spelunky Community Update Project (because there's no need for installing Game Maker)
  • CLion for editing

License

Full license text can be accessed under this link:

https://github.com/dbeef/spelunky-ds/blob/master/LICENSE

Briefly, as for my code, I distribute it under GNU General Public License, as for Spelunky game assets, I use them under Spelunky® User License v1.1b, also, libnds and tools for building .nds files are provided by devkitARM; devkitARM is constructed from and contains components licensed under GPL, BSD, zlib, LGPL & MPL licenses. libnds is zlib licensed.

NintendoDS is a trademark of Nintendo and is used purely for descriptive purposes. This game is not affiliated with Nintendo.

Contributing

I will accept every help with running this project, feel free to catch one or more of the todo's.

Links

I found the following materials very helpful: