Game Development Community

Platformer Games

by Melanie · in Torque X 2D · 04/05/2008 (12:51 pm) · 4 replies

Hello

Does anyone have a demo platformer game that I can look at and play with? I am trying to create a side scrolling platformer game, but am really struggling, it needs 3 main parts, Jumping, collecting items, and killing enemys but the main part I am really strugging with at the moment is getting a character to jump, some help would be greatly appreciated please.
either code with a step by step guide or a demo game with code this would mean so much to me.

Thank you

Melanie

x

#1
04/05/2008 (1:03 pm)
Unfortunately, what I would show you would be the platformer kit, and I know from a previous post that you're not interested in a pay solution. There might be some XNA tutorials that would help at the Creator's Club site.
#2
04/05/2008 (1:16 pm)
Ye sorry from what I understand the 2.0 version of Torque X isnt compatible with the platformer kit. Hense the need for a demo with code...

Thank you

Mel
#3
04/05/2008 (2:26 pm)
For jumping, try adding a T2DPhysicsComponent and setting a velocity to some sort of -Y value that is greater than the gravity's +Y value; the player's mass value and a gravity force should return the player to the ground. Collecting items is a simple matter of adding a T2DCollisionComponent to the item object that responds to the player's object type. The same holds true for killing enemies - your weapon's projectiles have collisions that check for the enemy object type and then 'mark them for delete' upon contact.

Again, the Platformer Kit spells everything out, but short of that, you can check on the "Rainy Day" tutorial to learn about animations, triggers, player input, and collisions. You can also study from the "Space Warrior" tutorial to learn about projectiles killing enemies.

John K.
#4
07/22/2009 (7:31 pm)
I've found that adding a physics component to a player object does nothing. Other non-player objects function as expected. I can add velocities to it and it will not cause it to fall, thereby making it difficult to simulate a jump. Is there something else I would need to do besides setting a Y velocity on a physics component? Is there just another way to simulate a jump?