Author Topic: Stacking, Hull Types and Armor  (Read 1180 times)

Offline Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Stacking, Hull Types and Armor
« on: October 29, 2012, 11:09:09 AM »
I picked this forum since this was more of a technical thought about AI Wars. This is directed mainly at Keith:

I know you've mentioned the biggest issue with the Stacking suggestion is virtualization of ForegroundObject.  I don't know if you've considered it, but in reworking Hull Types and Armor, you might be able to squeeze enough bits out to storing a stack count in the ForegroundObject itself to avoid virtualization.  Two numbers stored in a single primitive are each accessible by a single bit operation (AND mask for the first, bit-shift for the second), so that shouldn't be speed prohibitive.  Just a thought while I ride out this lovely storm on the east coast.

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: Stacking, Hull Types and Armor
« Reply #1 on: October 29, 2012, 11:35:42 AM »
The memory footprint of an extra 8-bit or 16-bit int isn't that big a deal.  I've done worse for less (though I go to lengths to avoid it, too).

The bigger concerns are:

1)
The performance penalty of having to multiply or even bitshift AttackPower and MaxHealth whenever they're used would be substantial.

Or:

The bug-potential of having AttackPower and MaxHealth no longer be attributes of the ForegroundObject's UnitData object (which is shared by all ForegroundObject's sharing the same enum-Type and Player) would be... pretty impressive ;)


2) How to show "this is a stacked/fused/whatever ship" on the interface is non-obvious to me:

Just showing the numbers would get cluttery in a hurry (as presumably there's gonna be a lot of these wherever there's any, or else the stacking would be unnecessary) and that would have a substantial performance impact as well from the extra draws (unless we create alternate baked runtime textures for every used combination of unit and stack-count, which has its own costs). 

Or:

Drawing the mark number or something else in a different color for each stacking quantity would be a little less aesthetically disastrous but would have similar performance concerns in terms of extra draws and/or distinct textures, etc.


3) And ultimately I think there are just more interesting ways of packing strength into a lower unit count.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!