Skip to content
May 11, 2012 / sguergachi

Development Diary #15

Wow, its been quite some time since the last Dev Diary!

Well, I finally have the exciting news I’ve been wanting to let everyone know for sometime now:

Alpha Release!

Carlos and I have been working on this since the last release. Even through University I’ve been able to make considerable progress. Basically, Alpha has a functioning Library, that actually does something that may be considered useful. Here are the major features now in Alpha:

  • You can add games to the Library using the new Add Game UI
  • You can run games from the Library
  • You can remove games from the library, and never by accident
  • The Library saves your games to a local database
  • The Library saves the favorite state of your games

Those are the major features added, but that comes with a butt load of bug fixes and some other small changes. I’m going to go into a bit of detail as to how each of these Major features actually work:

Add games to the Library using the new Add Game UI

Well, this has been a long time coming. Being able to add a game to a library with multiple grids in run time, from a database, all to be beautifully displayed is hard work, especially since this was all done from scratch. From the very beginning the rendering of the library was designed to allow for infinite games to be added and removed easily.

It started with the GridManager a component in the core of Aurora which manages all of the aGridPanels which is an engine component designed to contain components in a grid fashion with some added built in management capabilities such as an ArrayList that contains a copy or a list of all the items currently in the grid, this allows for easy manipulation and acquisition of items in these grids. the GridManager has to fill up each grid with the game Object represented in the library in the form of beautiful box art icons and create new grids when appropriate, check for duplicates and finish by adding placeholder images  in the empty slots of unfilled girds. The GameCover is one of the Major components in the Core of Aurora, it contains every detail about a specific game, it also contains the UI dealing with the manipulation of the game in the Library. It deals with getting the actual Box Art from our sourceforge web servers, or locally if available.  All this came together in the Aurora_GameLibrary class where the transition between grids and handling of major UI is put together.

That stuff had to be built before we were able to add individual games. When that got put together I started working on the interface that would allow for easy in app adding of games. I had a nice simple slide down box done in the previous release, that turned into what it is now. The AddGameUI allows you to add a game to your library in two steps. The first step is simply the name of the game you want to add, typing it in the very visible textbox allows you to see a predictive search of the game you want represented by the Box Art. The list directly to the left of the box art shows up to 10 other games that contain in there name what you typed in, selecting them shows the BoxArt for you to make sure that’s the correct game. The second step is locating the game on your system using the file browser. On Windows the Filebrowser isn’t very good since it uses the Java stock file browser with slight color changes to fit in, otherwise its not the easiest way to navigate your system, and I hope I can fix this in the Beta release. Otherwise the file browser lets you select executable and shortcuts and associate them with the game you want to add. Each steps light up red when they are not done or done incorrectly and light up green if they are both completed. When both steps are green a big green button pops down allowing you to add the game to the library. The AddGameUI pops back up and the game is added to the library. If the first grid is full then the grid automatically moves to the right until you get to the grid containing your newly added game. That’s basically how adding games to Aurora works.

Run games from the Library

Running games from the library uses the new AuroraLauncher which executes the associated file attached to the game object . It displays an overlay covering the whole screen notifying the user that their game is about to launch, when the executable terminates the user is welcomed with the black overlay again and are told how much time they spent on that game then returned to the library. Executing files using Java was tricky at first since we executed things through the command prompt (or terminal) and this caused a bug where the game would not be executed from the context of that directory, so if the game needed any files in and around that directory, it would fail since we were executing from the home directory. Turns out the ProcessBuilder in java makes things really simple. We did end up using the command prompt to run shortcuts on windows since that was the best way to do it with the ability to track when the executable executed by the shortcut was terminated. Overall the launcher is pretty good, we plan on adding tracking information to it later when we finish the actual tracker.

Remove games from the library, and never by accident

Removing games from the library was one of the trickier parts of this release. Many bugs could (and still may) ensue because of the remove game feature. Removing a game from the library we had to deal with all the many possibilities involved with it removing a game. When we wanted to have the remove game feature implemented we made sure that it was done live and instantly as users would expect, when you remove a game the library should reformat to keep the flow of games continuing along the library with no random empty spots, make sure placeholders where re-added appropriately etc. We had to deal with the fact that removing games from a single grid would affect every grid before it. We also had to make sure people would not accidentally remove a game. So I worked on the UI part of removing games and  Carlos was able to work the actual logistics and made the adjustments to the GridManager to be able to handle this as we envisioned it. Right now I think it works pretty well, we haven’t had time to stress test it, but hey its Alpha we expect many bugs and bad things to happen!

Library saves your games to a local database

Saving your library is an obvious feature that I managed to  implement in a matter of days using a system I thought up called Stores. The idea was to have a “Store” that contained array lists filled with library content, the store would be an in memory database essentially. On launch the store would be filled with library related data from the local database, when a game is added to the game it is saved in the store and transferred to the database directly so that in case of a sudden crash all previously added games have already been added to the database. There is a separate store for the Library, Settings and the Profile each extend the aStore interface in the engine. It works pretty well, there are some database read and write optimizations that I need to do, but for now the H2 Database engine is speedy and works well with Aurora through the aSimpleDB component in the engine which allows for quick and simple access to a database, without even having to know SQL (for basic operations).

Library saves the favorite state of your games

Saving states of whether a game is favorited or not is similar to saving a game as it also goes through the Store, however it required that we updated currently existing records and not add new ones. So new methods were implemented to instantly record whether a game is favorited or not in the library Store. I also changed the adding to library process when Aurora launches to organize the favorite games to be added first and the rest afterwards. I do want to be able to have games instantly reorganize when you favorite a game to be among the first games, but that will have to come later.

Well those are the major new features, and the only ones that really matter right now, there are known bugs with some of these features and some that have been around for ever (UI scaling) and we are working on fixing them ASAP, so expect more frequent releases again.

Also I should mention if you haven’t yet please go to our website and subscribe to get updates when new features come out:

Other than that I hope you get to enjoy Aurora Alpha release, its been in the works for the past 3 months through our free time and we are pretty happy with what we’ve been able to achieve. Please e-mail me if you have any feedback, bugs or just leave a comment!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: