Sunday, 13 July 2014

Generation of water and electricity. And a toolbar!

The colony generates water and electricity! Plus I added windows, tooltips, and a toolbar.

GUI..? GUI stands for graphic user interface. This just means all the buttons, menus, labels, and pictures that help the player play the game and get information about the game.

It's been over a week since any major progress because I've been intimidated by all the options that I faced. Designing how information is displayed requires knowing a lot about the future of your game. In the end I actually needed to write out my interface requirements in a document:


This took several hours and it was an extremely good idea. While reading and writing my interface requirements, I was able to clearly imagine the appearance of all the controls and game information. I vividly imagined what it would be like to want information and use my menu to find it. I imagined the exact graphical layout of each window. And because it was written in English and not code, it was easy and painless to revise or completely rewrite.

I highly recommend this process to anyone starting a big GUI system before writing any code. Had I not done this I would have burned a lot of time writing dead-end code, frustrating myself profoundly. That sort of motivation-trap puts the whole project at risk.

At the bottom of the screen is the overview toolbar which turns on and off by pressing "O".

For now I've coded the colony resources window (first button) and colony structures window (fifth button). I have planned the others in my document but will code them only when it adds something meaningful to the gameplay. I don't want to work on something unless it adds something interesting now. Otherwise I would be squandering my motivation.

Thanks to Unity's GUI.Window you can reposition the windows. I also made a tooltip system. My system works great with Unity's OnGUI calls. Just place a single TooltipManager function call in OnGUI for each tooltip and it does the rest. Tooltips follow the mouse smoothly. Tooltips everywhere! Here's a tooltip for the electricity resource (you can't see the mouse in the screenshot):


In other news, I fixed the weather balloon animation, and made a plastic dome for the AWG. I also mass produced a ton of icons. Here are some:


The art is far from perfect. And some of you may be thinking: "surely you could have found some of that art online, for free". Why yes, there are indeed some great free video game icon packs out there. But I think consistent mediocre art looks better than non-matching fabulous art. And since I'm the only artist, all my art has the same mediocre style. That style being the only style I can probably do!

I wrote a python script to count how many lines of C# code is in my project. So far we're at 3706. Gee, C# sure is verbose.

For research I started reading A Traveler's Guide to Mars but found it a little slow so I just switched to On to Mars. It came with a CD with 60 pdfs on Mars colony science but of course the mailman decided to smash it to pieces when he jammed it into my mailbox...

Thanks Canada Post!

Oh well. Onward!

6 comments:

  1. Wow, lots of really good progress! The GUI is looking pretty sweet.

    ReplyDelete
  2. Thanks :O

    The tooltip stuff was especially a task. I didn't like the tooltip system Unity gives you, and it didn't jive well with those windows. This one is very custom and extremely easy to use. I could also significantly complicate the tooltip appearance in the future at zero hassle.

    It's smart and will re-orient itself if the mouse makes it appear outside the screen. The first few ideas I had were performance hogs. Maybe I'd have explained how it works if I didn't feel the post was already pretty long. :P

    ReplyDelete
  3. I like how legit this game is looking. When can I play? I think you are good at managing your motivation levels and that's extraordinary. I read C# as C hash tag... jokes

    ReplyDelete
  4. Hah :P

    Thanks. I'll send you a web player version when I feel there is a game. So: goals, failure, success. Gettin there :o

    ReplyDelete
  5. Good advice about the GUI!

    ReplyDelete
  6. I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
    http://gainfreestuff.com/

    ReplyDelete

Be polite.