Platform tutorials
by Ryan McKenzie · in Torque Game Builder · 09/04/2006 (5:41 pm) · 61 replies
I am after any platform tutorials for TGB, so far i'm learning from the mini platform tutorial at TDN but it doesn't explain everything, can somebody point me in a good direction. My aim is to create a game like sonic the hedgehog.
Ryan
Ryan
About the author
#2
Simply saying that if the old tutorial wasn't so hard to get round and was up to date then I would of found my match to creating my platform game.
The new tutorial is however easy to follow but just doesn't tell enough. I really need to know how to create enemies, make them wonder, attack, recieve attack, etc. And small things like making my player slide down a hill when traveling at a certain speed and at a certain angle. There's loads of questions I'd need to ask to make the game I want.
09/05/2006 (1:23 pm)
@David, The tutorial doesn't include enemies, an important object in all platform games. Also winning and losing. I've noticed the old platform tutorial on TDN which includes very good basics and some intemediate skills included, this tutorial isn't as usefull because 1. The newer version of TGB is quite diffrent (especialy the tile builer) and 2. The scripting in the Tutorial has experienced some faults in the syntax which is usually hard to get round.Simply saying that if the old tutorial wasn't so hard to get round and was up to date then I would of found my match to creating my platform game.
The new tutorial is however easy to follow but just doesn't tell enough. I really need to know how to create enemies, make them wonder, attack, recieve attack, etc. And small things like making my player slide down a hill when traveling at a certain speed and at a certain angle. There's loads of questions I'd need to ask to make the game I want.
#3
We want to make game development accessible, but it does take work. From reading your many posts it sounds like if game development were music, you would like to have the equivalent of karaoke. Is that what you are looking for? Maybe if you could describe what you are looking for we could help. If we did supply what you are looking for, then what would be the changes you see yourself making so the game is your own and not the same game the thousands of other people could make?
Again, I am not trying to pick on you here. I am trying to understand what could be a large market of people are looking for.
-Jeff Tunnell, GG
09/05/2006 (2:51 pm)
@Ryan: Do you just want a game that you put in different art work? Or do you want to make your own game. It almost sounds like you would like a platformer game that is "moddable". I am not trying to shoot you down, I am just trying to understand the expectations of the "newbiest" members of our community.We want to make game development accessible, but it does take work. From reading your many posts it sounds like if game development were music, you would like to have the equivalent of karaoke. Is that what you are looking for? Maybe if you could describe what you are looking for we could help. If we did supply what you are looking for, then what would be the changes you see yourself making so the game is your own and not the same game the thousands of other people could make?
Again, I am not trying to pick on you here. I am trying to understand what could be a large market of people are looking for.
-Jeff Tunnell, GG
#4
For a start I want to create my own game out of my own artwork. I'm very familuare in digital art so thats not a problem to me. Once having an idea I found and turned to TGB a few months ago. So I've been learning the basics like the shooter tutorial and fish game, however seeing that I am wanting to create a platform game, these tutorials wern't exactly what I was looking for. So I got my hands on the real deal and got the full version of TGB.
Soon as possible went straight to TDN to see a tutorial in my catagory. PERFECT!! Soon finding the mini platform tutorial ( actually I first came to the old tutorial but didn't get far ).
My player had to run, jump, attack and destroy enemies through 5 diffrent levels. But I knew making this game was going to be a question on the way. I had the game so clear in my head of what I wanted that I was bound to ask questions to achieve small actions like, falling down a hill if the character isn't going fast enough bla bla bla......
So I knew making this game was going to be very tough but here I am having to learn. So the mini platform tutorial did not supply everything I needed to know so I wondered if there was anything else that I could achieve and build on. Again I'm looking for some clear and huge platform basics like enemies. And winning and loosing. The old platform tutorial supplied all of this but I found it difficult to understand (seeing as i was not good with script).
Simply I am looking for somone to point me in a good direction to making a game like this.
09/05/2006 (3:42 pm)
@Jeff, For a start I want to create my own game out of my own artwork. I'm very familuare in digital art so thats not a problem to me. Once having an idea I found and turned to TGB a few months ago. So I've been learning the basics like the shooter tutorial and fish game, however seeing that I am wanting to create a platform game, these tutorials wern't exactly what I was looking for. So I got my hands on the real deal and got the full version of TGB.
Soon as possible went straight to TDN to see a tutorial in my catagory. PERFECT!! Soon finding the mini platform tutorial ( actually I first came to the old tutorial but didn't get far ).
My player had to run, jump, attack and destroy enemies through 5 diffrent levels. But I knew making this game was going to be a question on the way. I had the game so clear in my head of what I wanted that I was bound to ask questions to achieve small actions like, falling down a hill if the character isn't going fast enough bla bla bla......
So I knew making this game was going to be very tough but here I am having to learn. So the mini platform tutorial did not supply everything I needed to know so I wondered if there was anything else that I could achieve and build on. Again I'm looking for some clear and huge platform basics like enemies. And winning and loosing. The old platform tutorial supplied all of this but I found it difficult to understand (seeing as i was not good with script).
Simply I am looking for somone to point me in a good direction to making a game like this.
#5
I'm really getting a hard time trying to get my platformer to work properly :/
09/05/2006 (4:18 pm)
Yep, we need something as complete as the old tutorial, but updated and with better explanation for each thing.I'm really getting a hard time trying to get my platformer to work properly :/
#6
09/05/2006 (5:06 pm)
Keep your eyes open for a platformer "framework" thats been worked on to be released. Right now trying to find time to test it more fully and partner it with a starter tutorial on how to use it.
#7
@Ryan, depending on your patience and ability to merge various lessons learned from different tutorials, I believe everything you need (with the exception of the rolling down hill) is actually available in all of the tutorials -- for example, the Whack-a-Mole tutorial shows you how to keep track of scores, checking the value of the score would be as easy as adding a few extra lines of comparison code to the 'keeping track of score' portion of the game.
As for the enemies, I believe the Fish demo would explain the general basics of colliding and managing your player with enemy collisions.
For AI (moving around, etc) that would all depend on the complexity of your Platformer, old-school platformers basically triggered the enemy and then had them walk back and forth on the platform they were on -- Sonic, Mario Bros., etc, etc ... all performed there enemy 'AI' this way. A more complex AI could be devised but the 'AI' section on TDN is 'red' ...
I've yet had the chance to look into the platformer tutorial to see where it's lacking, which was why I asked my initial question -- sometime this week (perhaps even tonight) I will take a look at it ... and perhaps have more input after that.
@Jeff, from the posts I've read thus far from a large majority of people -- it would appear as though having more 'out of the box' games would be nice, there appears to be a fairly good amount of artists and non-coders that want to 'play around' as much as the rest of us and they seem to all be having trouble with scripting in torquescript or coding in C++ ... perhaps if each of the tutorials were 'full blown' games, or at least provided the additional files or a download that made it as such -- some of the artists could prototype there artwork in a real game, and/or mod an existing game and make it there own. But that's just an opinion, I'm a coder so I like doing everything the hard way personally :)
09/05/2006 (6:05 pm)
@Mathhew, will that 'framework' be made available for free or as a content/script pack?@Ryan, depending on your patience and ability to merge various lessons learned from different tutorials, I believe everything you need (with the exception of the rolling down hill) is actually available in all of the tutorials -- for example, the Whack-a-Mole tutorial shows you how to keep track of scores, checking the value of the score would be as easy as adding a few extra lines of comparison code to the 'keeping track of score' portion of the game.
As for the enemies, I believe the Fish demo would explain the general basics of colliding and managing your player with enemy collisions.
For AI (moving around, etc) that would all depend on the complexity of your Platformer, old-school platformers basically triggered the enemy and then had them walk back and forth on the platform they were on -- Sonic, Mario Bros., etc, etc ... all performed there enemy 'AI' this way. A more complex AI could be devised but the 'AI' section on TDN is 'red' ...
I've yet had the chance to look into the platformer tutorial to see where it's lacking, which was why I asked my initial question -- sometime this week (perhaps even tonight) I will take a look at it ... and perhaps have more input after that.
@Jeff, from the posts I've read thus far from a large majority of people -- it would appear as though having more 'out of the box' games would be nice, there appears to be a fairly good amount of artists and non-coders that want to 'play around' as much as the rest of us and they seem to all be having trouble with scripting in torquescript or coding in C++ ... perhaps if each of the tutorials were 'full blown' games, or at least provided the additional files or a download that made it as such -- some of the artists could prototype there artwork in a real game, and/or mod an existing game and make it there own. But that's just an opinion, I'm a coder so I like doing everything the hard way personally :)
#8
09/05/2006 (6:14 pm)
@David: for free :) It will be sent out as an RSS ping as well.
#9
I am, however, interested in testing a few theories on enemies. I also seem to have an issue with my Player object 'climbing' up objects as he jumps. For example, the default level that the tutorial has you build along with the physics settings it provides does not allow the player to jump onto the platform that is floating -- however, with the small 'bug' of wall climbing, you can get on the platform with little to no trouble at all (I believe I saw another post referring to this as well -- will check that out in a bit).
@Ryan, I may ammend an 'Enemies' section to the tutorial sometime in the near future, otherwise, the Fish Demo and the Whack-a-Mole demo have everything you need in them as far as 'code examples' go, it's just a matter of putting them into the platformer and adding a new enemy graphic.
09/05/2006 (7:49 pm)
Ok, I've just gone through tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial on TDN. I too feel as though it's missing quite a bit, but I also feel as though I learned enough from it to work from there and create a complete game.I am, however, interested in testing a few theories on enemies. I also seem to have an issue with my Player object 'climbing' up objects as he jumps. For example, the default level that the tutorial has you build along with the physics settings it provides does not allow the player to jump onto the platform that is floating -- however, with the small 'bug' of wall climbing, you can get on the platform with little to no trouble at all (I believe I saw another post referring to this as well -- will check that out in a bit).
@Ryan, I may ammend an 'Enemies' section to the tutorial sometime in the near future, otherwise, the Fish Demo and the Whack-a-Mole demo have everything you need in them as far as 'code examples' go, it's just a matter of putting them into the platformer and adding a new enemy graphic.
#10
Just my thoughts, since a miniEnemy tutorial could be useful not only to platform games but any game that requires enemies. The AI may change, but the basics of pathing and such are similar between genres and perspectives.
09/06/2006 (7:36 am)
Rather than amending a section, I would create a miniEnemies tutorial. Mini tutorials should be simple and to-the-point, which the platform tutorial is. It gives a nice bite-sized chunk to get people moving quickly without providing too much information. It also keeps thing easier to update as new versions come out due to compartmentalization. Rather than moving through the entire platform tutorial, which people are irritated by due to its use of a previous version and lack of updates to the current release, the miniTutorials make updating seem like a less difficult proposition. Unless they get huge.Just my thoughts, since a miniEnemy tutorial could be useful not only to platform games but any game that requires enemies. The AI may change, but the basics of pathing and such are similar between genres and perspectives.
#11
Thank you for your consideration. I also agree with David Blake and his thoughts on the matter. A mini enemie tutorial would surely help alot of people. But untill that time what else is there to do but make the most of seperate tutorials.
@Mathew, Thanks for the heads up. I had been hearing rumours about that tutorial. Will look out for it when released.
09/06/2006 (4:05 pm)
@David Higgins,Thank you for your consideration. I also agree with David Blake and his thoughts on the matter. A mini enemie tutorial would surely help alot of people. But untill that time what else is there to do but make the most of seperate tutorials.
@Mathew, Thanks for the heads up. I had been hearing rumours about that tutorial. Will look out for it when released.
#12
09/06/2006 (4:50 pm)
@David Blake, I can do either ... seems the mini tutorial thing is the new fad, so I'll probably stick with that and add a link to it in the platformer for 'Related Tutorials' or something *shrug*
#13
the plan with the mini tutorials is eventually to have a bunch of mini tutorials on things like AI, physics, etc.. in different genres, so you can go in, learn a little bit, and then decide to piece them together as you see fit to make your game.
What we are attempting to do is create a bunch of functionality that can be re-used for just about any game type, use these peices to make frameworks for specific genres, and show examples of how to do this (demos)
As David pointed out, these smaller tutorials allow us to do more quickly, and update things more efficiently.
The other thing that we want to avoid is srticly mandating the way a game should be made, or make too many assumptions about what people are attempting to make. If we go off in one direction that does not meet a requirement of someone's game idea, then we will constantly have to be updating the docs and adding lots of extras specific to someones game idea.
We would rather give out chunks of functionality and allow people to piece these together however they see fit.
Eventually, we will take all of these mini tutorials and string them together into larger projects. These are intended not only to show people how to make larger projects, but also how to take all the smaller chunks and stitch them together.
If you look at the images in My Blogs or looks at images of the Tank Buster images in nates plan, you will see that we have a lot planned on these fronts to help show how to best utilize the tools.
09/06/2006 (7:06 pm)
Hey all, the plan with the mini tutorials is eventually to have a bunch of mini tutorials on things like AI, physics, etc.. in different genres, so you can go in, learn a little bit, and then decide to piece them together as you see fit to make your game.
What we are attempting to do is create a bunch of functionality that can be re-used for just about any game type, use these peices to make frameworks for specific genres, and show examples of how to do this (demos)
As David pointed out, these smaller tutorials allow us to do more quickly, and update things more efficiently.
The other thing that we want to avoid is srticly mandating the way a game should be made, or make too many assumptions about what people are attempting to make. If we go off in one direction that does not meet a requirement of someone's game idea, then we will constantly have to be updating the docs and adding lots of extras specific to someones game idea.
We would rather give out chunks of functionality and allow people to piece these together however they see fit.
Eventually, we will take all of these mini tutorials and string them together into larger projects. These are intended not only to show people how to make larger projects, but also how to take all the smaller chunks and stitch them together.
If you look at the images in My Blogs or looks at images of the Tank Buster images in nates plan, you will see that we have a lot planned on these fronts to help show how to best utilize the tools.
#15
David: I also have the same problems with the character going up on walls, this is because when theres a collision you stop the gravity in midair to the character since you dont know you are hitting the floor or a wall, thefore he scalates any wall, there are two ways to fix this.
The easy (and buggy way) is to simple comment out the section in updateMovement where you use the castcollision function, however sometimes (not always) the character wont know if he is in the air or not.
The hard (and right) way to do it is to do a collision check against the platform, and check weither you are colliding with a wall or a floor. (by using the method described in the platform demo)
Im still looking for something in between.
09/08/2006 (9:00 am)
Those are great news I love the minitutorials. David: I also have the same problems with the character going up on walls, this is because when theres a collision you stop the gravity in midair to the character since you dont know you are hitting the floor or a wall, thefore he scalates any wall, there are two ways to fix this.
The easy (and buggy way) is to simple comment out the section in updateMovement where you use the castcollision function, however sometimes (not always) the character wont know if he is in the air or not.
//comment this out
/*
if(%collision $= "")
{
$pGuy.setConstantForceY(100);
}
else
{
$pGuy.setConstantForceY(0);
}
*/The hard (and right) way to do it is to do a collision check against the platform, and check weither you are colliding with a wall or a floor. (by using the method described in the platform demo)
Im still looking for something in between.
#16
Great to hear about a platformer framework. I hope it will cover the following:
- Slanted tiles (aka Mario 3, where mario can slide down sloping hills, or Suped Metroid). i.e. not everything is square
- Moving/falling platforms. Moving platforms move through the air, and the hero or enemies can ride on it. Falling platforms are similar, but stationary in the air, and fall when stepped on.
- Tiles that you collide with only when falling. But you can walk left/right through them, or jump up through them. Think of the small "hills" in Mario 3. You can jump up to the top and run around on them, or you can run past (through) them.
I mention these not because I want you to write a game for me, but because these things are typically the trickiest things to do in a platformer. If you can solve those issues, then the rest is relatively easy.
09/08/2006 (12:50 pm)
@Matthew -Great to hear about a platformer framework. I hope it will cover the following:
- Slanted tiles (aka Mario 3, where mario can slide down sloping hills, or Suped Metroid). i.e. not everything is square
- Moving/falling platforms. Moving platforms move through the air, and the hero or enemies can ride on it. Falling platforms are similar, but stationary in the air, and fall when stepped on.
- Tiles that you collide with only when falling. But you can walk left/right through them, or jump up through them. Think of the small "hills" in Mario 3. You can jump up to the top and run around on them, or you can run past (through) them.
I mention these not because I want you to write a game for me, but because these things are typically the trickiest things to do in a platformer. If you can solve those issues, then the rest is relatively easy.
#17
Though, that's all general 'theory' and would work ... though I'm running into a few issues with the overall collision detection system that TGB uses ... where it's a set polygon system, pixel detection would be nice, but I'm not seeing that anytime in the future ... *peers at Allegro and sobs*
All around, I think TGB can do quite a few impressive things with platformers, but I think alot of the odd stuff people are looking to do that mimic existing platformers like SM3 and Sonic would require some modification to the C++ source to account for those special circumstances and I can't off the top of my head see any other reason other then platformers to add that functionality into the core TGB source -- except for pixel collisions ;p
09/08/2006 (5:21 pm)
@Vern, I don't think it will go that extent, but using a collision check system like @AzraelK mentioned in his post would allow you to account for the walking through tiles (determine where the collision came from) .. for the rolling down hills, that should be as simple (yeah, I know, 'simple', right?) as setting the collision polygon for the tiles the way you want it and then changing the characters collision polygon and making it so that the physics system will automatically "slide" or "roll" the character down the hill (after applying gravity back to the character when they collide [walk on top of] the tile).Though, that's all general 'theory' and would work ... though I'm running into a few issues with the overall collision detection system that TGB uses ... where it's a set polygon system, pixel detection would be nice, but I'm not seeing that anytime in the future ... *peers at Allegro and sobs*
All around, I think TGB can do quite a few impressive things with platformers, but I think alot of the odd stuff people are looking to do that mimic existing platformers like SM3 and Sonic would require some modification to the C++ source to account for those special circumstances and I can't off the top of my head see any other reason other then platformers to add that functionality into the core TGB source -- except for pixel collisions ;p
#18
And if I jump while going left/right, and jump up against a wall, he'll slow way down, and in fact sometimes even continue to move up at a constant speed, instead of falling, for as long as I keep jump pushed, and keep him pushed up against the wall.
Sometimes I've also managed to fall right through tiles.
I also tried defining a custom collision polygon for the main guy, but this made things MUCH worse. He moves up and down a lot now when walking on a solid floor, and falls right through some tiles.
Is this all just me? Is anyone else seeing any of these issues???
It seems to me like it would be better to just do everything "from scratch". Turn off Torque's physics, and do it all by hand. Doesn't seem any worse than their current method, since all their code is executed from within the onSceneUpdate() method anyway.... I thouth we were supposed to avoid putting too much in that function. But the way the tutorial is done, you'd have to put not only the hero's movement stuff in there, but ALSO any movement for any enemies in there. So it seems like doing it all by hand, from scratch, wouldn't be much slower, and I'd have a heck of a lot more control over it, keeping things working the way they should.
09/08/2006 (5:42 pm)
I just went through the Mini Platformer tutorial. My guy ends up falling about 1/3 into the tile before he stops. Also, when I jump, his head goes about 1/3 into the tile before he stops. And if I jump while going left/right, and jump up against a wall, he'll slow way down, and in fact sometimes even continue to move up at a constant speed, instead of falling, for as long as I keep jump pushed, and keep him pushed up against the wall.
Sometimes I've also managed to fall right through tiles.
I also tried defining a custom collision polygon for the main guy, but this made things MUCH worse. He moves up and down a lot now when walking on a solid floor, and falls right through some tiles.
Is this all just me? Is anyone else seeing any of these issues???
It seems to me like it would be better to just do everything "from scratch". Turn off Torque's physics, and do it all by hand. Doesn't seem any worse than their current method, since all their code is executed from within the onSceneUpdate() method anyway.... I thouth we were supposed to avoid putting too much in that function. But the way the tutorial is done, you'd have to put not only the hero's movement stuff in there, but ALSO any movement for any enemies in there. So it seems like doing it all by hand, from scratch, wouldn't be much slower, and I'd have a heck of a lot more control over it, keeping things working the way they should.
#19
With the current approach, I think that if you tried to implement such a tile, and jumped in such a way that your guy was under this tile to start, and he got *close* enough to stand on it, but not close enough, he'd still end up being placed on top of it as he fell, even though he never got close enough to the top of the tile to stand on it. He *should* have fallen back down to where he started.
This is just speculation of course, but the way the demo uses castCollision() callls to determine if a solid tile is under him leads me to believe the above problem would exist if you tried to make a more complete game.
And that's not to mention the current problems with the demo.
Seems like doing something from scratch is the way to go here. I wonder if I put together a system that *worked*, doing things from scratch, would the Torque folks be interested in distributing is as an add-on pack? I have quite a bit of experience with platformers (released one called Midnight Mansion: www.actionsoft.com), and there are all sorts of issues you can run into when you try to put together anything more complicated than the Mini Platformer demo shows. (i.e. moving platforms, conveyor belts, falling platforms, tiles you can't fall through but *can* jump up through, etc.)
09/08/2006 (5:50 pm)
Come to think of it, I'm guessing the approach taken by the Mini Platformer tutorial would completely fail in situations posed by real games. For instance, consider the situation where you want to be able to walk left/right through a tile without colliding with it, and also want to be able to jump up through that tile, but NOT fall through it.With the current approach, I think that if you tried to implement such a tile, and jumped in such a way that your guy was under this tile to start, and he got *close* enough to stand on it, but not close enough, he'd still end up being placed on top of it as he fell, even though he never got close enough to the top of the tile to stand on it. He *should* have fallen back down to where he started.
This is just speculation of course, but the way the demo uses castCollision() callls to determine if a solid tile is under him leads me to believe the above problem would exist if you tried to make a more complete game.
And that's not to mention the current problems with the demo.
Seems like doing something from scratch is the way to go here. I wonder if I put together a system that *worked*, doing things from scratch, would the Torque folks be interested in distributing is as an add-on pack? I have quite a bit of experience with platformers (released one called Midnight Mansion: www.actionsoft.com), and there are all sorts of issues you can run into when you try to put together anything more complicated than the Mini Platformer demo shows. (i.e. moving platforms, conveyor belts, falling platforms, tiles you can't fall through but *can* jump up through, etc.)
#20
09/08/2006 (5:58 pm)
The mini platformer tutorial is a great tutorial. It's meant to teach you the scripting language, the engine calls, and the Level Builder. That's what tutorials are all about. Now you can take that knowledge and re-apply it in a much more robust and effective way :)
Associate David Higgins
DPHCoders.com