MENU

Fun & Interesting

Bootsector Game From Scratch - Space Invaders (x86 asm)

Queso Fuego 16,945 lượt xem 3 years ago
Video Not Working? Fix It Now

Making a simple space invaders ish level in 16bit real mode x86 assembly, in 512 bytes or less. I try to explain every line of code, so it takes a while.
Bootsector games playlist: https://www.youtube.com/playlist?list=PLT7NbkyNWaqY2dX7E744Ar2Bd-mFOrBnW

Source code for this game:
https://git.sr.ht/~queso_fuego/bootsector_games/tree/master/item/space_invaders

Let me know any bootsector games or programs you'd like to see!
Current ones on the list, if possible: Centipede, tetris, breakout, and asteroids

Disclaimer:
- Ideas/techniques/inspirations for this came from Oscar Toledo's work on bootsector programs like nanochess, or for this video, invaders:
https://github.com/nanochess/Invaders.
I bought his 2 books on bootsector programming, which contain commented source code listings and explanations for several real mode bootsector programs. If that sounds interesting, consider his site for more details: https://nanochess.org/ and look at some of Mr. Toledo's github for more bootsector goodness: https://github.com/nanochess/

This isn't a sponsor or anything, but I want to acknowledge his work as this video would not have happened without it.

Outline:
0:00 - Intro
2:08 - Create file and boot
9:22 - Set video mode, draw single color
16:20 - Single tick delay timer & test
24:07 - Sprites & constants
40:06 - Set initial variable values
48:20 - Draw aliens/draw sprite functions
1:17:58 - Draw player and barriers
1:26:01 - Check if shot hit barrier
1:41:54 - Get player input
1:49:44 - Draw shots
1:56:37 - Check if shot hit alien
2:08:28 - Create alien shots
2:19:00 - Move aliens
2:28:59 - Finished game & Outro

----------------------------------------------------------------------------------------------------------------------------------

Git repo for this project and other bootsector games:
https://codeberg.org/queso_fuego/bootsector-games

Contact:
https://queso_fuego.codeberg.page/contact.html

Support:
https://queso_fuego.codeberg.page/support.html

Questions about setup/software/etc.?
Check the FAQ: https://queso_fuego.srht.site/about.html

Credits:
Music from https://incompetech.com:
"Your Call" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/

The blue title tags:
#x86 #gamedev #assembly

Comment