Nwagyu!Nwagyu!
App installer
  • English
  • Français
GitHub
App installer
  • English
  • Français
GitHub
  • Documentation Index
  • Tutorial
    • Part 1: Project creation
    • Part 2: Cleaning up the template
    • Part 3: Moving the snake
    • Part 4: Handling snake length
    • Part 5: Eating fruits
    • Part 6: Game over
    • Part 7: Map edge handling
    • Part 8: Frame limiter
    • Part 9: Progressive fruits spawning
    • Part 10: Score calculator and saving
    • Part 11: Map support
    • Part 12: App icon
    • Part 13: Increasing speed
    • Part 14: Conclusion
  • External apps
    • Creating your own application
    • Accessing storage
    • On/Off and Home keys
    • Syscalls
  • Firmware
    • Boot process
    • Slots
    • Bootloader
    • Kernel
    • Userland
    • Addresses and structures
  • Others
    • Communication with the computer (DFU)
    • Downloading Epsilon from NumWorks' website
  • Developers tips
    • [Rust] Using a heap allocator when developing apps
  • User documentation

Part 14: Conclusion

You've reached the end of this tutorial, congratulations! 🎉

I don't pretend my solution is the best implementation possible, it's just one way which is working. For example, some people would have used real constants declared using const instead of preprocessor macros declared with #define. The main goal of this tutorial is to help you learn C and how NWA apps works behind the scenes.

As you can see, this game is playable but can still be improved. If you need some ideas of possibles improvements, you can try doing the following:

  • Improving the interface, by adding a title screen with a logo and a better game over screen with a retry option
  • Adding some difficulty presets on the title screen, controlling speed and fruit spawn rate
  • Creating new maps, and why not a map editor with user maps stored in the Python storage using storage.c
  • Built-in maps with a map chooser, to avoid needing to install the app many times to use several maps
  • Autoplay move, where the snake move by itself. You can try an algorithmic approach, or a machine-learning approach where the snake learns over time. I've made an implementation on my q-learning branch.
  • Randomly spawning obstacles, and maybe a way to interact with them
  • Releasing your app on Nwagyu
  • Creating another app
  • And of course whatever you want to implement, it's your game after all

The code you should have if you followed the tutorial is available here: https://codeberg.org/Yaya-Cout/Snake/

If you need help, simply want to send me a message or want to show your creations, don't hesitate to open an issue on the Nwagyu GitHub repo or Snake Codeberg repo, join our Discord server, send me a message on Matrix (we don't have a NumWorks room yet), by email (I won't write it here to avoid bots) or on the Fediverse at @yayacout@social.linux.pizza.

A final note: have fun!

Edit this page
Last Updated: 3/6/26, 10:31 PM
Contributors: Yaya-Cout
Prev
Part 13: Increasing speed