11/2/2012
Moved a large portion of the code into a separate code library and created a basic game editor. This may not sound like a lot, but it really as a lot of work as I had to ensure that only universal methods were included in the library. This also means that I had to essentially recreate all existing functionality for the editor and make it use reverse logic from the actual game. In the game, the three phase lights go Green – Yellow – Red – Green, but in the editor they need to go Green – Red – Yellow – Green. It’s a simple distinction, but to make it actually happen meant writing that core functionality separately for the game and the editor. During this process, I also decided that I want to handle scoring similar to golf. Each level will have a par that will be calculated based upon the number of moves used in the editor to create the level. I ran a few models before finally settling on par being calculated by multiplying the number of moves by 1.2 and rounding up. Essentially, this means that if it took 4 moves to create the level then: par = roundup(4 * 1.2 ) par = roundup(4.8) par = 5 Likewise, if it takes 6 moves to create the level, then Par = roundup(6 * 1.2) Par = roundup(7.2) Par = 8 This formula may change later when I add the other expected features, but for now I feel it’s a fair calculation. The idea is to allow the player a means by which they can deduct points from their total score. This raised another question to me. In golf, if you go 10 strokes over par, they count your score for that hole at +10 and leave it at that. The question then becomes, how far past par should I allow the player to go? For now I’m not going to implement this option, opting instead to just let the player keep going until they either give up or succeed. With the editor complete, the next concept that I want to implement is what you might call level paths. In some games this might be called campaigns. But it’s really just a list of levels in the order they will appear. I want this so I can provide multiple game options such as a classic level list, and advanced level list, an expert level list, and a tutorial level list. As with many other games, these lists should lead into each other, for instance, the tutorial list should pass you into the classic level list which passes you to the advanced level list followed by the expert level list. Of course once you finish the last level list, it should take you to the credits screen. Anyways, here’s a screenshot of the editor as it is now: ———-EDIT———- I should point out that while I’m providing a screenshot of the editor, I currently have no intentions of releasing the editor with the final game. This is because I’m building the game such that the levels are hard-coded into it. The editor is used for designing the level, and writes the appropriate C# code for the level for me. The end result is that each level is written as a class that predominately consists of several two-dimensional arrays of integers that keep track of each button and their status. I can’t say at this time if there will be an editor in the final version. That will most likely be determined by the amount of interest in the project and the inclusion of an editor.