Running A Rail Type Game
by Night Fox · in Torque Game Engine · 08/06/2007 (7:40 pm) · 3 replies
Hey I've been checking the threads a lot and hunting resources is proving tough on my time so hopefully I can get some help from the community.
How can I run a rail type game similar to StarFox 64 where the Arwing is contained in a forward motion upon a path, only able to stay within the camera bounds and unable to pull full maneuvers in all directions. I want to be able to fully mimic the game as best as possible as well as adding the elements of StarFox Assault where there are missions for the player to run about on foot and still be able to get in a vehicle without the vehicle pulling loops and such.
for the 3rd person aspect I can easily work on that myself with my limited coding skills, but it is the rail system, and also the all range mode of fighting where the vehicle is unable to flip upside down, or at least there is better control with the vehicle.
I'd be grateful for all the help I can get and I'll probably have more questions as I continue to build a game for my portfolio.
How can I run a rail type game similar to StarFox 64 where the Arwing is contained in a forward motion upon a path, only able to stay within the camera bounds and unable to pull full maneuvers in all directions. I want to be able to fully mimic the game as best as possible as well as adding the elements of StarFox Assault where there are missions for the player to run about on foot and still be able to get in a vehicle without the vehicle pulling loops and such.
for the 3rd person aspect I can easily work on that myself with my limited coding skills, but it is the rail system, and also the all range mode of fighting where the vehicle is unable to flip upside down, or at least there is better control with the vehicle.
I'd be grateful for all the help I can get and I'll probably have more questions as I continue to build a game for my portfolio.
About the author
#2
When Lmouse down you save the sim time, when Lmouse released you calculate the lasers power with release sim time minus pressed sim time. (then maybe divide by 1000 and for each second held multiply by how ever much damage you want it to do?) For the homing effect, well, the simplist thing and easiest for a first stage would be to find the closest enemy and calculate the vector straight to it and set the laser velocity equal to that.
Nova Bomb should be easy since it just kills everything, although the particle effects could take a little work to get right.
As for the rail system, you could set some kindof "marker" objects in the mission labeled railpoint1 railpoin2 or whatever, then, what is sounds like you want to do is move the camera along that rail by just saving the one you are headed to now, checking if you are there yet, and if so, finding the next one. Does TGE have a "path" system like TGB? Starfox does a lot of camera rotations / pans / all kinds of stuff, which I couldn't say off the top of my head how you would do.
As for keeping the player onscreen, that sounds like world limits in TGB. I don't think TGE has a concept of wordlimits so you will probably need to do this in code, if you want decent performance. If you can define a rectangle in which to enclose the player and then move that rectangle along with the camera, then you can check every tick to keep the player inside the box. I don't think handling this with the normal collision detection would work because you don't want enemies or projectiles to collide with the box and TGE doesn't have scene groups or scene layers that you can specify only the player will collide with it. You could simplify it by just getting the players position / center point and makeing sure it is inside the box or placing it inside the box.
08/16/2007 (9:14 am)
Fire lasers on Lmouse release instead of click.When Lmouse down you save the sim time, when Lmouse released you calculate the lasers power with release sim time minus pressed sim time. (then maybe divide by 1000 and for each second held multiply by how ever much damage you want it to do?) For the homing effect, well, the simplist thing and easiest for a first stage would be to find the closest enemy and calculate the vector straight to it and set the laser velocity equal to that.
Nova Bomb should be easy since it just kills everything, although the particle effects could take a little work to get right.
As for the rail system, you could set some kindof "marker" objects in the mission labeled railpoint1 railpoin2 or whatever, then, what is sounds like you want to do is move the camera along that rail by just saving the one you are headed to now, checking if you are there yet, and if so, finding the next one. Does TGE have a "path" system like TGB? Starfox does a lot of camera rotations / pans / all kinds of stuff, which I couldn't say off the top of my head how you would do.
As for keeping the player onscreen, that sounds like world limits in TGB. I don't think TGE has a concept of wordlimits so you will probably need to do this in code, if you want decent performance. If you can define a rectangle in which to enclose the player and then move that rectangle along with the camera, then you can check every tick to keep the player inside the box. I don't think handling this with the normal collision detection would work because you don't want enemies or projectiles to collide with the box and TGE doesn't have scene groups or scene layers that you can specify only the player will collide with it. You could simplify it by just getting the players position / center point and makeing sure it is inside the box or placing it inside the box.
#3
I agree with you on the nova bomb being much easier than i thought, setting the blast radius and everything is much simpler than I thought, now I just need to set a trigger so if one is already been fired, then on a second Rmouse release the nova will explode, be odd to have one fly off into infinity.
Finally one of my instructors suggested some sort of trigger that forces the player to stay within the trigger boxes bounds, something like "If player hits left side trigger, to stop all left movement" or something along those lines.
08/17/2007 (9:24 am)
Thanks James, I'll try my best to setup the weapon system to do that, (in other words Ima gonna bother a friend who can code better then me).I agree with you on the nova bomb being much easier than i thought, setting the blast radius and everything is much simpler than I thought, now I just need to set a trigger so if one is already been fired, then on a second Rmouse release the nova will explode, be odd to have one fly off into infinity.
Finally one of my instructors suggested some sort of trigger that forces the player to stay within the trigger boxes bounds, something like "If player hits left side trigger, to stop all left movement" or something along those lines.
Torque Owner Night Fox
1. On Lmouse click fire lasers.
2. On Lmouse hold charge laser and release homing (If I could atleast get how to do the charge I can try merging the heat seeking projectile, unless there is a way to do a lock on system)
3. On Rmouse release Nova Bomb
Can anyone point me in the right direction please?