Author Topic: RED PISTOL  (Read 736 times)

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #15 on: May 21, 2018, 04:30:22 PM »
That's sad, i have no explanation for that. In windows 8.1 works without problems. If the libraries are not in your computer, windows should have stopped the program. Well maybe in windows 8.1 it gives you a warning and then terminates the program,  but probably in windows 7 just finish when it founds in the middle of the execution that this libraries aren't in your system.  :idea:
Felipe.

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #16 on: May 21, 2018, 04:34:52 PM »
Here is the link for the end user runtime libraries that are needed to run this program: https://www.microsoft.com/en-us/download/details.aspx?id=8109

aw27: Did you executed successfully another directx 9 demo that i have posted before?
Felipe.

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #17 on: May 21, 2018, 04:38:14 PM »
What about you Siekmanski? did you tried this one?
Felipe.

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #18 on: May 21, 2018, 04:41:11 PM »
Or you daydreamer?
Felipe.

AW

  • Member
  • *****
  • Posts: 1393
  • Let's Make ASM Great Again!
Re: RED PISTOL
« Reply #19 on: May 21, 2018, 04:45:52 PM »
It does not run also in Windows 10. Yes, I have the dx9 runtime.
I think I have run  other dx9 from you without problem.

DebugBSD

  • Regular Member
  • *
  • Posts: 9
Re: RED PISTOL
« Reply #20 on: May 21, 2018, 04:54:35 PM »
I had no success. In Windows 7, it launches, my 2 monitors enter full screen mode then the program exits without explanation.

I have the same problem here, and I've installed DX9 SDK.
Happy Hacking!

DebugBSD

  • Regular Member
  • *
  • Posts: 9
Re: RED PISTOL
« Reply #21 on: May 21, 2018, 05:00:09 PM »
In the laptop of my job which have Windows 10, Windows Defender alerts me about a Virus and I can't run the program!
Happy Hacking!

AW

  • Member
  • *****
  • Posts: 1393
  • Let's Make ASM Great Again!
Re: RED PISTOL
« Reply #22 on: May 21, 2018, 05:10:09 PM »
It works in Windows 10 after changing resolution to 1920x1080 and rebuilding but I see no pistols. Am I supposed to see pistols?

Ah, OK a I got it, it is the red rectangle  :t

So all the elements work, life count, enemies and weapon. Congratulations.
But the game is not nice enough to be played more than once   :(

Siekmanski

  • Member
  • *****
  • Posts: 1600
Re: RED PISTOL
« Reply #23 on: May 21, 2018, 07:30:10 PM »
It works on my computer.  :biggrin:

Not every fullscreen resolution is available on all different monitors.
If not available it won't run.
You are using a fixed 1024 by 768 pixel fullscreen resolution which has an aspect ratio of 1.3
When the user has a monitor size of 1920 by 1080 ( aspect ratio of 1.78 ) your fullscreen game has unused screen parts of the screen at the left and right side of the monitor, because of the difference in aspect ratios.

A solution for this is to get the users actual monitor resolution and use that as the fullscreen resolution.
Or a smaller available resolution with the aspect ratio of the users monitor.

    invoke  GetSystemMetrics,SM_CXSCREEN
    invoke  GetSystemMetrics,SM_CYSCREEN

When posting sources, it's nice to always include the libs and include files that are not in the Masm32 SDK so that people can build the .exe
Creative coders use backward thinking techniques as their strategy.

Ascended

  • Member
  • ***
  • Posts: 331
Re: RED PISTOL
« Reply #24 on: May 21, 2018, 07:36:55 PM »
Pro tip! - Always use error handling, especially with DirectX, and 'fail back' where required.

LordAdef

  • Member
  • ****
  • Posts: 588
Re: RED PISTOL
« Reply #25 on: May 22, 2018, 01:23:29 AM »
I only ran the exe, since there was no batch. It runs, but suddenly the game quits without any reason. Looks like a bug Felipe.Also, twice, the bullet trans-passed the enemy and killed two enemies. Something to check out.I hope that helps.

jj2007

  • Member
  • *****
  • Posts: 8608
  • Assembler is fun ;-)
    • MasmBasic
Re: RED PISTOL
« Reply #26 on: May 22, 2018, 01:41:35 AM »
It runs, but suddenly the game quits without any reason.

Same on Win7-64. Felipe is quickly approaching 666 posts... the devil is in the detail ::)

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #27 on: May 22, 2018, 01:45:11 AM »
Ok Siekmanski, is good to know you know what are you talking about. The good thing is that this demo has the screen resolution set by 2 equ's in the upper part of the code. So people with this problem can try the demo changing those equ's. Of course the better approach is to use the resolution of the user screen. I didn't thought that providing each time the same includes, provided before, would be a good idea, but maybe it is.

AW, is true, as you can figure it out, making a full playable game is a lot of work. This is just a demo and like always i really don't know if i will try to make other game now, tomorrow or never.

LordAdef there are no bugs in the game, as you can see the algorithm for the collision detection is not perfect (maybe a better aproach is to use the winapi  function IntersectRect). I don't use other batch files others than those provided with the masm32 sdk package. I think, with the time you have in this forum, than looking in the code the section of the includes, shouldn't be difficult to you to assemble and link this little demo.  :idea:

Thanks for trying it!  :icon_mrgreen:
Felipe.

felipe

  • Member
  • ****
  • Posts: 895
  • Eagles are just great!
Re: RED PISTOL
« Reply #28 on: May 22, 2018, 01:48:02 AM »
the devil is in the detail ::)

This should be an old song from your childhood?

Maybe you have not understand the code. You can even change it, to have more fun!  :idea:
Felipe.

LordAdef

  • Member
  • ****
  • Posts: 588
Re: RED PISTOL
« Reply #29 on: May 22, 2018, 02:12:16 AM »
Quote
I think, with the time you have in this forum, than looking in the code the section of the includes, shouldn't be difficult to you to assemble and link this little demo.  :idea:[\quote]
Ooops....