(11-02-2022, 09:48 PM)TerryRitchie Wrote:(11-02-2022, 09:31 PM)madscijr Wrote:(11-01-2022, 05:44 PM)TerryRitchie Wrote: Back in 2011 or so I wrote QB64 Space Invaders which was a sad attempt at Space Invaders. In 2013 I rewrote it to clone the original as much as possible. However, it was buggy and I never released it. I rediscovered the code recently when rewriting the tutorial web site and decided it was time to do this code justice. I completely rewrote the code and I present to you a QB64 Space Invaders game that clones the original 99%. I spent the last 3 weeks working on this (and playing WAY TOO MANY games of Space Invaders working the kinks out. Give it a whirl and let me know what you think.
The ZIP file below contains the source code and all assets (sound files and graphics). The game does create a file upon startup called "si.sav" that is used to save the game options and high score. It only contains two text lines so will never exceed 1KB in size.
You can turn the bezel image on/off, the background image on/off, resize the screen 1x, 2x, 3x, or full screen. Just like the original you can choose the number of shields (3 to 6), the extra ship score (1000 or 1500), and coin required or free play through the use of DIP switches in the options screen (just like found on the motherboard of the original arcade systems). The game is capable of playing 1 or 2 players exactly like the original was as well.
This is awesome! You have replicated the look and feel so well!
In fact, I was just thinking about Space Invaders,
and how in 2022 with these giant 1080p and 4k screens we have,
it should be updated to take advantage of that real estate (see pic).
Now, how hard would it be to tweak the code for such a thing?
It would be neat to add some simple variables to control things like:
how many invaders (rows/columns), size of invaders, # players,
and options for cooperative & head-to-head play modes, etc.
That would actually be pretty easy to do. Just increase a few array sizes, change the screen dimensions, and get rid of the hard coded "magic numbers" I used for character position on a 224x248 screen. The way the game works now is that everything is drawn to a 224x248 screen. _PUTIMAGE is then used to resize it onto a master display screen. Simply tweak that behavior and your in business.
It would be the same thing I did with Asteroids and updated it to "Widescreen Asteroids": https://www.qb64tutorial.com/games#h.o55mx5ahta14
But who in their right mind would play such a beast, LOL?
Aha, thanks! I just might give it a try after this spacewar project.
Who indeed... I was thinking it would be a fun party game.
Maybe some crazy head to head action where one team controls the invaders, and team 2 defends.
Remember Deluxe Space Invaders, where sometimes shooting one splits it in two?
That was a neat feature!
Anyway I love your work, really great quality stuff!