Writing a Space Invaders clone is such a rewarding task! :)<p>Here's mine (using Xlib): <a href="https://www.t3x.org/xt3x/index.html" rel="nofollow">https://www.t3x.org/xt3x/index.html</a>
A Javascript based one: <a href="https://codesandbox.io/s/2px9y0p480" rel="nofollow">https://codesandbox.io/s/2px9y0p480</a>
Heh - I remember doing this in ascii-art on an Osbourne CP/M machine, first in Basic and later in Z80 assembler. I used the wiring diagram in the owner manual (!!!) to work out how to make a joystick I could plug into the parallel port. I was maybe 13 at the time...
Since everyone is showing off theirs here is my half-assed attempt:
<a href="https://bitbucket.org/kennethrapp/spaceinvaders" rel="nofollow">https://bitbucket.org/kennethrapp/spaceinvaders</a>
I implemented Space Invaders from scratch, but in a roundabout way... By writing a well documented 8080a emulator that can play dumps of the arcade roms: <a href="https://github.com/anoakie/siemu" rel="nofollow">https://github.com/anoakie/siemu</a>
This brings back some fond memories. I once made a 3D OpenGL clone of space invaders for a graphics course (Windows only). It made a bunch of changes and was actually playable and reasonably challenging...don't know if it even works today<p><a href="http://www.cs.northwestern.edu/~agupta/_projects/space_invaders/index.html" rel="nofollow">http://www.cs.northwestern.edu/~agupta/_projects/space_invad...</a>
If you want to be OCD about it - here's how the original arcade game worked...<p><a href="http://www.computerarcheology.com/Arcade/SpaceInvaders/" rel="nofollow">http://www.computerarcheology.com/Arcade/SpaceInvaders/</a>
Here's my version targeted for the original 8080 hardware, in C: <a href="http://8bitworkshop.com/v2.1.1/?platform=mw8080bw&file=game2.c" rel="nofollow">http://8bitworkshop.com/v2.1.1/?platform=mw8080bw&file=game2...</a>
A little bit off topic, but what are the best libraries for drawing simple graphics like this? I've been looking into making a small graphics project and I'm not sure which is the best to use. It only needs to draw basic shapes like ellipses, or rectangles, or just specific pixels. I've been looking into SDL2, as that seems relatively popular and portable, but I'm curious to see if there's any other libraries that are recommended.
"From scratch" made me expect something like "From NAND to Tetris".<p><a href="http://www.nand2tetris.org/" rel="nofollow">http://www.nand2tetris.org/</a><p>Or Space Invaders not on modern hardware, or at least on an emulated 8-bit system.
now that unreadable shader trick might be neat and all, but since GLSL supports if statements why not use this and make it readable? There certainly won't be any performance issues with rendering a single triangle, but I suppose people want to feel clever?<p><a href="https://rauwendaal.net/2014/06/14/rendering-a-screen-covering-triangle-in-opengl/" rel="nofollow">https://rauwendaal.net/2014/06/14/rendering-a-screen-coverin...</a>