I started with console interface first, then finalized with GUI version.
It is written purely in FASM, using raw Win32 API.
Although it is in GUI, I use TextOutA function in GDI32.dll, which is just displaying text in GUI window, no graphics at the moment.
There is no collision detection yet, no scoring. What you can do with this program is:
1) Move the caret (gun) to the left or to the right
2) Shoot one bullet at one time
3) Watch the enemies moving around

For the enemies to move around, I use random number generator to predict the direction of movement.
I have included the source code here (EXE is not included as it is falsely detected as virus).
If you are interested to run the program, you can....
1) Download SHOOT.txt
2) Rename SHOOT.txt to SHOOT.asm
3) Download Flat Assembler for Windows
4) Run FASMW.EXE and open SHOOT.asm
5) Click Compile
6) Go to the File Explorer, and you'll see SHOOT.EXE along with SHOOT.asm.
Note: If you compile yourself, Windows Security won't detect this as virus. Of course, my code does nothing malicious.
But my game is still very crude, I might consider using GDI+ or SDL2 to develop my graphical version of 2D game.
Attached File(s)
SHOOT.txt ( 10.15k )
Number of downloads: 27
Feb 6 2025, 03:49 PM, updated 10 months ago
Quote

0.0197sec
0.61
6 queries
GZIP Disabled