Friday, November 23, 2012

Week 3. Working on menu and HUD.

This week was big on working on the HUD and menu. Unfortunately, a holiday also kept me from working on it. But now that I'm back, there should be more work done. So far though, I have a lot of my part set up. I have basic menu use, player save input ports, and cheat input capability. Now I just need to know what we need for the load and cheats to set them up fully. As well I need to add save ability, a tutorial (help button. Probably late game implementation for when everything is set up), button assets (also a bit later because I need input from shops), and achievement planning (not a core part so last on my list really).

During my work I found that the photoshop mock-ups I made could be imported and used to create the menu. This helped to save some time, though the coding set me back a bit. My knowledge of flash is on the lower side, but nothing that google can't help me figure out. One major problem I was having was with player save/load. I needed a structure to hold the information, but google told me that flash doesn't use structs. This meant that I needed to make classes, which is fine, but they needed to be in another flash code file. Luckily I figured out how to get it set up and working with the main code layer via the import code.

This also reminded me that flash has a different use of code than C++. It doesn't have floats or ints, which leads me to believe that number supports both. As well I found that creating arrays in flash is actually pretty easy. All you need is a var Something:Array, then set Something = [#,#]. Though I might want to look into how it works with parallel arrays.