Wednesday, October 23, 2013

Unity and GUI scaling, the easy way...

Today's update is about GUI design in unity, and some ideas on how to make it a bit less annoying to use.

Anyone using the GUI system knows that it can be tough to make it work with multiple resolutions and aspect ratios.  In fact, this issues is the lead one clients come to me about when working with the GUI system.  Well, after "What do you mean Unity does not have a built in GUI editor?"...

Well, there is an easy method to deal with that.  Using the GUI.matrix variable.

The idea is to set a variable with the default width and height of the screen in pixels you want to design for, in this case, 1920x1080.  Once you know that, you build your interface based on the idea that EVERYONE will use that resolution.

Then at the beginning of every OnGUI() call, you just set the GUI.matrix and it will do all the hard scaling changes for you.

Example below:

Saturday, October 19, 2013

Sounds Foolish, or Foolish Sounds

One of my many hobbies is writing songs (or parodies, actually) about things that interest/annoy/amuse me.  Needless to say, that leads to a lot of songs.

Some of the songs are not listed here due to them being so horrible that I'd like them to fade away and die.  (yes, worse than these.  Think about it.)

I at no time wrote the actual music for these, just lyrics.  The vocals are mine, though.

First, the Second Life songs:
Avatar (Parody of Rockstar by Nickleback) was the first parody I ever published, based on most people's expectation of SecondLife.  It's also possibly one of the best known songs about Second life ever made.
Prim in my Hand(parody of stone in my hand by Everlast) is a song about Primitives, the building blocks of Second Life.
Sweet home on the mainland (Parody of Sweet home Alabama) talks about how hard it can be to find a place in Second Life, even your own home.
Lindens Lamnent (Parody of Piano Man) was written especially for a concert I hosted in Second Life.  It's a bit tongue-in-cheek, but overall is about how people seem to always push SL further than the game engine can function well.

And then the songs about how far Second Life has fallen due to Linden Lab mismanagement:
Lost Life (Parody of Mad World) came out at the point that I generally got tired of trying to make SL work, even though Linden Lab seemed to want to find ways to break it and chase off their client base.
You're Virtual (Parody of You're Beautiful) was written based on an archtype of player everyone in SL knows about.  Bet you do too.

And songs from other games:
World Of Warcraft: The Hunter (The Gambler Parody) This was done in a couple of days as a lark when they changed the hunter class for the umpteenth time.
StarCraft: Living in the Zerg Hive (Strawberry Wine) Zerg Rush!
StarCraft: Battle of new Gettysburg (Battle of new Orleans) Ever wondered how it went down at New Gettysburg when the Zerg and Protoss jumped the Terrans and whacked the whole planet?  Well, now you do!
Eve Online: Clone in the Lowsec (Down in the Boondocks) Eve has an interesting backstory about using clones for immortality... and euthanizing the original...

And songs made for RPG games I ran, in this case PathFinder:
We be Goblins  Is a song I took from Pathfinder's first RPG module.
Whisper in the Attic  Ditto.

Finally, my life in a song:
(I wish I Worked) Nine to Five (I'm Alive) is a song after trying to keep a series of servers up with a second-rate server company that liked to not only break things, but to tell us "no, everything looks fine from here!' Of course they do.  The server is OFF.  You can't get errors when they don't have power...