Help me with my game please
Hey guys. **WARNING: Longpass post, but probably interesting if you''re into game programming**
This project is a C++ game using OpenGL for it''s graphics API, and as it looks like FMod for it''s sound engine. It''s a reflex-based lightsaber fighting game setup in the StarWars universe. The project
will be handed in at the end of my senior year in high school, so I have around 4-5 more months to work on it before all the other end of year exams start popping up (maths, literature etc).
The game will be as such: Two player fighting game, where the two players play on the same keyboard using 4 arrows to control their player. (Player 1 on the actual arrow keys, player 2 on the WSAD keys, or some such). The camera view will be behind Player 1''s shoulder, AKA 3rd person view. You can attack with your saber to 8 directions with the 4 arrow keys: Left, top left, top, top right, right, bottom right, bottom, and bottom left. The gameplay will basically be high paced, reflex blocking and attacking of the sabers. So if player 1 presses left to attack on the left side, player 2 must now also press left to block the incoming blow. The fighters cannot move, so blocking is the only way to avoid being killed.
The game will have a number of fighters to select from, which largely depends on how much time will I have to create the models and special moves for them. Special moves will be a combination of keys to press (Left left right, for example) which will result in a combo/special move, possibly with a special animation.
Each player starts with 100 health, whereas each blow hits for 20 points. There will be 3 game speeds, controlling how long you can hit again after you''ve just attacked your opponent. IE, player 1 presses Left, he will be able to attack again in X seconds. If the reaction time for an average person is 3/4 seconds, then the settings will be Fast (1/2 second), Normal (3/4 seconds), and Slow (1 second). Another gameplay element will be Powerups, which is an idea that I kind of-sort of-possibly stole from Dance Dance Revolution. There will be a UI element (picture a box with enough room for a sqaure-shaped TGA with an arrow inside the square). These boxes will appear every 2 minutes for example, and will make a direction appear in that box. If you press that direction in a matter of a second or two from the moment which the powerup appeared on the screen then that blow will be powered-up, IE a faster swipe, or more damage delivered.
Now I''m basically a C++/OpenGL newb, I''ve done a few C (not OOP) based console games like tic tac toe and such, but not C++ OOP programming. I realise that I''m way over my head here but I have plenty of time to learn everything required of me to do this project, and I''m confident that I''m passionate enough about this to go through with it. I have a bunch of problems and solutions and I''d like you all to tell me what you think about my solutions, so here we go:
The game pace setting: 1/2 seconds, 3/4 seconds or 1 full second. I figuare I save it as a float for each player. (Player 1 and player 2 are a player of a class called Player). IE: I save the setting under Player1.Cooldown and Player2.Cooldown
It''s a timer that starts at 1 (or whatever the players chose at the main menu) that whenever you press a directional key, counts down to 0. If the sabers connect (IE if the defender successfuly blocks) then the timer stops at whatever it managed to get to. Then it backtracks the attack animation back to the idle standing animation pose in however much time the Cooldown variable has left. Example: Both players'' cooldown timers are at 1. Player 1 presses Left, and one tenth of a second later Player 2 also presses left. Player 1 will have 0.6 when the sabers connect and Player 2 will have 0.4 when the connection happens. Then in 0.6 of a second Player 1 will be able to attack again (Because he attacked earlier, his saber travelled farther so it''ll take him more time to be ready again) and Player 2 will be able to attack in 0.4 of a second. So now Player 2 has the advantage whereas earlier Player 1 had it.
The powerup (remember the DDR ripoff, you have to press an arrow key whenever the arrow appears on the screen so your next blox will be more powerful) will simply temporarily alter the cooldown for the person who took the powerup to half of what it was earlier (depending on the game pace setting), so the next attack will start counting down from 0.5. So the swipe will be faster and twice as harder to block. Of course all these values will change when I actually beta test the game but you get the picture.
What do you think about that system in general, will it work?
New problem - the models:
Let''s assume I''ll create my own models in 3DMax and export them to 3ds format, and then load that model into my OpenGL enviroment. I plan on animating the models in 3dmax using the bones technique. Can I do what I described above with this format? IE trigger a specific animation according to keypresses, and more importantly, STOP an animation when a certin event happens (the sabers connect), and then REWIND the animation back to it''s start position? How do you (generally) refer to specific animations stored in a 3ds filed in a programming enviroment? Is that possible with OpenGL and 3DS? If not, what do you suggest?
New problem - Sound:
I heard alot about FMod, so I went ahead and downloaded it from fmod.org and quickly got it up and running with the GameProgramming base code (now I have an mp3 playing in the background, and a white triangle displayed on the screen, yay!). I also have a wav playing on a keypress, which is cool. FMod seems pretty nice to me, but I also heard alot about the Miles Sound System. It seems that every game these days uses it, IE commercial games like StarWars Galaxies and Call of Duty. What are the advantages of Miles over FMod, and are they worth it to learn how to get Miles up and running? Is there any other sound library you think is better?
New problem - collision detection:
Alright, half the game will be centered around this problem prolly. I gotta detect collision between the sabers (and then stop the animations, play a wav, and a cool particle where the sabers connected). And also between each player and the other guy''s saber (in which case, deduct some health from the player''s health pool, play a wav, and display some blood or whatever). I read that you basically create invisible boxes around the object which you wanna track and work with that. Can anyone expand on that? From what I understand, I''d create two invisible boxes "on" the two sabers and somehow check collision between those boxes. Obviously I move the invisible boxes along with the sabers. The sabers themselves will be apart of the models, is that a problem? Then I''d also have boxes on the players themselves and check for collison between the saber boxes and the player boxes. Any help on this suject would be great, not looking for specific code or anything, but rather general help / a link for a tutorial or whatever. There''s a bunch of tutorials on collision between polygons / lines and camera / world right here on gametutorials.com, will those be sufficient for what I''m trying to accomplish?
I think that about covers any problems I had envisioned with my project, note that I have a few months to do it, and right now I''m at a point in which I have OpenGL initialised with a sound system (FMod) up and running, and I''m working on some models for the game in 3dmax in the mean time. The next step I''m working on is getting the 3ds loader code found on this site integrated into my program (or another format if you guys suggest that one instead).
Thanks if you read this far really, and special thanks if you reply with suggestions or comments!!
I hate to be a pessimist, but if you don't know C++ and OpenGL well, you are unlikely to be able to finish such a project even working full time for 5 months. I'm not saying it is impossible, but it will take a hell of a lot of work.
Unfortunately, the kind of questions you are asking depend a lot on your skill levels - do you know how to model in max? Do you know how to do skeletal animation in max? If not, theres a couple of months work right there. You've done tic-tac-toe, have you done a (simple!) 3D engine before? Theres at least another month, depending on how well versed you are in model formats and the math & data structures involved. The research into collision systems could well take a few weeks alone. This is not an easy project as you have laid out there.
My suggestion would be to tone it down a bit, maybe make a shooter without too much animation (unless you're a wiz at the art side, in which case knock yourself out) or hard collision problems. You'll find even doing a modest (but good) space invaders clone could take a month or more if you've never done graphics coding before.
Maybe I have pegged you wrong and you've considered all this (or maybe I'm slightly overexaggerating the timescales, although I don't think I'm far off), maybe you don't need a finished product and just a skeleton to hand in, but you've got to consider whether this really is the size of project you want to tackle.
[edited by - JuNC on September 6, 2003 5:02:48 PM]
Unfortunately, the kind of questions you are asking depend a lot on your skill levels - do you know how to model in max? Do you know how to do skeletal animation in max? If not, theres a couple of months work right there. You've done tic-tac-toe, have you done a (simple!) 3D engine before? Theres at least another month, depending on how well versed you are in model formats and the math & data structures involved. The research into collision systems could well take a few weeks alone. This is not an easy project as you have laid out there.
My suggestion would be to tone it down a bit, maybe make a shooter without too much animation (unless you're a wiz at the art side, in which case knock yourself out) or hard collision problems. You'll find even doing a modest (but good) space invaders clone could take a month or more if you've never done graphics coding before.
Maybe I have pegged you wrong and you've considered all this (or maybe I'm slightly overexaggerating the timescales, although I don't think I'm far off), maybe you don't need a finished product and just a skeleton to hand in, but you've got to consider whether this really is the size of project you want to tackle.
[edited by - JuNC on September 6, 2003 5:02:48 PM]
Well on the optimistic side, it can be done if you are passionate about it and are disciplined enough to keep working on it and not slack.
On to you questions.
You seem to have planned how everything is going to be implemented so i can say all you have left to do is code and model. For animation, i also have no idea how you can load bones animation from a .3ds file. I recommend you export to .ase and get the animation information from there. You will have to force samples to 1 when exporting and this will result in animation data for every frame. It will require more memory but it is more than enough for a game with just 2 characters.
I don''t think you really need collission detection. Firstly, collission can be very difficult to understand and implement, especially where you want to test if 2 models collided. Since you know what the moves are going to be like, you could keep a variable to keep track of how a long a particular move will take to execute. Say for an attack it takes 1s. So when Player1 attacks, Player 2 has 1s to react and try to block. Depending on how long the time has passed since the attack, you can get the time required for you collission to occur.
Eg
Player 1 attacks, 1s starts to countdown. Player 2 blocks 0.5s later. Assuming that blocking does not have a delay or if it does you can change the way it calculates, Player 2 can do the block animation and Player 1 can start reversing his animation. In this time, Player 2 is free to attack.
I really think that you don''t need collission detection since there is not going to be any movement(It is slow and difficult to implement). Also i don''t think games like Jedi Knight 2 do model - model collission tests, if you notice, the blocking in this game is almost instant.
With collission out, all you have to do is implement your game code and load your models.
Obviously, it''s easier said than done, and it is not going to be easy to do. But if you are determined enough, i think you should be able to do it in 4-5 months.
On to you questions.
You seem to have planned how everything is going to be implemented so i can say all you have left to do is code and model. For animation, i also have no idea how you can load bones animation from a .3ds file. I recommend you export to .ase and get the animation information from there. You will have to force samples to 1 when exporting and this will result in animation data for every frame. It will require more memory but it is more than enough for a game with just 2 characters.
I don''t think you really need collission detection. Firstly, collission can be very difficult to understand and implement, especially where you want to test if 2 models collided. Since you know what the moves are going to be like, you could keep a variable to keep track of how a long a particular move will take to execute. Say for an attack it takes 1s. So when Player1 attacks, Player 2 has 1s to react and try to block. Depending on how long the time has passed since the attack, you can get the time required for you collission to occur.
Eg
Player 1 attacks, 1s starts to countdown. Player 2 blocks 0.5s later. Assuming that blocking does not have a delay or if it does you can change the way it calculates, Player 2 can do the block animation and Player 1 can start reversing his animation. In this time, Player 2 is free to attack.
I really think that you don''t need collission detection since there is not going to be any movement(It is slow and difficult to implement). Also i don''t think games like Jedi Knight 2 do model - model collission tests, if you notice, the blocking in this game is almost instant.
With collission out, all you have to do is implement your game code and load your models.
Obviously, it''s easier said than done, and it is not going to be easy to do. But if you are determined enough, i think you should be able to do it in 4-5 months.
what was the question?
"There are people who live in the reality. We recreate it!"
"There are people who live in the reality. We recreate it!"
"There are people who live in the reality. We recreate it!"
I''m drunk...
5-6 months to make a beat-em-up on the PC!? I have yet to see a single half-decent fighting game on the PC. You say WSAD for player one and cursor for other? If so, that''s a huge problem alone. For example, every cruddy keyboard that i''ve had for PC can only detect 3 to 4 (If lucky) keys simultaneously. Soundz like ya need a different input
Seriously... you''ve done tic-tac-toe? Straight to "The first ever good on PC beat-em-up"? Good luck to ya!
Although Hmmm... Is the coding of this thing simply to show what you can do to the examiners? If so, do a singly inherited Neural net... do a bit of googling, you''ll find summin, NN are simple, yet complex, the simple surprises simple people (IE examiners)
If I''m just too drunk right now, then appolosise mucho.
5-6 months to make a beat-em-up on the PC!? I have yet to see a single half-decent fighting game on the PC. You say WSAD for player one and cursor for other? If so, that''s a huge problem alone. For example, every cruddy keyboard that i''ve had for PC can only detect 3 to 4 (If lucky) keys simultaneously. Soundz like ya need a different input

Seriously... you''ve done tic-tac-toe? Straight to "The first ever good on PC beat-em-up"? Good luck to ya!
Although Hmmm... Is the coding of this thing simply to show what you can do to the examiners? If so, do a singly inherited Neural net... do a bit of googling, you''ll find summin, NN are simple, yet complex, the simple surprises simple people (IE examiners)

If I''m just too drunk right now, then appolosise mucho.
Hehe, that''s ok I''ve switched around my entire project idea a few days after I made the original post =D
That''s a shame, I for one would have been interested to see how you did! What''s the new plan?
The new plan is a top-down, space shooter game, arcade style. Set in the StarWars universe as well. Player 1 chooses a ship, say an X-Wing, and player 2 chooses a Tie Fighter and they duke it out in one of 3 arenas. Left/right to rotate your ship, Up to accelerate in the direction which your ship is facing. Space-like physics, etc... The enviroments will be composed of multiple layers, including objects which can collide with the player ships, such as asteroids.
I says if you want to create the lightsaber battle its possible for you to learn what you need.
The very first OGL prog I wrote with only a book in hand controlled a lightsaber based on the mouse, that part wasnt the problem, neither was the sound of the lightsaber because i took the sound straight from the movie and used directx to play the sound per keystroke.....
I never got my blur effect to work mainly because i moved on to other programs. I think the collision detection should be handled on turn base instead of real time
ex: i press attack 1/2 sec until attack
check if user is blocking in the right quadrant within 1/2 sec
if no life-=
else let 2nd player attack
the collision is not real time because players cant attack at the same time therefore 1 keyboard will suffice.
Y
\ | / <---- This is how i split the screen up for moving
- - the light saber.
/ | \
X
PS: Im a Star Wars dork thats all the motivation i needed to write the simple lightsaber for my first prog.
The very first OGL prog I wrote with only a book in hand controlled a lightsaber based on the mouse, that part wasnt the problem, neither was the sound of the lightsaber because i took the sound straight from the movie and used directx to play the sound per keystroke.....
I never got my blur effect to work mainly because i moved on to other programs. I think the collision detection should be handled on turn base instead of real time
ex: i press attack 1/2 sec until attack
check if user is blocking in the right quadrant within 1/2 sec
if no life-=
else let 2nd player attack
the collision is not real time because players cant attack at the same time therefore 1 keyboard will suffice.
Y
\ | / <---- This is how i split the screen up for moving
- - the light saber.
/ | \
X
PS: Im a Star Wars dork thats all the motivation i needed to write the simple lightsaber for my first prog.
Im still here?
Talking about Miles Sound System, I think you have to pay a lot for get it, FMod is surely better..because it''s free! :-)
________________________________________________________www.wizardofoz.tk
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement