Page 1 of 2

Bizarre idea: support resizing models in game

Posted: 23 Nov 2007, 22:30
by YokoZar
Imagine if, through some scripting command, we could set a particular unit to be constructed to be double in size.

I could set a factory to build half or double size units, or whatever percentage we want. This way we could store the same model, but have it represent essentially different things - a tiny version could have proportionately smaller damage, health, line of sight, and radar radius, for instance.

Or, maybe I just want to make giant peewees in my experimental gantry. Or a giant moho mine that covers 3 mexes.


If we want to get really fancy, we could even allow for dynamic resizing of an existing model rather than a newly constructed one. That way we could have a script to make the commander shrink really tiny or something.

Posted: 23 Nov 2007, 22:34
by KDR_11k
Lua it.

hehe

Posted: 23 Nov 2007, 22:46
by rcdraco
OR SHRINK RAYS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Posted: 24 Nov 2007, 00:32
by Guessmyname
I never did get the point of shrink-rays. Wouldn't it be better to enlarge? Bigger target, makes it less mobile, and if it's mass stays constant, it would also make it less dense (ie weaker)

Posted: 24 Nov 2007, 00:35
by Neddie
I suppose it is irrational intuition which leads some to believe that reducing the size of an object will reduce the strength it may exert as well as its structural integrity. Of course, this is bollocks - unless you remove mass as well, the increased density should lead to greater force exertion and durability.

Posted: 24 Nov 2007, 01:49
by AF

Code: Select all

x = scale x axis multiplier
y = scale y axis by multiplier
z = scale z axis by multiplier

glPushMatrix();
glScalef(x,y,z);
// do unit rendering
glPopMatrix();
Maybe a little more complicated than that but thats about it.

Posted: 24 Nov 2007, 01:54
by trepan
LuaRules can be used if you just want a rendering size change.

Posted: 24 Nov 2007, 02:36
by Forboding Angel
what about the hitspheres tho?

And if someone would make this I would be eternally grateful, as it would allow for a lot of diversity in multiplayer.

Posted: 24 Nov 2007, 03:10
by VonGratz
What about scripting issues?
Particularly in kbots and mechs movement?
A double size in this case means doubled numbers in each walking scripts.
vonGratz :wink:

Posted: 24 Nov 2007, 03:12
by Forboding Angel
VonGratz wrote:What about scripting issues?
Particularly in kbots and mechs movement?
A double size in this case means doubled numbers in each walking scripts.
vonGratz :wink:
I don't have any mechs, so nyah! :P j/k

Posted: 24 Nov 2007, 03:27
by Snipawolf
Well, for move commands that could become an issue. For angles/turns it would still function properly.

Posted: 24 Nov 2007, 03:38
by Argh
Use LUA to send a message to the COB that tells it to use a different constant for linear travel, voila, problem solved.

Posted: 24 Nov 2007, 09:54
by KDR_11k
When you scale the model at rendering you don't have to rescale the move commands because it's internally handled at the old size, fools!

Posted: 25 Nov 2007, 05:24
by lurker
neddiedrow wrote:I suppose it is irrational intuition which leads some to believe that reducing the size of an object will reduce the strength it may exert as well as its structural integrity. Of course, this is bollocks - unless you remove mass as well, the increased density should lead to greater force exertion and durability.
Irrational intuition? Every single sci-fi/cartoon shrink ray I have seen has left density unchanged. Perfectly rational. Other than the shrinking process. :roll:
KDR_11k wrote:When you scale the model at rendering you don't have to rescale the move commands because it's internally handled at the old size, fools!
When you only render the model at half-scale, the legs, wheels, etc. will be moving at half the speed the model is.

Posted: 25 Nov 2007, 08:33
by KDR_11k
Obviously you're going to scale the unit's speed, too.

Posted: 25 Nov 2007, 08:43
by lurker
Oh, that's what you were thinking. Still, not all the time. Using the only mobile example so far, the giant gantry-built peewee, I don't see that thing having a scaled speed.

Posted: 25 Nov 2007, 09:27
by zwzsg
Argh wrote:Use LUA to send a message to the COB that tells it to use a different constant for linear travel, voila, problem solved.
Hmm, if you're talking about the [ ] constant you set in Scriptor, it is used at compile time, not at run-time.

However you could, in your code, add a multiplication by a static-var in all the values of all your "move" command, and make that static-var changes when you shrink/enlarge.

Though, I'd go with what KDR said.

Posted: 25 Nov 2007, 14:22
by manored
neddiedrow wrote:I suppose it is irrational intuition which leads some to believe that reducing the size of an object will reduce the strength it may exert as well as its structural integrity. Of course, this is bollocks - unless you remove mass as well, the increased density should lead to greater force exertion and durability.
If you shrinked a krog to the side of a peewee an other krog could step on it and thus would have tactical advantage... :)

Posted: 25 Nov 2007, 16:02
by KDR_11k
It wouldn't do anything because the Krog's body would still be able to withstand the same forces. On the other hand, the small krog would take less damage because all impacts are dispersed over a larger area.

Posted: 25 Nov 2007, 16:21
by Snipawolf
Well, yes, but if the mass stayed the same, and it was over muddy terrain.. I am sure a krog weighs quite a lot.... It could possibly sink into the ground.