News:

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

Main Menu

About directx9 redistributables for users

Started by felipe, July 12, 2019, 06:45:16 AM

Previous topic - Next topic

felipe


felipe

Ok i know this was a stupid question, but i made a simple game using Direct3D that i want to share with any interested person from the forum. The issue is that i don't have problems with feedback about the source code, but i'm more interested with someone (at least one person  :toothy:) who can play the game and give some feedback about it. But to be able to play this simple game you need to install those libraries since i'm using some of the d3dx9 functionalities...If someone is interested just tell me here (don't be shy...) and i would upload the whole thing (source code, game assets, d3dx9.lib, and .exe file).  :thup:  :azn:

K_F

'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

felipe

I will automatically assume you are interested in it... :biggrin:  In the zip file attached: source code, executable, the game assets, the d3dx9.lib and the includes64 folder.  :thup:
A few notes about the game:  :mrgreen:
1) Use up, down and right arrow keys to move the spaceship, left arrow dosen't work because i though it will be more fun and difficult if you can no go back...
2) The game may seem difficult or easy, it will depend on you i suppose. But by no way it's impossible. I have won the game dozen times or more.
3) To play the game install the libs already mentioned in above replies. Also put the game assets in the same folder as the executable.
4) You can do with the game/code what you wish. I only ask for your feedback by playing the game and telling me what do you think about it. That's all.
5) Before you play! The game is very simple. It's not have been my intention to make false expectations about it. But i think it's fun to play, at least a few times... :toothy:

Siekmanski

 :biggrin: :thumbsup:

It works great but, the keys are not responding right away.
Maybe you could use "GetAsyncKeyState" for the key input?
It will give smooth game action and sprite movements. ( call it within the 3Drender loop )

I lose again and again and again.......  :joking:

something like this:

Move_object proc
   invoke   GetAsyncKeyState,VK_LEFT
   test     ax,ax
   jns      if_right
   fld      x_Position
   fsub     FLOAT_(2.5)
   fstp     x_Position
if_right:
   invoke   GetAsyncKeyState,VK_RIGHT
   test     ax,ax
   jns      if_end
   fld      x_Position
   fadd     FLOAT_(2.5)
   fstp     x_Position
if_end:
   ret
Move_object endp
Creative coders use backward thinking techniques as a strategy.

felipe

Thanks a lot siekmanski!  :thumbsup: This time i choosed to use other keys method because i thought GetAsyncKey was a little problematic since it can take input from other programs while running the game. I though that the speed was ok, i will have to do a test with GetAsyncKey to note the difference in the speed of the keys reponses. Now one question: why to use a float value for the position if the RECT coordinates should be in integer format?  :icon_idea:


Siekmanski

When you lose focus, you could kill the key input.
Didn't know you used an integer format. ( I'm used to floats  :biggrin: )
Creative coders use backward thinking techniques as a strategy.

felipe

Quote from: Siekmanski on July 15, 2019, 09:21:23 AM
When you lose focus, you could kill the key input.

That's a good idea  :thup:. I was thinking that i will leave this simple game as it and i will use GetAsyncKey in a next game which i hope it can be more complex.  :icon_idea:

daydreamer

works great,but I dont get sad smilie after death,just a black screen :thumbsup:
nice colorful graphics
but if you are one who wants to make d3d code,prefer the dx9 SDK

smooth and natural movement is to have a loop that moves x=x+xspeed,y=y+yspeed and indirectly change xspeed and yspeed controlled by keys,mouse controlled spaceship is also an alternative to input mouse coordinates and let x and y from that control x and y of spaceship

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

felipe

Nice suggestions daydreamer,  :thup: but i can't understand why you don't get the sad face file. If the image is not loaded properly the program should show a messagebox and terminate...Is the image file sad.png in the same folder as the executable?  :icon_idea:

daydreamer

Quote from: felipe on July 16, 2019, 08:58:21 AM
Nice suggestions daydreamer,  :thup: but i can't understand why you don't get the sad face file. If the image is not loaded properly the program should show a messagebox and terminate...Is the image file sad.png in the same folder as the executable?  :icon_idea:
I did the usual extract files images endup in same folder automatically,going to check myself
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding