For the August Ludum Dare #27 I released a simple game called apple harvest. The game was simpler than I would have liked due to what went wrong but it was finished and isn't too bad of a game all things considered. Here is my postmortem of the game.
What went wrong
Unfortunately Ludum Dare #27 happened to take place the same weekend as one of my cousins' was getting married. This meant that instead of having 48 hours to work on a game I only had about 8. This greatly reduced both my options for what type of games I could develop and the amount of polishing that could be applied to the game. As I really need to work on my polishing skills, this was disappointing.
What went right and wrong
I have been moving away from Flash preferring HTML 5 solutions as they do not require plug-ins. Right now my choice is to use Dart, but depending on what happens with ECMAScript 6 this could change. Still, when there is a limited amount of time, Flash is a bit faster to work with. Part of the reason that Flash is more efficient is simply due to the fact that the art/animation tools are built right in so you are not switching between multiple tools and writing code to load the various assets into the game as that is all handled automatically for you. While I would have preferred a HTML 5 solution, using Flash allowed me to finish the game at a relatively reasonable time so I wasn't overly tired for the Wedding.
What went right
The first thought that I had when I read the theme was a money booth type game. The kind radio shows like to have where you have a short amount of time to grab as much money as you can. Playing around with air dynamics would have been great fun but probably would have taken me more than 8 hours so I had to apply a Keep It Super Simple approach. I replaced harvesting money with apples. Why apples? I wanted some type of motion to the harvesting and falling apples is what came into my head so I just went with it. The apple life cycle was fairly simple with a flower, then a growing green fruit then a transition to a mature fruit. The transitions had a per-frame probability of happening adding a slight random element. Spawning new blossoms was also easy as I just pick a random spot on the trees. If there are no apples near enough then it takes otherwise, no spawning happens that frame. The simple artwork for the apple also got co-opted into the buttons for the menus.
Conclusion
For a very rapid game I think it turned out good. If I do revisit the game I would add multiple levels with quotas per level, and possibly different types of fruit trees.
Thursday, September 5, 2013
Friday, August 23, 2013
7DFPS 2013 Postmortem
The 7DFPS 2013 challenge is over. Since the first game-jam that I ever entered was the original 7DFPS, I felt that even though I was only going to be able to put in around 40 hours towards a game that I would still try and get an entry this year. Moon Base Z chapter 1 is my entry. It is in a lot rougher state than I would hope but is a fully playable game. As usual, here is my postmortem for the challenge.
What went right
I quickly came up with a story for the game but almost immediately realized that the story was way too ambitious for a week. This gave me two options: break up the story into chapters and just focus on getting the first chapter done for the challenge or re-work the story so it can fit. As much as I wanted a complete stand-alone game for the challenge, going with the chapter route would not only allow me to finish a playable level, but would give me months of extra time to properly create the game I jotted down. Seeing how I barely managed to get a single chapter finished, this clearly was the correct choice.
What went both right and wrong
As people who have been following this blog already know, I am getting heavy into using Dart as my web programming language. The decision to use Dart was actually a good one as I find myself far more productive using Dart than JavaScript. The plan to port my earlier 7DFPS engine to Dart, however, took far longer than I had anticipated. What is intersting, is that some of the bugs I was looking into in CQFPS were clearly marked as errors or warnings once the code was ported over. I find I am really enjoying Dart as a language, even with its idiosyncrasies and really hope that the language does take off.
What went wrong
I was going to get help with the artwork for the game. Sadly other things happened making it impossible for my artist to contribute directly to this game. Instead I had to cut-and-paste existing artwork and create new artwork. I also did not have the time to experiment with HTML5 sound, which is something I really need to do.
Conclusion
Overall not as good of a showing as I would like, but the game is far from finished. As I finish off the remaining 3 chapters I do hope that the resulting game will be much better than this first chapter indicates. My plans are to release each chapter as a beta each independently playable. Once all the chapters are out, I will do a final reworking of all the levels and combine it into a single game. I have no timeframe for doing this but do hope that it is sooner rather than later.
What went right
I quickly came up with a story for the game but almost immediately realized that the story was way too ambitious for a week. This gave me two options: break up the story into chapters and just focus on getting the first chapter done for the challenge or re-work the story so it can fit. As much as I wanted a complete stand-alone game for the challenge, going with the chapter route would not only allow me to finish a playable level, but would give me months of extra time to properly create the game I jotted down. Seeing how I barely managed to get a single chapter finished, this clearly was the correct choice.
What went both right and wrong
As people who have been following this blog already know, I am getting heavy into using Dart as my web programming language. The decision to use Dart was actually a good one as I find myself far more productive using Dart than JavaScript. The plan to port my earlier 7DFPS engine to Dart, however, took far longer than I had anticipated. What is intersting, is that some of the bugs I was looking into in CQFPS were clearly marked as errors or warnings once the code was ported over. I find I am really enjoying Dart as a language, even with its idiosyncrasies and really hope that the language does take off.
What went wrong
I was going to get help with the artwork for the game. Sadly other things happened making it impossible for my artist to contribute directly to this game. Instead I had to cut-and-paste existing artwork and create new artwork. I also did not have the time to experiment with HTML5 sound, which is something I really need to do.
Conclusion
Overall not as good of a showing as I would like, but the game is far from finished. As I finish off the remaining 3 chapters I do hope that the resulting game will be much better than this first chapter indicates. My plans are to release each chapter as a beta each independently playable. Once all the chapters are out, I will do a final reworking of all the levels and combine it into a single game. I have no timeframe for doing this but do hope that it is sooner rather than later.
Friday, August 9, 2013
Steam Trading Cards
I have been thinking about the Steam Trading Cards quite a bit lately as my free evenings have been spent playing games in order to collect the free card drops for games that have trading cards. I have received quite a few cards and have been selling the duplicates on the steam marketplace. Overall, I think it was an interesting marketing idea but at it's current implementation is a flawed system. As a programmer, I am use to debugging things so figured I would debug the Steam trading card system. Unfortunately, I do not work at Valve so my thoughts will lead to nothing but the exceeding remote chance that someone at Valve will somehow read this post and agree with my opinions.
Marketing wise, I am not sure that the addition of trading cards will actually sway any purchasing decisions very much for most people. That said, interest in the game generated by people playing the game more to gather trading cards will lead other people to buy the game so from an extended sales perspective this system could be potentially valuable. Unfortunately, due to the way the system is designed, it does not really do this but instead focuses on making commission profit from the marketplace. Why do I say this, well lets look at how the cards work.
There are a set of cards for a game, the number of cards varies but I have seen 5 to 15 Half that number of cards are earned by card drops from simply playing the game. This is the brilliant part of the scheme as poorer players earn stuff simply for playing which encourages them to play. There is the problem of people simply running the game and not actually playing it, but I don't consider it a real problem as the vast majority of people will actually play the game. Once the player has earned the drops from the game, they need to trade with other people, buy cards from the market, or wait for booster packs. Booster packs are only eligible to people who have used all their drops. This actually is a good idea. The problem is that the booster packs gives you cards immediately instead of adding more card drops. This means that once you have received all the card drops you never have to play the game again. This means that instead of encouraging players to play games longer and benefit from the word-of-mouth sales from people continuing to play older games, they are only making a few cents of commission from the marketplace when people sell cards.
The obvious solution is to make booster packs card drops. Still, I am not sure this is the best solution. Getting free cards is really nice and encourages people to continually log on to Steam which could lead to more sales. A much better solution is to keep the random booster packs, but also to give people an extra drop each week capped at the half-the-cards limit. People with drops would no longer be eligible for booster packs which would encourage players to play the older games keeping the communities for those games more active and resulting in more sales. While this would mean more people would earn badges, it would also mean more people trading cards on the market so the market commission profit would not go away plus there would be more sales of trading-card related games.
Such a very simple change would actually make the trading card scheme interesting instead of resulting in people simply playing games to gather the trading cards then not bothering with that game anymore.
Marketing wise, I am not sure that the addition of trading cards will actually sway any purchasing decisions very much for most people. That said, interest in the game generated by people playing the game more to gather trading cards will lead other people to buy the game so from an extended sales perspective this system could be potentially valuable. Unfortunately, due to the way the system is designed, it does not really do this but instead focuses on making commission profit from the marketplace. Why do I say this, well lets look at how the cards work.
There are a set of cards for a game, the number of cards varies but I have seen 5 to 15 Half that number of cards are earned by card drops from simply playing the game. This is the brilliant part of the scheme as poorer players earn stuff simply for playing which encourages them to play. There is the problem of people simply running the game and not actually playing it, but I don't consider it a real problem as the vast majority of people will actually play the game. Once the player has earned the drops from the game, they need to trade with other people, buy cards from the market, or wait for booster packs. Booster packs are only eligible to people who have used all their drops. This actually is a good idea. The problem is that the booster packs gives you cards immediately instead of adding more card drops. This means that once you have received all the card drops you never have to play the game again. This means that instead of encouraging players to play games longer and benefit from the word-of-mouth sales from people continuing to play older games, they are only making a few cents of commission from the marketplace when people sell cards.
The obvious solution is to make booster packs card drops. Still, I am not sure this is the best solution. Getting free cards is really nice and encourages people to continually log on to Steam which could lead to more sales. A much better solution is to keep the random booster packs, but also to give people an extra drop each week capped at the half-the-cards limit. People with drops would no longer be eligible for booster packs which would encourage players to play the older games keeping the communities for those games more active and resulting in more sales. While this would mean more people would earn badges, it would also mean more people trading cards on the market so the market commission profit would not go away plus there would be more sales of trading-card related games.
Such a very simple change would actually make the trading card scheme interesting instead of resulting in people simply playing games to gather the trading cards then not bothering with that game anymore.
Sunday, July 28, 2013
Metal Galaxy Postmortem
I am a few days late with this blog post as I decided to wait and see if I participated in the 7DRTS before writing it. Due to other obligations I was not able to spend a week, or for that matter evenings during the week, to work on the 7DRTS challenge but having worked out a simplified 4X game in my mind I wanted to give it a go. This is not that game but hints at what I had in mind are all throughout this postmortem. The game was posted on Ludum Dare, but is going to be August 2nd Blazing Games release. For those who don't want to wait a few days, here is the link to the page so you can try the game out right now. http://blazinggames.com/gamejams/minild44/miniLD44.php
What Went Right
In addition to the Mini-Ludum Dare theme of 7DRTS, I decided even before I started that I would try and incorporate the One Game a Month theme of Metal into whatever game I designed. Massive space fleets battling each other on a galactic map fit this theme but when I had to reduce my scope as it was probably not realistic, fitting that theme into colonizing planets was a bit trickier. Coming up with the amount of metal different stars have affecting the production rate worked really well as it definitely determines which strategies are most effective. The most effective strategy is focusing on heavy metal stars but bottlenecking the opponent by taking advantage of the 10 light-year limit is also effective.
What Went Right and Wrong
When I first heard of the RTS component of the challenge, my first thought was a galactic conquest game with a focus on fleets. As I only had a couple of the seven days this wasn't possible, at least not the way I had in mind. While playing with my galaxy generation code I added code to detect clicking on stars and making sure that a star was within 10 light years of a star the player already owns. This is when I realized that a race to colonize the galaxy is ultimately what the game is about and by eliminating the combat it becomes easy to finish the game over the weekend. Of course, by not having any type of production choices, or fleet dynamics, the strategy element of the game is significantly reduced. My what went right added a bit of strategy back to the game so while still simple on the strategy level, the game is fun and fairly quick to play.
What Went Wrong
As was already mentioned, the original plans for this game was to be a strategic space combat game so I spent time working out a simplified fleet management system. Had there been a full week to work on this game I have no doubts that I would have been able to pull this off. As it was, after spending a few hours of putting together some basic fleet management code, I quickly realized that the game simply was too large for a weekend so scrapped the code. Except that I still want to do the original game. Yet another game in my ever growing list of projects. Ah well.
What Went Right
In addition to the Mini-Ludum Dare theme of 7DRTS, I decided even before I started that I would try and incorporate the One Game a Month theme of Metal into whatever game I designed. Massive space fleets battling each other on a galactic map fit this theme but when I had to reduce my scope as it was probably not realistic, fitting that theme into colonizing planets was a bit trickier. Coming up with the amount of metal different stars have affecting the production rate worked really well as it definitely determines which strategies are most effective. The most effective strategy is focusing on heavy metal stars but bottlenecking the opponent by taking advantage of the 10 light-year limit is also effective.
What Went Right and Wrong
When I first heard of the RTS component of the challenge, my first thought was a galactic conquest game with a focus on fleets. As I only had a couple of the seven days this wasn't possible, at least not the way I had in mind. While playing with my galaxy generation code I added code to detect clicking on stars and making sure that a star was within 10 light years of a star the player already owns. This is when I realized that a race to colonize the galaxy is ultimately what the game is about and by eliminating the combat it becomes easy to finish the game over the weekend. Of course, by not having any type of production choices, or fleet dynamics, the strategy element of the game is significantly reduced. My what went right added a bit of strategy back to the game so while still simple on the strategy level, the game is fun and fairly quick to play.
What Went Wrong
As was already mentioned, the original plans for this game was to be a strategic space combat game so I spent time working out a simplified fleet management system. Had there been a full week to work on this game I have no doubts that I would have been able to pull this off. As it was, after spending a few hours of putting together some basic fleet management code, I quickly realized that the game simply was too large for a weekend so scrapped the code. Except that I still want to do the original game. Yet another game in my ever growing list of projects. Ah well.
Thursday, July 11, 2013
Creating NIM
When you look at the tag-based syntax that make up a HTML page, it is fairly clear that the format was designed more for static documents rather than interactive games. What you can do with pure HTML is rather limited. To get the interactivity necessary for all but the simplest of games, an additional programming language is need. This can take the form of the scripting language JavaScript which is built into all the major browsers. There are a number of other languages, such as Dart, that compile to JavaScript that can also be used but compiling to JavaScript is not quite the same as writing in JavaScript.
When I got a trollish email saying that JavaScript is not part of HTML5, which is only true on the most purest level, I decided to create a simple game using only HTML. A number of the tags that HTML5 added are clearly designed for use with a scripting language so to utilize HTML5 you really need to utilize a scripting language. Now if the email was complaining about WebGL, I would not have considered it a troll but still hope that Microsoft does start supporting it (as the rumours suggest).
The first problem that needs to be overcome when creating a no-script HTML game is finding a game that is simple enough to implement using only the markup language. This essentially means that the game needs to be representable using static pages with the interactive element switching between pages. While this is a huge restriction, I actually came up with a number of games that could be created using a number of static pages. These include 3D mazes, path choosing adventure games, combination puzzles, restricted move games such as Tower of Hanoi, and many of the various NIM style math games. Obviously I chose NIM.
The game must be broken into a number of pages. If we go with the traditional 17 objects, then we will need 17 pages for the player landing zones. The problem is that the computer needs to make a move. There are at least two ways to deal with this. The obvious solution is to add an additional 16 pages for the computer moves. When you think about it, the only thing that happens during the computer move is that the number of objects it is going to take is revealed so the only thing the player is doing is clicking to continue. While merging the computer results with the landing page adds a slight bit of complexity, it cuts the number of pages necessary in half.
The easiest way of implementing the game is to create the 17 item page, clone it, remove an item and repeat until all 17 pages have been created. A slightly faster, though more complex way of doing this would be to write a script to generate the pages for you. Each page simply consists of images and links to the lower-numbered three pages so this is really simple to create. That really is all there is to it. Sorry for boring you this week.
When I got a trollish email saying that JavaScript is not part of HTML5, which is only true on the most purest level, I decided to create a simple game using only HTML. A number of the tags that HTML5 added are clearly designed for use with a scripting language so to utilize HTML5 you really need to utilize a scripting language. Now if the email was complaining about WebGL, I would not have considered it a troll but still hope that Microsoft does start supporting it (as the rumours suggest).
The first problem that needs to be overcome when creating a no-script HTML game is finding a game that is simple enough to implement using only the markup language. This essentially means that the game needs to be representable using static pages with the interactive element switching between pages. While this is a huge restriction, I actually came up with a number of games that could be created using a number of static pages. These include 3D mazes, path choosing adventure games, combination puzzles, restricted move games such as Tower of Hanoi, and many of the various NIM style math games. Obviously I chose NIM.
The game must be broken into a number of pages. If we go with the traditional 17 objects, then we will need 17 pages for the player landing zones. The problem is that the computer needs to make a move. There are at least two ways to deal with this. The obvious solution is to add an additional 16 pages for the computer moves. When you think about it, the only thing that happens during the computer move is that the number of objects it is going to take is revealed so the only thing the player is doing is clicking to continue. While merging the computer results with the landing page adds a slight bit of complexity, it cuts the number of pages necessary in half.
The easiest way of implementing the game is to create the 17 item page, clone it, remove an item and repeat until all 17 pages have been created. A slightly faster, though more complex way of doing this would be to write a script to generate the pages for you. Each page simply consists of images and links to the lower-numbered three pages so this is really simple to create. That really is all there is to it. Sorry for boring you this week.
Friday, June 28, 2013
Binary Prerequisites
I recently released an educational game where you play with logic gates. The inspiration for the game came from a JavaScript book that didn't even bother covering logical operations. Logic operations are used to manipulate bytes at the per-bit level making them very useful for optimizing the memory-footprint of data structures. Now that everyone has multiple gigabytes of RAM in their computers, optimizing memory is not as high of priority anymore even if it is fairly easy to do. Instead of preaching about this, I am instead going to give an example of its use and the non-boolean-logic alternative.
For a number of games under development, I have a skill system where players select their bonus skills. Many of the skills have prerequisites. Each skill gets assigned a bit within an integer (if there were more than 32 bits, more than one integer could be used, though for me this isn't an issue as skills are grouped into set that contain 16 skills so only 16 bits are needed). Each skill record has an integer for prerequisites. The character class has an integer for each skill set indicating what skills are known. To see if a skill can be learned, a simple logical AND can be done on the prerequisite and the characters skill set. If the result equals the prerequisite, the skill can be learned.
This can be done without binary logic operators by using an array of booleans. Checking prerequisites the becomes a bit more complicated. First, a meets-prerequisites flag is set to true. A for loop looping through the prerequisites array checks if the corresponding skill flag is set. If it is set, the array of skills in the character sheet then gets checked. If the character sheet skill is false, the meets-prerequisites flag is set to false and the for loop is exited.
As many languages use integers to represent Boolean variables, this is a potential waste of 31 bits. In our example, this would be a memory increase of 16 times the amount. Some compilers have optimizations for memory use in which case the compressing of the bits into a single integer will be done by the compiler, but even in that case the compiler will still have to use the looping code for checking prerequisites with the rather significant speed difference as a result. Of course, in addition to having lots of memory, computers also are very fast now so such concerns can be overlooked. But as writing the code to be efficient in the first place is so easy there really is no excuse for such a waste of memory and CPU cycles.
For a number of games under development, I have a skill system where players select their bonus skills. Many of the skills have prerequisites. Each skill gets assigned a bit within an integer (if there were more than 32 bits, more than one integer could be used, though for me this isn't an issue as skills are grouped into set that contain 16 skills so only 16 bits are needed). Each skill record has an integer for prerequisites. The character class has an integer for each skill set indicating what skills are known. To see if a skill can be learned, a simple logical AND can be done on the prerequisite and the characters skill set. If the result equals the prerequisite, the skill can be learned.
This can be done without binary logic operators by using an array of booleans. Checking prerequisites the becomes a bit more complicated. First, a meets-prerequisites flag is set to true. A for loop looping through the prerequisites array checks if the corresponding skill flag is set. If it is set, the array of skills in the character sheet then gets checked. If the character sheet skill is false, the meets-prerequisites flag is set to false and the for loop is exited.
As many languages use integers to represent Boolean variables, this is a potential waste of 31 bits. In our example, this would be a memory increase of 16 times the amount. Some compilers have optimizations for memory use in which case the compressing of the bits into a single integer will be done by the compiler, but even in that case the compiler will still have to use the looping code for checking prerequisites with the rather significant speed difference as a result. Of course, in addition to having lots of memory, computers also are very fast now so such concerns can be overlooked. But as writing the code to be efficient in the first place is so easy there really is no excuse for such a waste of memory and CPU cycles.
Friday, June 14, 2013
Thoughts on Dart
I have mixed feelings on the new languages that compile to JavaScript such as Dart and CoffeeScript. The problem with these languages is that by producing JavaScript there are people who seem to think they are creating JavaScript projects when they are not. It is possible to take the JavaScript output and edit it as if it were a JavaScript program, but unless those changes are also done in the language source code, those changes are either not part of the project or make the project much harder to maintain. This effectively means that once you start a project in one of these languages you pretty much have to stick with the language. This is not necessarily a bad thing but it does reduce the number of people who can use the source code.
Dart is a bit different from other languages that compile to JavaScript. The compiling to JavaScript is a backwards-compatibility feature designed to allow programs written in Dart to work on browsers that do not support the Dart language. The idea is that eventually browsers will start supporting Dart as one of their script-tag languages. The dart programs then would be run using their native JIT-compiler resulting in better performance. Right now there are not any browsers that support Dart, but Chrome is going to soon as the Dart SDK includes a beta-build of Chrome that has Dart support.
When Dart was first released, I briefly looked at the language but decided I would wait for the 1.0 release before trying it. A Google IO presentation on the language got my curiosity peaked and when I discovered StageXL (which like the CreateJS library is modelled after the Flash API that I am familiar with) I decided that the JavaScript issues I was having with CreateJS might be solved if I used Dart and StageXL. This in fact was the case so I have decided that I will be using Dart to port my Ultimate Retro Project to HTML5.
The Dart language is a proper Object-Oriented language with optional type support. All the type-related issues I have with JavaScript are gone and having proper classes makes working with code great. My favourite feature surprisingly was the switch statement. Dart requires that each case statement within the switch block has a break, continue or return statement making the issue of accidentally forgetting a break statement a thing of the past. This is one of my pet-peeves with all the C-like languages so discovering this feature made my day.
While I am still new to the Dart language, I suspect that by the end of the Ultimate Retro Project port I will be close to an expert with Dart. If like me you are coming to JavaScript from real programming languages, Dart may be the solution. I will be continuing my discussion of Dart as I continue to work on my port, but as this is a side project I am not sure how quick the work will proceed. Perhaps by the end of the project I will have changed my mind, but my current impressions of Dart are exceedingly positive so there will have to be major issues to make me change my mind about the language.
Dart is a bit different from other languages that compile to JavaScript. The compiling to JavaScript is a backwards-compatibility feature designed to allow programs written in Dart to work on browsers that do not support the Dart language. The idea is that eventually browsers will start supporting Dart as one of their script-tag languages. The dart programs then would be run using their native JIT-compiler resulting in better performance. Right now there are not any browsers that support Dart, but Chrome is going to soon as the Dart SDK includes a beta-build of Chrome that has Dart support.
When Dart was first released, I briefly looked at the language but decided I would wait for the 1.0 release before trying it. A Google IO presentation on the language got my curiosity peaked and when I discovered StageXL (which like the CreateJS library is modelled after the Flash API that I am familiar with) I decided that the JavaScript issues I was having with CreateJS might be solved if I used Dart and StageXL. This in fact was the case so I have decided that I will be using Dart to port my Ultimate Retro Project to HTML5.
The Dart language is a proper Object-Oriented language with optional type support. All the type-related issues I have with JavaScript are gone and having proper classes makes working with code great. My favourite feature surprisingly was the switch statement. Dart requires that each case statement within the switch block has a break, continue or return statement making the issue of accidentally forgetting a break statement a thing of the past. This is one of my pet-peeves with all the C-like languages so discovering this feature made my day.
While I am still new to the Dart language, I suspect that by the end of the Ultimate Retro Project port I will be close to an expert with Dart. If like me you are coming to JavaScript from real programming languages, Dart may be the solution. I will be continuing my discussion of Dart as I continue to work on my port, but as this is a side project I am not sure how quick the work will proceed. Perhaps by the end of the project I will have changed my mind, but my current impressions of Dart are exceedingly positive so there will have to be major issues to make me change my mind about the language.
Subscribe to:
Posts (Atom)
