News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

RED PISTOL

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

Previous topic - Next topic

felipe

Here it is another demo. Yes, is a demo, but this time is more complete (or playable). Also (probably the most important) the code is well commented (hopefully  ;)). And while the demo-game (boring game?  :redface:) is very simple, the source code is above 2000 lines. So, yes making a full game is a lot of work. And that will involve images, sound files, etc. Eventually bloatware. So the game industry needs powerfull machines and even good network connections sometimes. But people (gamers here) will do all to play those games (  :icon_rolleyes:).

Features:
-Fullscreen playable demo.
-Complete source code, well commented. (Right?  :redface:)
...That's all?  :redface:

Instructions:
-Move the "RED PISTOL" to right or left with the right and left arrow keys. Use the spacebar to fire a blue shot. You have only 1 shot at a time, so once fired you must wait that the shot impact an enemy or the shot has reached the upper limit of the screen. Then you will have another shot.
Shot the enemies until you get bored or you die.
Press the escape key to finish your boring time. The game will also terminate when you lose all your 3 lifes (check the upper left corner hearts.)
Finally, run the program in the same folder where you locate the 2 .png files.


That's all! As usual with this game-demo works with Directx 9 and uses the extensions features (Mainly to load the images to the screen). The program will not check if you have the user runtime libs requiered to play (mainly to avoid some problems). But fear not, Windows will detect this situation and will not allow the program to run if they are not in your system  :redface:.

:P




jj2007

Doesn't build (no idea what "ENOENT" means ::))

Tmp_File.asm(14) : Error A2106: Cannot open file: "\masm32\include\DX9Includes\d3d9.inc" [ENOENT]
Tmp_File.asm(15) : Error A2106: Cannot open file: "\masm32\include\DX9Includes\d3dx9.inc" [ENOENT]

Biterider

#2
HiENOENT = Error NO ENTity.
It can be used for files/dirs or any other entity.

Biterider

aw27

Hi Felipe,

Can you post the link to the Siekmaski library? I have it somewhere, but can not find now.

jj2007

Quote from: Biterider on May 20, 2018, 08:02:25 PM
HiENOENT = Error NO ENTity.
As if "Cannot open file" was not explicit enough ;)

But it sparks nice exchanges of views on SOF:
Quote"It is Unix terminology" (Passant)

"Seems like it would be more valuable to users if the error was explicit rather than saving 8 characters of space. Any idea why this might be the case?" (Dowling)

"Because C compilers at the dawn of time didn't support more than 8 characters in symbols" (Some programmer)

"@Someprogrammerdude's comment explained most of my questions (qualms) about C naming conventions" (Jackson)
:biggrin:

Siekmanski

Quote from: aw27 on May 20, 2018, 10:43:49 PM
Hi Felipe,

Can you post the link to the Siekmaski library? I have it somewhere, but can not find now.

http://masm32.com/board/index.php?topic=7078.msg76110#msg76110

This is a modified COM version for Felipe.
Creative coders use backward thinking techniques as a strategy.

aw27

Thank you, Marinus, that's what I was looking for,

felipe

I attach the folder of the includes made by Siekmanski (no macro versions) and others that i have translated/modified for now. This ones, particularly the d3dx9.inc i think, have some updates (if you try only those provided by Siekmanski's link and you have a problem try with this ones.)
:icon14:


jj2007

fatal error: File not found: '\masm32\lib\d3dx9.lib'

felipe

  :biggrin:

Attached the .lib file. This files were also located here: http://masm32.com/board/index.php?topic=7105.15

:icon14:

felipe

@jj2007:
QuoteTo give you a starting point: Forum search yields almost 100 threads for...

Trying in the search box d3dx9.lib also located the link above...Perhaps  you... :idea:

jj2007


felipe

Ok, good to know. I hope you don't get too mad with my other comments (mainly in the other post in the 16 bit subforum). Did bothered me a little your comment there... :redface:

felipe

If someone wants to say something about this demo, that will be nice too. Thanks.  :bgrin:

aw27

I had no success. In Windows 7, it launches, my 2 monitors enter full screen mode then the program exits without explanation.