Thursday, April 29, 2010

Sprite Width and Scaling

Sprite children inherit the scaleX and scaleY properties of the parent sprite. But unfortunately if you ask the parent sprite for its width or height, it will return the current pixel dimensions.

If you want to get the true width of a Sprite so that when you add a child sprite to it the proportions match what you were expecting, then you can use this expression:
sprite.width / sprite.scaleX

The training queue system we are using for Pioneers Online is very similar to EVE's training system. We have a graphical bar representing skills waiting to be trained. Each skill has a variable time requirement, and we'd like this to be reflected in the graphical bar. In order to determine the appropriate width of a fill sprite, a proportion is calculated and is then used to set the width. I had forgotten that I scaled the empty bar in CS4, and this caused some headaches when I tried to add children to it.

Wednesday, April 14, 2010

StrongMan Wins Again

StrongMan, the pattern recognition minigame prototype I made, displayed its worthiness yet again tonight. Everyone I've showed this to has started competing either with everyone else in the room or with themselves (if alone), playing far more than the other, math-based games. This time, even core gamers were taken by the simplicity of it. (I'm sure the scoring helped establish a temporary leader board and fuel the competition.)

I am starting to believe that pattern recognition as a core mechanic is far superior to a math-centric core.

Where Has All the Content Gone?

A post on That's A Terrible Idea: http://www.thatsaterribleidea.com/2010/04/where-has-all-content-gone.html

And there is an interesting discussion in the comments.