Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Super Smash Bros type fighting system issues
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
isaiahk9




PostPosted: Mon May 05, 2008 4:49 pm   Post subject: Super Smash Bros type fighting system issues

My game is following a fighting system similar to Super Smash Brothers. It would help if you knew what that was, but if you don't here it is :
Your player hurts the other player with attacks. When hurt, the other player's damage meter goes up. The higher the damage meter, the farther an enemy will be sent flying from an attack. The goal is to knock the enemy off the stage. (To see this type of fighting style, go onto www.addictinggames.com and search "Fight For Glorton" in the search bar in the top right hand corner).
So far I've got Master Chief/Dark Link/Aizen running around Halo Island/Dark Hyrule/Ralyot with gravity and music working smoothly. I also have all the animations prepared. Thanks to metachief for gravity - see the attachment below for the simulation.
But I have absolutely no clue how to make the change from gravity to trajectory for shooting weapons - arrows dipping down as well as flying. And more importantly, I have no clue how to increase the trajectory when you're more damaged. And there is the added problem of different moves having more or less throw to their attack.
I would appreciate it a lot if somebody could tell me a guide to trajectory for an idiot - i have no clue whatsoever. If anyone posts in reply, you and anyone you reference will be in the credits for my game.
I would appreciate it if somebody could help. Below is metachief's gravity simulator.
~thanx~



gravity.t
 Description:

Download
 Filename:  gravity.t
 Filesize:  673 Bytes
 Downloaded:  106 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon May 05, 2008 5:20 pm   Post subject: RE:Super Smash Bros type fighting system issues

"trajectory" is already included with "gravity", since it's the same concept. I suppose that would be the benefit of implementing parts yourself, and knowing how everything works, rather than plugging in someone else's code and getting stuck on the next step.

Gravity is a constant force vector acting downwards on a character. A jump is achieved by applying an upward force vector to the character. If the jump force is larger than the gravity force, it will take the engine a few frames to catch up -- that's the time when the character is moving up from the ground.

It's the same for sideways-force/friction pair to move left/right.

Taking the same concept, variable throws are trivial. You apply the same type of a force vector as you would have before, but instead of 90 degree angles, pick something in between (perhaps dependent on an attack type). Then make the magnitude of the force correlate to the damage already taken. The large the force applied, the further the throw (you can think of it as a sideways jump) will be.

You might want to throw in some air friction to prevent your characters from flying off too far, or a dump some of the force on landing, or just stick to friction and let them roll on the ground for a bit.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
isaiahk9




PostPosted: Wed May 07, 2008 7:33 pm   Post subject: Re: Super Smash Bros type fighting system issues

So I should make a x coordinate as well and a y to make the lift up, and gravity will do the rest.
That means that stronger attacks will have a larger x and y coordinate.
And to increase throw to damage, would I go
x coordinate for flying times (playerdamage times 0.01), and y coordinate for flying times (playerdamage times 0.01). Thanx for solving m problem tony.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: