DungeonRush – open source C + SDL 2 game
I continue my quest, looking around for open source games in C that use SDL 2. The latest one is DungeonRush by developer Rapiz1 (does no one ever use their real names these days?) who hails from Wuhan.
It is not a rogue-like, but more a Snake-like game. You move your hero around the playing area avoiding monsters and things fired at you while picking up stuff and people to give you extra lives. As well as the difficulty levels it includes multiplayer mode as well though I haven’t tried that.
If you are learning C or games programming, it’s worth studying to see how others do things; this includes its own text drawing and high scoring and saving high scores. It’s quite fun to play though I am rubbish playing it, even at the normal level. I’ve added this to the C Code links page. (Accessed on the top menu),
Snake games are interesting because if you use a circular buffer, no matter how big the snake grows, you can move it by just moving the head and tail elements. An O(1) operation!