I’m not quite yet ready to reveal too much (like a screenshot) of game 2. But I would like to document some of the areas that have been a focus. Don’t bother trying to figure out what all of these have in common…. that they are all in my head is about all that seems to relate them.
Scale: More creeper that moves in a more fluid fashion would improve things in game 2. To accomplish this I have rewritten the core creeper flow algorithm and noted a few interesting things.
The creeper flows around like a cellular automata simulation of heat. At least it starts out this way and then the math gets tweaked a bit to make it behave more like a thick, viscous fluid. The performance of the algorithm depends heavily on the number of array (or vector in the case of AS3) accesses. This is because vector member access is so slow in AS3. It isn’t like C, where you can do millions per second with no real performance impact. So any reduction in vector member access will improve performance. In CW for each cell, I have to look at 4 neighbor cells (the three along the bottom and the one to the right). In game 2, I have this down to 2 neighbor cells. Instant double performance improvement! Also, since I am targeting flash 10 only, I have switched to Vectors over Arrays. This is a small gain, but still a gain. Couple these two things with a third: Integer math. In CW I used ‘Number’ for everything, In game 2 I use int’s. So instead of Creeper cells containing 2.3725 for instance, they now contain 237250000. Keeping everything as Integers makes the math faster in AS3. Doing all of these things has helped increase the creeper calculation scale by about a factor of 4…. and this meets my needs for what I have in mind for game 2.
Purpose: In CW you are on the run… it’s the end of all civilization and each mission is a mission of survival. You push back the sentinel creeper long enough to activate the rift. You never really defeat the creeper you just hold it back.
In game 2, it’s payback time. Thousands of worlds remain to be reclaimed and new technologies have been developed to destroy the emitters once and for all. Problem is, they are deep…. I mean DEEP beneath the surface. So guess what, time to start digging! ‘Terrain modification’ is central to game 2 and to the story. This has created a number of interesting technical challenges…. one of which is path finding.
Path Finding: In CW, path finding was done by packets as the moved along your network. This was one of the cooler things about CW. Many people just liked watching those packets find their way. The packets were themselves a kind of “unit” that moved around on the map and made the whole simulation alive and animated. Classic A* was used to route the packets with a new evaluation being done at each place along the path. In game2, the network isn’t made up of straight lines that connect structures. It is made up of tunnels and caves that the player digs. Packets move around through this collection of tunnels to find their targets.
So I also had to rewrite my A* algorithm to get its scale up. It now also works on integer Vectors rather than arrays of objects. I’ve improved it’s performance by about a factor of 5 and this allows me to have lots of little packets making their way through a large collection of user created tunnels and structures (and hopefully avoiding creeper along the way).
Anti Creeper, and Anti Gravity: I always wanted to see what would happen if “good” creeper flooded against “bad” creeper. Well now I know… and soon will you I hope. Balancing is an issue (unlike any kind of unit balancing problem I’ve ever even heard of) but if I can make it work out, game 2 will feature creeper that you can control.
And while on the topic of “anti”, why not throw in some anti-gravity or force fields as well? I’ve implemented them and they are way cool to play with. Whether they will be a defensive system, an offensive weapon, both, or something else is something I am working on.
Adobe AIR: Should I stick with this? Writing the game in AS3 is fine. No complaints there. Performance is well, so-so. AIR gives me access to local files (so importing games works very well). So what is the problem you say? Well to name a few:
- The installer has to be signed. I either have to buy a signing cert and keep up with certificate chains over years of time, or I can do what I do now: Ignore the warning that pops up during the install. I decided to ignore because even with a signed installer, the AIR installation still had a “red” indicator during the install (for a different reason, but it is still red and the eyeballs of the person installing still see red that they have to ignore). If I didn’t use AIR none of this would be an issue.
- About 1 out of 2000 installs of Adobe AIR seem to fail. At least this is true for what is called the ‘sidecar’ install. The sidecar install is when I bundle AIR and the game together in an executable zip file. This allows the user to just run a single executable and they get Adobe AIR if and only if they don’t have it installed already. For some really small number of users, this fails and Adobe AIR has to be installed manually first. Not a bug deal, but still in the negative column.
- Once upon a time I was talking to Steam about making CW available in their store. I mentioned “AIR” and that is the last I heard from them. Maybe they just decided they didn’t like me, or maybe they don’t allow AIR games in their store…..
So that’s it for now. I hope to have an early screen shot (complete with developer art) in a few weeks.
Wow! A lot more changes in ‘game 2’ compared to CW than I expected…. You’ve obviously been working hard.
And I see you started with the nasty stuff; very wise. I’m sure these improvements will be paying off and allow you to code more CPU intensive mechanics.
So we’re gonna dig? Man, that will completely change the game play and related strategies! In one word: GREAT! I can’t wait…. It will also literally give a new dimension to map making I guess, so I’m very enthusiastic.
I’m glad CW1 is still so much fun, otherwise the next months would be hard to bridge…. 😉
Twi again here, looking at an earlier post. I see you’ve implemented terraforming in a way. I approve.
You’re changing the coding? Always a good idea to improve that, though I honestly don’t know too much about that.
The new plot sounds cool to me. Give the Commander a name, though, please.
I like the anti-creeper idea. As for other such things, I’d go with shields of some kind, and maybe excavation.
actually you should let your player name the character themselves, so that they can play the game more from a 1st person view and…. BINGO, a more immersive game that people love and tell their friends about.
that wasn’t in the first game, no comments to that one
Wow, man this is amazing!
I first got hooked when I played the training sim, and then I HAD to buy the game, as you said its just something about those little packets flying across the map 😀 as well as the uniqueness of an enemy that you cannot ‘defeat’.
(Though most of my friends just say torrent it or something, they don’t just get the idea of supporting small developers (but it seems you have quite a few players on your hands so maybe not so small any more 😉 )
Anyway to my main point… (I seem to have gone off track a bit)
This second version sound amazing! The part that most caught my interest was the four fold improvement in the game speed (coding) (as I wan’t to become a games developer as well I am interested in coding; mostly for PC and Xbox360 i.e. C++ and C#, I’m guessing this is written in Action Script right?), many times I’ve seen developers just implement new features into 2nd 3rd etc. versions of games while not considering performance, so the game lagggggs!
The fact that we get to fight Creeper with creeper… awesome… and dig underground too! Shielding whether it be temporary or something else; is really cool idea, because there is many times that you need a shield at the last minute: just about to beat a level and next thing you know a tiny bit of creeper takes out your main defences and BAM! you lost (there goes thirty minutes haha), with the case of anti-gravity hmm, could be a bit hard to do but looking forward to it!
Finally Adobe Air: its good but… it would be nice if we didn’t have to use it, maybe its just my computer or the game its self, but it seems a bit slow(?). An executable (.exe) file perhaps as an alternative, oh well, can’t wait for CW 2!
i think that you need to keep the original packet routing method because everyone that loved the original method will hate the sequel and tell their friends to not play the sequel
there will still be packet routing, and that you bought the game in the ifrst place means you’re in for new stuff. Also a game can’t be rated on one element
i guess your right, i looked at the other blogs and packet routing is still alive
p.s. the idea of force fields is awesome. I love it!
AIR is not the best choice, unless you still want to target the mac/apple market.
I also believe steam might be too busy fixing up their source engine and converting to the mac platform, as it seems they have been lately 😉
I absolutely love this game (and i do hear my friends saying to torrent it aswell though) and It’s totally worth the $10. WEll that was #1 I’m a bit skeptical about #2, though i do like the thought of killing emitters finally and of having anit-creeper. How would the base get from map to map though? is it like some sort of space ship in that it can just simply fly from planet to planet? just a thought I thought I’d pitch out there.