Scaling of footprintX

Scaling of footprintX

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Scaling of footprintX

Post by Jools »

Anybody knows why footprintX scales between gamedev:unitdef and lua:unitdef?

For example: I have the arm bulldog: movementclass=TANKBH3
movedef file: wrote:name = "TANKBH3",
footprintX = 3,
footprintZ = 3,
But in lua I get:
lua echo wrote:name, tankbh3
zsize, 5
xsize, 5
It seems the one in-game has always 2 added to it. Can anyone confirm this empirical finding in theory?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Scaling of footprintX

Post by Anarchid »

For me it seemed that lua value was always double of definition value.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Scaling of footprintX

Post by CarRepairer »

Makes sense. 5 is about double of 3.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Scaling of footprintX

Post by SinbadEV »

CarRepairer wrote:Makes sense. 5 is about double of 3.
doubling would only seem like adding two in a vary narrow set of circumstances... I suspect a common outside cause... what do the rest of your definitions look like?

Lot's of places in the code... not sure which apply... but my poor-mans interpretation is that zsize = this footprintZ/(largest footprintZ * 2)

so 5 = 3/(10*2)


Code that lead me to this theory:
[code]const int zsizeDef = std::max(1, moveDefTable.GetInt("footprintZ", xsizeDef));

zsize = std::max(1 * SPRING_FOOTPRINT_SCALE, fdTable.GetInt("footprintZ", 1)

zsize = zsizeDef * SPRING_FOOTPRINT_SCALE;

const int SPRING_FOOTPRINT_SCALE = 2[/code]


That was clearly wrong but you get my point that there are other factors involved.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Scaling of footprintX

Post by Jools »

Maybe the xsize need to be a Fibonacci number as well?
Post Reply

Return to “Game Development”