Bizarre idea: support resizing models in game

Bizarre idea: support resizing models in game

Requests for features in the spring code.

Moderator: Moderators

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Bizarre idea: support resizing models in game

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Lua it.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

hehe

Post by rcdraco »

OR SHRINK RAYS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post 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)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

LuaRules can be used if you just want a rendering size change.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post 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.
User avatar
VonGratz
Posts: 471
Joined: 03 May 2005, 05:25

Post 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:
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post 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
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Well, for move commands that could become an issue. For angles/turns it would still function properly.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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!
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Obviously you're going to scale the unit's speed, too.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post 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.
Last edited by lurker on 25 Nov 2007, 10:04, edited 1 time in total.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post 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... :)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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.
Post Reply

Return to “Feature Requests”