Space Shooter thingy (WIP)
Moderator: PC Supremacists
- Netwatcher
- 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)
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
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Netwatcher
- 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)
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.
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Netwatcher
- 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)
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
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-
- Chaos Rift Cool Newbie
- Posts: 54
- Joined: Sun Jul 12, 2009 7:47 am
Re: What The Space, a PvP space shooter (WIP)
lmfao...thanks for putting my hard work to shame ._.
not my fault I suck when it comes to pixeling big stuff
not my fault I suck when it comes to pixeling big stuff
- Netwatcher
- 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)
On the contrary, you don't suck at all...
you drew a beautiful turd.
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Bludklok
- 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)
In your movement function i'm guessing it looks something like this...
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
if(key_d) move_right( player.x );
void move_right(int & x)
{
x++;
}
Code: Select all
void move_right(int & x)
{
if(x < screen_width - length_of_ship_sprite) x++;
}
- Netwatcher
- 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)
Bludklok wrote:In your movement function i'm guessing it looks something like this...
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
if(key_d) move_right( player.x ); void move_right(int & x) { x++; }
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Bludklok
- 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)
Hmm but if the player can travel outside of the screen whats stopping them from getting lost?
- Netwatcher
- 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)
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
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
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
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Bludklok
- 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)
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.
Also it keeps all of that mess out of your game's main loop.
- Netwatcher
- 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)
Yep, that's what I'm using for the projectiles.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.
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
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Bludklok
- 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)
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.)
- Netwatcher
- 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)
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
For extra meteor action press F9 & F11
"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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Netwatcher
- 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)
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Netwatcher
- 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)
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.
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/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/