Show HN: My platforming game written in C 89
I wasn&#x27;t sure I would be able to play on mobile but I was pleasantly surprised by the simple controls and managed to reach the third scene of chapter 1 before getting stuck, so, good job.<p>I don&#x27;t think anything needs to change with the controls, the people saying that aren&#x27;t the audience and don&#x27;t have the genre literacy to know what this type of control setup  is doing(for those watching: Jump King, Getting Over It both have the same kind of ruthless difficulty).<p>Regarding the technology, it&#x27;s healthy to simplify the architecture - I&#x27;ve played a lot with the same  kinds of thought processes of adding a lot of abstraction and gradually moved towards simpler answers. You already have a lot of answers that work, but my own take is that games of this type and scale need, roughly, these pieces:<p>* A &quot;god object&quot; entity model(every entity is one struct containing all necessary state for all possible behaviors). Going beyond that adds memory savings that you don&#x27;t need for modern machines, or modularity that will introduce more to debug.<p>* State machine formalisms to describe what screen to draw, how to transition between them, what animations to play, and other behaviors. All control flow logic encompasses the behavior of a state machine, so you have to decide which formalism is best to use for the context and will aid debugging. That&#x27;s why people sometimes gravitate towards coroutines and other high-level abstractions. Simple &quot;scripting languages&quot; that just describe a sequence of opcodes are something that frequently appear in old games.<p>* A simple constraint solver for the platforming physics. The problem that all physics systems have to solve is &quot;there are multiple possible solutions that will resolve this motion: which one is the best?&quot; This tends to be obfuscated in platforming physics by a convention of throwing away information about potential solutions early(e.g. moving on the x axis and resolving collision there, then doing the same on the y axis). Instead I recommend breaking down the motion into multiple permutations of &quot;x then y&quot; vs &quot;y then x&quot;, then sorting and ranking the outcomes relative to a heuristic of unimpeded free movement. It&#x27;s a more expensive check that also gives a better-feeling result.<p>* A pipeline to load the graphics, collision and scene assets. Although you can hard-code a lot of these things in a simple game, it can be convenient to export them from a spreadsheet and make it data-driven. Things like describing what &quot;chapter 1&quot; is are basically asset problems. I noticed that you have dialogue boxes described with a tileset and code to draw the tiles. This is how I would have done things once, since it is &quot;how they used to do it&quot; - today I would be likely to turn everything at runtime into an image, and to build the text itself, compile pre-baked images of text in the build process using tools like imagemagick. That makes the runtime simpler and reduces the kinds of assets it tracks, while allowing total freedom with the content of dialogues.<p>Sometimes with these projects, the engine development is being used to avoid content work. I suggest a physical graph paper notebook to create a location for that content to be designed, and to engage in some blind contour sketching to warm up to doing anything visually-oriented. When you have a whole storyboard for the game it becomes easier to conceptualize what code is necessary to get the effect, and do exactly that instead of generalizing it.<p>Two commercial &quot;back in the day&quot; games I would also look at for more inspiration: Xargon, Little Big Adventure 1. Both written in C, original source code is available. Studying those will give you a sense of where you are relative to finished work.