2D Platformer with melee combat and colour mechanism
by Fabiene MacMillan · in Torque Game Builder · 02/22/2011 (4:09 pm) · 6 replies
G'day!
I'm a fourth year student at the University of Abertay Dundee, for my honours project I'm trying to empathise what it's like to be a single developer, by trying to create a game of my own design by myself.
You can read the documentation and game principles at my blog entry: http://tribulationsofagamer.wordpress.com/projects/honours%C2%A0project/
I've already begun work using the miniplatformer tutorial, swapping out my own assets as seen here http://www.youtube.com/watch?v=iGIKChGXx6s&feature=player_embedded
But I'm at a loss where to go from here, now that I have basic platforming elements I can crack on with level design but I foresee the more complex game mechanics becoming difficult to even visualise let alone create due to the lack of further documentation, an inexperience of programming and coupled with a lack of time to experiment and fully run through all of the tutorials available makes for a stressful situation.
The combat for example, I initially imagined as Attack, Block (Reduced damage from being attacked) and Evade (A time event that only function after an enemy has initiated it's attack), if that worked it was to be deepened with a colour system, whereby the player can only damage enemies of the same colour whilst the enemies could harm the player regardless and the player would change their colour according to the source of damage taken (eaplained further in my blog entry). Yet I've found little to no information concerning combat, other than jumping on the heads of one's enemies.
I was hoping if anyone could perhaps point me in the right directions, be it tutorials or advise you think would be relevant.
I'm currently working through makingindiegame's TGB lessons just so that I understand the coding behind Torque Game Builder, my programming capabilities rather lacking and I had another question concerning this tutorial
http://tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerOverview
Given the warning, considering it goes into further detail about enemy creation and level progression/functionality, is there nothing to be learned that still works from it?
I have also been tempted to grab the Platformer Kit, rather on the edge although, given that I would assume it would take the majority of the programming out of the equation and allow me to focus more on the art and gameplay but the matters presceding this question take priority.
A long post but I hope to work hard to make something unique I can eventually show off when I graduate and ideally this thread would help those who were to new to TGB and wish to create a similar type of game, I would truly appreciate any help given.
I'm a fourth year student at the University of Abertay Dundee, for my honours project I'm trying to empathise what it's like to be a single developer, by trying to create a game of my own design by myself.
You can read the documentation and game principles at my blog entry: http://tribulationsofagamer.wordpress.com/projects/honours%C2%A0project/
I've already begun work using the miniplatformer tutorial, swapping out my own assets as seen here http://www.youtube.com/watch?v=iGIKChGXx6s&feature=player_embedded
But I'm at a loss where to go from here, now that I have basic platforming elements I can crack on with level design but I foresee the more complex game mechanics becoming difficult to even visualise let alone create due to the lack of further documentation, an inexperience of programming and coupled with a lack of time to experiment and fully run through all of the tutorials available makes for a stressful situation.
The combat for example, I initially imagined as Attack, Block (Reduced damage from being attacked) and Evade (A time event that only function after an enemy has initiated it's attack), if that worked it was to be deepened with a colour system, whereby the player can only damage enemies of the same colour whilst the enemies could harm the player regardless and the player would change their colour according to the source of damage taken (eaplained further in my blog entry). Yet I've found little to no information concerning combat, other than jumping on the heads of one's enemies.
I was hoping if anyone could perhaps point me in the right directions, be it tutorials or advise you think would be relevant.
I'm currently working through makingindiegame's TGB lessons just so that I understand the coding behind Torque Game Builder, my programming capabilities rather lacking and I had another question concerning this tutorial
http://tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerOverview
Given the warning, considering it goes into further detail about enemy creation and level progression/functionality, is there nothing to be learned that still works from it?
I have also been tempted to grab the Platformer Kit, rather on the edge although, given that I would assume it would take the majority of the programming out of the equation and allow me to focus more on the art and gameplay but the matters presceding this question take priority.
A long post but I hope to work hard to make something unique I can eventually show off when I graduate and ideally this thread would help those who were to new to TGB and wish to create a similar type of game, I would truly appreciate any help given.
#2
Currently I am managing combat in the way Dave suggested.
I attach a "hitbox" object on the character sprite. This hitbox is assigned a deal damage behavior (taken from the TDN behaviors with some modifications). This hitbox has its collision detection turned on and off when the player attacks.
I think i currently got the collisions working, and in theory I could start prototiping a basic side scroller brawler now.
Problem with this solution so far: I want my character to also have some "swing" like attacks. Like swinging the hammer above player's head down to the floor. I am still unsure on how to handle those collisions.
Probably have the arms wielding a weapon as separate images could solve this.
Have in mind i am also new to TGB, so this solution might very well be a horrible idea.
02/23/2011 (7:43 am)
I am currently working on getting the mechanics for a sidescroll brawler working.Currently I am managing combat in the way Dave suggested.
I attach a "hitbox" object on the character sprite. This hitbox is assigned a deal damage behavior (taken from the TDN behaviors with some modifications). This hitbox has its collision detection turned on and off when the player attacks.
I think i currently got the collisions working, and in theory I could start prototiping a basic side scroller brawler now.
Problem with this solution so far: I want my character to also have some "swing" like attacks. Like swinging the hammer above player's head down to the floor. I am still unsure on how to handle those collisions.
Probably have the arms wielding a weapon as separate images could solve this.
Have in mind i am also new to TGB, so this solution might very well be a horrible idea.
#3
ALthough I am a little suprised at the lack of documentation about this kind of gameplay, 2D fighting, is it that its so simple or such a broad subject?
02/23/2011 (9:13 am)
A friend of mine suggested something along the same lines as your method Xavier, I'm leaving combat for about a week or so into development as I get more aquainted with TorqueScript and have a bit of fun making the levels, so I'll be eager to hear how you get on!ALthough I am a little suprised at the lack of documentation about this kind of gameplay, 2D fighting, is it that its so simple or such a broad subject?
#4
Summing up the things I deem important, each frame of an animation can have 0 or more "attack collision boxes" and "defense collision boxes".
The attack boxes work as others describes, the defense box is used to check if an attack should harm the player. If the character uses his own body to attack it makes sense to have a "defense" box as well as an "attack" box in the attacking area, if instead uses a weapon a defense box may not be added for that area.
That also applies to enemies as well.
The color thing is more like a flag that should be checked even before comparing boxes. There shouldn't be much trouble there, it's just a boolean check that should be done before comparing those collision boxes.
The problem of all this is that collision boxes in Torque are simple to do in the editor but specific boxes per frame are not possible. So... I don't know :)
02/25/2011 (11:59 am)
I suggest studying Mugen or similar fighting game engines.Summing up the things I deem important, each frame of an animation can have 0 or more "attack collision boxes" and "defense collision boxes".
The attack boxes work as others describes, the defense box is used to check if an attack should harm the player. If the character uses his own body to attack it makes sense to have a "defense" box as well as an "attack" box in the attacking area, if instead uses a weapon a defense box may not be added for that area.
That also applies to enemies as well.
The color thing is more like a flag that should be checked even before comparing boxes. There shouldn't be much trouble there, it's just a boolean check that should be done before comparing those collision boxes.
The problem of all this is that collision boxes in Torque are simple to do in the editor but specific boxes per frame are not possible. So... I don't know :)
#5
02/25/2011 (12:05 pm)
Well, you could build collision boxes in the editor and just note down the results and programmatically change them/mount them in different positions via the animation functions. I could see this being done easily with attack/defense behaviours containing some parameters for damage and special cases.
#6
02/27/2011 (7:41 am)
I prototyped a fighting game in an earlier version of TGB, but it broke with the newer versions when some things changed. The characters could shoot particle projectiles with their own collision callbacks, do special moves, jump around etc. I think people get too wrapped up trying to get pixel perfect collision detection for their brawler. IMO that isn't really necessary to make a fighter work and make it fun.
Torque Owner Shaolin Dave
AwesomeSauce Games, L.L.C.