Retro birdseye view shooter - need help
by ben calder · in Torque Game Engine Advanced · 08/19/2008 (5:59 pm) · 37 replies
I am trying to use TGEA to make a retro feeling birdseye shooter game, like the one shown in this youtube video (http://www.youtube.com/watch?v=PnXi_mIiHn4&feature=related). Does anyone know how I could approach this, please bear in mind that I am really new to TGBA, so the more specific the better.
Thanks
Thanks
About the author
#2
One thing I am slightly confused with is how to create a level like the one shown in the youtube video, im fine with the art and textures side of things, my friend does all that stuff, but Im lost when it comes to making the level as a whole, I take it that you dont use the world editor.
Once again, thanks for the help John.
08/19/2008 (8:32 pm)
John Thanks for the help, I really appretiate it. I guess the main thing at the moment is the camera position, I definatley think I have followed your advice and bought the ArcanFX(core) and I will start coming to grips with that to sort out the camera so that it is positioned above the player, but I am also intending to make it so that the camera position shifts slightly depending on the position of the cursor, im not sure whether FX allows this, i guess i'll find out soon.One thing I am slightly confused with is how to create a level like the one shown in the youtube video, im fine with the art and textures side of things, my friend does all that stuff, but Im lost when it comes to making the level as a whole, I take it that you dont use the world editor.
Once again, thanks for the help John.
#3
Creating a maze like the one seen in that video will be a snap. There's two ways to approach it: you can use Constructor to create an entire level, or you can create individual walls or rooms and stitch them together in the world editor.
Creating smaller building blocks and piecing them together will give you infinite variety. For easy placement, try to keep their size as multiples of some number: I make all my DIFs 16, 32, 64, or 128 units on a side. (If you use irregular sizes, like 21.5 x 43, you'll need to fuss with them to line them up by hand in the editor.)
Either way, export your components as .DIFs, and copy them with the necessary textures into the appropriate directory for your game -- probably /scriptsAndAssets/data/interiors/.
Now load up TGEA, and in the World Editor, you'll find your buildings (or building blocks). Add them to your level, arrange as desired, and save your mission.
Done. =)
08/19/2008 (9:01 pm)
Ahh, for the structures -- referred to as "interiors", even if they're outdoors -- you'll use a .MAP/.DIF editor. Constructor is the standard editor, and it's a free download from GarageGames. You can also use various third-party products like 3D World Studio or Quark, but you'll miss out on some of the Torque-specific tools and features that Constructor provides.Creating a maze like the one seen in that video will be a snap. There's two ways to approach it: you can use Constructor to create an entire level, or you can create individual walls or rooms and stitch them together in the world editor.
Creating smaller building blocks and piecing them together will give you infinite variety. For easy placement, try to keep their size as multiples of some number: I make all my DIFs 16, 32, 64, or 128 units on a side. (If you use irregular sizes, like 21.5 x 43, you'll need to fuss with them to line them up by hand in the editor.)
Either way, export your components as .DIFs, and copy them with the necessary textures into the appropriate directory for your game -- probably /scriptsAndAssets/data/interiors/.
Now load up TGEA, and in the World Editor, you'll find your buildings (or building blocks). Add them to your level, arrange as desired, and save your mission.
Done. =)
#4
Looks like i've run into a reasonably big problem with the birdseye camera though, the afx combo has made it easier, but there is still a lott to do to get the camera in a birdseye position.
I was just wandering has anyone altered AFX to get a birdseye view camera? and if so could you point me in the right direction, all the thnigs i have tried so far have ended in countless errors, im sticking at it, but im not really getting far with trial and error.
Thanks
08/20/2008 (8:14 pm)
Thanks again John. Looks like i've run into a reasonably big problem with the birdseye camera though, the afx combo has made it easier, but there is still a lott to do to get the camera in a birdseye position.
I was just wandering has anyone altered AFX to get a birdseye view camera? and if so could you point me in the right direction, all the thnigs i have tried so far have ended in countless errors, im sticking at it, but im not really getting far with trial and error.
Thanks
#5
I think you just need to tweak your camera object's settings.
In server/scripts/game.cs, look for the GameConnection::createPlayer function. There's a setThirdPersonOffset() command that you can modify, and your players will spawn with those settings.
Just change it from
and season to taste.
You may want to disable the key bindings that allow the player to switch between first and third person mode. (Then again, having the added option to play as a first-person shooter might be cool!)
08/20/2008 (8:59 pm)
Hi Callum,I think you just need to tweak your camera object's settings.
In server/scripts/game.cs, look for the GameConnection::createPlayer function. There's a setThirdPersonOffset() command that you can modify, and your players will spawn with those settings.
Just change it from
%this.camera.setThirdPersonOffset("0 -3 3");to %this.camera.setThirdPersonOffset("0 -20 20");and season to taste.
You may want to disable the key bindings that allow the player to switch between first and third person mode. (Then again, having the added option to play as a first-person shooter might be cool!)
#6
Im probably pressing my luck but do you have an incling as to how i could prevent the user from being able to alter the camera position with the mouse. if you hold the right or left mouse button down you can rotate the camera position, and with the scroller (i think that is the z axis) you can zoom in/out, and I want to try prevent this from happening as i would like to implament a cursor to aim/rotate the character when i have got this camera aspect all sorted.
Thanks,
08/20/2008 (9:50 pm)
Thankyou so much John, you are a lifesaver, cant thankyou enough. I didn't think it would be that easy. Id just spent a few hours trying to get the advanced camera mod to work, wasnt going anywhere with that route, thats for sure, lol.Im probably pressing my luck but do you have an incling as to how i could prevent the user from being able to alter the camera position with the mouse. if you hold the right or left mouse button down you can rotate the camera position, and with the scroller (i think that is the z axis) you can zoom in/out, and I want to try prevent this from happening as i would like to implament a cursor to aim/rotate the character when i have got this camera aspect all sorted.
Thanks,
#7
I think you can just comment out the pitch() and yaw() and various zoom and freelook functions... but I don't recall offhand what else is in there besides camera control, so there might be some unwanted side effects.
It's pretty straightforward once you get a grip on how Torque handles input. Sniff around those functions, do a little experimenting, and you'll have it figured out in no time.
Then you can tackle the cursor aiming, which is a different beast entirely... Muahahah! =D
Happy hunting!
08/20/2008 (10:58 pm)
Take a look at client/scripts/default.bind.cs; you'll find various functions for mouse and keyboard actions there. (If you change keybindings, be sure to delete client/config.cs; that's where the game gets its bindings from. If it can't find config.cs, it builds a new one from default.bind.cs.)I think you can just comment out the pitch() and yaw() and various zoom and freelook functions... but I don't recall offhand what else is in there besides camera control, so there might be some unwanted side effects.
It's pretty straightforward once you get a grip on how Torque handles input. Sniff around those functions, do a little experimenting, and you'll have it figured out in no time.
Then you can tackle the cursor aiming, which is a different beast entirely... Muahahah! =D
Happy hunting!
#8
08/21/2008 (8:07 am)
Thanks Again John. You've been an amazing help.
#9
how you making out with this? i'm working on something simliar but i can't get the crosshair right. when you move the mouse the player only turns a little bit and not directly where the mouse is pointing. have you had this problem?
08/21/2008 (9:03 am)
Hey Callum,how you making out with this? i'm working on something simliar but i can't get the crosshair right. when you move the mouse the player only turns a little bit and not directly where the mouse is pointing. have you had this problem?
#10
After that im gunna concentrate on the cursor, im having some difficulty getting the player rotation right, its a bit jumpy.
I think we are heading for the same goals at this point, so I will keep you updated about how i get on and wether I get the cursor functioning perfectly. If you are a bit more specific about the problem I mgiht be able to help more, im not sure what stage you are at.
Thanks
08/21/2008 (11:05 am)
Hi Tim, im working my way towards it, bit by bit, at the moment im stuggling to prevent the mouse wheel zoom function.After that im gunna concentrate on the cursor, im having some difficulty getting the player rotation right, its a bit jumpy.
I think we are heading for the same goals at this point, so I will keep you updated about how i get on and wether I get the cursor functioning perfectly. If you are a bit more specific about the problem I mgiht be able to help more, im not sure what stage you are at.
Thanks
#11
08/25/2008 (1:41 pm)
Right now i got the cursor and everything all set up. im trying to get the player to face the cursor when it moves. i found the function that handles it so now im just playing around with how to make him face the cursor. It's proving to be quite difficult.
#12
08/25/2008 (2:05 pm)
Which function are you dealing with? I carnt find the right one.
#13
if you are using TGEA with AFX (like me) then its in afxTSCtrl::onMouseMove
08/25/2008 (2:12 pm)
It depends on what engine, if you are usea TGEA then its in GameTSCtrl::onMouseMove if you are using TGEA with AFX (like me) then its in afxTSCtrl::onMouseMove
#14
08/25/2008 (2:13 pm)
Those function will only work if you are using a cursor and not a crosshair though.
#15
Thanks again for pointing me to the right location.
08/25/2008 (2:18 pm)
Thanks, I am using TGEA with AFX similar to you, and yes I am using a cursor. My understanding was that the best way to achieve the effects we are looking for was to use the cursor to dictate player direction, and then simply use a custom cursor in place of the windows arrow to give a crosshair effect. Then the difficulty lies in making it smooth so that the chartacter doesnt jolt. Out of interest, have you managed to edit the camera so that the location of the cursor moves the camera along slightly, as it does in the youtube video. Thanks again for pointing me to the right location.
#16
08/25/2008 (2:29 pm)
At the moment that is where im stuck. i have my custom cursor set up and it stays within the bounds of the window. I've been messing wtih this all day and i can get the player to spin around but he never faces the cursor.
#17
this is the resource i used to help me get started. most of it can be ignored. just the look for the section that says on mouse move. Its not quite right but it will get you at least started.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3645
08/26/2008 (8:50 am)
Hey Callum,this is the resource i used to help me get started. most of it can be ignored. just the look for the section that says on mouse move. Its not quite right but it will get you at least started.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3645
#18
Have you managed to get it all sorted yet?
08/26/2008 (9:08 am)
Thanks, i'll take a look at this now,Have you managed to get it all sorted yet?
#19
08/26/2008 (9:54 am)
Not yet..getting closer i think
#20
08/26/2008 (1:09 pm)
Hows the progress coming Callum?
Torque Owner John Doppler Schiff
There are a number of resources that have done a lot of the coding for you already.
ArcaneFX (featured on the Products page) will save you a lot of time, and add some terrific features to TGEA. In addition to its awesome effects, it implements an advanced camera, object/target selection, and datablock caching. Definitely check it out, it sounds to me like that will solve most of your needs in one swell foop.
If you don't want to purchase an add-on, you've got some heavy coding and merging ahead of you. These resources predate TGEA 1.7.1 and might not work without some coaxing and tweaking...
The Advanced Camera resource will give you your "bird's eye view".
Object selection is available as another resource.
What other features are you looking for?