Making a 1-bit game engine

feeef

Well-known member
I am making a game engine for our old B&W Macs. I have posted the full story at Tinker different as it was my main source of inspiration for coding, but I thought I would post about it here too.

You can find the source code at https://gitlab.com/ftech31/classicsprite

It is still a work in progress and there is no documentation at this time. I plan to work on that as I move forward with finalizing the code structure and the syntax. The entire project is released under a free software licence so feel free to use, share, and modify as you wish! I learned a lot during the process so it can also be a source of code example for anyone who wants to learn how to program with 1-bit QuickDraw.

Here is a quick demo of a dummy game that I made with the engine:

 

feeef

Well-known member
I am mainly focusing on the graphics at the moment (I still have my mind in optimizing the frame rate) but sound is part of the plan. This project from @Mu0n seems quite advanced in term of sound. We may be able to merge efforts at some point.
 

Mu0n

Well-known member
Here's what I have:
-modal tunes that use the square wave synth in some very old project
-modal tunes that use the four-tone synth in some very old project
-real time manipulation of the wave shape buffer with the mouse for a four-tone synth while it plays
-MIDI in data coming from a piano controller, passing through a serial MIDI interface, and being dissected and correctly interpreted
-MIDI out data correctly dispatched out to an external midi module like the Roland Sound Canvas or Roland MT-32 or any module, of course
-Standard MIDI file opened, dissected and played back programmatically in C to that same midi interface. Basically I mimick what Space Quest III did for its intro sequence music or gameplay music.
-Link MIDI in to the four-tone synth for real time playback

Here's what I'll soon reach:
-use a MIDI in controller as a joystick just for fun
-Link MIDI in to the square wave synth
-Link MIDI in to the freeform synth and play instrument files from Studio Session at arbitrary note values
-Studio Session song file, played back in real time programmatically since it's just a notch more complicated than doing a standard midi file playback
-Use a standard midi file but dispatch it through a four-tone synth by focusing on 4 instruments at most for quick and dirty game music that doesn't require a hardware MIDI interface and a hardware MIDI module.
 

feeef

Well-known member
That's awesome @Mu0n ! When looking at your code, I realize that I should rethink my syntax. I am used to naming my function and variables in lower_case and instead, I should go for the camelCase syntax that is used in the entire Toolbox. That will look a lot cleaner.
 
Top