Tuesday, December 23, 2014

Progress Update

The past two weeks have been all title screen and save file work. The user can now create up to three save files which, so far, record which rooms have been completed and the least number of moves it took to complete. The title screen menu has a few extra options; CONTINUE takes you strait to the room you stopped at, STATS brings up a GUI that shows your record number of moves for each room and what medal/ranking you got for the room if any, OPTIONS will eventually let you adjust various things like sound and music volumes.

I was very surprised how much work it ended up being. I almost always jump into something with the judgement that it will be just a small task only to come to the realization a month and thousands of lines of code later that the task was much more than it seemed.

I've been playing this one particular game lately and am in love with the navigation system. So I've decided to base most of my navigation off of that.

The game opens with the game title and the words PRESS SPACE. You can press SPACE, ENTER, or click anywhere on the screen which will tween in the save file select.

The save file select defaults to highlighting the last save file that was used so it's as easy as pressing SPACE or ENTER again. If the user does not want that save file, they can press the LEFT or RIGHT arrow keys to highlight a different save file.

Selecting a save file will tween in the menu options. The options given are; NEW GAME, CONTINUE, ROOM SELECT, ROOM DESIGNER, STATS, OPTIONS. A menu option selector object sits to the left of whichever option will be selected and can move up and down to each option with the UP and DOWN keys. CONTINUE and ROOM SELECT are sort of grayed out and cannot be highlighted depending on the circumstances.

Also, the ESCAPE key is a big part of navigation. At any one of these title screen stages, pressing ESCAPE will back out to the previous one. I would like to implement something that will close the application when pressing ESCAPE at the opening screen but I haven't figured that one out yet.





Friday, December 12, 2014

Daily Goal

Finish the Back-and-Forth Tile

Although the Back-and-Forth Tile is built, I need to test and make sure it's working everywhere it needs to.

Work Completed (12/11/14)

The Back-and-Forth Tile is alive an functioning after one day's work. There are some wrinkles that need to be ironed out and I should probably add documentation to the manual.

Although the functionality of the Back-and-Forth Tile is fairly simple, there was SO much that had to be done in so many classes. It makes me wonder what I could do to make the code more robust so that adding a feature doesn't require adjustments in a million different classes.



Thursday, December 11, 2014

Daily Goal

Create the BackAndForthTile

I'm putting the puzzle creation on hold for now because I can't stop procrastinating on it (stop procrastinating??). I should use all this wasted time to build on other parts of the game. So I'd like to create a tile that moves back and forth between two to four different tiles after each move in game play. Hopefully it doesn't end up being too complicated.

Tuesday, December 9, 2014

Creating Puzzles ain't Easy

I'm having somewhat of a difficult time with puzzle creation. On top of that, just staying focused on it is a chore. I've only been able to knock out a few since the last post which was six days ago. This is certainly unexpected and unfortunate since the Room Designer is fully functional and I don't like wasting time. Also, the main drive to make the Room Designer was so I could easily create the puzzles by simply drawing them in. So I don't know what's damming the river of creativity.

I did, however, use some of this time to practice physics stuff. I made something that spawns randomly colored squares that move up and down and also left and right as if they're orbiting around a pole. Spawning several of these squares at certain distances from the center of gravity and at timed intervals creates a sort of cone shape.



Wednesday, December 3, 2014

Goal for the week

Create Rooms and Fix Bugs

This seems to be the goal most days so I'm just going to work on these for the rest of the week. If I get them done before the week is over, I'll start Daily Goal again.

Tuesday, December 2, 2014

Daily Goal

Fix Switch Tile Editor Bug

While creating a room yesterday, the game crashed when I tried deleting some Switch Clients in Switch Tile Editor. I'm getting started late today so this will be my only goal.

Work Completed (12/2/2014)

I wasn't able to get around to creating rooms because I spent the time working through some bugs. I learned something critical about AS3 today while working through different SAVE CHANGES button and ADD ROOM button scenarios. The most common error I get is Error #1009: Cannot access a property or method of a null object reference which means I tried to access something from an object that hasn't been added to the world. What I'm now realizing is that this happens often due to objects adding other objects to the world in their added() function. Up until now, my thinking was those secondary objects get added to the world the same frame as their parent. However, I now think that this delays adding those secondary objects to the world until the end of the next frame. As a workaround to this issue, I've been setting an alarm to call whatever function is generating the error. That way, by the time the alarm goes off to call the function, the secondary objects have already been added to the world. The alarm only waits a tenth of a second so it would hardly be noticeable to the user but is still a cheap workaround and not the right way to do things.

Monday, December 1, 2014

Daily Goal

Create Rooms

Hopefully nothing sidetracks me today and I get around to creating rooms because I'd really like to move on to scoring and rewards for performance.

Last night I kept working past the Work Completed post to move the Room Designer switch tile outline F8 visibility toggle function from the SwitchTile class to the RoomDesigner class. Although the function was identical, it didn't turn on and off like it had been. The problem ended up being one of the conditional checks: if (es.indexText.masterAlpha == 1). Because this toggle feature is based off of update() listening for the F8 key, indexText.masterAlpha is a different value depending on which class's update is listening. So, if (es.indexText.masterAlpha == 1) needed to be changed to if (es.indexText.masterAlpha == 0).