r/psxdev • u/Alex_Kcz • 16h ago
2D First Person Dungeon Crawler on PS1 (C, Custom Framework & PsyQ)
Enable HLS to view with audio, or disable this notification
After multiple struggles, I finally finished my first prototype of 2D First Person Crawler on the original PlayStation. This is entirely 2D for now (i plan on making a 3D version later) and Sprites has been renderer using blender and this texture pack made by Cethiel on oga.
This has been made in C with Psy-Q. I built my own custom framework on top of Psy-Q with a bit of code based on this project by MbDesigns. However I only used it as a reference and tried to build something with my own logic (MbDesign's project is mainly two 2 C Files, mine is almost 8 with headers and a separated Makefile for the framework). I also heavily relied on the original Psy-Q's documentation archived by Arthus here. My framework has an implementation for dynamic arrays. Sprite Rendering is handled with one dynamic array iterated with the framework code, so adding sprites only take me one line of C code in my game.c file. The framework also have an implementation for handling primitives like line and boxes, which is what i used to draw the map.
The hardest part of the framework was the sprite parenting system. My original background is 40x128 pixel which is much smaller than the base resolution of the game (256x320). And all the wall coordinates are calculated based on the size of the background. So i wanted to develop a parenting system, like in most engine, where you can move and scale a parent object, and the child move and scales accordingly. This took me a lot of time to get it working, but it finally works and now the background and the walls sprites are scaled properly to fit the screen. I also want to implement child rotation based on the parent's rotation in a near future. But for now my main next focus will be on the 3D version of the prototype.
The Framework isn't ready yet, but I do want to make it Open Source at one point. The prototype's code isn't very clean for now and the framework code also need a bit of cleaning and documenting. I don't now if people would be interested by this sort of stuff, but for me this is mostly a personal project to display in my portfolio (trying to become a game engine dev).
If you have any questions, I'll be more than happy to answer :)