Local Co-op

local co-op is something I’d really like to code for Mysterious Space, but the game is so basic right now, that I’ve always felt I need to focus on making it deeper and more fun before implementing co-op.

but co-op came up again when talking to my co-worker Steve, who’s interested in coding boss AI for Mysterious Space. we were talking about the kind of data the AI would need, and then I recalled I was thinking of doing co-op.

“if I implement co-op, is that going to throw a wrench in your AI plans?”

Steve had no such worries. rather, we started talking about the possibilities: an item that switches the appearance of you and your buddy’s ship, so that the AI tries to use the tactics it’s learned for each person on the other… or an item that creates a hologram, so that there appear to be two of you… which is the real one??

as we talked about the possibilities, I recalled bits of code that are not prepared for co-op. for example, enemies always try to spawn off-screen, so the SpawnEnemy method takes a single camera as an argument… but that’s going to have to be updated to accept an array of cameras… also, when an enemy IS spawned, it’s passed a single Player object as its target… but enemies are going to need multiple targets… and are going to need to be able to switch between targets, hopefully without being taken advantage of by the players (for example, via “kiting”: a tactic where two (or more) players alternate in getting an enemy’s attention, preventing that enemy from ever getting close to either).

all of this has made me realize that local co-op is something I need to code sooner, rather than later. lots of the code is already making assumptions about the number of players (one)… the more of these sorts of assumptions get baked into the code, the harder it will be to change.

and so, for the next release, I will be implementing local co-op!

should be exciting! haha

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s