Dynamic Gravity Manipulation
by Tom Dowd · in Torque Game Engine · 02/15/2008 (9:46 am) · 4 replies
(Tom Dowd from Columbia College Chicago here, posting this for one of our students.)
Hey All,
My name is Ben, and I am currently studying game design at Columbia College Chicago. I am studying to be a designer and, while I have a little bit of scripting/coding experience, I am definitely a novice, so be gentle.
Here is a bit of information to put ideas and questions in context:
The Game Design Major is very new at Columbia, and it's getting ready to graduate its first class of which I am a part. The first class will graduate in Spring '09. During Fall '08 and Spring '09, the entire graduating class will be collaborating to produce a game as a Senior Capstone (to be done in Torque). This current semester (Spring '08) those who are in the design concentration (as I am) are working on creating thorough design documents. Three in total are being produced. At the end of the semester we will be presenting our ideas to the rest of the game design major (animators, programmers and sound guys), where they will be voted on and narrowed down to the final project.
The project I am working on is a sort of first person puzzler/platformer hybrid in which the player must navigate through puzzles by manipulating gravity (namely it's direction or vector, but potentially other characteristics as well). We've shared our ideas with the major, and a lot of the programmers have expressed their concern at the plausibility of it.
My question concerns gravity in Torque: can the direction or vector of gravity be changed in Torque? Gravity always pulls "down," but what if I wanted it to pull "up" (essentially making the old floor the new ceiling and vice versa)? Is that possible? More specifically, is it possible to do that on the fly? That is, would it be possible for a player to change the gravity of a level in mid-mission?
Sorry for the lengthy post, and many thanks in advance!
-Ben
Hey All,
My name is Ben, and I am currently studying game design at Columbia College Chicago. I am studying to be a designer and, while I have a little bit of scripting/coding experience, I am definitely a novice, so be gentle.
Here is a bit of information to put ideas and questions in context:
The Game Design Major is very new at Columbia, and it's getting ready to graduate its first class of which I am a part. The first class will graduate in Spring '09. During Fall '08 and Spring '09, the entire graduating class will be collaborating to produce a game as a Senior Capstone (to be done in Torque). This current semester (Spring '08) those who are in the design concentration (as I am) are working on creating thorough design documents. Three in total are being produced. At the end of the semester we will be presenting our ideas to the rest of the game design major (animators, programmers and sound guys), where they will be voted on and narrowed down to the final project.
The project I am working on is a sort of first person puzzler/platformer hybrid in which the player must navigate through puzzles by manipulating gravity (namely it's direction or vector, but potentially other characteristics as well). We've shared our ideas with the major, and a lot of the programmers have expressed their concern at the plausibility of it.
My question concerns gravity in Torque: can the direction or vector of gravity be changed in Torque? Gravity always pulls "down," but what if I wanted it to pull "up" (essentially making the old floor the new ceiling and vice versa)? Is that possible? More specifically, is it possible to do that on the fly? That is, would it be possible for a player to change the gravity of a level in mid-mission?
Sorry for the lengthy post, and many thanks in advance!
-Ben
About the author
Tom Dowd is a 25-year veteran of the game design business with credits on the PC, Xbox, PS2, NES and Genesis. He is an assistant professor at Columbia College Chicago in the Interactive Arts and Media department teaching in their Game Design major.
#2
So, yes, the task is simple(ish). But I think it's a pretty big task.
02/15/2008 (11:39 am)
Or, if you're searching through Torque to find all the uses of gravity, then change it all to a vector quantity (Point3F?), so you can have any sort of gravity you want. I would refactor the whole gravity system so everything uses a global gravity vector constant, and then each object or datablock can specify a modifier to this - an additional vector to add to the global gravitation, and/or a scalar to multiply the global vector by.So, yes, the task is simple(ish). But I think it's a pretty big task.
#4
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13249
02/25/2008 (10:23 am)
Check out the dynamic gravity mod here:http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13249
Associate Ross Pawley
Keep in mind however, that the player object in Torque isn't set up by default to rotate on any but the z-axis (for turning). So, you might need to add in the other axes to rotation for the player (a matter of adding in the extra terms to the matrix it uses for turning, plus sending that data across the network in pack/unpackUpdate and read/writePacketData (one is for ghosted, third person non-control objects, the other for control objects)).
If you need global control of gravity, you'll have to find all the places that objects calculate their gravity at (do a search) and add an extra term to the multiplication to scale it up or down (if you allow your term to go negative, you can reverse gravity globally that way too, e.g., gravitymod * gravity where gravitymod = -1). GameFlood has this as well.