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.

Wednesday, March 31, 2010

Flash Button Nightmare

I spent the day designing and implementing some GUI components for Pioneers. The buttons I designed had a downSkin which gives the illusion of being pressed:
The top box and the text in the last graphic are offset 2x1 pixels (but the shadow is in the same spot). I compensated for this offset by making sure the anchor of the MovieClip was in the same relative position.

I decided to use fl.controls.Button as my base class and apply the skins using the setStyle() function. I set width and height properties of the Button, and this was the result:
You can see the last skin is clearly stretched because the width and height are slightly less than the dimensions of the Button. As I said above, I compensated for this by changing the anchor, but that wasn't good enough. I even added a 0% (and later 1%) alpha box so the dimensions would line up. Had it worked, it would have been a dirty solution, but alas it still warped the skin a tiny bit.

The irony is that the old Button symbols in Flash would have worked with this no problem. I decided to try flash.display.SimpleButton, passing in the skins as constructor arguments.

Success! So if you have button skins of different sizes, use SimpleButton. The new Button Component is obviously too advanced to be bothered with these plebeian requests.

Friday, March 26, 2010

Rhythm is a Dancer

Continuing my pattern recognition game series, I put together a quick prototype in attempts to get the player to recognize input patterns. http://lskcfk7.linuxclass.marist.edu/rhythm/

My goal was to get the player in a rhythmic cycle, in an almost poetic state. This version did not live up to those aesthetics.

Noticing that meter in poetry could be missed if the reader was reciting the lines as fast as possible or with no vocal inflection, I then tried adding a meter line. http://lskcfk7.linuxclass.marist.edu/rhythm/meter/

This failed miserably. The only difference from the first version is that a vertical line is drawn and moved at a constant rate behind the arrows, guiding the player. There are no consequences to mistiming. As I played it and gave it to friends to try, any semblance of a pattern dissolved, and the player simply watched the line and hit the keys as they progressed. This is now even further from the poetry goal.

Combos in combat situations, whether they be fighting combos or WoW skill rotations, are mostly muscle memory. Even other rhythm games like Guitar Hero or DDR have quite a bit of memorization required in order to master a song.

Perhaps my training sessions are too short. Perhaps I need auditory cues.

Setting up domain

Finally got around to purchasing my domain name. Set up just a little Google site for career purposes. Important links to social media and various files and code samples where put up also.

This will be a critique of my own work as well as a more detailed account of my thought process when designing, coding, or investigating other games.