enumer8's blog

[Console - PSX] - Diving into PS1 dev - [1]

I suppose I should really use this place more. It's got cobwebs!

All right, getting back into blogging. What have I been up to? Well, Tephra dev is still happening (though not as actively because I've got another project I'm currently trying to progress on), and I've set up a nifty set of toolchains on my machine to develop PS1 programs in both assembly and C - courtesy of the Psyq + nugget project as well as Pikuma's PS1 programming course (armips assembler).

I've had this idea in my head for a long time - it was going to be a game from the beginning, which is rare for me; usually narratives like these end up as scraps of stories which ultimately languish in my notebooks or some text file somewhere. This one though stuck around and I'm glad it did, because I feel like it's got a lot of potential. Essentially, it's sort of a coming-of-age tale set in a weird seaside town. That's all I'm really going to talk about in this blog because I'd like to keep the idea fresh in my head and it's not really important for others to know the details at this point. I am not really a fan of constant devlogs that relate to a game's narrative or character development as opposed to its engine or something.

Anyway.

I've been digging pretty deep into PS1 development for some time now and I have to say I'm quite surprised at how pleasant and straightforward the process is. Getting something to display onto the screen (even just clearing it to a certain color without displaying primitives) is very simple, whether you approach it using MIPS assembly or C. Since I've got a toolchain set up for both (and have had some measure of success using inline assembly, as well as writing separate subroutines in an assembly source file and just calling them as externs in my C source), it's given me a lot of drive to continue working on this project. The most time-consuming part is definitely going to be creating assets for the game, whether that be the modeling or even the music - all of which I'm doing myself. I'm just putting all this down here so that I have at least some accountability. It's not going to be fun looking back on this in a year or two with nothing to show for it.

The approach of creating an 'engine' for the game is what I've been trying to tackle for the last few days. Right now, displaying primitives and even using the GTE to affect 3D transforms on them isn't particularly hard (in C, at least, I'll have to work on some subroutines in MIPS and get back to you on that) so the prospect of even just creating a rudimentary model and using the controller functions to allow the player to rotate or move them around isn't going to be too hard. And even with environments... the best move is probably to have fairly limited, constrained spaces to save on dev time and also iteration time. Given that texturing is also a fairly simple process, I think having a very, very basic first draft of a room (not even a scene, I'm not delusional) is pretty realistic in a few weeks. When I was writing renderers for x86-based machines I used to think that a favorable goal would be to end up with a program that was fit for general purpose (i.e. handled sound, calls to the system's native graphics API like X11 or Win32 instead of OpenGL or Vulkan, input, etc). In retrospect, this is likely too advanced for where I'm at right now, and instead it would suit my purposes to simply cobble together the functionality that I need immediately.

What do I have at this very minute? Well, I can display pretty much any kind of polygon I want - flat-shaded, Gouraud-shaded, textured (provided I do have a texture to use), and using what little I know of the PS1's ordering table, I can probably put together something that lets me display an OBJ and transform it in 3D space. I'd count that as a pretty neat place to be in right now :)