The MASM Forum

Projects => Game Development => Topic started by: LordAdef on May 01, 2017, 03:22:26 PM

Title: my 100% Assembly game development
Post by: LordAdef 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 (http://masm32.com/board/index.php?topic=5962.0)

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

Title: Re: my 100% Assembly game development
Post by: LordAdef 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:

Quotemov 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!

Title: Re: my 100% Assembly game development
Post by: jj2007 on May 04, 2017, 09:39:46 AM
It has become much faster. What did you change?
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 04, 2017, 10:00:01 AM
I´m optimizing the engine.  I still have some test to try though.
Nice you noticed!
Title: Re: my 100% Assembly game development
Post by: LordAdef 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
Title: Re: my 100% Assembly game development
Post by: jj2007 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.

Quote from: LordAdef on May 08, 2017, 07:32:37 AMNext: 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:
Title: Re: my 100% Assembly game development
Post by: Siekmanski on May 08, 2017, 09:12:38 AM
Works well here too.  8)
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 08, 2017, 09:27:16 AM
QuoteWorks 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.

QuoteI 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:
Title: Re: my 100% Assembly game development
Post by: hutch-- 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.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 08, 2017, 07:15:37 PM
Hutch, how about v8.12 I attached a couple of posts above?
Does it run?
Title: Re: my 100% Assembly game development
Post by: hutch-- on May 08, 2017, 07:56:21 PM
Yes, it works correctly.
Title: Re: my 100% Assembly game development
Post by: HSE 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)
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 06:05:33 AM
Quote from: HSE 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)

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?
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 06:27:11 AM
Quote from: hutch-- on May 08, 2017, 07:56:21 PM
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?
Title: Re: my 100% Assembly game development
Post by: jj2007 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 ;)
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 08:15:53 AM
QuoteThe "known thing" is that user needs feedback if required files are missing ;)

Indeed, I only sent the exe.

Hutch, just in case, I attached the Main_v8.13 with the other files.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 08:33:47 AM
This one is a solely a test, since HSE found the main plane flickering.

There are 2 planes, can you see any difference in flickering?

The plane on the left is the current one
The one on the right is bitblited to the double buffer instead.

I sense this may solve HSE´s issue, let´s see. I´m curious
Title: Re: my 100% Assembly game development
Post by: Siekmanski on May 09, 2017, 08:42:03 AM
Hi Alex,

The right one doesn't flicker but the left one does.
The ABt text also flickers.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 08:56:25 AM
Quote from: Siekmanski on May 09, 2017, 08:42:03 AM
Hi Alex,

The right one doesn't flicker but the left one does.
The ABt text also flickers.

Interesting... here at my machines they look the same. Doing the plane and bullets to the screen would save me some instructions... but this test shows that I must move them to the back buffer and keep them all tight there.

Thanks Marinus

ps: I forgot to clean that ABt from the UI. It´s a really cool feature I´m testing, but not just for me! I´ll post that idea separately soon (it´s going to useful for us too...)
Title: Re: my 100% Assembly game development
Post by: anunitu on May 09, 2017, 10:53:10 AM
I applaud you for doing a game in assembler. I have always heard it is very difficult,but I think it is just you need to be more exact in your programming. I think higher level languages allow a programmer to be less exact and may encourage less stringent methods.

Go for it!!!!   
Title: Re: my 100% Assembly game development
Post by: HSE on May 09, 2017, 11:45:22 AM
Ja, Ja. Fantastic!!

right perfect :t

left flickering. An interesting effect, look like flying under terrain.

Letters ABt also flickering.
Title: Re: my 100% Assembly game development
Post by: hutch-- on May 09, 2017, 12:08:23 PM
Hi Alex,

The version posted in Reply #15 work fine.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 05:14:39 PM
HSE,

Thanks again mate. Since it´s not flickering here, I would never know. But I´m glad I quickly spotted the solution, I might be turning into Noob level 2, in the Noob Richter Scale

Hutch,
QuoteThe version posted in Reply #15 work fine.
Thanks and it was my fault.

Anunitu,
QuoteI applaud you for doing a game in assembler. I have always heard it is very difficult,but I think it is just you need to be more exact in your programming. I think higher level languages allow a programmer to be less exact and may encourage less stringent methods.

Glad to see you here!
It´s harder on me, since I´m too new to Assembly. A game with levels as I´m making imposes extra difficulties too.
Well, it´s a bit harder. But it´s doable and I´m up for the task. Obviously I´m having the support of you guys, otherwise I would be stuck far behind. Game is a big world. If I can finish this one (and I will) I will be proud and, if people play it, we may say "see, it´s fast, it´s small, it´s all made in Assembly by someone who just started... so let´s bring asm back to the table asap please!".. or something similar.
Title: Re: my 100% Assembly game development
Post by: anunitu on May 09, 2017, 06:50:18 PM
Many of the early games on Nintindo were done in assembler,one reason was less memory and attempting to get every last advantage from those early chips. Some people are still active programming for those old chips,creating new games for the emulators.

See here.
https://www.gamedev.net/topic/343677-what-were-snes-games-programmed-in/ (https://www.gamedev.net/topic/343677-what-were-snes-games-programmed-in/)
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 09, 2017, 07:08:49 PM
Quote from: anunitu on May 09, 2017, 06:50:18 PM
Many of the early games on Nintindo were done in assembler,one reason was less memory and attempting to get every last advantage from those early chips. Some people are still active programming for those old chips,creating new games for the emulators.

See here.
https://www.gamedev.net/topic/343677-what-were-snes-games-programmed-in/ (https://www.gamedev.net/topic/343677-what-were-snes-games-programmed-in/)

And many others indeed. I was actually referring to main stream game programming. But you are right, there are many things coming back like chiptunes, arcade games and so on. I like that
Title: Re: my 100% Assembly game development
Post by: jj2007 on May 09, 2017, 09:02:30 PM
Dunny does a good job on SpecBas (http://retrogamecoding.org/board/index.php?topic=575.0). My first "real" computer was a Spectrum :P
Title: Re: my 100% Assembly game development
Post by: anunitu on May 09, 2017, 11:57:30 PM
I started my journey into assembler on a C64,and the 6502 chip. Then I saved enough to by an IBM box,and started on MASM.  Back in the late 80's
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 10, 2017, 04:45:42 AM
Quote from: jj2007 on May 09, 2017, 09:02:30 PM
Dunny does a good job on SpecBas (http://retrogamecoding.org/board/index.php?topic=575.0). My first "real" computer was a Spectrum :P

Funny, I've started with my father's trs-80 but the first I owned was a computer called TK85, a brazilian machine of the zx Spectrum class, rubber keys etc...
Title: Re: my 100% Assembly game development
Post by: hutch-- on May 10, 2017, 01:53:55 PM
Apart from a HP 11C calculator, the first computer I played with was a z80 in a military style metal case where the lid contained the keyboard. Was busy running a business so I never got a chance to play with it much which was a blessing because when I started on x86 PCs, I did not have pre-conceived ideas about what it should do. Has a 286 for a month before I built a DX486 and its been one toy after another up to the current boat anchor.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 16, 2017, 06:27:40 PM
Hi guys,

I spent 3 days with this fantastic OOP-ish idea with incredibly Avant-garde design  :dazzled: (for submarine bullets)...
...After nearly killing myself 3 times... I got it right, in a simpler way, in 2 hours. Why do we complicate things?

Now, submarines in game. If you face them they will shoot you back.
Would you test it for me? Exe only, There is a big mess to clean up now  :badgrin:

We are getting there... Now artillery.

Cheers
Alex
Title: Re: my 100% Assembly game development
Post by: hutch-- on May 16, 2017, 07:32:28 PM
Alex,

Works fine here. Is the artillery when you press the space bar ?
Title: Re: my 100% Assembly game development
Post by: Siekmanski on May 16, 2017, 08:21:17 PM
 :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 16, 2017, 09:03:22 PM
Quote from: hutch-- on May 16, 2017, 07:32:28 PM
Alex,

Works fine here. Is the artillery when you press the space bar ?

I mean something like tanks, that will shoot back. Using the same code as subs, but static on land.

Then I have those river patrols as the original game, although I'm far away from the original River Raid, I'm trying to stick to some of the original features.

I'll add constructions later on, something like bridges..
Title: Re: my 100% Assembly game development
Post by: jj2007 on May 16, 2017, 09:23:54 PM
Quote from: LordAdef on May 16, 2017, 06:27:40 PM
We are getting there... Now artillery.

Works fine, but I couldn't sink the ship :(
Title: Re: my 100% Assembly game development
Post by: HSE on May 16, 2017, 11:23:57 PM
Hi Alex!

Subs travel across terrain!!
Title: Re: my 100% Assembly game development
Post by: anunitu on May 17, 2017, 12:27:53 AM
I always loved that game,"River raid",was one of my favorites on the C64....

Also this game,"Raptor,call of the shadows"
(http://hellopcgames.com/wp-content/uploads/2016/02/Raptor-Call-Of-The-Shadows-Game-Picture.png)
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 17, 2017, 01:57:08 AM
QuoteWorks fine, but I couldn't sink the ship :(

QuoteSubs travel across terrain!!

These bastards, we must teach them everything!
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 17, 2017, 01:59:53 AM
QuoteI always loved that game,"River raid",was one of my favorites on the C64....

Me too!
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 30, 2017, 05:13:09 AM
Hi guys,

Busy week at work and couldn´t progress much in the game.

I´ve implemented artillery though (tanks). Now it´s time to 1) create macros to place the actors in game 2) clean the mess

Exe attached.

Please let me know if it works ok.

ps: Good news: I might already have 2 blokes on board to do graphics and soundtrack!

Cheers
Alex
Title: Re: my 100% Assembly game development
Post by: hutch-- on May 30, 2017, 09:19:26 PM
 :biggrin:

Put a volume control on the sound track, DOOM used to drive me NUTZ with the noise so I always turned the noise either down or OFF.  :P
Title: Re: my 100% Assembly game development
Post by: jj2007 on May 30, 2017, 09:40:16 PM
Quote from: LordAdef on May 30, 2017, 05:13:09 AMPlease let me know if it works ok.

It works fine, but I am a bit worried about my plane: It seems immune against all kind of attacks ::)
Title: Re: my 100% Assembly game development
Post by: Siekmanski on May 30, 2017, 09:59:39 PM
Works fine.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 31, 2017, 06:36:41 AM
Quote from: hutch-- on May 30, 2017, 09:19:26 PM
:biggrin:

Put a volume control on the sound track, DOOM used to drive me NUTZ with the noise so I always turned the noise either down or OFF.  :P

Sure!

I am going to be using Marinus audio library for the game!!!!
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 31, 2017, 06:59:09 AM
Quote from: jj2007 on May 30, 2017, 09:40:16 PM
Quote from: LordAdef on May 30, 2017, 05:13:09 AMPlease let me know if it works ok.

It works fine, but I am a bit worried about my plane: It seems immune against all kind of attacks ::)

I'm leaving collision detection for later on  :eusa_dance:
Title: Re: my 100% Assembly game development
Post by: LordAdef on June 01, 2017, 10:06:42 AM
Hi,

In order to populate the maps I built a couple of macros. It made life a lot easier.
So I tested the limits and filled the map with items so to taste the waters. I´m glad I did, I realized I undersized my arrays and also spot 1 bug related to a sdword. Easy stuff. The code is rather consistent.

I´m a bit worried about the excessive use of these macros though. It takes a lot to fill a single map. Although I´m not worried about the exe size, I wonder if cache may be compromised somehow.

Anyway, Here is a version with badguys spawning all over the map 1. Collision Detection is off so you can fly over terrain too (this is how I spot the bug).

I loved doing this step. I gives me a lot of ideas for game playing and designing. This may in fact become a fun game to play.
BTW, comments and suggesting are very well welcomed
Cheers
Alex
Title: Re: my 100% Assembly game development
Post by: Siekmanski on June 01, 2017, 11:04:49 AM
 :t
Title: Re: my 100% Assembly game development
Post by: jj2007 on June 01, 2017, 05:10:02 PM
Perfect :t

Now the next step, collision detection: Keep track of all the bullets that you are firing ;)
Title: Re: my 100% Assembly game development
Post by: jiucenglou on July 15, 2017, 11:31:34 PM
Excellent !! Hats off to you ! :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on November 07, 2017, 05:50:06 AM
Quote from: jiucenglou on July 15, 2017, 11:31:34 PM
Excellent !! Hats off to you ! :t

Thanks!

I'm back and soon resuming the development!
Title: Re: my 100% Assembly game development
Post by: anunitu on November 07, 2017, 09:10:02 AM
glad to kear you are on the game still.
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 12, 2017, 06:07:02 AM
I´m glad too!

I didn´t realised how much I was missing masm!

So, slowly coming back. Glad I could easily find myself around the code without much effort, which is a good sign.

New version attached. Collision detection: Now bullets kill you, and crashing onto enemies kill you too (though the code needs some polishing).
... But it still cannot kill anyone though... => next step

Alex
Title: Re: my 100% Assembly game development
Post by: HSE on December 12, 2017, 11:02:49 AM
Impresive  :t

Title: Re: my 100% Assembly game development
Post by: LordAdef on December 18, 2017, 01:47:33 PM
Quote from: HSE on December 12, 2017, 11:02:49 AM
Impresive  :t

Thanks my friend!
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 18, 2017, 01:55:36 PM
version v8.141

Family away, weekend only for Masm!!!

A new version. Finally something to shoot and kill, and with explosions already in place and working. It´s actually happening quite nicely. You also now earn points for killing the flying bastards.

For testing purposes I disabled most of the collision detection codes. So you may try and have some fun shooting the moving things only (the others are still due to be coded, they belong to a different class)

JJ, would you give me a quick friendly help?
I do know I have something wrong (that´s why the first flying guy from the left looks drunk  :dazzled:)
There is a warning when I build it. It´s assuming something is a Byte. I cannot see what it is... Built with Richmasm, of course.

I´m getting there!
I hope it works for you guys
Title: Re: my 100% Assembly game development
Post by: jj2007 on December 18, 2017, 06:49:22 PM
Quote from: LordAdef on December 18, 2017, 01:55:36 PMThere is a warning when I build it. It´s assuming something is a Byte. I cannot see what it is... Built with Richmasm, of course.

      mov man.bullets[eax].????, FALSE   ; Which element of the structure???
      mov gm.badguys[esi].active, FALSE   ; This tells the assembler which element you mean

Btw: Impressive, this is getting professional :t

P.S.: I see you make good use of the bookmarks feature. Which is the last one you see? For me, it's ------- SHOW EXPLOSIONS -----
There is a limited number, of course. To see the lower ones again, hold Ctrl and click on upper bookmarks that you don't need any more.
Title: Re: my 100% Assembly game development
Post by: felipe on December 19, 2017, 06:30:32 AM
Quote from: LordAdef on December 12, 2017, 06:07:02 AM

New version attached. Collision detection: Now bullets kill you, and crashing onto enemies kill you too...


This version crashed, in an espectacular way, in my system (The whole system collapsed by a moment).  :biggrin:
Maybe because i was using youtube too and listening music? Maybe too little RAM in the pc for it?  :redface:
It happened after a little time i started to play.  :icon_exclaim:

But looks nice!  :icon14: I guess it will be good to a big game like this to include some basic setting's detection in the pc of the players to see if they can play (requirements to play) and also to adjust the window to the screen. I actually use a netbook and the window don't fit too well in the screen.
Thanks for sharing some code  :t, i will check it and i will try the new version that you attached too.  :icon14:
Title: Re: my 100% Assembly game development
Post by: felipe on December 19, 2017, 06:59:04 AM
I found this macro in one include file (stuff.inc) of the version 814:


RGB macro red,green,blue
           xor eax,eax
           shl eax,8
           mov ah,green
           mov al,red
endm


Check that, is not well defined (only a suggestion btw  :icon_mrgreen:).

:icon14:
Title: Re: my 100% Assembly game development
Post by: felipe on December 19, 2017, 07:22:50 AM
From the same file (stuff.inc):


mUnroll9lines MACRO
; 9 lines combo
      invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
endm


Unless you want to use the CF it would be better to use INC edi (just a suggestion).   :icon14:
Btw if you don't want more suggestion from me i can shut up with no problem.  :greensml:
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 19, 2017, 01:04:52 PM
Hey JJ, THANKS!!

Quotemov man.bullets[eax].????, FALSE   ; Which element of the structure???
      mov gm.badguys[esi].active, FALSE   ; This tells the assembler which element you mean

How did you find it, Olly? It´s amazing it even built! Yep, missing the "active" element

QuoteBtw: Impressive, this is getting professional :t
I´m flattered! Cheers

QuoteP.S.: I see you make good use of the bookmarks feature. Which is the last one you see? For me, it's ------- SHOW EXPLOSIONS -----
There is a limited number, of course. To see the lower ones again, hold Ctrl and click on upper bookmarks that you don't need any more.

I heavily rely on Bookmarks!!! It´s a great feature and I already use the Ctrl-Click. -- SHOW EXPLOSIONS ----- was indeed my latest one
You should make it infinite! :badgrin: :badgrin:
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 19, 2017, 01:11:40 PM
Hi Felipe,

QuoteThis version crashed, in an espectacular way, in my system (The whole system collapsed by a moment).  :biggrin:
Maybe because i was using youtube too and listening music? Maybe too little RAM in the pc for it?  :redface:
It happened after a little time i started to play.  :icon_exclaim:

Would please tell your specs? The program is CPU intensive but not memory intensive.
Funny, It should run without any issue. Would you try it without the youtube + music playing and see if it holds?

QuoteBut looks nice!  :icon14: I guess it will be good to a big game like this to include some basic setting's detection in the pc of the players to see if they can play (requirements to play) and also to adjust the window to the screen. I actually use a netbook and the window don't fit too well in the screen.
Thanks for sharing some code  :t, i will check it and i will try the new version that you attached too.  :icon14:

Thanks, I´ll make a note of your suggestions. I´m not familiar if netbooks at all. What´s your screen resolution?
Title: Re: my 100% Assembly game development
Post by: felipe on December 19, 2017, 01:26:20 PM
Quote from: LordAdef on December 19, 2017, 01:11:40 PM
Would you try it without the youtube + music playing and see if it holds?

I will do it and with the latest version.  :icon14: (btw i was listening music from youtube  :bgrin:).

Quote from: LordAdef on December 19, 2017, 01:11:40 PM
What´s your screen resolution?

Less than 1200 x 900
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 19, 2017, 01:42:46 PM
Hi Felipe,
QuoteUnless you want to use the CF it would be better to use INC edi (just a suggestion).   :icon14:

This is definitely a very controversial subject Felipe, and there are already loads of open debates about it (including Hutch vs Johen  ::))

Intel actually recommends ADD over INC for performance. Others disagree and my guess is "depends".
Hutch is in favour of ADD. JJ is in favour of INC. Wait and see..

That´s my main game loop, and I need performance. ADD, regardless of the debate, seems to be faster in more modern systems.
I made the choice for ADD following the performance suggestion made by the Intel manual (and Hutch).

I hope that clarifies my option and thank you for raising the subject.

You will surely find this subject here at our forum, with benchmarks, etc..

An interesting read:
http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=4662.0 (http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=4662.0)



QuoteBtw if you don't want more suggestion from me i can shut up with no problem.  :greensml:
Don´t worry, I never mind constructive suggestions. That´s how we learn or double-check things! Just bare in mind that my code is not optimized yet, so you may bump into something I´m still going to change.
But There are already very optimized code in there. If you want, check "decomp.asm". It´s very fast and efficient. Although it´s my algo, credit must be given to our friends here, who helped me optimizing it.

Cheers Alex
Title: Re: my 100% Assembly game development
Post by: felipe on December 19, 2017, 01:56:10 PM
I have tried the last version (without doing anything else with the pc) and didn't crashed.  :icon14:
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 19, 2017, 02:01:52 PM
Quote from: felipe on December 19, 2017, 01:56:10 PM
I have tried the last version (without doing anything else with the pc) and didn't crashed.  :icon14:
Great!!
Title: Re: my 100% Assembly game development
Post by: LordAdef on December 19, 2017, 04:03:00 PM
v8.15

I´ve corrected the missing element and my "drunk badguy" bug. It was an out of boundary array loop....

Now, everything can be shot dead. To be more fun, all collisions detection are on. It´s quite tough!

Title: Re: my 100% Assembly game development
Post by: LordAdef on January 04, 2018, 05:58:21 AM
Small update: v1.853

Gas Pump: fill tank
New assets: civilian cars, bridge
Bonus: reach the bonus point and earn an extra life
Small game logic tweaks, and small bug corrections

ps: Terrain collision detection off.

This time, exe (plus 3 lib files) only.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 20, 2018, 08:20:05 AM
v8.16:

Many overall code changes.
. Main loop engine completely rewritten, with substantial gain in performance. I got rid of those slow textOut and build two buffers. A lot fasters (code is commented, in PAINT btw)

. Changes in the game flow control
. Fixed man´s own explosion
. Now, when man is dead, animation continues
. Acceleration has been improved and now has some kinetics (still in development) (try it , it can go reaaally fast)
. Civilian vehicles you shouldn´t kill

this build has some new easy-to-fix bugs, due to the new engine implementation/ flow control.

GUI should be a lot smoother now
Title: Re: my 100% Assembly game development
Post by: HSE on January 20, 2018, 11:20:53 AM
Yes, faster to kill me  :biggrin:   :t
Title: Re: my 100% Assembly game development
Post by: jj2007 on January 20, 2018, 12:39:46 PM
Yes indeed, it has become challenging :badgrin:

Over 3,000 lines of code, this has become a nice project :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 20, 2018, 01:03:17 PM
Thanks HSE and JJ,

Yes! I´m having a lot of fun with it. Remember I started learning MASM from scratch, here with you... I know I´m still a noob, but I´m persistent  :biggrin:


BTW, I needed to add a font to my resource so I could use it without installing it into the user´s pc.
But I don´t know how to do it. I couldn´t find how. I guess I´m trying in a way to get rid of the homework.....  You would give this friend a little help ??
Title: Re: my 100% Assembly game development
Post by: Siekmanski on January 20, 2018, 03:13:56 PM
Very cool.  :t
I've never been killed that many times in such a short period.  :badgrin:
Title: Re: my 100% Assembly game development
Post by: jj2007 on January 20, 2018, 07:30:56 PM
Quote from: LordAdef on January 20, 2018, 01:03:17 PMI needed to add a font to my resource so I could use it without installing it into the user´s pc.

You can always embed a font file in the resources. Little example:

include \masm32\MasmBasic\MasmBasic.inc         ; download (http://masm32.com/board/index.php?topic=94.0)
  Init
  If_ Not Exist("MsgBox.exe") Then FileWrite "MsgBox.exe", res:77       ; extract a file from RCDATA resource #77
  Launch "MsgBox.exe"
EndOfCode

Rsrc
#include "resource.h"
IDI_APPLICATION ICON    "\\Masm32\\MasmBasic\\icons\\Smiley.ico"        // Calc, Disk, Editor, Eye, Globe, MasmBasic, Smiley
01 RT_MANIFEST         "\\Masm32\\MasmBasic\\Res\\XpManifest.xml"
77 RCDATA      "MsgBox.exe"
Rsrc

Title: Re: my 100% Assembly game development
Post by: aw27 on January 20, 2018, 10:42:37 PM
I have never been good at playing games, but would like to know the reason I can't get more than this?!

(http://www.atelierweb.com/b/game.jpg)
PS: I pressed 1 to start. I unzipped creating a folder with an assets subfolder.
Title: Re: my 100% Assembly game development
Post by: HSE on January 21, 2018, 03:17:17 AM
the other 1.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 21, 2018, 06:21:04 AM
hi aw27,

well, thanks for the feedback! what's your Windows?

BTW, all you need is the .exe file plus the 3 .dat files (L1, L2, L3). everything else is already withing the exe.

unless you're pressing the wrong "1" , there is something wrong here...

would you please try the previous version and let me know? It's one post earlier.

Cheers
Title: Re: my 100% Assembly game development
Post by: mabdelouahab on January 21, 2018, 06:24:38 AM
Quote from: aw27 on January 20, 2018, 10:42:37 PM
I have never been good at playing games, but would like to know the reason I can't get more than this?!

me too  :(

(https://gdurl.com/AWCj)
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 21, 2018, 06:28:52 AM
Quote from: mabdelouahab on January 21, 2018, 06:24:38 AM
Quote from: aw27 on January 20, 2018, 10:42:37 PM
I have never been good at playing games, but would like to know the reason I can't get more than this?!

me too  :(


hi, wow!

what Windows is this? It didn't even find the fonts (which are basic ones... Arial etc)?!?
Title: Re: my 100% Assembly game development
Post by: mabdelouahab on January 21, 2018, 06:40:41 AM
Quote from: LordAdef on January 21, 2018, 06:28:52 AM
what Windows is this? It didn't even find the fonts (which are basic ones... Arial etc)?!?
Windows 8.1 Enterprise 64Bit Arabic
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 21, 2018, 06:46:08 AM
http://masm32.com/board/index.php?topic=6200.msg73104#msg73104

Thanks! would you help me pinpoint the issues? this post above has a previous build (version 8.153) . would you try it and see if it works? This way I may know if it's something with my re-coding, or if the problem was already there.

The font thing is funny. You do have Arial font installed, don't you?

Title: Re: my 100% Assembly game development
Post by: mabdelouahab on January 21, 2018, 07:04:44 AM
I tried the v8.15, V8.153, V8.16 and I have the Arial font, but the same problem appears, same funny font.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 21, 2018, 07:11:42 AM
Quote from: mabdelouahab on January 21, 2018, 07:04:44 AM
I tried the v8.15, V8.153, V8.16 and I have the Arial font, but the same problem appears, same funny font.

I imagined you had the fonts. none of the above builds work.... ok... research time......
Thank you so much for the feedback.

So basically, I am bumping into something different between Win 7 and Win 8. The font thing is really funny cause it's a simple procedure... Possibly some suicidal code. I'll start by pushing/ preserving ABi convention stuff

let's see.
Title: Re: my 100% Assembly game development
Post by: aw27 on January 21, 2018, 03:46:11 PM
hi LordAdef,

It does not work on my Windows 10 Pro notebook, it works on Windows 7.
This may have to do with the switch from Intel Graphics card to NVidia card. I will check that, may be I need to add the game to the list on the NVidia.
Title: Re: my 100% Assembly game development
Post by: aw27 on January 21, 2018, 10:19:43 PM
I don't think it has anything to do with adding the game to NVidia list.
I tested in another notebook, this with nearly 3 years old and different hardware and with Windows 10 Home and had the same problem.
However I tested in Windows XP running from a virtual machine on the Windows 10 pro and it run well.

The problem happens in all releases I found in the thread since December.

I had a quick look at your code and did not find anything really abnormal, although I had to use an old release of MASM (10.xx) to build it due to the MASM SDWORD PTR bug on HLL compares, mentioned here http://masm32.com/board/index.php?topic=6732.0.
Title: Re: my 100% Assembly game development
Post by: jj2007 on January 22, 2018, 12:11:36 AM
For the attached debug version, I get this sequence on Win10:Line 1798: Handle non valido.
Line 1804: Handle non valido.
Line 1828: Handle non valido.
Line 1849: Handle non valido.
Line 1930: Handle non valido.
Line 1968: Handle non valido.
Line 1997: Handle non valido.
Line 1998: Handle non valido.
Line 2005: Handle non valido.


EDIT: NEW VERSION, the old one was not working. Check CreateCompatibleDC in stuff.inc, it seems to fail for the hBufferDC section:

** this is line 1636 hBufferDC **
** this is line 1636 hPreBufferDC **
** this is line 1636 hManDC **
** this is line 1636 LoadBitmap **
** this is line 1636 hManCrashDC **
** this is line 1637 after mCreateDC **

Unfortunately, this is in an external module, stuff.inc, so the macro cannot know the exact line. Both MASM and UAsm do not provide correct @Line when such things hang around in include files. Better to integrate them into the main source... I know C/C++ programmers are being taught to split everything in tiny little modules, but a) that was good advice when computers were really slow, b) it makes debugging very difficult, and c) it's not good advice if your editor has bookmarks and a powerful little listbox ;-)

Attached a version trying to guess the exact line with the ShowThisLine macro. No extra code generated, it's just echos.
P.S.: Just saw this:
   Print Str$("withinPixel: hBufferDC=%i\n", hBufferDC)
   inc gDebugCt  ; <<<< needed for the versions that work
Title: Re: my 100% Assembly game development
Post by: aw27 on January 22, 2018, 12:12:13 AM
  .IF uMsg==WM_CREATE
   ; Insert these to make it work
      invoke BeginPaint, hWnd, ADDR ps
      mov edi, eax
      mov  hdc, edi
      

PS: I got this from the hint provide by JJ  :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 22, 2018, 03:07:17 AM
hi guys,

It's a macro, which I placed outside the main file. Aw7 got it right, it's being used there after WM_CREATE

Aw7, please clarify me: you insert something there and it worked?

Title: Re: my 100% Assembly game development
Post by: aw27 on January 22, 2018, 03:47:24 AM
I inserted what I mentioned, because it was not there.  :biggrin:
So hdc was indefined, and what surprises me is that it worked with some OS.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 22, 2018, 03:51:30 AM
Thanks!

Wow, but it should be there indeed! that's why I asked you. I could swear it was there.....
Title: Re: my 100% Assembly game development
Post by: jj2007 on January 22, 2018, 04:09:49 AM
Quote from: LordAdef on January 22, 2018, 03:51:30 AMWow, but it should be there indeed! that's why I asked you. I could swear it was there.....

It is there, but a few lines further down. Still, the only change that I see on Win10 (and Win7) is that I can see the gauge now. And I don't have access to the Win10 machine right now...
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 22, 2018, 05:56:16 AM
Hey, I couldn´t resist... Before solving these issues I made some drafts for two new cool Controls. Version attached is a work in progress only, only to show it.

Fuel Tank Gauge:

I used the algo kindly created by Marinus (Thanks my Friend) to move the needle.
For the needle I´m using the "line" command from masm32. Unfortunately, "line" doesn´t set a line width, so I´m going to have to shape that needle by code.

Marinus algo:

QuotepCalculateGauge proc Xpos:DWORD,Ypos:DWORD, Radius:DWORD, Angle:DWORD
   ; -------------------------------------------------------------------------------------------
   ;     This procedure was created by Marinus Siekmanski
   ; -------------------------------------------------------------------------------------------
   
    fild    Angle ; in degrees
    fmul    RotationMagic
    fsincos

    fimul   Radius
    fchs
    fiadd   Ypos
    fistp   dword ptr [esp-8]
    fimul   Radius
    fiadd   Xpos
    fistp   dword ptr [esp-4]
    mov     eax,dword ptr [esp-4]   ; New_X
    mov     ecx,dword ptr [esp-8]   ; New_Y
    ret
pCalculateGauge endp



MiniMap overview:

Still working on it. The Minimap is created on the fly using SetPixels (only setting the blue pixels). It is going to show our airplane current position. I think it´s cool  :dazzled:
Title: Re: my 100% Assembly game development
Post by: Siekmanski on January 22, 2018, 06:44:58 AM
It fails to run on my machine.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 22, 2018, 06:46:38 AM
Oh god... time to stop and clean the house.. Thanks Marinus, I wanted you to see the Gauge in action


edit to add: I think I got it... Would you guys try and see what happens? CONTROL_test2 (someone downloaded it but I changed it again)
Title: Re: my 100% Assembly game development
Post by: daydreamer on January 22, 2018, 08:46:10 PM
cool thread
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 22, 2018, 08:55:22 PM
Bugs sorted out. At least it's running on Win10.
Post it later today.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 23, 2018, 07:38:51 AM
Quote from: daydreamer2 on January 22, 2018, 08:46:10 PM
cool thread

Thanks for hanging out DDreamer!

The main reason I'm keeping this as a journal is to serve as a guide for newbies like me, who may het something good out of this project of mine. The more gurus around the better.
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 23, 2018, 01:33:04 PM
So, This is a working version, tested on my win7 and win10. hopefully it will also work in win8.

It shows the Fuel gauge with a working needle (still visually awful though). As I mentioned, it uses Marinus´FPU code.
It also shows the beginning of what will become a minimap control.

Please let me know guys, please.
Fingers crossed for win8!

ps: I´m amazed I could even run it in win7...... I made a series of bad mistakes, including an out of boundery byte manipulation, and not preserving EDI. These were the main issues there
Title: Re: my 100% Assembly game development
Post by: jj2007 on January 23, 2018, 02:53:04 PM
Works great on Win7 :t
Title: Re: my 100% Assembly game development
Post by: mabdelouahab on January 23, 2018, 04:38:53 PM
Works well in win 8.1, :t
but the same funny font appears. :(
Title: Re: my 100% Assembly game development
Post by: LordAdef on January 23, 2018, 04:55:13 PM
Quote from: mabdelouahab on January 23, 2018, 04:38:53 PM
Works well in win 8.1, :t
but the same funny font appears. :(

Yeeeees, great news mabdelouahab!!

The computer I´ve been working with these days doesn´t have Olly installed. I still need to check this out.

But I´m not too concern since all these fonts are only for development. They will all be replaced by graphics and controls, like what I just did with the fuel gauge.

It will be a pleasure if you stick around and follow up. Cheers Alex
Title: Re: my 100% Assembly game development
Post by: mabdelouahab on January 23, 2018, 05:07:09 PM
LordAdef
The same Font appeared when I tried the game at Win 7 X64 Arabic, I think the problem is in Microsoft Windows Arabic version
Title: Re: my 100% Assembly game development
Post by: Siekmanski on January 23, 2018, 08:30:24 PM
It is running well now.  :t
Title: Re: my 100% Assembly game development
Post by: daydreamer on February 09, 2018, 05:26:58 AM
suggestion to better game Graphics,prerendered 3d guntowers,ships,airplanes
here is an example
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 09, 2018, 06:04:14 AM
Quote from: daydreamer on February 09, 2018, 05:26:58 AM
suggestion to better game Graphics,prerendered 3d guntowers,ships,airplanes
here is an example

Thanks for that Dreamer, is that yours?

This game is supposed to be top down 2d, and the current art is solely for development. I`ll have someone to make all the graphics for me.

I already have an idea for a new game, but it still cooking. Meanwhile, I´m trying to stick to this one and polish, repolish and eventually I may take some of its code into the next one.

Title: Re: my 100% Assembly game development
Post by: daydreamer on February 10, 2018, 07:31:52 AM
its mine
there are ways to make it more 3dfeeling with drawing first shadows of planes with some offset Before drawing planes,easiest is to design the new game like old starcraft and other games using isometric view and shadows that that are offset on flying objects

Title: Re: my 100% Assembly game development
Post by: LordAdef on February 17, 2018, 04:05:07 PM
Hi,

This is a nice update I was anxious to get running. v8.18

1. Bullets don´t fly over terrain anymore
2. Array optimizations
3. MiniMap working and marking player´s position (although still very temporarily, using masm32 circle)
4. AND the main stuff: I got rid of the ascII map style and am writing a new engine.   Still "free jazz code" (meaning not optimized at all). But this new engine will allow for many new game stuff:

This is Forest/river terrain low res jpg:
(https://www.dropbox.com/s/vvb24n4i4edtbfe/v818_printscreen.jpg?raw=1)

I hope you guys like it and the Win10 doesn´t shout bug.
Title: Re: my 100% Assembly game development
Post by: avcaballero on February 17, 2018, 07:52:02 PM
Congrats :t, that's very nice, but I've got an error while running it, just freezing and stop. W7-64 bits
Title: Re: my 100% Assembly game development
Post by: jj2007 on February 17, 2018, 09:35:30 PM
Works fine for me on Win7-64 :t
Title: Re: my 100% Assembly game development
Post by: Siekmanski on February 17, 2018, 09:41:16 PM
Hi Alex,
Works on Win8.1-64  :t
Title: Re: my 100% Assembly game development
Post by: daydreamer on February 18, 2018, 12:01:16 AM
nice work alex, but at some Point it stops working on my windows8.1 64 :t
after I died several times it appears, if that helps?
Title: Re: my 100% Assembly game development
Post by: HSE on February 18, 2018, 02:56:17 AM
Working very well here  :t

But...  :biggrin:  the images background now are a problem. With previous ascii map the images'  background were almost imperceptible.
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 18, 2018, 06:44:16 AM
hi HSE, cheers my friend! In fact this is not a problem. Since I'm working on this new engine, there is now the need to have image masks for all assets, which I still didn't bother to do it. Before I was getting away without this extra payload. Now I am going to need two imgs for each stuff, and "AND" the two to create the transparency. I'm slowly doing this in the free time. But I am looking for someone to do all the art for this game.
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 18, 2018, 06:47:27 AM
thanks Caballero and Daydreamer,

now that's odd, we have the game stalling in some win8 and some win7 but not on every one. hmm..damn it  :icon_redface:
Title: Re: my 100% Assembly game development
Post by: avcaballero on February 18, 2018, 07:13:08 PM
Like a daydreamer, I've got the error in the third or fourth play. Maybe that helps.
Title: Re: my 100% Assembly game development
Post by: HSE on February 19, 2018, 04:53:44 AM
Quote from: LordAdef on February 18, 2018, 06:44:16 AM
Now I am going to need two imgs for each stuff, and "AND" the two to create the transparency.

I think that using a rarely used color for transparency you can make the mask on the fly. Just change every images's color diferent to transparency to 1.
Title: Re: my 100% Assembly game development
Post by: Siekmanski on February 19, 2018, 07:59:41 AM
Try to adjust the ALPHA color component for 1 color.

    mov     ColorKey,0FFFFFF00h             ; make yellow transparent, if 0 then no transparency
;    mov     ColorKey,0FF000000h            ; make black transparent, if 0 then no transparency

    mov     eax,dword ptr [esi]             ; get pixel data ARGB
   
    cmp     ColorKey,0                      ; Check if we need to set a certain color of this bipmap to transparent.
    jz      NoColorKey
    or      eax,0FF000000h
    cmp     ColorKey,eax
    jne     NoColorKey
    xor     eax,eax
NoColorKey:
    mov     dword ptr [esi],eax              ; save the pixel color data ARGB

Title: Re: my 100% Assembly game development
Post by: LordAdef on February 19, 2018, 08:43:20 AM
Cheers my friends, this will surely save a lot of time and size.

Marinus, sorry for the stupid question.. I actuallu looked at the msdn to save the question, but I always get mad at msdn :icon_redface:

What is esi pointing to?
Title: Re: my 100% Assembly game development
Post by: Siekmanski on February 19, 2018, 08:50:19 AM
esi points to the raw bitmap data, just check every pixel in the bitmap data ( add esi,4 for the next pixel ) and adjust the ALPHA channel of the color that needs to be transparent.
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 19, 2018, 09:43:14 AM
Quote from: Siekmanski on February 19, 2018, 08:50:19 AM
esi points to the raw bitmap data, just check every pixel in the bitmap data ( add esi,4 for the next pixel ) and adjust the ALPHA channel of the color that needs to be transparent.

Oh, I see. I thought there were something in the Win image structure that you were point to... my bad.
Title: Re: my 100% Assembly game development
Post by: daydreamer on February 20, 2018, 06:47:58 AM
Curious, do you have a tileengine instead of previous ascii? So one ascii is drawed as green forestpic,another is drawn as waterpic
, and one as fuelpump?
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 20, 2018, 03:35:54 PM
Quote from: daydreamer on February 20, 2018, 06:47:58 AM
Curious, do you have a tileengine instead of previous ascii? So one ascii is drawed as green forestpic,another is drawn as waterpic
, and one as fuelpump?

Hey Daydreamer, I´m glad you noticed!!  In fact, the engine is a hybrid! I´m quite excited with that and am currently working to make the engine solid enough for me to use it for other projects.

There is no tile, and all the images have different sizes.
However, there is a LUT running behind the hood controlling everything.

So the forest terrain is bitblit in strips, covering the whole horizontal line. I check the region were there is water and bitblit that area on top of the forest. But since I´m using a buffer, I only need to do 2 lines of that per loop.

Title: Re: my 100% Assembly game development
Post by: LordAdef on February 23, 2018, 11:01:25 AM
Back to the transparent topic.

The suggestions given made me do a lot o research. For those interested I found this nice tuto. He gives two methods, I was using the first. the second is Marinus´ one, but he does it with a bitblt trick, to avoid the setPixels:

http://www.winprog.org/tutorial/transparency.html (http://www.winprog.org/tutorial/transparency.html)

I ended up using TransparentBitBlt in the current version. It´s working nicely and without much effort. the bonus is that it can stretch images too.


v818a:
=>1 Traced 2 bugs with OllyDbg, and 1 bug related to logic. Those could possibly make win10 work properly now (I hope)
ps: when killed, enemies stop flying for now (on purpose, to adjust the code)

Hope it works now



Title: Re: my 100% Assembly game development
Post by: Siekmanski on February 23, 2018, 11:41:46 AM
 8)
Title: Re: my 100% Assembly game development
Post by: HSE on February 23, 2018, 12:26:23 PM
Perfect now!  :t

You can see later (here (http://masm32.com/board/index.php?topic=6731.msg73565#msg73565) for example) that no setPixel is used to draw.
Title: Re: my 100% Assembly game development
Post by: jj2007 on February 23, 2018, 05:16:02 PM
Quote from: LordAdef on February 23, 2018, 11:01:25 AMHope it works now

Like a charm :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 26, 2018, 08:27:10 AM
Quote from: HSE on February 23, 2018, 12:26:23 PM
Perfect now!  :t

You can see later (here (http://masm32.com/board/index.php?topic=6731.msg73565#msg73565) for example) that no setPixel is used to draw.

Hi HSE, thanks I´ll check that code. I followed this link but actually didn´t studied the code.
Title: Re: my 100% Assembly game development
Post by: daydreamer on March 04, 2018, 11:29:31 PM
it would be cool to make a martian game based on this:
https://en.wikipedia.org/wiki/Valles_Marineris (https://en.wikipedia.org/wiki/Valles_Marineris)
do you plan on make game Engine able to import bitmaps as maps, a low res version as tilemap,hires version as terrain texture?
Title: Re: my 100% Assembly game development
Post by: LordAdef on March 06, 2018, 02:21:15 PM
Quote from: daydreamer on March 04, 2018, 11:29:31 PM
it would be cool to make a martian game based on this:
https://en.wikipedia.org/wiki/Valles_Marineris (https://en.wikipedia.org/wiki/Valles_Marineris)
do you plan on make game Engine able to import bitmaps as maps, a low res version as tilemap,hires version as terrain texture?

Not in the current plan DayDreamer. It's not a tilemap engine.

The good news is I got professional guys (from India!) to work on the art for the game! A friend of mine is going to do sound Fx.

If I cannot find anyone, I will do the soundtrack myself, although I'd rather stay away from the music in this project.
Title: Re: my 100% Assembly game development
Post by: Lonewolff on April 07, 2018, 05:23:33 PM
Doing great, man!  8)

Getting pretty close to trying my hand at a simple game, once I am up to a decent level with ASM.
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 08, 2018, 11:43:46 AM
Cheers LoneWolf!


As a quick update, my first post here after it's been moved to Game deve Forum:

This project is in full development!
I'm not posting anything new only because I'm changing too many things for this next build. Mostly code stuff related.

However, to tease things a bit, I'd like to show you guys the concept draft for the player's plane (the current art is solely for development):

(https://www.dropbox.com/s/p5zvarwaj8yb30k/Plane%2001.jpg?raw=1)
Title: Re: my 100% Assembly game development
Post by: Lonewolff on April 08, 2018, 12:36:14 PM
Nice!   8)
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 11, 2018, 03:03:48 AM
I've been setting my game loop timings with QueryPerformanceCount, frequency, sleep granularity with TimeBeginTime etc...


The good news is that without any serious optimization (and a lot can be gained), I'm currently achieving 4 milliseconds per frame on my machine (bitblting to a 1920/1080 window size). Since I'm targeting a game running at 60 FPS (about 17 msec), I've got lots of headroom! And no memory leaks.


Not that bad for a beginner, I guess... :icon_cool:
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 13, 2018, 10:20:56 PM
Guys,

This is a test version. I'm doing a bunch of changes and it's quite broken as of now. Would you running it for me? It's broken, all I want is to see how it behaves on your machines.

The console is my debbuger, if you press (the top number 8, not the one in the numpad), it will output the relevante data for my test: frame rate, sleep time, and FPS.

I appreciate the help.
Title: Re: my 100% Assembly game development
Post by: jj2007 on April 13, 2018, 10:48:02 PM
Stack overflow on Win7-64 :(------------ Debugger started --------------

.code

Win Main
WM==Create **********************
------- Create DC start -----------------

** width: 76  height: 48
** width: 25  height: 48
** width: 72  height: 70
** width: 72  height: 70
** width: 21  height: 170
** width: 216  height: 50
** width: 1445  height: 38
** width: 21  height: 18
** width: 69  height: 52
** width: 18  height: 21
** width: 20  height: 45
** width: 30  height: 27
** width: 30  height: 44
** width: 86  height: 84
** width: 31  height: 21
** width: 51  height: 372
** width: 68  height: 66
** width: 21  height: 32
** width: 1920  height: 64
** width: 1920  height: 20
** width: 1099  height: 20
** width: 900  height: 64
** Creating image buffers
-----------createDC end-------------------

pLoadLevel in
Load level
ini checkpoints, and set cp game controls
------------------------------------
Reset level
IniAssets start
   iniEngine
Number of Stamps: 8
Number of Submarines: 27
Number of Artillery: 129
Number of Bad Guys: 44
Number of Static: 111

UnrollBK in
UnrollBK on
CreateMiniMap
WM==Create end **********************
gameloop is ready
Title: Re: my 100% Assembly game development
Post by: HSE on April 13, 2018, 11:03:14 PM
A little crash:CPU Disasm
Address   Hex dump          Command                                  Comments
76BB6995  |>  56            PUSH ESI                                 ; /Arg1 = 130
76BB6996  |.  E8 95050000   CALL 76BB6F30                            ; \USP10.76BB6F30      <-- CRASH

Another:CPU Disasm
Address   Hex dump          Command                                  Comments
758EC602  /$  8BFF          MOV EDI,EDI                              ; HEXDATA kernel32.InterlockedExchange(pTarget,Value)
758EC604  |.  55            PUSH EBP                      <-- CRASH
758EC605  |.  8BEC          MOV EBP,ESP
758EC607  |.  5D            POP EBP
758EC608  \.- E9 0BFFFFFF   JMP 758EC518


And sometime not error, but not aeroplane!!

LATER:
                 :biggrin:

<----------      AMD  Win7-32 
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 13, 2018, 11:25:35 PM
Which windows HSE?

I built it with Windows 10
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 13, 2018, 11:26:41 PM
Quote from: jj2007 on April 13, 2018, 10:48:02 PM
Stack overflow on Win7-64 :(------------ Debugger started --------------

.code

Win Main
WM==Create **********************
------- Create DC start -----------------

** width: 76  height: 48
** width: 25  height: 48
** width: 72  height: 70
** width: 72  height: 70
** width: 21  height: 170
** width: 216  height: 50
** width: 1445  height: 38
** width: 21  height: 18
** width: 69  height: 52
** width: 18  height: 21
** width: 20  height: 45
** width: 30  height: 27
** width: 30  height: 44
** width: 86  height: 84
** width: 31  height: 21
** width: 51  height: 372
** width: 68  height: 66
** width: 21  height: 32
** width: 1920  height: 64
** width: 1920  height: 20
** width: 1099  height: 20
** width: 900  height: 64
** Creating image buffers
-----------createDC end-------------------

pLoadLevel in
Load level
ini checkpoints, and set cp game controls
------------------------------------
Reset level
IniAssets start
   iniEngine
Number of Stamps: 8
Number of Submarines: 27
Number of Artillery: 129
Number of Bad Guys: 44
Number of Static: 111

UnrollBK in
UnrollBK on
CreateMiniMap
WM==Create end **********************
gameloop is ready


I see, you too! ok thanks JJ
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 24, 2018, 03:12:59 AM
I'm so happy to see new friends involved in game dev here!

Since I'm not posting about my own game as frequently as usual, this is a quick update:

. Currently cleaning code and expanding things I did in a rough way only to make it work (free jazz code style !)
. Tackling on the Bug and To do list itens, it's a big list.
. Adding new systems to the game, so everything is ready for when things get larger
. I've got some people doing the game art. They are currently working on the flying assets
. Game pitch.
. Level 1 overall design. What we have today is just for development.
. The plan is to make a medium size game

A lot of work lads!
Title: Re: my 100% Assembly game development
Post by: Lonewolff on April 24, 2018, 07:45:31 AM
Certainly is a huge amount of work.

Huge amount of work in any language, let alone in ASM. Great work dude!  :t
Title: Re: my 100% Assembly game development
Post by: daydreamer on April 25, 2018, 12:54:53 AM
great work, I just wonder what size you mean by mediumsize?
and you are like a marathon runner, keep working on same project for months+ a year :t
Title: Re: my 100% Assembly game development
Post by: LordAdef on April 25, 2018, 04:18:50 AM
Quote from: daydreamer on April 25, 2018, 12:54:53 AM
great work, I just wonder what size you mean by mediumsize?
and you are like a marathon runner, keep working on same project for months+ a year :t


That's the plan. For a small game I already could've finished it, since the game rules are all there.


But this game is how I'm learning asm. The idea evolved into something bigger but doable. And by keeping working on the same project, I'm using new and different aspects of asm I didn't know before. So I'm quite happy to be working on this game for another year and have a nice and polished semi-pro finish product.


I've joined masm32 about a year ago without any knowledge of asm. All I learned I learned here with the help of these great guys. That's the story, and the story of this game




Title: Re: my 100% Assembly game development
Post by: LordAdef on May 12, 2018, 11:13:25 AM
Hey lads!

I'm super excited to share with you the next build version of my game!
I've been quietly working on it all these past weeks, cleaned up a lot of stuff and coding new stuff. I am currently working on the terrain engine system and it is so cool, and full of possibilities!

The game is already playable, the logic and systems are already there (the basic playing stuff, at least). I'm holding development and am not jumping onto the next thing until my base is fully robust and solid.

I wonder:

I have this build version I want to share for you to test it. But I'm using large images, and a 1920/1080 screen size (non resizable yet).
This is all for testing payload and so forth..

Would you mind if I posted a dropbox link for you to download it (11.5 mb)?

Title: Re: my 100% Assembly game development
Post by: jj2007 on May 12, 2018, 01:40:18 PM
Quote from: LordAdef on May 12, 2018, 11:13:25 AM
Would you mind if I posted a dropbox link for you to download it (11.5 mb)?

Hi Alex,
Posting a link is certainly not a problem, but my screen resolution is 1366x768 :(
Title: Re: my 100% Assembly game development
Post by: felipe on May 12, 2018, 02:03:55 PM
 :biggrin: I still remember my first laptop: a hp workstation with a resolution screen of 1920 x 1200: the nw9440. It was heavy and the nvidia graphics card was mainly for design (not to play games :bgrin:). But was really a die hard  :icon14:. Now, even my desktop pc has a less screen resolution: 1280x1024.  :(
Title: Re: my 100% Assembly game development
Post by: Siekmanski on May 12, 2018, 02:34:38 PM
Hi Alex,

My monitor can handle 1920 * 1080.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 12, 2018, 02:41:34 PM
Quote from: jj2007 on May 12, 2018, 01:40:18 PM
Quote from: LordAdef on May 12, 2018, 11:13:25 AM
Would you mind if I posted a dropbox link for you to download it (11.5 mb)?

Hi Alex,
Posting a link is certainly not a problem, but my screen resolution is 1366x768 :(

Hey Jochen, no problems. I will disable everything, so one can hit 1 and watch the scrolling animation with the new engine that I'm building. It's fine even if you miss the bottom of the screen. It's only a test build anyway.
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 12, 2018, 02:44:53 PM
Quote from: felipe on May 12, 2018, 02:03:55 PM
:biggrin: I still remember my first laptop: a hp workstation with a resolution screen of 1920 x 1200: the nw9440. It was heavy and the nvidia graphics card was mainly for design (not to play games :bgrin: ). But was really a die hard  :icon14: . Now, even my desktop pc has a less screen resolution: 1280x1024.  :(

I see. But bare in mind that today's gamers play at 1920/1080 as a normal gaming resolution. That's why i am targeting this resolution as the main one. I am also using bigger images so I can test the hit in the system.

this way, if I can make it run reasonably smoothly with cpu processing, I know I'm good when I port it to Marinus's  D9D!

Well, at least this has always been the plan :eusa_dance:
Title: Re: my 100% Assembly game development
Post by: LordAdef on May 12, 2018, 02:48:25 PM
Quote from: Siekmanski on May 12, 2018, 02:34:38 PM
Hi Alex,

My monitor can handle 1920 * 1080.

Great! I need to make it work with win7 (I've been a lazy bastard and still didn't bother to move it to a win7 puter). Doint it asap
Title: Re: my 100% Assembly game development
Post by: daydreamer on May 12, 2018, 07:27:09 PM
Quote from: LordAdef on May 12, 2018, 02:44:53 PM
I see. But bare in mind that today's gamers play at 1920/1080 as a normal gaming resolution. That's why i am targeting this resolution as the main one. I am also using bigger images so I can test the hit in the system.
I have external monitor that can handle that,unfortunatly when I connected it to HDMI ,it failed to work :(
as long as you keep your game as window it can be dragged to secondary monitor,once you make it fullscreen you cant

would be cool if you ported it to Xbox One,ps4 that is capable o running at 1920x1080 HDtv resolution,its x86/x64 hardware under the hood

I have one old XP box, thats capable of 1920x1080,but I don't know if its capable of running your game,because I dont know if you use the latest SIMD opcodes?
Title: Re: my 100% Assembly game development
Post by: felipe on May 13, 2018, 12:48:37 PM
Quote from: LordAdef on May 12, 2018, 02:44:53 PM
But bare in mind that today's gamers play at 1920/1080 as a normal gaming resolution.
Sorry, i don't program for any gamer around.  :idea:

Quote from: LordAdef on May 12, 2018, 02:44:53 PM
when I port it to Marinus's  D9D!
What is d9d?  :idea:
Title: Re: my 100% Assembly game development
Post by: felipe on May 23, 2018, 01:20:01 PM
Quote from: felipe on May 13, 2018, 12:48:37 PM
Quote from: LordAdef on May 12, 2018, 02:44:53 PM
when I port it to Marinus's  D9D!
What is d9d?  :idea:

Is d3d. Or Direct3D. In the case of the great contribution of Siekmanski, is the version 9.  :idea:

:redface:

:biggrin:
Title: Re: my 100% Assembly game development
Post by: LordAdef on September 20, 2018, 08:39:36 AM
Hey lads, I'm back!
Title: Re: my 100% Assembly game development
Post by: Siekmanski on September 20, 2018, 10:01:08 AM
About time.   :biggrin: :t
Title: Re: my 100% Assembly game development
Post by: Caché GB on September 20, 2018, 02:59:01 PM
Hi LordAdef.

Yes, welcome back.

I was wondering where you were.
http://masm32.com/board/index.php?topic=7238.msg78758#msg78758
Title: Re: my 100% Assembly game development
Post by: HSE on September 20, 2018, 10:52:27 PM
 :t

Have you seen Gunther in the other dimension?  :biggrin:
Title: Re: my 100% Assembly game development
Post by: Siekmanski on September 21, 2018, 12:57:41 AM
Maybe Gunther is still in Subspace and can return to the forum faster-than-light.  :lol:
Title: Re: my 100% Assembly game development
Post by: avcaballero on September 21, 2018, 04:06:05 AM
Hello, Alex, what news do you have? :t
Title: Re: my 100% Assembly game development
Post by: Caché GB on September 21, 2018, 04:13:12 AM
Gunther didn't tell everyone here the full story.

Everyone, Gunther and his colleagues found a porthole to a parallel universe where they discovered a planet
where the forests are of chocolate and the whole sea is made of whisky. So in Einstein's theory of relativity
terms it will be a long time before he gets back to posting in the forum.
Title: Re: my 100% Assembly game development
Post by: aw27 on September 21, 2018, 05:35:44 AM
Hi LordAdef, welcome back! It appears that the games gang is happy now.  :bgrin:

Last time I heard about Gunther he was going to help CERN, not exactly clear in what way. He has so many activities, namely producing Excel add-ins, play master level chess and help a known hacker featured on wikipedia to complete his PHD. But above all I miss his bugs. Sure I have JJ for that but is not the same thing - Germans fight better.
Title: Re: my 100% Assembly game development
Post by: felipe on September 21, 2018, 06:59:54 AM
I think jj is actually german... :idea:
Title: Re: my 100% Assembly game development
Post by: jj2007 on September 21, 2018, 09:29:41 AM
Felipe,

Remember: Don't feed the troll, especially when he always forgets to take his pills :eusa_naughty:
Title: Re: my 100% Assembly game development
Post by: HSE on September 21, 2018, 09:57:02 AM
Quote from: Caché GB on September 21, 2018, 04:13:12 AM
in Einstein's theory of relativity terms
After a sea of whisky perhaps the theory don't have any term  :biggrin:

Title: Re: my 100% Assembly game development
Post by: daydreamer on September 22, 2018, 01:55:03 AM
Welcome back lord adef
I am interested to learn gdi way of pictures/ tiles/ sprites topdown or sidescroller or isometric style
Title: Re: my 100% Assembly game development
Post by: LordAdef on September 23, 2018, 07:56:10 AM
Hey guys, thanks every one who posted above!
Well, my previous work was too intense and reaching its final stages. It was a medieval plot for tv.By the way, if anyone is interested to have a listen, you can find the sountrack cd online (and listen to the snipets):  .
(disclamer: I am not trying to sell cds :eusa_naughty:   just sharing my stuff)
https://open.spotify.com/album/24D3Flf4QlnLr1QJyx3Q2I (https://open.spotify.com/album/24D3Flf4QlnLr1QJyx3Q2I)
or here:
https://itunes.apple.com/us/album/deus-salve-o-rei-m%C3%BAsica-original-da-s%C3%A9rie-de-tv/1378846216 (https://itunes.apple.com/us/album/deus-salve-o-rei-m%C3%BAsica-original-da-s%C3%A9rie-de-tv/1378846216)

Gunther must be in CERN trying to prove wrong the speed of light limit....
Afterwards, I spent some time in Croatia and Greece with the family, but no Gunther there I'm afraid.

Back to ASM finally, god I was missing this!!
Title: Re: my 100% Assembly game development
Post by: avcaballero on September 24, 2018, 02:06:53 AM
In your links there's nothing like this :icon_rolleyes:
https://youtu.be/b5lm5fnlgus
Title: Re: my 100% Assembly game development
Post by: HSE on September 24, 2018, 05:06:39 AM
Quote from: LordAdef on September 23, 2018, 07:56:10 AM
just sharing my stuff
:t

Quote from: LordAdef on September 23, 2018, 07:56:10 AM
.. Croatia and Greece
Like in this dimension!  :biggrin:
Title: Re: my 100% Assembly game development
Post by: daydreamer on September 30, 2018, 12:03:10 AM
do you use kinda like gimp outputting your sprite data in .C for your data files?just curious
Title: Re: my 100% Assembly game development
Post by: LordAdef on October 24, 2018, 05:53:04 AM
Quote from: daydreamer on September 30, 2018, 12:03:10 AM
do you use kinda like gimp outputting your sprite data in .C for your data files?just curious
Hi DayDreamer, I'm not sure if I understand your question.
As of now, I am creating the sprite files by hand, and loading them dynamically by code.
There are some nice free apps that create a Atlas of image for games, to save loading time (and to keep memory access tight). I might be going in this direction once a tackle and refine my loading system.

These Atlas files come with a coordinate system for every asset and outputs a data file. Is that what you mean?
Title: Re: my 100% Assembly game development
Post by: aw27 on October 24, 2018, 05:48:36 PM
Still no news from Gunther  :(
Title: Re: my 100% Assembly game development
Post by: daydreamer on October 28, 2018, 12:30:57 AM
Quote from: LordAdef on October 24, 2018, 05:53:04 AM
Quote from: daydreamer on September 30, 2018, 12:03:10 AM
do you use kinda like gimp outputting your sprite data in .C for your data files?just curious
Hi DayDreamer, I'm not sure if I understand your question.
As of now, I am creating the sprite files by hand, and loading them dynamically by code.
There are some nice free apps that create a Atlas of image for games, to save loading time (and to keep memory access tight). I might be going in this direction once a tackle and refine my loading system.

These Atlas files come with a coordinate system for every asset and outputs a data file. Is that what you mean?
thanks,I Think prerender lots of art kind of avatarsize and take advantage of keyframes and animate for example rotating 360 degrees and choose output lots of .bmp's and maybe export to  .C data maybe could save me type in lots of data in sprites.inc manually but I found out qeditor function load file as hex should be better alternative
but I Think try to import them into atlas file would be better idea,what app are you using for atlas image?
PS
do you literally mean by hand and scan in like they did with old games like phantasy star II intro scene,its a handdrawn sketch scanned in and change colors?
Title: Re: my 100% Assembly game development
Post by: LordAdef on October 29, 2018, 04:59:01 PM
Quote from: daydreamer on October 28, 2018, 12:30:57 AM
Quote from: LordAdef on October 24, 2018, 05:53:04 AM
Quote from: daydreamer on September 30, 2018, 12:03:10 AM
do you use kinda like gimp outputting your sprite data in .C for your data files?just curious
Hi DayDreamer, I'm not sure if I understand your question.
As of now, I am creating the sprite files by hand, and loading them dynamically by code.
There are some nice free apps that create a Atlas of image for games, to save loading time (and to keep memory access tight). I might be going in this direction once a tackle and refine my loading system.

These Atlas files come with a coordinate system for every asset and outputs a data file. Is that what you mean?
thanks,I Think prerender lots of art kind of avatarsize and take advantage of keyframes and animate for example rotating 360 degrees and choose output lots of .bmp's and maybe export to  .C data maybe could save me type in lots of data in sprites.inc manually but I found out qeditor function load file as hex should be better alternative
but I Think try to import them into atlas file would be better idea,what app are you using for atlas image?
PS
do you literally mean by hand and scan in like they did with old games like phantasy star II intro scene,its a handdrawn sketch scanned in and change colors?


Hi!


By hand I mean making the sprite sheet of Assets myself, copying / pasting each frame alongside each other. Since my current assets are all for development only, it's fine.


I'm using any transform in code. I might eventually have to do it... rotation and so forth.


concerning the Atlas program, I let you know the one I'm using and the ones I found (away from the puter)
Title: Re: my 100% Assembly game development
Post by: LordAdef on February 07, 2019, 09:00:03 AM
I'm back! Re-factoring code
Title: Re: my 100% Assembly game development
Post by: anunitu on February 08, 2019, 08:01:04 AM
was wondering how this was getting along.
Title: Re: my 100% Assembly game development
Post by: daydreamer on April 17, 2019, 01:32:58 AM
Quote from: LordAdef on October 29, 2018, 04:59:01 PM

concerning the Atlas program, I let you know the one I'm using and the ones I found (away from the puter)
I think it would be great idea to convert the final atlas image to one or several .dds ,several .dds to older gfx cards