Gaming Your Way

May contain nuts.

The size of this thing

I'm well overdue posting here aren't I, and in saying that this is only going to be a very brief post.

Currently I'm restructuring the bullet code in the game, which has a knock on effect that I have to update the baddies, and what we call "Noninteractive baddies". These are objects we treat as a kind of baddie so one set of code can handle both, so for example they're triggers for playing music stabs, enabling the flies, the large fan shadows etc. Basically everything which isn't a physics object, like a crate or a desk, or a baddie.

I've just done a quick count up whilst going through them, and there are currently 96 of these objects. That's a hell of a lot of unique things in a game. Also on the subject of numbers, there are 232 sounds in the game, and I can see that rising to at least 250.

This is a beast of a game.

Back to it for me, this soul destroying updating won't do itself. Maybe next time we can talk about Swarm mode seeing how that's back in the game now.


The middle of June, so soon ?

I didn't realise I've been neglecting the blog like a prisoner trapped in my basement dungeon for so long ( Best you forget all about that basement dungeon thing ).

So what's new pussy cat ? I've finally added the sentry gun, so all the weapons are complete now.


You can see the area it covers ( Still only placeholder art for now ), and it just rotates between those two points unleashing hell on anything which comes into it's line of fire.

I was concerned it was going to be over powered, but it doesn't seem to be. The real test will be in Swarm mode, so hopefully next week ( I've got some client work which needs killing off, which is partly to explain the lack of updates here ) I'll finally get to add a Swarm level in there which will be good for testing.

We got some great feedback recently, and one of the things which came up was the aliens were seen as being a little too fool hardy, so I've tweaked their AI slightly ( Again Swarm mode would be the best place to test this ), so for the larger "Tank" aliens instead of just moving randomly when they are first triggered [ Off screen ] they start path finding towards the player. Not exactly what was meant by the feedback, but it won't make the game any worse for doing it.

The past week, between html games, I've been working on the new terminal.

Lux has done a great job in redesigning how it works. We've stripped out a lot of the filler from the original one ( No Plan 9 From Outer Space this time ) and it's a lot tighter and easier to use because of that.

Obviously coding it has been a complete bitch, but it's getting there. All the weapons are done, so just the supplies left and a large chunk of in-game UI will be ticked off my list.

Installed the new Flash CC yesterday. It's really good so far, it's like what Flash should be. One of the reasons I've been itching to get hold of it, aside from it making the level design much less painful ( On complicated levels, like the planet based level 3, Flash doesn't work in real time. You move up 10px you get the spinning wheel. Hopefully Flash CC will remove that ) is the LZMA compression it offers.
I had a quick play with using Flash CC to build the game using that, as opposed to Flash Builder, and the release build file size went from 12.3meg to 11.7meg, which is a really good saving.

In terms of a rough road map, I think I'm going to be working on the terminal the rest of this week and then hopefully next week I'll be able to add one Swarm level into the game, which is perfect for testing a lot of things. We've also got loads of exciting news that's just around the corner, in fact it's been just around the corner for weeks now, which is maddening. But we're getting closer, and I can't wait to share. It's pretty fucking cool.


Let's see if this works

Giving Vine a quick try out, as it may be handy for posting quick clips here.

If it's all gone to plan that should be the flamethrower in all it's too bright to capture well on an iPad glory.


Spot the difference

Work's going really well on level 5, only started it this week and it's coming together already.

This is what you guys will see

This is what I see.

I've managed to speed up a lot of the plotting routines this past week or so ( I've moved over to ASC2.0 which is fantastic, it feels like it's not actually compiled any changes it's so quick and it reduces the file size a bit too ) which means I've been able to drop a parallax layer in level 5.
( Also after my previous post I looked at the level construction times. They've been speeded up like a billion percent. Where the larger levels could take up to 5-10 seconds to plot they now take under 2 ). 

Also we've got this nice lens flare effect which you can kinda see in the top grab. I guess you could call it a HDR effect and really alters the whole lighting of the level. Maybe I'll try and grab a clip of it as it really is one of those effects you need to see in action.

Ok that's it for today, someone's got to do a million white rectangle collision boxes for this level.


Big restructuring time. Again. *sigh*

Way back in the days of Outpost:Swarm I wrote how we did the Wingman AI ( Here if you're interested ). Well, that's had to change.

The past day or two I've been re-working it so it uses the same pathfinding routines as the baddies. The reason for this ? Hang on, let's liven this post up with a picture of the new C4 weapon first otherwise it's going to be really dull.

It means I don't have to maintain two pathfinding type approaches, one just for the wingman and another for the baddies, which is a bit mental. Plus we're going to be adding human baddies on level 8 ( The one in the grab above ) so "fixing" the wingman AI is a good template for that.

This hasn't been too painful, but a knock on effect from this is needing to update all the bullet classes. Quite a lot of people mentioned in the feedback to Swarm that they'd like it if the wingman changed weapon, so we're going to add that. The game engine was never really designed for that, hence my big re-write of the code for it today. So the wingman will have access to the assault rifle as before, as well as the pulse rifle, the shotgun, the SMG and the flamethrower ( 'Cause it looks so sexy not to let him use it ).

The bigger plus side to all this is that the baddie humans on level 8 will also have access to all these weapon types. Aliens and humans fighting each other, and you and your wingman, all using different weapons. I can't wait.


Level plotting hang

We've got an issue with Outpost 2 with the level construction ( We call it "Loading" in-game but we all know that's a lie, we're just plotting things rather than streaming data ).

On the larger levels it takes forever, and on slower machines it could throw up a script taking too long error. I've always assumed it was creating all the objects in Nape, but I thought I should be good and run a little test. Glad I did.

plotFootMap - Elapsed time: 27
plotWallsIntoMap - Elapsed time: 1
plotPath - Elapsed time: 0
plotBackground - Elapsed time: 4621
plotBumpMap - Elapsed time: 1079
getCollisions - Elapsed time: 63
plotShadows - Elapsed time: 2623
plotBatTriggerMap - Elapsed time: 0
getObjects - Elapsed time: 30
getNodes - Elapsed time: 13

I really wasn't expecting that. Without going into it too much, with the plotBackground method we basically use the draw() command to copy 640x640 parts of a movieclip into bitmaps for the entire level.

Bit of a nothingy post I'm afraid, just thought it'd be interesting to share that you can't really make assumptions about code bottle necks ( The two calls which deal with Nape, getCollisions and getObjects are blindingly fast considering how many objects they have to create ).

Now we've identified the problem properly it's just a case of fixing it. The simple part.


So I've split the plotting routines up, and speeded them up slightly, so now the times taken are:

plotFootMap - Elapsed time: 11
plotWallsIntoMap - Elapsed time: 1
plotPath - Elapsed time: 0
plotBackground - Elapsed time: 792
plotBackground - Elapsed time: 748
plotBackground - Elapsed time: 761
plotBackground - Elapsed time: 748
plotBackground - Elapsed time: 774
plotBackground - Elapsed time: 477
plotBumpMap - Elapsed time: 1015
getCollisions - Elapsed time: 60
plotShadows - Elapsed time: 235
plotShadows - Elapsed time: 230
plotShadows - Elapsed time: 449
plotShadows - Elapsed time: 443
plotShadows - Elapsed time: 417
plotShadows - Elapsed time: 275
plotBatTriggerMap - Elapsed time: 1
getObjects - Elapsed time: 35
getNodes - Elapsed time: 14

By splitting them up like that it spreads the load on the CPU so we can drop a simple progress bar in there. Nothing major I know, but it's important to show some sort of feedback instead of letting the player think the game has crashed.


See, we do plan. Sort of.

I was just looking through the story we planned out at the start of Outpost 2, way, way back, and it's interesting to see where we've stuck to things and where we've gone off on a tangent ( And also how things were different in my head to the reality ).
So here's the plan for the first three levels you'll have seen in the demo ( Via our Facebook page )



Starts with computer screen. Telemetry data scrolls up, then the word “Warning” flashing in red ( Think old dos like screen. This is a screen on our ship powered by Haily, monitoring Lee’s shuttle ).

Voice over by Lee “The shuttle’s breaking up, I’m going down”. *static*

Fade to black

( This could even be before the title screen ).

Welcome to Haven:


Same as first level in Haven, just this time you control Jameson. Gets the player used to collecting different items, opening doors and movement.

Staff Canteen:

This needs to be in two distinct parts, the kitchen / storage area and then the eating halls.

The first area we will introduce the info cards / terminal. It’ll be a slow tutorial area, couple of “Tanks” and facehugger aliens. Also a small fire is burning which will push the player out of that area ( “That’s spreading to the gas line, we should really move” ).

From this we’ll go into the long corridor like eating areas, and it’s going to kick off. The sprinkler system goes off, the lights short out, and then I want all the tables / chairs to flip over as aliens burst through the floor ( Picture the library scene in Ghostbusters ).

Along with that the kitchen area will blow up, creating a wall of flame behind the player. Basically I want this to be a forced sprint to the end of the level.

We’ll reach a more secure area when Haily has to hack the door closed for you, so you have to hold them off whilst she does that ( Maybe the aliens attacking you can come out on fire ? ).

At the end of the level we run into one of the mini-bosses from the first game. At this stage the player won’t have the fire power to deal with it, so we’ll let them try for a little while, then a cut scene where something bigger ( Possibly unseen, I’m thinking spider like legs bursting through the floor ) will come crashing in and kill our big bug.

Planet side:


We’re back with Lee on the planet, debris strewn around, the red flares from Swarm etc.

Haily tells us she can’t collect you as the magnetic storm which caused the shuttle to crash stops her getting too close for an extraction, but that there’s a structure near by.

This is the “Maze” like planet level, simple A>B. I’d like to introduce different baddies on here.



Outpost 2 update time

It's been a while hasn't it. Client work has been tripping me up so it's been tricky to have a good clear run at O2.

Ok, so where are we at ? Level 4 is finally nearly almost done. Finally. Nearly. Hopefully when you finally get to play it you'll see why it's been such a beast to do, there's a lot of stuff in there.

Because it's a sewer level we've added some new underwater baddie types. They swim towards you really quickly ( Where you can't shoot them ) then burst out of the water really close to you. They're really jumpy things, much more so than the "Red eyes".

Also some various tweaks have been done, the doors don't take as many shots to open if you've run out of keys, as that was just annoying. The pistols power has been doubled ( Hopefully that'll make up for the lack of attachments for it. I know a lot of people requested that, but it's meant to be a weapon of last resort, not something you upgrade ). Also the SMG bullets now move a lot quicker, and I've increased the power too. The armour now works more like it should, it was regenerating too quickly before, it should work more like Halo's, which it does now. Oh, nearly forgot, a skip button on the intro at last, as so many people asked for it via the Facebook page feedback.

Speaking of weapons, added these on Saturday. 

Trip wires, nice

Those are the trip wires I've been wanting to add for ages. You shoot them at any target and they just stick, then shoot out those red laser lines you can see there. Any baddies passing through them die instantly, and then 3 seconds later the whole thing explodes. These are going to be really handy on the Swarm levels.
They're not quite finished yet as I want to be able to attach them to objects, they just work on walls right now, so you'll be able to attach a couple to say a desk, open a door into a room full of baddies in and push the desk in there.
Now I don't know if anyone will ever do that, but I think it's important to give the player as many ways as possible to play with the game mechanics, plus it'll be kinda cool.

As I finished the client work last week, and what with the time of year, I treated myself to adding a little Easter Egg to the game.

Old school baby

There's not going to be any streaming films this time, but you may find this old 1983 classic in there ( It's not really an actual clone of a game from 1983, just part of the mythology ).

It's actually from a prototype ( A failed one funnily enough ) that I did a while back that rather than just had it sit on my HD never seeing the light of day I thought I'd skin up and drop in the game.

There will be a challenge to beat that hi-score btw.

And that's it. I'm in two minds about posting the game with level 4 in via the Facebook page, we may hold off 'til level 5 is in there ( I've got to do UI things before adding level 5 though ) so we'll have to see how we feel about that.

It's all feeling really good, I'm really pleased with how it's coming together. Level 4 feels like the first "Proper" level with the first 3 being more tutorial like and introducing the flipping between points in time / characters. Level 4 is where we open things up and give you actual tasks to do with lots and lots of baddies.


Is it cheating ?

Currently working on level 4 of Outpost 2 and I've found a game play issue. It's one of those "Do four things before you can proceed" levels that we used quite a bit in Haven, although this is the first time we've dropped this mechanic into O2.

The problem with these levels types is that we have to spread them out, there's no point having all four items ( In this case terminals ) too close together, which means walking into areas where we throw a lot of baddies at the player ( This level is a mixture of dark / scary and shooty, it's the first really action heavy one ).
That's all cool, but then you have the journey back, which is literally just walking back the way you've come. You've killed everything on the way in, so it's just a trek back to the next action bubble. That's not the most fun thing in the world, although it is nice to be able to admire Lux's graphics.

So yesterday I added some respawn code. You complete an objective and I trigger a load of new baddies behind you. Oh dear, that's cheating.

You'll play some FPS's, like COD or Battlefield 3 and it's almost like you triggered an invisible trip wire, stay where you are and nothing happens, take one step forward and all of a sudden the baddies are triggered. It's fucking awful game design, really lazy ( Compare it to the Halo games, who do it to some extent, but it's a lot more hidden due to the fantastic AI code they use ). I didn't want that feeling in O2.
Also I didn't want the whole "You've cleared that room of baddies, but when you walk back in they're all there again. Like magic" thing either, that's one old school game mechanic I'm glad has been mostly lost to time.

But how is what I've done cheating ? As a player you've done your task, you've cleared out the rooms and done the objective, it's not really fair that the game now shows you you've only done half the job, even though there was no way you could do it all.
It's a price we're having to pay though to keep the game interesting. I've tried to be subtle with it, well as much as I can, but what I think I may have to do is alter some background tiles to help justify it. If I add a hole to the floor which wasn't there when you came in it should help sell the fact that the baddies have found a way to you, rather than just being teleported in by the game play gods.

And that's what I'm working on right now. In terms of progress, half the layout of level 4 is in place, it's feeling good. The gyoscope is finally in and working how I want it to ( It's pretty cool pushing a crate into the room with it and watching it get bashed around the screen ). Still left to do is another baddie type, an underwater one which you can only shoot when it bursts out of the water, I've got to copy the walking in water code over from Swarm, so you move slower and splash around. Then we've got another bit planned for the end, a waiting for the lift sequence. That could be boring, but that's why we're going to give you a sentry gun to play with. Nice.

( Oh, and the art is done for level 5. For now I'm just going to say "Zero G" and leave it at that ).


All kinds of bugs

Something and nothing post really, but I'm still messing with the baddie AI, and I think I've managed to code stage fright.

They'll get that close to the player, but it's like they're too scared to move any closer, so they all hurdle up not wanting to make the first move.

( If I wanted to try and actually code that I wouldn't be able to in a million years ).

Hopefully some proper news soon. Oh, and the screen grab was taken in full screen mode in case you're wondering why it's so chunky.