Tuesday, February 28, 2012

More Leaderboard Stuff

Haven't been working on much code. I messed with the main menu of Color Coder a bit. I played with the spacing between buttons and added a nice looking Scoreloop one to get to that information. Still trying to get the Time Trial leader board working since the other two are good to go. The Scoreloop documentation makes it look like what I want to do is, in fact, doable. I just can't figure out how to do it. I also can't tell if it is possible to have an ascending leader board in the same game as a descending one (which I need). I can't be the only one who wants both types of leader boards in a game, so you would think it would be an option, but I have no idea how to set it up on the Scoreloop website. Then again, their controls for developers aren't terribly user friendly and when you click the little "i" information image next to stuff, it barely tells you anything helpful.

I posted a discussion on the Scoreloop support "forums" so now I just need to wait for it to be answered. This, however, could potentially be a while, so I will have to find something to work on in the meantime. I think it'll be trying to get the music in my new game working better. Right now it restarts the music every time you switch activities. Its fine once you get to the game page, but no good everywhere else. So, I'm going to try and get that all sorted out.

On a side note, I beat my high scores for both Color Coder classic modes with 14 on hard and a sweet 18 on easy, so that's pretty cool.

Monday, February 27, 2012

More Commenting and Scoreloop

So the work I've done in the last couple days has mostly been commenting and working with Scoreloop. My main game activity is commented really well (in my opinion), possibly too much in some places. I still have 5 other activities to comment, but they are much smaller and shouldn't be a problem.

I've also started integrating Scoreloop in to Color Coder. So far I have a working leader board for classic easy mode, but I need to make two more for classic hard mode and time trial mode. Scoreloop was pretty easy to integrate since they have some pretty good documentation that comes with the APK download, but their support "forums" are a bit lack luster. If you post a topic asking for help, it first has to be approved from moderation. Then you have to wait for a variable amount of time, up to 4 days that I've seen, to get any response from a member of the support team. As there are only 4 of them I can imagine that they get overwhelmed from time to time.

Regardless, I've got it set up so there is a leader board for classic mode of Color Coder. You can only have a single score on the boards and if you submit a score lower than your current score on the boards, it doesn't get updated. It seems weird to not just put all your scores up there since I'm used to Arcade style leader boards where one person can flood the screen if they are good enough. This setup makes more sense though, especially since I expect that most of the people on the top scores list to have the same score, at least on Classic Easy and Hard modes. On Time Trial I think there will be a bit more separation. Now I just need to get the other two leader boards set up and get a new button image on the main screen for Scoreloop stuff. Otherwise, Color Coder is pretty much set up for an update including Scoreloop leader boards, hopefully in the next week.

Saturday, February 25, 2012

Tweaks and Commenting

Today has been pretty boring so this will be a short post. The only thing I did to the game was altering the position of some text so that it is better centered and such. I've also been doing inline comments to better document the code, but there is still a lot to do there so it will take quite a bit more time. The game is almost done and up until this point I haven't been taking a whole lot of time to any inline commenting so I need to get that going before I forget why I did certain things.

Friday, February 24, 2012

Splash Screen, Sound Effects, and Music

Today I added a couple of smaller features on my way to finishing up the game: a splash screen, sound effects, and music. All three things were quite a bit simpler to add than I thought they would be.

The splash screen wasn't hard once I figured out what I needed to do. I looked over some example code I found, but it was from over a year ago and some of the object names and such have since been changed, so I had to look up what the new names were, which didn't take long, but it would be nice if some of the examples I've been looking at were current at all. The splash screen just shows up for 2 seconds when the user first starts the game. The screen shows an image of the Downplay Games logo along with the AndEngine logo in the lower right. The image zooms in a little bit over the course of the 2 seconds the screen is shown.

The sound effects were also fairly easy to add. Since I already had the Sound On/Off settings flag implemented, it was pretty simple to add in a couple if statements checking if the sound flag was set, and then it plays the sound. I added in sounds for starting a game, selecting a tile to destroy, chains being destroyed, tiles being respawned, and the game ending. Currently they all play the sound file since I don't have any other files ready.

Similar to the sound effects, the music settings flag was set up already so getting the music to play was easy to implement. All pages in the game play it if the music setting is on. Unfortunately, the song restarts every time the game switches to a different page. I'm also using a place holder song for now that just loops repeatedly. If the player pauses the game on game page, the music also pauses. The music toggle button on the settings page does the same thing: the music plays when the music toggle is on and pauses when it is off.

With these additions, I'm tempted to say all the critical aspects of the game are now complete.

Thursday, February 23, 2012

Game Modes 2

Yesterday I finished up with two major aspects of the game: Time trial mode and high score message boxes. The message boxes appear in the middle of the screen when the player has scored a new fastest time in Time Trial or a new high score in Classic or Casual.

In time trial mode, the player has unlimited clicks and the object of the game is to get to 15,000 points or more as fast as possible. A stopwatch style counter starts when the player starts the game and ends when they reach 15,000 or more points. My fastest time so far is 1:26.880. Adding time trial mode to the game was a bit time consuming, but I was expecting that. Getting the timer to pause and resume correctly was *way* easier than I was expecting.

Time trial mode is pretty fun. Since you don't have to conserve clicks, you can just set yourself up for much larger chains, where in casual or classic, setting yourself up for a larger chain might not be worth the extra clicks you spend to do so. Without having to worry about how many clicks you have left you can make large chains all game, as long as you do so quickly.

Getting the high score/fastest time message boxes to pop up at the correct time was actually much more time consuming than I thought because I was actually checking for high scores in multiple places, both when the timer ran out and when the user was out of clicks. Now, it basically checks when the last tiles are respawned after the game end condition has been met.

Earlier today, I also did some quick work to add a "Quit" option on the game screen pause menu. Now, when the player presses either the menu button or the back button on the game screen, the pause menu will pop up. When the player selects the Quit option, they are taken back to the main screen of the game.

I feel like the only main things I need to add now (besides better graphics) is music/sound effects and a Downplay Games splash screen when the game first loads. Then an addition I was thinking about making was some sort of point text that appeared when a chain was made to give feed back to the player as to how many points they've received. In this way, the player would get a feel for how different chains are rewarded more than others and how causing multiple chain reactions is more beneficial. That being said, I also feel that there is a lot of chain reactions and tiles falling in different directions, etc, and putting a bunch of text numbers over the top of it might get really busy and make the board too crowded. I'll have to play around with it later and see how I feel about it.

Wednesday, February 22, 2012

New Game Modes 1

Yesterday I started working on different game types, specifically the "Casual" mode. In casual mode, there is no time limit and the player has 25 clicks to get as many points as possible. Its a mode for when players want to take their time and really think out their moves.

Since I started putting new game modes in, I also added some personal high score tracking. Currently the game is saving high scores for Classic and Casual modes. The game type selection page now shows the high score for currently selected game type. The high score text is displayed on the bottom of the game type description area. My new Classic high score is 13236 and my Casual high score is 14296.

When the game is in Casual mode, the time display is shown as the infinity symbol. When the game is in Time Trial mode, the clicks display is shown as the infinity symbol.

The stop watch functionality of Time Trial still needs to be implemented and then a fastest time needs to be saved. I also need to add some sort of new high score/fastest time dialog box that pops up when the player breaks their records.

Tuesday, February 21, 2012

Non-Game Pages.

Had a pretty productive day yesterday. I added 5 activities to the game: main menu, help page, story page, settings page, and a game type page.

The main menu page is straight forward. There's a large button for play that takes you to the game type selection page, and then 3 smaller buttons for Story, Settings, and Help.

The settings page has two toggle buttons for turning off and on sound effects and music, except there isn't actually any sound effects or music in the game yet. It also has buttons that will take you to the Downplay Games facebook, twitter, and website, as well as a "More Games" button that takes you to our page in the Android Market.

The help page and story page pretty much function the same way. They are basically slideshows that you navigate by swiping the screen with your finger. at the bottom left of the page in small text I put a note that says "Swipe to Change Page" just in case the user doesn't automatically get that. Also, in the bottom right there is a page indicator, that says for example "Page 3 of 6", to provide a little feedback so the user doesn't keep swiping when at the end of the 'slides'. These pages will show the help page images and ones depicting the back story of the game.

The game type page is the page displayed right before you get in to playing the actual game. It will be here that the user selects their game mode. I currently have 3 game modes shown. Clicking any game mode button highlights the button's frame in different colors, and obviously clicking a different button removes the highlight from the previous button and places it on the current one. In addition, an image that takes up the right portion of the screen also displays a description of the highlighted game mode. Clicking a game type button that is highlighted takes you to the game page, though the different game modes are not yet implemented.

Getting the new game modes in are next on my list as the various new pages are pretty much finished besides adding proper images and sound effects. I'm also going to be adding some personal high score saving pretty soon. On a side note, my new high score for what should now be considered "Classic Mode" is 13050.