Author Topic: my 100% Assembly game development  (Read 1427 times)

LordAdef

  • Member
  • ***
  • Posts: 255
my 100% Assembly game development
« on: May 01, 2017, 03:22:26 PM »
I started from scratch in Assembly about 3 month ago here at the Masm32 community. As a way to learn it, I´ve been developing this 2D game.

I´ll keep updating the development history (a kind of personal Journal) in this thread from now on.

The whole thing started here if you want to catch up:
http://masm32.com/board/index.php?topic=5962.0

As usual, any help or contribution will be more than welcomed!

« Last Edit: May 02, 2017, 05:04:12 AM by LordAdef »

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #1 on: May 04, 2017, 09:18:10 AM »
Bullets, we have bullets! Infinite bullets.

Attached, only the exe. I´m still generalizing the function to apply to other actors. The bombers are already using the same bullet principal and not hard coded anymore.

Thanks to everyone that helped me with:

Quote
mov man.bullets[eax].active, TRUE

Code soon.

ps: Keys:

1: Resume game
2: Pause game
3: (for debug in console)
4: Load next level (for debug)

UP_arrow: fast speed
DOWN_arrow: slow speed
RIGHT/LEFT_arrow:  .... left/right
BACKSPACE: =====> shoot bullets!


jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7460
  • Assembler is fun ;-)
    • MasmBasic
Re: my 100% Assembly game development
« Reply #2 on: May 04, 2017, 09:39:46 AM »
It has become much faster. What did you change?

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #3 on: May 04, 2017, 10:00:01 AM »
I´m optimizing the engine.  I still have some test to try though.
Nice you noticed!

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #4 on: May 08, 2017, 07:32:37 AM »
v8.13
A quick and lousy update, exe only.

Introducing ships, helicopters and temporary rivers. Hard coded for tests. I was trying to keep animations to only 2 frames, but helicopters will have to have 3. Working on that.

Next: Submarines and artillery that will shoot back. They will be of a different class.

Hopefully it´s running ok, please let me know. This is only a test.
Cheers Alex

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7460
  • Assembler is fun ;-)
    • MasmBasic
Re: my 100% Assembly game development
« Reply #5 on: May 08, 2017, 08:22:06 AM »
Works like a charm :t

After a while, there are no new red planes or ships, though.

Next: Submarines and artillery that will shoot back. They will be of a different class

I won't test that for you, Alex. Too dangerous for my taste :bgrin:

Siekmanski

  • Member
  • *****
  • Posts: 1079
Re: my 100% Assembly game development
« Reply #6 on: May 08, 2017, 09:12:38 AM »
Works well here too.  8)

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #7 on: May 08, 2017, 09:27:16 AM »
Quote
Works like a charm :t

After a while, there are no new red planes or ships, though.

Thanks for testing JJ. Yep, I hard coded them and they only spawn at the beginning.

Quote
I won't test that for you, Alex. Too dangerous for my taste :bgrin:

Don´t worry, I might screw up the code anyway :icon_redface:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4753
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: my 100% Assembly game development
« Reply #8 on: May 08, 2017, 06:34:58 PM »
Alex,

I don't know why but it won't run on my win10 64. Tried starting it from the console but I just get a quick flash on the console title bar and nothing else.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #9 on: May 08, 2017, 07:15:37 PM »
Hutch, how about v8.12 I attached a couple of posts above?
Does it run?

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4753
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: my 100% Assembly game development
« Reply #10 on: May 08, 2017, 07:56:21 PM »
Yes, it works correctly.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

HSE

  • Member
  • ****
  • Posts: 522
  • <AMD>< 7-32>
Re: my 100% Assembly game development
« Reply #11 on: May 08, 2017, 10:57:13 PM »
The main plane suffer a lot of flickering here. (I think related with other programs cpu use)

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #12 on: May 09, 2017, 06:05:33 AM »
The main plane suffer a lot of flickering here. (I think related with other programs cpu use)

This one is rather interesting and might have a quick fix. The main plane and its bullets are being bitblt straight to the screen DC, while the others to the double buffer. This may be causing this issue in you machine.

If you don't mind, let me build a test exe so you could check that for me?

LordAdef

  • Member
  • ***
  • Posts: 255
Re: my 100% Assembly game development
« Reply #13 on: May 09, 2017, 06:27:11 AM »
Yes, it works correctly.

Thanks Hutch, this narrows the search a lot. What do you reckon could be so drastically different the prog wont run on win10, any known thing?

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7460
  • Assembler is fun ;-)
    • MasmBasic
Re: my 100% Assembly game development
« Reply #14 on: May 09, 2017, 07:07:56 AM »
Works like a charm on Win7-64, Alex. The "known thing" is that user needs feedback if required files are missing ;)