Author Topic: RED PISTOL  (Read 1102 times)

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
RED PISTOL
« on: May 20, 2018, 03:19:15 PM »
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



Felipe.

jj2007

  • Member
  • *****
  • Posts: 8841
  • Assembler is fun ;-)
    • MasmBasic
Re: RED PISTOL
« Reply #1 on: May 20, 2018, 07:36:55 PM »
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

  • Member
  • **
  • Posts: 247
  • ObjAsm32 - ObjAsm64
    • ObjAsm64
Re: RED PISTOL
« Reply #2 on: May 20, 2018, 08:02:25 PM »
HiENOENT = Error NO ENTity.
It can be used for files/dirs or any other entity.

Biterider
« Last Edit: May 21, 2018, 01:29:20 AM by Biterider »

AW

  • Member
  • *****
  • Posts: 1564
  • Let's Make ASM Great Again!
Re: RED PISTOL
« Reply #3 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.

jj2007

  • Member
  • *****
  • Posts: 8841
  • Assembler is fun ;-)
    • MasmBasic
Re: RED PISTOL
« Reply #4 on: May 20, 2018, 10:58:54 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

  • Member
  • *****
  • Posts: 1684
Re: RED PISTOL
« Reply #5 on: May 20, 2018, 11:09:48 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.

AW

  • Member
  • *****
  • Posts: 1564
  • Let's Make ASM Great Again!
Re: RED PISTOL
« Reply #6 on: May 20, 2018, 11:35:56 PM »
Thank you, Marinus, that's what I was looking for,

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
Re: RED PISTOL
« Reply #7 on: May 21, 2018, 03:52:26 AM »
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:

Felipe.

jj2007

  • Member
  • *****
  • Posts: 8841
  • Assembler is fun ;-)
    • MasmBasic
Re: RED PISTOL
« Reply #8 on: May 21, 2018, 04:04:13 AM »
fatal error: File not found: '\masm32\lib\d3dx9.lib'

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
Re: RED PISTOL
« Reply #9 on: May 21, 2018, 05:34:28 AM »
  :biggrin:

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

 :icon14:
Felipe.

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
Re: RED PISTOL
« Reply #10 on: May 21, 2018, 06:16:25 AM »
@jj2007:
Quote
To 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:
Felipe.

jj2007

  • Member
  • *****
  • Posts: 8841
  • Assembler is fun ;-)
    • MasmBasic
Re: RED PISTOL
« Reply #11 on: May 21, 2018, 07:44:05 AM »
Attached the .lib file

Now it builds :t

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
Re: RED PISTOL
« Reply #12 on: May 21, 2018, 07:49:45 AM »
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.

felipe

  • Member
  • ****
  • Posts: 970
  • Eagles are just great!
Re: RED PISTOL
« Reply #13 on: May 21, 2018, 08:07:05 AM »
If someone wants to say something about this demo, that will be nice too. Thanks.  :bgrin:
Felipe.

AW

  • Member
  • *****
  • Posts: 1564
  • Let's Make ASM Great Again!
Re: RED PISTOL
« Reply #14 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.