TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Space Invaders from Scratch

212 pointsby Grieverheartalmost 7 years ago

13 comments

nils-m-holmalmost 7 years ago
Writing a Space Invaders clone is such a rewarding task! :)<p>Here&#x27;s mine (using Xlib): <a href="https:&#x2F;&#x2F;www.t3x.org&#x2F;xt3x&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;www.t3x.org&#x2F;xt3x&#x2F;index.html</a>
评论 #17168971 未加载
scottlu2almost 7 years ago
A Javascript based one: <a href="https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;2px9y0p480" rel="nofollow">https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;2px9y0p480</a>
评论 #17167626 未加载
bigiainalmost 7 years ago
Heh - I remember doing this in ascii-art on an Osbourne CP&#x2F;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...
评论 #17171587 未加载
krappalmost 7 years ago
Since everyone is showing off theirs here is my half-assed attempt: <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;kennethrapp&#x2F;spaceinvaders" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;kennethrapp&#x2F;spaceinvaders</a>
评论 #17171461 未加载
anoakiealmost 7 years ago
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:&#x2F;&#x2F;github.com&#x2F;anoakie&#x2F;siemu" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;anoakie&#x2F;siemu</a>
nyrulezalmost 7 years ago
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&#x27;t know if it even works today<p><a href="http:&#x2F;&#x2F;www.cs.northwestern.edu&#x2F;~agupta&#x2F;_projects&#x2F;space_invaders&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;www.cs.northwestern.edu&#x2F;~agupta&#x2F;_projects&#x2F;space_invad...</a>
评论 #17170125 未加载
AnotherHustleralmost 7 years ago
If you want to be OCD about it - here&#x27;s how the original arcade game worked...<p><a href="http:&#x2F;&#x2F;www.computerarcheology.com&#x2F;Arcade&#x2F;SpaceInvaders&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.computerarcheology.com&#x2F;Arcade&#x2F;SpaceInvaders&#x2F;</a>
sehuggalmost 7 years ago
Here&#x27;s my version targeted for the original 8080 hardware, in C: <a href="http:&#x2F;&#x2F;8bitworkshop.com&#x2F;v2.1.1&#x2F;?platform=mw8080bw&amp;file=game2.c" rel="nofollow">http:&#x2F;&#x2F;8bitworkshop.com&#x2F;v2.1.1&#x2F;?platform=mw8080bw&amp;file=game2...</a>
weeberalmost 7 years ago
Interresting, but the OpenGL setup is not necessary?
评论 #17167754 未加载
aquovaalmost 7 years ago
A little bit off topic, but what are the best libraries for drawing simple graphics like this? I&#x27;ve been looking into making a small graphics project and I&#x27;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&#x27;ve been looking into SDL2, as that seems relatively popular and portable, but I&#x27;m curious to see if there&#x27;s any other libraries that are recommended.
评论 #17170087 未加载
评论 #17179600 未加载
vardumpalmost 7 years ago
&quot;From scratch&quot; made me expect something like &quot;From NAND to Tetris&quot;.<p><a href="http:&#x2F;&#x2F;www.nand2tetris.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.nand2tetris.org&#x2F;</a><p>Or Space Invaders not on modern hardware, or at least on an emulated 8-bit system.
zorkw4rgalmost 7 years ago
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&#x27;t be any performance issues with rendering a single triangle, but I suppose people want to feel clever?<p><a href="https:&#x2F;&#x2F;rauwendaal.net&#x2F;2014&#x2F;06&#x2F;14&#x2F;rendering-a-screen-covering-triangle-in-opengl&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rauwendaal.net&#x2F;2014&#x2F;06&#x2F;14&#x2F;rendering-a-screen-coverin...</a>
评论 #17173829 未加载
dexterdogalmost 7 years ago
He seems to have skipped over the creation of the universe step at the beginning.
评论 #17169824 未加载
评论 #17173767 未加载