Need a 2D Platformer Tutorial... Paid
by Scott Arnold · in Jobs · 01/03/2009 (8:26 pm) · 1 replies
I've spent the recent holiday (got me a 5 day weekend!) evaluating and trying to learn some Torque X in hopes of being able to build a 2D platformer game (that I've already made in Game Maker). I've gone through what tutorials I could find and even got the "Platformer Starter Kit". I had a great deal of difficulty getting that installed though, and was only able to look at the code (I still can't get it to do a successful build to see it in action). However, the Kit was so huge and has so much code I've found it very difficult to learn from.
I'm hoping I can pay someone to create a VERY simple Platformer and accompanying tutorial.
Specifically what I'm looking for:
A TXB scene with 5 static sprite objects (a "player", a "bad guy", a piece of ground, a projectile, and a "power-up"). They don't have to make any sense. They can be the spaceships from the Space Warrior tutorial, the Garage Games logo, or anything you already have lying around. The "Hello World" Tutorial showed me how to change an object's animation, so I can do that part myself.
A "Gravity" Component:
Let's me input a float "Gravity", float "Max Fall Speed", and a list of TorqueObjectTypes through TXB.
On tick, checks to see if there are any instances of TorqueObjectTypes directly below the parent object
If so, sets Y velocity to 0 and moves the parent object to contact the object below
If not, checks to see if the Y velocity is >= to Max Fall Speed
If so, keeps the Y velocity at Max Fall Speed
If not, increases Y velocity by Gravity
I'm able to do most of this myself, but where I have trouble is in checking whether or not there is "ground" below the object. The FSM Tutorial briefly covered it, but I got pretty confused, especially as I don't quite understand how to set the location I'm looking at or call the object types from my list in TXB, so I would need that part explained pretty well. Of course, if there's a better way to do gravity I'm open to that as well, so long as it's explained.
A "Customize Controls" Component.
They had these in most of the tutorials, but I got a bit confused as to how they later checked that the correct button was being pressed. I would like this component to let me to, in TXB, set the player number, and what buttons I want to use for the equivalent of the X box controls, but I don't want this component to actually move anything. Rather, I'd like to pass that to a:
"Platformer Move" Component
Let's me input Speed and Jump Strength through TXB. Checks to see if the correct buttons, set in the custom controls component, are being pressed, and then moves the parent object left or right, unless there's a certain object type in the way. Far as I know this should be very similar to the Gravity Component. Also, checks if player is on the ground (perhaps that could be set back in the gravity component?) and if so sets Y Velocity -= Jump Strength.
A "Life" Component.
Let's me input a float "HitPoints" in TXB. Decreases number of hit points when parent object collides with a TorqueObjectType "projectile". Marks to kill when hit points reach zero. I've pretty much got the hang of this, so no explanation necessary. But see the "firepower" component below.
A "Shooter" component.
Let's me input a "shoot speed" and "shoot delay" to TXB. Then when pressing the "shoot" button, creates a projectile at a relative position. I'm going to need the tutorial or //comments to explain how to make the projectile at a specific position, instead of at the object's 0,0, (for example if I use a sprite of a guy with a gun, I would want the projectile created at the tip of the gun, not in the guy's chest).
Continued when I get more characters...
I'm hoping I can pay someone to create a VERY simple Platformer and accompanying tutorial.
Specifically what I'm looking for:
A TXB scene with 5 static sprite objects (a "player", a "bad guy", a piece of ground, a projectile, and a "power-up"). They don't have to make any sense. They can be the spaceships from the Space Warrior tutorial, the Garage Games logo, or anything you already have lying around. The "Hello World" Tutorial showed me how to change an object's animation, so I can do that part myself.
A "Gravity" Component:
Let's me input a float "Gravity", float "Max Fall Speed", and a list of TorqueObjectTypes through TXB.
On tick, checks to see if there are any instances of TorqueObjectTypes directly below the parent object
If so, sets Y velocity to 0 and moves the parent object to contact the object below
If not, checks to see if the Y velocity is >= to Max Fall Speed
If so, keeps the Y velocity at Max Fall Speed
If not, increases Y velocity by Gravity
I'm able to do most of this myself, but where I have trouble is in checking whether or not there is "ground" below the object. The FSM Tutorial briefly covered it, but I got pretty confused, especially as I don't quite understand how to set the location I'm looking at or call the object types from my list in TXB, so I would need that part explained pretty well. Of course, if there's a better way to do gravity I'm open to that as well, so long as it's explained.
A "Customize Controls" Component.
They had these in most of the tutorials, but I got a bit confused as to how they later checked that the correct button was being pressed. I would like this component to let me to, in TXB, set the player number, and what buttons I want to use for the equivalent of the X box controls, but I don't want this component to actually move anything. Rather, I'd like to pass that to a:
"Platformer Move" Component
Let's me input Speed and Jump Strength through TXB. Checks to see if the correct buttons, set in the custom controls component, are being pressed, and then moves the parent object left or right, unless there's a certain object type in the way. Far as I know this should be very similar to the Gravity Component. Also, checks if player is on the ground (perhaps that could be set back in the gravity component?) and if so sets Y Velocity -= Jump Strength.
A "Life" Component.
Let's me input a float "HitPoints" in TXB. Decreases number of hit points when parent object collides with a TorqueObjectType "projectile". Marks to kill when hit points reach zero. I've pretty much got the hang of this, so no explanation necessary. But see the "firepower" component below.
A "Shooter" component.
Let's me input a "shoot speed" and "shoot delay" to TXB. Then when pressing the "shoot" button, creates a projectile at a relative position. I'm going to need the tutorial or //comments to explain how to make the projectile at a specific position, instead of at the object's 0,0, (for example if I use a sprite of a guy with a gun, I would want the projectile created at the tip of the gun, not in the guy's chest).
Continued when I get more characters...
Scott Arnold
I would like to slap this onto the player and, when the player collides with a definably object type (the "power-up") I can increase a variable "Firepower". Somehow that variable would be passed on to the projectile when he shoots, and then when the enemy gets hit with the projectile the enemy loses that many hit points. The whole "player shoots and damages the enemy" was covered pretty well in the Space Warrior tutorial, but I got confused when I tried to pass a "Firepower" variable along from the player, to the projectile, and then to the enemy when it gets hit, so I would need some good explanation on how to do that. Also, it would be great if there were a few settings I could tweak in TXB, so that with the same component I could have "power-ups" that increase firepower and some that re-fill "hit points". (Perhaps there would have to be 2 components, one for the player object and one for the power-up object, so that the power-up object can set what variable to increase (firepower or hitpoints) and also by how much.)
Theoretically, with these I would be able to slap all these components on two separate objects and, so long as I defined them as different players and different controls in the "Customize Controls" Component, could have two players running around shooting each other. Alternatively, I could throw just the Gravity, Life, and then write my own "EnemyAIComponent," and make a "bad guy object" that just walks towards the player (and maybe jumps on occasion) that he can shoot at.
As for the "tutorial" aspect, I don't need any pictures or anything. I just need those certain things I haven't quite grasped explained. Again, those would be:
How to check and see if the "jump" button (whatever actual button I set it to in the Custom Control Component) is being pressed.
How to check if there are any instances of TorqueObjectTypes directly below the parent object. (or however you would suggest doing gravity). Theoretically this would be the same method to check if there's a wall in front of the parent object, to restrict horizontal movement, yeah?
How to spawn an object in a position relative to the parent object (I.e. parent's position +4 X units or whatever)
How to take a float "Firepower" from a "player", and carry it on a projectile and then use it when hitting an enemy.
A review on setting up a method to launch on collision, so that when the "player" collides with the "power-up" I can kill the power-up and increase my firepower or hit-points.
Also of note, I'm using TXB v1.1.5, and XNA Game Studio Express
So there you go. If anyone who's got a pretty good hang of Torque X and has some free time, shoot me an email, let me know your credentials, when you could get it done, and your rate. Also, if you've got any questions or comments post 'em here. My email: gorogorosama at gmail dot com.
One last note, I do plan on making this available to the public once I run through it. Hopefully it can help the "lack of documentation" problem, if only just a little bit.