Game Development Community

Scaling up the world, problems?

by Drew Parker · in Torque Game Engine · 03/03/2005 (8:47 pm) · 5 replies

Hi all,

If I scale up my game world by lets say 4 times, will that have any negative effects? I'm trying to get around the limitations of the GJK collision algorithm and let my players have fun with really small objects. Considering I scale up everything evenly, including players and .dts shapes, .dif files, the terrain, etc etc, is there anything BAD that can happen? Has anyone tried this?

Also, what can I safely scale up in the mission editor without major problems? For instance, looks like static shapes and .dif files scale up nicely. The player scales up nicely too and animations seem to work (run speed has to be adjusted), but are there any other consequences?

Thanks to any that reply!

#1
03/03/2005 (8:52 pm)
To my knowledge, DIF's doesnt scale very well. Their collision gets too big, or too small.
If you scale the terrain too much I guess you will hit the float precision limit, but that's quite alot AFAIK.
#2
03/03/2005 (9:25 pm)
I tired scaling up DIFs in my current project. At around 4x size the collision stopped working properly and i would fall thru the DIF. I've since taken to building my geometry at a smaller scale and changing the 'geometry_scale' worldspawn property to scale it all up. So far this is working great.
#3
03/03/2005 (9:43 pm)
Hi guys, thanks for the replies! Looks like we have some late nighters. Or people on a different timezone then me. :)

@Stefan: I know all about those float precision limits, hit those when my scale was too small before. :)

@Tom: Is 'geometry_scale' a setting in Quark? Unfortunately I'm just a code monkey, so I don't know lots about the art tools...

What I'm finding from my tests so far is, the DTS and DIFs seem to be scaling nicely from the editor. Tom, I was getting that same problem with the character falling through the buildling, but after I scaled the building, if I move it around in the mission editor a bit, the problem seems to go away. I haven't tested it for very long though.

One problem I'm encountering is the player step height. My scaled up player can't walk up the scaled up steps. Even when I change the maxStepHeight datablock value, he still won't walk up the steps. But the weird thing is, if I reduce the scale to 1 1 1, the player will walk up the scaled up steps, using the new maxStepHeight value.

I looked into the C++ code in Player::step, and it looks like the maxStepHeight value is getting multiplied by the scale, so I'm not sure why it's not working.

In other news, scaling these datablock values up by 4 makes my player 4x behave somewhat like usual:

//   runForce = 48 * 90;
//   maxForwardSpeed = 8;
//   maxBackwardSpeed = 5;
//   maxSideSpeed = 5;

   runForce = 48 * 360;
   maxForwardSpeed = 32;
   maxBackwardSpeed = 20;
   maxSideSpeed = 20;

However, when jumping the big player seems to float a bit, which I think is coming from the fact that the gravity is also not scaled, which is
static F32 mGravity
in the Player class. Perhaps I'll expose that to a datablock so it can be set from script.
#4
03/03/2005 (10:14 pm)
@Drew - Yes it's a setting done in QuArK on the 'worldspawn' entity. By the way... why are you needing to scale up the DIF? For our project it just makes it easier to build the DIF if we can do so at a smaller scale.

I have heard of the maxStepHeight issue before on the forums:

www.garagegames.com/mg/forums/result.thread.php?qt=26036
www.garagegames.com/mg/forums/result.thread.php?qt=18374
#5
03/03/2005 (10:45 pm)
Hi Tom,

I'm basically scaling up the DIF to test the scaled up player, and to see how feasible it is to take a time-saving shortcut and scale up what objects can be scaled without re-doing the source art. Looks like, from the threads you posted and elsewhere, in general this is a bad idea (what I figured), and it's better to scale from the source. However, it's letting me prototype the player real quick, which is nice.

Looks like no-one has a solution to the stepHeight yet. I'll try searching more. I've already made a few changes to the step function and can't get it to work still.