
Bootsector Game From Scratch - Space Invaders (x86 asm)
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
----------------------------------------------------------------------------------------------------------------------------------
Software used:
VMware Workstation Player: https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
openBSD: https://www.openbsd.org/
qemu: https://www.qemu.org/
vim: https://www.vim.org/
nasm (Netwide Assembler): https://nasm.us/
nasm docs: https://www.nasm.us/xdoc/2.15.05/html/nasmdoc0.html
davinci resolve: https://www.blackmagicdesign.com/products/davinciresolve/
OBS Studio: https://obsproject.com/
Peripherals:
Camera: Sony ZV-1, Elgato Camlink 4k
Microphone: Audio Technica AT2005USB
Keyboard: HHKB Pro Hybrid Type S, white/blank keycaps
Mouse: Logitech G502
Contact:
email - fuegoqueso@gmail.com
twitter - https://twitter.com/Queso_Fuego
twitch - https://www.twitch.tv/queso_fuego
Thoughts/Notes/Suggestions/Other - Drop a message in the video comments, twitter, or email
Updates for these videos and other things will be on twitter, if I remember. Maybe the YouTube channel community tab in the future, or mailing lists, if people want
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