HTML5 Game Development With GameMaker published

Today Packt Publishing announced the publication of HTML5 Game Development with GameMaker by Jason Lee Elliott. I was involved with the creation of this book as a technical reviewer, and as such I’m intimately familiar with its contents.

While the book title refers to HTML5 games specifically, most of the content is applicable to any development in GameMaker Studio, regardless of your intended build target.

Some of the highlights include:

  • Numerous examples of the “Finite State Machine” pattern implemented as a system of related Objects
  • Building a Box2D physics-based game
  • Creating a particle system
  • Facebook integration
  • Flurry Analytics integration
  • How to publish your game on the web.

If you purchase through the link below, Amazon will compensate me for the referral.

GameMaker Project Rot

My recent project, Genes, had a bug in it which didn’t really matter too much: Male creatures were supposed to seek the nearest available female, re-targeting every few seconds. And so too with females. But for some reason, the males were not re-targeting any longer once all the females had become pregnant.

I spent some hours trying to debug this before I released it, and I suspected something about the instance_change() method, which I used to change a female creature to a pregnant female, was to blame, but when I tried running a few tests to see what was going on in the code, it was apparent that the pregnant females were truly turning back into normal females after birthing, and also that the male’s re-targeting clock was resetting, and that they should have been seeing these females as available but for some reason they just weren’t.

It wasn’t crucial to the Genes demo, since the female homing worked well enough to get the breeding cycle going, so I gave up and posted it as it was. Then, I updated GameMaker Studio on Saturday to 1.1.929, and re-ran the game and all of a sudden the males are exhibiting the correct behavior now.

I started reading through the changelog to see what might have fixed it, and noticed something else that was enticing to me: Blend modes have been added to WebGL!

I haven’t touched the project files for Karyote in since sometime late in September, when I finished working on the post-Ludum Dare compo enhancements for it. My great disappointment with the HTML5 build of Karyote was that the pretty color blends that I’d come up with for the Windows build weren’t able to be rendered.

This had really soured me on building HTML5 games. But now I could see if it would be worth while to release a new build.

I tried opening up the project to rebuild it, and GameMaker said it needed to do something to the files in order to continue, and when it did, the project was corrupted, and all my project assets were missing. :-(

Fortunately, I have backups.

I restored the project folder from a backup and tried opening it again, and this time it worked. That is, it didn’t corrupt the project this time, at least.

But when I ran the game, a number of things were still off. In the Windows build, for some reason, the player’s sprite isn’t drawn correctly. The script that composites the player’s sprite no longer correctly centers everything, so now the body is off-center from the tail and the particle effects. And the HTML5 build no longer renders enemies at all for some reason. You just start out in an empty universe with nothing every appearing apart from the player.

Worse, the player sprite seems to be drawn correctly in the HTML5 build. So, it appears that the runner is not behaving consistently, depending on the build target. Which means that despite promising to allow you to develop projects that you can build to whatever platform, you (still) really can’t, because the behavior will not be identical across all platforms. I can only hope that this inconsistency will be rectified soon. It really sucks to have a tool that advertises itself as giving you the capability to easily develop for multiple platforms with a single project, and not deliver on that.

I’m sure with a little investigation and a bit of time, I might be able to fix these issues. But as a developer it sucks to have to sink my time into tasks like this, rather than doing new development.

This is something I’ll need to look into further, but I have to say that it is dismaying not to have confidence in Game Maker updates. If an update can ruin a project like this, it makes me very nervous about upgrading. Any project that I’ve put serious amounts of work into, I don’t want to introduce bugs into because I updated the development environment. Of course, I also don’t want to be stuck on an old version of my development tools, either.

I don’t know what techniques programmers use to protect their project code from changes to the underlying framework or environment. I imagine a unit test suite would help, but it doesn’t seem feasible for GameMaker projects.

Apart from that, I am not sure what else professional developers who work in GameMaker do. If you have any suggestions, I would love to hear them.

The Space Invaders: In Search of Lost Time

I just watched The Space Invaders: In Search of Lost Time, a documentary about the golden age of video games, and the stories of a few collectors of arcade games who are keeping them alive in basements and garages and museums around the country.

A heavily nostalgic look at the games, people telling their stories and what the games and the arcade experience meant to them. It wasn’t as heavy on history, research, and data as I would have liked, and being an enthusiast who lived through this period I didn’t feel like I really learned anything, but I feel qualified to say that the film is accurate in its treament of what it covers, and it is quite enjoyable to watch if you love the the golden age of arcade videogaming, or if you want to learn about that period.

The film did focus mainly on gamers who grew up in the late 70’s/early 80’s, and did not seem to include any interviews with people from the industry — designers, programmers, company presidents, or anything (although, a number of the collectors they interviewed do work in the computer technology field in some capacity). So it’s very much a gamer/fan oriented story, and not an insider story. But you’ll come away from it with a good feel for what the games meant to the generation who came of age during their heyday, and a lot of cabinet envy, if nothing else, and perhaps a desire for more wall outlets in your basement.

Strangely, the actual game Space Invaders seems to have been largely ignored by the collectors who shared their stories. For serving as the inspiration for the film’s title, it’s a bit odd that they didn’t spend a little more time talking about the game somewhere in there.

It’s available as an Amazon Instant Video, and if you watch it through the link below, I’ll get a little compensation through their affiliate program.

The Space Invaders: In Search of Lost Time

Genes

I’ve created a demo for a genetics mechanic.

This is not a playable game, as it isn’t interactive. It’s just a demo of a breeding mechanic.

To explain what’s going on a bit: (more…)

GameMaker: Studio Master Collection discount for Professional licensees

As covered by GameMakerBlog, YoYoGames has announced a special 60% discount sale for developers using GameMaker: Studio Professional only, allowing them to upgrade to Master Collection for $199. The special discount extends through 3/31/13.

This limited-time special offer is apparently in response to a situation affecting Professional licensees who had no cost-effective upgrade path to allow them to convert their existing investment to a Master Collection license. Following the recent release of the Ubuntu build target module, a paid upgrade for Professional users, there were complaints of unfair pricing affecting Professional licensees.

The big advantage for owners of a Master Collection license is that any future Game Maker build targets that happen to be released are automatically included as free updates, while GM:S Pro licensees have to pony up more cash for each piecemeal upgrade, thus making Pro a much more costly way to get all the features available in the Master Collection. As the Master Collection grows (and we don’t really know how much more, or if, it will grow), this disparity will only increase.

While this is a fine gesture on the part of YYG to respond to Pro license holders who asked for cost-effective upgrade path to the Master Collection, I still think it makes more sense for YYG to make it part of an ongoing pricing strategy, similar to the “Anytime Upgrade” option Microsoft made available to Windows 7 users, which would enable them to upgrade to higher product tiers for the difference in cost from their present tier, at any time. Hopefully YYG may yet make such a change to their licensing model — if you’d like to see that happen, I encourage you to send them feedback.

For now, this seems to be a good opportunity (and perhaps the only one) for any serious GameMaker Studio Professional users who may want to upgrade to the Master Collection.

Packt Publishing announces HTML5 Game Development With GameMaker

Packt Publishing has announced an upcoming new book, HTML5 Game Development With GameMaker, by Jason Elliott, tentative publication date in late April 2013.

I provided technical review/editing of the book, and so I can say that it should be a good book if you’re looking to get into the newer features of GameMaker Studio. While the book focuses primarily on HTML5, almost all of the book is generally applicable regardless of what platform you wish to target.

Highlights include:

  • Facebook integration
  • Pathfinding and Artificial Intelligence
  • State Machine design pattern
  • The new Box2D Physics system
  • Particle effects for any game
  • File I/O and HTML5 local storage.

Leveling Up as a Game Maker Dev

Something that interests me greatly with making things is the process by which the maker transforms from a novice to a master. This is a process of learning primarily by doing and through experience. Things like reading about a subject, interacting with peers, or watching others demonstrate, or abstractly thinking about a topic all contribute to learning, but none so much as actually doing things.

To the greatest extent possible, one should endeavor to spend their time doing and making. Get outside of your head and make. Do not exhaust yourself while making and doing; give yourself opportunity to observe what, how, and why you are doing what you are doing, and take time to examine and reflect on these things. Then apply what insights you gain from this into your next doing and making.

As I have progressed in learning GameMaker, I have observed a few distinct phases in my development. I don’t know that I’m at the highest level yet, or if there is a highest level. But as a gamer I like being able to categorize things and assign levels to them :-)

I really wish that I had had something like this to guide me as I made my progress, so it makes me really happy to have written this. I think it can help a less-experienced developer have some idea of a criteria of competencies so they can figure out how to get better, things to look for that can help them get there without having to figure it all out for themselves. It can also help a mentor recognize where their protegé is at in their development and help them identify areas where they should focus in order to improve.

Here’s a summary of my progression as a GM Dev to date:

Level 0

Complete ignorance. It’s a struggle to do anything.

All you can really do is follow instructions in a tutorial, most likely doing things with drag and drop actions. And sometimes even that is frustrating.

Despite the instructions being clear and straightforward, you still have a hard time following them because you have questions that are so basic that the people who wrote the tutorials don’t even realize that you would have them.

If you’re trying to follow written instructions, you wish that instead of still images, you had an animation showing where to click and what to type. The instructions use terms for user interface widgets in the IDE that you aren’t familiar with yet, leaving you to guess until you figure out what they mean.

Six months or so later, you think to search for tutorial videos on YouTube, and find a bunch, although they’re not really much better because of amateurish production quality, and by this point you’re well beyond needing them anyway. Still, there’s a few good ones on topics you’re not yet clear on. (more…)

GAME.Minder Expo 2013

Last Saturday, I attended and spoke at GAME.Minder Expo, held at Shaker LaunchHouse. after taking ill in January and missing the 2013 Global Game Jam, this was a great day to jump back into the Game Dev scene.

It was a relatively small event, but still probably the biggest local game dev event that I’ve been involved with to date. Organized by Handelabra to promote their studio’s mobile gaming efforts and the GAME.Minder podcast, and local area game developers in Ohio. Turnout was almost 40% higher than expected, with the official attendee count at 136. The Keynote talk was presented by Ian Schreiber, a co-founder of the Global Game Jam.

A bunch of us CGD people had dinner with Ian and his wife, and he said that we are getting big. It has been wonderful to see the local independent game developers organizing and building up our community and create a scene, and to be a part of making that happen.

Members of the Cleveland Game Developers meetup were well represented. I gave a brief talk on GameMaker, Jarryd Huntley talked about Construct2, while Brian Gessler and Justin Demetroff delivered a talk on Unity3D. Ian Faleer and Stephanie Frankiewicz gave a talk on the Art of the Game. And the folks from HashTag Nerd had a booth set up. There were a few other presenters as well. Videos are still being uploaded, but a number of them are already available on GAME.Minder’s Youtube channel.

The evening event was a screening of the Kickstarter-funded documentary Minecraft: The Story of Mojang. The movie was excellent and inspiring.

GameMaker: Studio Builds to Ubuntu

YoYoGames announced today that they have released a new build target for GameMaker Studio: Ubuntu Linux. It’s great to see YYG supporting Linux as a target platform, even if GameMaker does not embrace opensource principles. To add the Ubuntu build target to GM Studio Pro, it’s $99; if you have a Master Collection, it’s a free addition.

Master Collection is becoming an increasingly good deal with all the additional components provided and any new ones that come out entitled to Master Collection licensees.

Any time YYG releases a major new feature for GameMaker, I revise my wishlist for what I’d like to see from them next. Here’s what I’d like to see in future releases of Game Maker:

  1. An upgrade path for developers with Professional to Master Collection.
  2. Native IDE for Linux and Mac OS developers. The day a Native IDE comes out, I may not need to boot Windows anymore.
  3. Flash build target. (I know HTML5 is supposed to be the future, but Flash is still a relevant platform.)
  4. Support for other source control, especially git.
  5. Integration of some standard, cross-platform GUI widget toolkit like Qt or GTK to make creating user controls and forms easier.
  6. Native XML support (not relying on extensions)
  7. Project templates for common types of games, eg platformer, rts, etc. with library or namespace-like built-in classes for common objects already implemented

Recent site problems

A few days ago, I noticed site traffic had suddenly dropped.

Graph of recent site traffic stats for csanyk.com

Day 1 and 2, I didn’t do anything. I had noticed that the traffic was unusually low midway through the day on the first day, and thought it was curious, but I didn’t really worry about it. I was pretty busy those days and didn’t have time to look into things. I figured it might just be a fluke, much like I will occasionally see a traffic spike, and that it might correct itself.

After the second day, I wondered what was up. Had I been de-listed from google? I checked, I had not. I started googling “sudden traffic drop wordpress” and read a few articles.

Then I noticed that wordpress wasn’t serving the site properly. I had only been in the admin console and didn’t check the actual site, but when I went to read the home page, the web server just spat out a bunch of encoded gunk.

At first, I wondered whether the site had been hacked. I logged into the admin console and now WordPress reported that one of the plugins I use was giving an error. I disabled the plugin, and the site started serving properly again. Phew! I removed the offending plug-in entirely, and things seem to be back to normal.

Traffic bounced back almost immediately — yesterday I lost about a half day’s worth of traffic because I fixed the problem around the middle of the day. Today, at around 10am I already had a little over 50 hits, which seems about normal. By the end of the day I’d expect to have somewhere over 100 hits, which is back within the normal range of what I have been seeing in recent weeks.

I’m still not 100% sure about a few things.

Site stats during the “outage” days were very low, but still not zero. If wordpress was serving corrupted junk, I would expect that the stats should have been exactly zero. Stats for those days show that certain articles were still able to be reached, albeit by a much smaller number of visitors than previously. So, I’m not entirely sure when the plug-in error began or when it resulted in wordpress serving corrupted pages. It could be that stats counting is off somehow (wordpress documentation suggests that it is somewhat inexact, although I don’t fully understand the causes), or it could be there’s some other explanation (does a visit to a google cache of my site somehow increment my stats, perhaps?)

I think it would have been nice if WordPress could have been a little more active in notifying me of the error. I liked that it displayed an error message when I logged into the admin console, but it didn’t do that until three days into the low traffic — I think probably because the account I normally use to log in with is just an authoring account that doesn’t have full administrative privileges. When I logged in with my account that had admin privileges, I saw the errors, and it immediately told me where the problem was so I was able to fix the problem quickly. Which, is great and all, but even better would have been if WordPress had sent a notification email to me, so that I would have been aware of the problem right away, without having to log into the site.