News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

RED PISTOL

Started by felipe, May 20, 2018, 03:19:15 PM

Previous topic - Next topic

felipe

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

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

What about you Siekmanski? did you tried this one?

felipe

Or you daydreamer?

aw27

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

Quote from: aw27 on May 21, 2018, 03:56:39 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

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!

aw27

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

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 a strategy.

Lonewolff

Pro tip! - Always use error handling, especially with DirectX, and 'fail back' where required.

LordAdef

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

Quote from: LordAdef on May 22, 2018, 01:23:29 AMIt 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

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

Quote from: jj2007 on May 22, 2018, 01:41:35 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:

LordAdef

QuoteI 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....