The about screen in Megaroids is TANTALIZING:
This is a great promise to see the source code of a fluid, action oriented game, this can serve as a beacon of inspiration and teaching for would-be programmers of the platform. This in fact, was crucial for the developpers of "Continuum", another mac action game for b&w compact macs which you could easily sum up as "asteroids in a maze with gravity". They learned the structure and speed oriented tricks from the Megaroids source code. You can read about their recollection here:
The C compiler Megamax is trivial to get these days on Mac Garden: https://macintoshgarden.org/apps/megamax-c
However. I thought I remembered I saw the source code in digital format somewhere, but I can't readily find it.
But, I do own a programming book that has it listed ENTIRELY from p.279 to p.358, including super annoying to type hexadecimal data for some of the resources (sounds, graphics). Everything is in code, there's no need to get external files from a disk that you have to link to the project, it's all raw data! The book is "Programming C on the Macintosh" by Terry A. Ward, which I talk about a bit in my website Foray to 68000. https://mu0n.github.io/ForayInto68k/index.html
You can find a pdf of the book here:
CALL FOR HELP:
It would be cool if we could find it and put it in digital form, stored on archive.org. It's a cool little asteroid clone game, but it has worthwhile assembly routines where it has to count and a program structure in C to drive it all. It would also be fun to play around and mess with the parameters and get some variants going!
BUT WAIT, through the magic of OCR and PDFs, we can copy paste the code, barring some minimal mistakes that we correct along the way. Sample code test:
This is a great promise to see the source code of a fluid, action oriented game, this can serve as a beacon of inspiration and teaching for would-be programmers of the platform. This in fact, was crucial for the developpers of "Continuum", another mac action game for b&w compact macs which you could easily sum up as "asteroids in a maze with gravity". They learned the structure and speed oriented tricks from the Megaroids source code. You can read about their recollection here:
The C compiler Megamax is trivial to get these days on Mac Garden: https://macintoshgarden.org/apps/megamax-c
However. I thought I remembered I saw the source code in digital format somewhere, but I can't readily find it.
But, I do own a programming book that has it listed ENTIRELY from p.279 to p.358, including super annoying to type hexadecimal data for some of the resources (sounds, graphics). Everything is in code, there's no need to get external files from a disk that you have to link to the project, it's all raw data! The book is "Programming C on the Macintosh" by Terry A. Ward, which I talk about a bit in my website Foray to 68000. https://mu0n.github.io/ForayInto68k/index.html
You can find a pdf of the book here:
CALL FOR HELP:
It would be cool if we could find it and put it in digital form, stored on archive.org. It's a cool little asteroid clone game, but it has worthwhile assembly routines where it has to count and a program structure in C to drive it all. It would also be fun to play around and mess with the parameters and get some variants going!
BUT WAIT, through the magic of OCR and PDFs, we can copy paste the code, barring some minimal mistakes that we correct along the way. Sample code test:
C:
main()
initialize
initgraf
initfonts
initwindows
initmenus
teinit
initdialogs
getpaintdo c
do (check menubar)
dowindowstuff
initialize
draw background
set regions
f Lush events
setupmenus
initcursor
set rectangle
set port
expandpic
update mywindow
if first invocation
initgamestuff
e x pan d_s ma L L de f
exp a nd_def
expand_bigdef
expand-ships
unload Cinitgamestuff)
do (main event Loop)
switch based on event
inmenubar: docommand
systemclick: return event record
if return value == game
game
check for primary screen
set free pointer Lists
initialize score
position ship in center of screen
initialize counters
do while (count OK and ships OK)
wait for start time
i n i t _m e t e o r s
erase_meteors
erase_fig <ship and alien ship)
erase_shots
erase_explosions
d r a w_e x p l o s i on s
draw_meteors
if (alien not present)
check for probability of occurrence
draw alien ship (random & position)