Radar

I’ve been messing around with mini maps, and after a few different approaches, I have come up with a cool demo that simulates a radar screen. The screen even has a sweeping beam that lights up the blips, which fade over time. Only instances which inherit from an object called oMappable are drawn on the radar. The size of the blips is based on the width of the sprite of the oMappable child, so objects of differing sizes will be shown in scale relative to each other.

radar screenshot

It runs quite well, with up to 4000 simple objects (~30fps on a 2.0GHz Core2 Duo).

Demo (.zip)

Project Source (.gmz)

Vendor Hosting, SaaS, Cloud Computing: What’s the difference?

When talking with non-IT people, it’s amazing (ok, not really) how much confusion there is about concepts and what these terms mean. While the terms are related, they are far from interchangeable. People soemtimes like to throw around “buzzwords” in order to sound like they’re knowlegable or on the cutting edge. If you deal with this stuff, it’s good to understand the differences.

Vendor Hosted

Vendor hosting is a relationship. Vendor == someone you’re paying to do something for you. Hosting == the something you’re paying them to do. You don’t own the hardware, they do.

This can be wonderful if you won’t want the expense and complexity of deploying and maintaining the hardware, and if the vendor is good at doing those things.

But it can suck if your vendor doesn’t provide good service, or shuts down suddenly, leaving you with no access to your data.

Software as a Service

SaaS is a business model. With software as a service, you’re paying like you pay for a utility, based on your usage, or subscription, based on time. Like utilities, if you stop paying, you can’t use it anymore.

Contrast SaaS with Free software and licensed software models.

Free software is, well, free. Often the software itself is free (cost), but you pay for support or for customization, or by devoting resources to maintaining the codebase.

Licenses are typically perpetual, but limited to a major release version and its patches. When the next major release comes out, you have to pay for the upgrade. Usually the vendor compels their customers to upgrade by dropping support for the old version, offering discounts on upgrades for existing licensees, and so on.

Unlike the licensed software model, with SaaS you’re usually entitled to the latest version, not paying for upgrades. Often, but not necessarily limited to, vendor hosted solutions.

This can be wonderful if:

  • You hate managing licenses.
  • The upgrade treadmill gets you down.
  • You’re cool with fixed costs and realize you can either pay the vendor once a year for the next version or the same amount of money over the course of a year for the SaaS model.
  • You don’t use an expensive solution very much, but would be in the market for a solution you can spend a small amount on for what you do need. Like, you’re not going to spend $25000 for CAD software, but if I could pay $25 to use it for a few hours, you’d be able to design that thing you want to build for your hobby.

But it can suck if you want to pay for something once and own it, or if the SaaS vendor goes out of business or decides to stop providing the service, or if for some reason you prefer to remain on a certain version of a product that meets your needs well enough, such that you have no compelling need to upgrade, or if the SaaS vendor’s upgrades take the product in a direction that doesn’t suit your needs.

Cloud computing

Cloud Computing is an architecture. A distributed cluster of redundant, co-located, and load balanced hardware, typically spanning multiple datacenters, which is used to run virtual machines which are not dedicated to specific hardware. The amorphous nature which decouples virtual machines from any specific node in the cluster is what gives rise to the term “cloud” computing.

“The cloud” may often be used as a generic term for “the internet” because on networking diagrams, the internet is symbolized that way, because the specific architecture of the internet is unknown and not really of concern to you. But just because something is on the internet does not mean it is “cloud computing”.

The cloud computing cluster’s capacity is typically shared among many customers. Due to the nature of the cluster, it is possible to scale a customer’s utilization of the cloud very rapidly, growing a virtual machine from a single node on the cluster to several or many. Conversely, the cloud may idle portions of the cluster when demand is low, resulting in great efficiency and flexibility. If a node in the cluster goes offline or experiences hardware failure, the cloud continues chugging along and only the admins will even notice that anything happened.

Cloud computing is also typically vendor hosted, since it requires specialized professionals to set up and maintain the cluster. Very few entities are in need of owning their own cloud, and will buy cloud computing in the SaaS model from a vendor who hosts it. You can pay for a tiny portion of the cloud, and as you grow you can expand your footprint on the cloud, paying more for it but generally not having to deal with many of the usual headache associated with scaling up a rapidly growing enterprise.

This can be wonderful if you can live with not owning your hardware and are comfortable with the idea that your data and processing could be “anywhere” in the cloud, co-mingling with other virtualized instances running on the same node(s) in the cluster.

But it can suck if your vendor decides they don’t need you or gets a request for your data from the government and just rolls over and complies with the request, rather than fighting it like *your* legal team would.

Bottom line

Any time you put your data or services in the hands of someone else, you really are putting a tremendous amount of trust in them. You need to consider not just the benefits of the relationship, but the risks as well.

Outsourcing is attractive because it’s expensive and difficult to do well, and if it’s not the core competency of your business to do enterprise IT, it may make sense to have someone else do it who has that expertise. But you need to make sure that your vendor actually does have that expertise!

The pre-sales people will promise you the moon, but you need to be able to verify that they can back those promises up. One of the great selling points is that you don’t have to worry about all the complexity of maintaining IT infrastructure anymore. But it’s not like that responsibility disappears into nothing — it’s the vendor’s responsibility, and you now need to worry if they’re doing it right. If you’re paying someone else to do it right because you don’t know how to do it right, and you’re trusting them to do it better, or cheaper, than you could, how do you do so with confidence that they’re really that good?

Usually, outsourcing puts up organizational boundaries which can be barriers to transparency — you can audit internal processes much more readily than external ones. But are you any better at auditing IT than you are at running IT? Probably not. There may be third party auditors who you can outsource to… but how do establish that you can trust them? 

So how do you establish trust? This is something you need to figure out before you move into a vendor hosted solution. One approach is to move gradually. Do a pilot project and see how it works over a period of time before jumping in with both feet. Plan for moving off of the vendor’s services so you can do so with short notice if need be. Utilize redundant vendors if that’s feasible, so all of your eggs aren’t in one basket.

Work at establishing trust continuously — trust is not a “set it and forget it” kind of thing. Trust comes from a relationship based on iterative transactions. It is built with each interaction that you have. Despite sales pitches, outsourcing does not mean that you don’t have to worry about things anymore. It means you need to establish a management relationship with people outside of your organization who are assuming responsibilities and risks which still affect you. It pays to maintain a close relationship with them.

If you’re not engaged with your vendors and don’t have good rapport with them, then chances are very good they’re going to ignore you, take you for granted, and fail to understand what your needs are, and when it comes time to deal with problems, you won’t be familiar with each other. Communicating effectively and working together will be a second-order problem that prevents you from fixing the original problem.

Don’t be lulled into a false sense of security, and don’t make the mistake that because something is the vendor’s responsibility, that you don’t have to worry about it. It’s still your enterprise that’s at risk. When everything’s running smoothly, it’s great, but problems may actually become more complicated, due to the vendor relationship and the fact that you don’t have direct access and full control over the systems they are managing for you.

Risk management is incomplete without an answer to the question, if the vendor goes away tomorrow, what do you do? If maintaining control over your data is critical, it’s a good idea to require that you have a local copy stored on hardware that you own. At the very least, the vendor should make it easy for you to export your data, ideally to a documented format which will be useful for you in the event you need to switch vendors.

Stat-Driven Causality: Better than pseudo-randomness!

Watch this video on how the “random” loot drops in the original Legend of Zelda were actually determined:

I found it very interesting. In my game projects, one of the more difficult areas of game design is getting the frequency of the loot drops to feel right.

Let’s look at the ways in which the loot drops in Zelda are not random.

  1. Loot drops happen because of an event, eg defeating an enemy. They don’t happen “randomly” for no apparent reason. This drives a feedback loop of “kill monster, get treasure”.
  2. Which type of item gets dropped is actually not random. However, it’s important for the drop to seem random to the player, so they never can be sure of what they’re going to get. This keeps them guessing and curious: “What will I get if I kill this monster? There’s only one way to find out; better kill it!” invites play much more than “Ho hum, here’s another [enemy]; I know they only drop [type], and I don’t need that right now, so I’ll just walk by it.”
  3. It does seem that certain types of enemies do drop certain types of loot a bit more often. For example, in the overworld Tektites seem to be pretty reliable about dropping rupees, and tend to yield a higher proportion of blue rupees that are worth 5. They do drop other things, bombs and hearts, and fairies, but it does seem like they will drop rupees a bit more than other types of enemies. There may be a similar relationship between other types of enemies and other types of loot. This gives certain areas of the map, where these types of enemies appear, have strategic value for “farming” a given type of resource.
  4. It would make sense that more challenging enemies might yield more/better loot, but I don’t notice this so much when I play LoZ. It seems that as you progress through the game, the difficulty of the monsters ramps up, matching your own power increase, but that the reward remains more or less constant. Still, in many games, there’s a directly relationship between challenge and reward.
  5. By connecting the frequency and type of loot dropped to a complex conditional based on the internal state of the game’s various counts, it’s possible to tune the difficulty of the game to a far more precise degree than could be done through purely random loot drops. For example, if the player is low on hearts, you could use that data to drive a slight increase in the amount of health drops, to make the game easier. Or, to make the game more challenging, you could make health drops rarer when you’re low. This can be tweaked so that “easier” areas of the game have the more generous/forgiving drop rate, while the harder areas have stingy/unforgiving drop rates.

Up until now, I have thought of loot drops as something based on completely random chance, not influenced by various factors being tracked in the game. I had played with various stochastic functions to create what felt like “right” odds to give the game the right “feel”, and wondered why simple random distribution never felt quite right.

But what is “right” is highly subjective, difficult to define, and requires extensive time spent playtesting in order to gauge “feel”. But now, I see a much more interesting potential in tying the frequency and/or item dropped to causal relationships to various stat counters. What’s great about tying the loot drops to in-game stats is that it allows you to directly apply mechanisms to balance the game, based on how the stats reflect the player’s performance, their progress in the game, and the amount of difficulty you want at that point in the game.

Exactly how to do this will still be very subjective, and require extensive play testing, of course, but it will be tune-able and in the control of the developer, rather than purely random chance. I am excited by the possibility of using the stats model to drive feedback loops which can help to govern the game’s challenge level, or to provide certain items when they are more likely to be needed, or just to make the loot drop frequencies seem a little more interesting and less totally random. It seems like a potentially much more elegant way of distributing items in the game.

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…)