hi people
I have to write my computer science thesis next semester. I was thinking about making some 2D game in C, because I love the programming language C.
I have the following idea: instead of exporting and importing spritesheets into my game, I'll write a tool that transforms an animation into pure C code. my intent is to work with vector-based animations, possibly with tweening. when my game loads, it'd pre-render every sprite and visual asset according to physical display resolution and framerate and user quality settings. I'm currently generating game builds for Windows, HTML5 and Android APKs.
I've played lots of games that pre-render stuff when loading, so I guess this is common practice and arguably okay. but I don't know. maybe a cutscene should be rendered and played in realtime? mysteries.
my game would be some kind of 2D side-scroller, probably a shooter or beat-em-up game, or an adventure point-and-click adventure. characters with bones and reverse kinematics is currently out of question. physics is possible, since there is one powerful 2D physics engine for C called Chipmunk2D.
I'm currently exploring the idea of working with SWF. it seems that many animation software exports to SWF, so I suppose this facilitates collaboration with animators. I also saw that there are many tools to render SWF, so I can look at their source code and figure out how they work and replicate their techniques. I think SVG is very heavyweight, but because everything will become C, I could parse it as well. I thought about writing individual plugins/extensions for each animation software, but that sounds like an enormous hassle.
I don't know how to lay out the game levels, like position enemies, spawn points and special interactions. I suppose one could add some metadata inside the animation software, which I could later read to give special meaning. same goes for collision, I suppose the animator could draw some invisible layer that I can interpret as collision.
now, for some technical stuff. I'm using SDL2 or SDL3. as for vector art, there are many libraries that render vector graphics. for software rendering, I can employ OpenMP to use all CPU cores to pre-render stuff. if I use a GPU library, I'd have extra work exposing SDL's GPU APIs to these libraries, but maybe it is worth it.
I'll document here my progress while I experiment and learn from any feedback. I will also keep my discoveries in a PDF that I will update regularly and maybe share here.
there is a lot to learn from existing technology. all of this is preliminary


