Space Shooter thingy (WIP)

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Space Shooter thingy (WIP)

Post by Netwatcher »

A Player VS Player space shooter.
Just thought it would be cool to make one, and it's an interesting learning experience.

The game will have:
2 Players PvP action.
Power-Ups.
Animated background.
Random enemy waves.(dunno if that's a good idea)

I'm using C++ with DirectX9

So far I've implemented the following:

A basic DirectX9 framework(graphics,audio,input(might end up using Win32 input))

A sprite class containing;
2D pos info, width and height(for collision), hp, and an alive bool(draw/do not draw the sprite)

2 players and controls.

A Dynamic-projectile-creation-system,
Which does the following:
Creates sprites in "on a need" basis in a vector(*).
Erases a sprite when it is no longer needed.
Renders the sprite.
Checks for collision.(well it partially does...)

*A vector container was used to create as many sprites as needed, and to delete them easily from the anywhere within the Vector.

all art was made by clsDevAaron.

Download link coming soon
Last edited by Netwatcher on Wed Aug 05, 2009 3:33 pm, edited 3 times in total.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Got the download link here

5 days into the development, a showcase of features.

http://www.mediafire.com/?zzmmnytmzyz


Included the VC++ redistributable, and the d3dx9_41.dll, it should work properly on all Windows machines.


Controls:

Player 1:
AWSD and Left Ctrl for shooting.

Player 2:
Arrow keys and right Ctrl for shooting.

*Known issues:
**Getting your ship off the screen and shooting will crash the game.

*Instead of random enemy waves there will be random Meteor Showers.
Last edited by Netwatcher on Sat Jul 18, 2009 12:53 pm, edited 2 times in total.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

This is the new "Capture the turd" mode, basically , you need to kill the enemy carrying the turd so he is no longer drawn, and the turd's Center matrix will become yours... have fun!



http://www.mediafire.com/download.php?mjmlnjmngem

Thanks to clsDevAaron for the turd.

*This is a practice in rotation matrices
*no win/lose situations
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
clsDevAaron
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 54
Joined: Sun Jul 12, 2009 7:47 am

Re: What The Space, a PvP space shooter (WIP)

Post by clsDevAaron »

lmfao...thanks for putting my hard work to shame ._.

not my fault I suck when it comes to pixeling big stuff
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

On the contrary, you don't suck at all...
you drew a beautiful turd.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Bludklok
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Tue Apr 14, 2009 1:31 am
Current Project: EnigmaCore
Favorite Gaming Platforms: PC, N64, Playstation1, Playstation2
Programming Language of Choice: C++
Location: New Jersey
Contact:

Re: What The Space, a PvP space shooter (WIP)

Post by Bludklok »

In your movement function i'm guessing it looks something like this...

Code: Select all

if(key_d) move_right( player.x );

void move_right(int & x)
{
	x++;
}
In that case an easy way to fix the crash when the ship moves out of the screen would be to do this...

Code: Select all

void move_right(int & x)
{
	if(x < screen_width - length_of_ship_sprite) x++;
}
Youtube
Website
Current project: Enigma Core
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Bludklok wrote:In your movement function i'm guessing it looks something like this...

Code: Select all

if(key_d) move_right( player.x );

void move_right(int & x)
{
	x++;
}
In that case an easy way to fix the crash when the ship moves out of the screen would be to do this...

Code: Select all

void move_right(int & x)
{
	if(x < screen_width - length_of_ship_sprite) x++;
}

No, No, and Nooope, I did fix the problem, it had something to do with the projectile system erasing a non-existing element in the vector...
but I fixed that after a few hours and it's all good now. the projectiles were meant to erase themselves when they exit your FOV(which creates a conflict when the starting position of the projectile is already outside of the FOV).
Nothing to do with the ship lol, you can get outside of the screen only because I want you to...
just want to get the hard stuff done first
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Bludklok
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Tue Apr 14, 2009 1:31 am
Current Project: EnigmaCore
Favorite Gaming Platforms: PC, N64, Playstation1, Playstation2
Programming Language of Choice: C++
Location: New Jersey
Contact:

Re: What The Space, a PvP space shooter (WIP)

Post by Bludklok »

Hmm but if the player can travel outside of the screen whats stopping them from getting lost?
Youtube
Website
Current project: Enigma Core
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Said im gonna take care of the hard stuff first, saving this child's play for the end.

and if you were wondering...

Edit: when I'll need to use velocity, I'll change it

Code: Select all

//Player One
if(Key_Down(DIK_W))//up
	{playerOne.y -= 5;}
	if(Key_Down(DIK_S))//down
	{playerOne.y += 5;}
	if(Key_Down(DIK_A))//left
	{playerOne.x -= 5;}
	if(Key_Down(DIK_D))//right
	{playerOne.x += 5;}
	if(Key_Down(DIK_LCONTROL))//shoot
	{Proj[0].CreateProjectile(playerOne.x+37,playerOne.y+25,20,5);Proj[0].Reload();}

//Player Two
	if(Key_Down(DIK_UP))
	{playerTwo.y-= 5;}
	if(Key_Down(DIK_DOWN))
	{playerTwo.y+= 5;}
	if(Key_Down(DIK_LEFT))
	{playerTwo.x -= 5;}
	if(Key_Down(DIK_RIGHT))
	{playerTwo.x += 5;}
	if(Key_Down(DIK_RCONTROL))
		
	{Proj[1].CreateProjectile(playerTwo.x+24,playerTwo.y+25,20,5);Proj[1].Reload();} //shoot    
Creating an UP/Down/Left/Right function is a waste of time for this...(only 1 instruction per function, which i can do faster like this)
Might be useful for a game with 20 different characters, then again, I can just change the image and the sprite is still playerOne/PlayerTwo
Last edited by Netwatcher on Wed Aug 05, 2009 3:33 pm, edited 2 times in total.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Bludklok
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Tue Apr 14, 2009 1:31 am
Current Project: EnigmaCore
Favorite Gaming Platforms: PC, N64, Playstation1, Playstation2
Programming Language of Choice: C++
Location: New Jersey
Contact:

Re: What The Space, a PvP space shooter (WIP)

Post by Bludklok »

If your going to have several different things moving you can just make a set of move_direction functions and use that instead of what your doing right now. Ultimately its up to you I guess but It's just how I would do it. ;)

Also it keeps all of that mess out of your game's main loop.
Youtube
Website
Current project: Enigma Core
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Bludklok wrote:If your going to have several different things moving you can just make a set of move_direction functions and use that instead of what your doing right now. Ultimately its up to you I guess but It's just how I would do it. ;)

Also it keeps all of that mess out of your game's main loop.
Yep, that's what I'm using for the projectiles.

ok... a new build

http://www.mediafire.com/download.php?on3lditodmk


Known Issues:
They game does not crash under any circumstances.



Controls:
Now the Arrow Keys control the Right player while the WASD keys control the Left Player.
*New* Press "P" to pause the game.
If you switch windows, the game won't get stuck and just pause.
Press F9 to generate random space turds Meteors.(again, the projectile class.. just added 7 new functions to it :D)
and F8 to clean the screen.
Last edited by Netwatcher on Tue Jul 21, 2009 7:20 am, edited 1 time in total.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Bludklok
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Tue Apr 14, 2009 1:31 am
Current Project: EnigmaCore
Favorite Gaming Platforms: PC, N64, Playstation1, Playstation2
Programming Language of Choice: C++
Location: New Jersey
Contact:

Re: What The Space, a PvP space shooter (WIP)

Post by Bludklok »

Nice frame rate when there's a lot of sprites on the screen, I got my autoclicker + onscreen keyboard and spammed F9 in an attempt to make it crash. (Although it seems you limited the amount of meteors allowed on-screen at one time. Boo you.) :)
Youtube
Website
Current project: Enigma Core
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

I didn't, they just get off the screen and get un-rendered O_0 well that's what they're supposed to do

For extra meteor action press F9 & F11 :lol:
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Thanks to help on IRC and a hell lot of time spent on reading the DirectX documentation, the engine now supports rotation.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
User avatar
Netwatcher
Chaos Rift Junior
Chaos Rift Junior
Posts: 378
Joined: Sun Jun 07, 2009 2:49 am
Current Project: The Awesome Game (Actual title)
Favorite Gaming Platforms: Cabbage, Ground beef
Programming Language of Choice: C++
Location: Rehovot, Israel

Re: What The Space, a PvP space shooter (WIP)

Post by Netwatcher »

Got a little bored and played with stuff...
http://www.youtube.com/watch?v=24i-cD3E4Q8

P.S.
If you search for an "Exotic Fruit Engine" in youtube, this video is the 6th result
If you search for an "Exotic Fruits Engine" this is the 4th.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655

blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
Post Reply