Monday, August 30, 2010

Dreg's triumphant return (I hope)


Arrow keys: move. Space: jump. A: punch. D: Kick. E: interact.


Hello again! Miss me?

Yeah, I definitely had a bit of break... then I got working, like seriously. I didn't update for a while cause I was fed up with all these little updates about small additions to the game. I want to make the damn game already!

So what you have above you is the beginning of the Dregs of War! It's still a little clunky- the foreground is minimal, and I haven't added a lot of details. But you still get the general idea. Then again, I won't be adding many more details to it, because the previous post is too complex for my struggling little computer to keep up. Seeing as I declared that the game should be able to run on my machine, I'm going to have to make some sacrifices as far as graphics go. The main reason for slow down is the mini map, but it's so easy to get lost in this game that the map is pretty much essential.

Here are the new bits:

- the map is faster now, and you can add your own little flag on it to look for. When you're give objectives, they show up on the map too.
- When you die, the game puts you back at the beginning of the current neighbourhood.
- I have my excuse for cutscenes, where the camera will focus on different characters / areas and sometimes a simple animation will play.
- the game has states which are triggered by the player's actions. The main example you see here is the fact that people say different things to you after you've performed certain actions.

Lots of other things have been tweaked, but generally I can see this game coming together. I reckon that what you can play above is about a fifth, or maybe a quarter of the whole game. It takes a while, and let's face it, I am only making a flash game. My next project is definitely going to be smaller in scope!

In any case, now it's becoming less and less about programming, and more and more about designing. I need to make the next few levels, complete with cut-scenes, backgrounds, sounds and (urgh!) new enemies! Fun fun fun!

As for programming, I still need to sort out saving, and I want to make a sort of quick travel feature players unlock as they explore the world (to avoid boring treks through bits you've already seen)

Unfortunately I have some paid programming work to do, which will further slow this whole project down. Do you remember last year that I declared I would finish the game before last Christmas? Hahahahaha! I'll be lucky if I can make it for the following Christmas!

Anyway, as always, please point out improvements the game needs, and any bugs you discover. Wahey!

Here, have an image of a new part of the world, The Big Drink:

Monday, May 10, 2010

How much breast can I actually reveal before I chicken out?


Arrow keys: move. Space: jump. A: punch. D: Kick. Q: health boost. S: whip. R: reset level. E: interact.


Yay! How exciting! A new post!

Well I've been slaving away on various things. The point of what you see above you is to stress test the game - as I mentioned a long time ago, I wanted to make a game I can play on my little macbook, which is not an ideal computer to play flash games on by any means, and the process was a lot more difficult that I had anticipated. More on that in the geeky section below.

So you'll notice the background is back, along with a few more background objects for me to pepper the scene with. This is still the same zone as the post years and years ago where I had Dreg running around his neighbourhood, but tune in next update to see a different area for Dreg to explore.

And there's a new enemy - he's a weedy little thing that doesn't post much of a threat - he'll be an early stage enemy. I like how he runs.

At this point, I basically need to get down and just make lots of stuff. Enemies, backgrounds, and people to populate the world. See, my problem with the film I made is that the streets are deserted, but they should be full of people. But I simply didn't have the energy to model, skin and animate bystanders to fill the scenes with.

But seeing as in this game I just need to make simple sprites I've gone ahead and made a few background people. I've used the same technique as I use on the enemy characters to make each person look different, but essentially I've only made two characters - slutty girl, and manly man man. Slutty girl dresses somewhat provocatively, and is sometimes skinny, sometimes more generously proportioned. She smokes too much. Manly man man is either a gym bunny, or has something of a beer belly going on, and he suffers from a Freudian obsession with his genitals.

Anyway, I'm really happy with how it changes the mood of the place with people around. I want to make more characters - old people, aliens etc. to really give it a sense of being populated. If you want to see the many manifestations of the background characters, press R - it'll reload the level and you'll see them in different guises.

The big issue for me was performance, so if things get sluggish on your machine please let me know!

Anyway, let's get into the nitty gritty of my struggle with my macbook's computing power, shall we? Non-geeks may look away now.

< geekaliciousness >

So I started off just drawing more and more background objects to fill my scene with, and it was starting to look really cool. Unfortunately, the framerate was getting so low that the game turned more into an interactive slide show than anything else. So I had to get working on a solution.

One thing I tried was to draw the various layers to bitmaps, and though this worked to some extent, it caused a kind of awkward blurring (which you can see in the backgrounds, which are drawn to bitmap), it took up loooooaaaaads of RAM, and it made loading a new level take too much time. So I decided I simply had to simplify the foreground and keep it as vector graphics.

The whole bitmap issue made me get stressed (again) about memory leaks. I recently discovered the Activity monitor in my mac (yes, I'm a noob) which allowed me to see how much memory flash was using. It was leaking soooooo much it made me want to cry. So that was about a week's work hunting down event listeners and display lists to destroy. I eventually just wrote a function that looped through every sprite in the game and removed it (after having removed its children). This worked well, but for some weird issues that can happen where a sprite's numChildren value is updated before the children have actually been added to the displayList. It's as horrible and confusing as it sounds.

Anyway, so it was no longer leaking memory (as far as I can tell - feel free to inform me otherwise). But the framerate, though better, was still choppy. It turns out that using masks is a bad idea - they really seem to eat up resources. I realised that the biggest cause for the slow-down was the mini-map, which uses masks to only show some areas at a time. Once again, the solution was drawing to bitmap, hence its slightly blurry edges at times. The main map still uses masks, and the framerate drops on my computer when I use the map, but hey, who cares? It's just a map...

All this was worrying because I wanted those background characters that now so charmingly fill the streets of Disarea. Happily, I seem to have just about pulled it off - the framerate is acceptable on my machine, and silky smooth if I lower the flash draw quality to medium (on this machine, I have to play most flash games on lowest quality, and it still struggles, so medium quality smoothness is a feat in and of itself!).

So now I just need to draw draw draw, until I feel I have all the ingredients I need. Then I'll have to make the levels.

A new issue for concern now is that the game is already 500 K big, and I haven't even added sound or music yet. What do you think the limit should be? Games which show how big they are in the loading screen seem to be between 4 and 10 MB, which certainly seems achievable, but obviously the lower I keep it the better! The thing is that at this rate I imagine that just all the background characters, enemies and background images I'll already get to something like 3MB, then there's sound and music! Might have to ditch music all together and just go for some ambient background sound loops...

Monday, April 5, 2010

And a warm welcome to our newest member!


Press Q to use the health dispenser. Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Meet Crog!


Aaaaw! So cute!


Crog is a fast, nasty little animal that pounces at you and chews your knees off. If you encounter a bunch of crogs, they're likely to flank you and cause all kinds of damage.

Crogs come in all combinations of eye-watering colours that clash so much it makes my teeth feel tingly.

The best way to kill a crog is to be quicker than it is - they don't have much health, and though they can block a few blows, they're most likely to take damage.

The hardest thing about crogs is that I've never done a four-legged run-cycle. This was the best I could come up with. I'm happy with it, though obviously it could be a hell of a lot better.


Yes, it's a bit dodgy, but when he's running around biting your bum off you won't notice


Crogs will probably appear mid-way through the game, because they can be tricky. But once you get the hang of them they're not too tough (just big puppies really).

To help you get better acquainted with crogs, I've given you extra health, and a fully-upgraded health dispenser (press Q to use it). You can buy extra doses for it at the shop.

Next for me is to make a weaker enemy that'll appear at the beginning of the game. I hope I'll get this one done quicker than crog. But I enjoyed making crog.

Crog crog.

Wednesday, March 24, 2010

More stuff to buy!


Press Q to use the health dispenser (once you've bought it!). Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Hello!

I know! After four months of nothing Dreg is a hive of activity once more!

Actually, this update is not such a huge advance - mainly it's tweaks to the shop and combat and a new object to purchase...

The thing is, I just want to say thanks to everybody who has given me advice and criticism - it's all been so helpful. For this particular post, you'll see I've dealt with the comments by Todorus from the previous post (thanks todorus!). As for the difficulty, you start now with more health and money that should hopefully help the beginners among my fans (the new object should help too - more on that later).

Also, on the NewGrounds forum (in which most the posts are mine!), some guy called AdmittingZero wrote the following:

I don't understand how to buy anything in the shop or make him shut up.

Also I can just keep beating on the guys (when they're all standing on top of eachother), my punches hit all of them and none of them have a chance to fight back. The fighting needs to be a little bit more complex.


Ouch - he doesn't like snotty sam, and the combat, which I spent so long working on, isn't any good!

But the thing is, I went and tried what he was talking about, and he was right - you could just spam the A button over and over, and you'd eventually kill the thugs. It would take a long time, but it worked, because they could never hit back!

See, I'd originally thought that by having them block if you do the same move too often, players would be encouraged to vary their fighting. But that wasn't enough!

So now what I've done is that whenever a Thug blocks, there's a chance he'll do a quick counter. That way, if you keep spamming the same move you'll just get punched in the face. Haha!

It's also led to the nice emergent behaviour of apparent arguments between Thugs. If you've got two thugs in front of you and you kick, you tend to hit both. Now imagine both of them block. Then imagine that the one behind the first one does the quick counter, but just ends up hitting the one in front of him. Then the front one blocks and counters too, and it looks like they're just pissing each other off. It's hilarious and I love it. Wheeeee!

Anyway, it all goes to show the value of getting criticism.

Other changes include constantly visible instructions for the shop, and keeping health visible as you make your purchases - this is particularly important now with the addition of the Health dispenser! Yay, a new object!

Press Q to use the Health Dispenser, and it will replenish some of your health. You can upgrade the health dispenser both in the number of doses it can carry, and the amount of health it replenishes with each dose. To get the upgrades you need to leave the shop then enter again.

I went through a similar process in the design of the health dispenser as I had with Snotty Sam and the Holotec armour - the final version is much simpler (and better) than what I started out with.

I'm still not happy with the holotec armour but I really can't be bothered anymore!

Obviously, in the actual game there will be no shop like Snotty Sam's - different upgrades to armour and equipment will be found in different shops that the player will have to find.

Anyway, I'm ever closer to actually starting the game. There are still several tasks I need to deal with:

- More enemies! Argh! That'll be a fair amount of work, but I have to do it. That'll probably be my next task, to be honest - no point designing levels if I can't populate them.

- Getting lots of artwork done: I want to have a whole bunch of buildings, objects, and people to litter the world with to make it feel lived in, but also to make the background design faster (in the background I did a long time ago, I just drew each house individually, but that took too much time - I could still do that for some buildings, but it's best just to have a bunch of building blocks I can stick into the level)

- Figuring out scene-specifics like cut-scenes and boss battles

- Sorting out the ability to save. I've already got quite a lot of ideas how to do this and I think I'll be able to get it sorted pretty quickly, with small save files.

And I guess I also need to think about all the sound effects.

It still feels like there's a lot of work to do, but at the same time the light at the end is definitely getting bigger.





Wheeeee!

Monday, March 22, 2010

Money talks


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


It’s a big update today!

Thing is, I don’t think anybody reads this actual blog post anymore (apart form you, Xenelement, thanks!) so I’m going to take this opportunity just to waffle on for ages, stream-of-consciousness style.

Oh and don’t worry – I removed the sounds because it was taking up too much time to test the movie. Can anybody explain how to compress MP3s to be directly used in Flash? No matter what I do, it wants to convert them as it compiles, apart from one mp3 which I downloaded from a site and which allows flash to “use imported MP3 settings”. How can I other MP3s that also get to use their own imported settings?

This was another one of those updates that saw disparate parts of the project coming together. I imagine you’ve noticed that there’s now a shop, and money to be earned! How do you earn it? You beat it out of your enemies, that’s how.

Everything is extra cheap at the shop so that you can buy stuff!

Now some of you might not have realised that there is a bigger map than the mini-map. Press M to access it. Do you remember that post oh-so-long ago where I first introduced the map? Yeah, it was horrendously ugly.

A couple of posts ago I updated it to have a lot of it drawn automatically for me, so that I don’t have to worry about drawing a map as well as designing a level. But it was still ugly.

The mini map is what did it for me – I decided to make the mini-map’s big brother share the same aesthetic, and here it is in all its glory:


I know it says “press s to set flag”, but ignore that for now, please!

This was plagued by a common problem I have while working on this project – wasting time on stupid nonsense. Specifically I wasted time on:

- making the screen to the right show the correct values for x and y (they are in metres by the way)

- adding rotation (what on Earth could be the point?). That took me ages to get right.

I also worked a pretty long time on the shop. It makes sense, though – I imagine in the future (and there will be plenty more games in the future) it’ll be useful for me to have a shop, and what with the flexibility of object orientated programming, a lot of what I’m doing now can be re-used again in the future.

With the shop, the biggest obstacles were actually graphic-design related, as opposed to programming. The two main issues were the holotec armour suit and Snotty Sam.

I started with the holotec armour, a blatant rip-off of the sort of energy field armour in the tremendously fantastic Mass Effect 2 (I don’t think you could actually see the energy armour in the first installment, which was also wonderful).

So I happily drew highly intricate, shiny energy armour for Dreg, which looked great, but when I loaded up the game, it was all so small that is was just a nasty mess (to be honest, it’s still a bit of a nasty mess, but whatever, I have to make this damn game!).

By the way – the armour does actually work – if you’ve got all of the holotec armour you’ll receive only 55% of the damage dealt to you…

Anyway, I quickly discovered that to make something visually appealing, I had to make it big, fun and simple. Hence the huge shoulder-pads and silly helmet. Now the armour adds to dreg’s silhouette considerably, in a way it has to, so as to compensate for its transparency. Then came drawing the shop, and giving it a salesman.

The thing is, Snotty Sam has been a character in Disarea for aaaages (when I was 18 I wrote a crappy sci-fi book set in the world – I write more about this in my ancient university-era site, which also has the comic).

The thing is, I’d always known Snotty Sam was an amalgamation of alien bits and bobs, due to an unpleasant experience in the badlands (he hints at this if you let him chat with you in the shop).

This was fine in the book, because that was all I needed to do – write that he’d been patched up with alien pieces, and that was it. Having to draw the bugger, on the other hand, posed a whole other problem.

The thing is, I’d never taken the time to properly visualise what Snotty Sam looked like, and I tried to draw him anyway. The stupid thing is, I already knew that this was a stupid idea (again, I wrote about this five years ago!), but I had so many things I needed to do in the game that I wanted to rush it. Obviously, this only meant more time-wasting.

So finally I gathered up the self-discipline to figure out what I wanted him to look like. Then Suddenly it was there, and here he is!



Again, simple, big silhouette, minimal alien modifications but a drastic change from his original form – though in the book it was fine to have him be a complex, amorphic mass of alien organs, it just doesn’t work visually (at least, not within my limited abilities!)

I went through a similar process with the currency – should I use coins? Symbols? AAARGH! Then I thought I’d just rip off Zelda. That was a solution I was happy with. Tell me what you think!

Friday, March 12, 2010

Minimaps, hidden areas and stupid armour


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Wahey! Look! A mini-map! It is excellent.

Anyway, this is an update of pleasant surprises, in the form of small touches that make a big difference (to me, anyway!)

So I was working on getting an easy system to have parts of the background seem to be in front of Dreg - this is important for things like when he's hanging off of corners (so that the lower part of his body is hidden by the floor... urgh, can't explain!!!)

I wanted to do this to allow Dreg to pass through windows (he is in front of the wall most of the time, but as he walks through a window, the part of the wall between the window frame and the foreground needs to be in front of Dreg. Again, can't explain. My Brain!)

Anyway, I suddenly realised that the same mechanic I use to have the grenade explosion reveal a part of the level could also be used to reveal hidden areas Dreg accesses. As you go through the window (in the part of the level to the left) the room is revealed as you enter it. The nice thing about this is that it was done entirely through my "level editor" - no additional coding was needed. That was nice.

The other nice surprise was how cool I find the simple addition of a gradient to the mini-map to give it volume. Observe:


Before



After


See? Now it looks like a compass or something! You might think it sucks, but I think it's wonderful, and so simple!

Then there's the armour. Again, you probably think it looks stupid, but I'm totally ok with that. In fact, I want to go further with the stupidness - I think I'll have three different suits of armour, and you obtain them part by part (helmet, torso, arms and legs), either by buying or finding them. Each part will increase your armour score, so it always makes sense to have the best version of each part equipped. My hope is that you'll end up with a horribly matched Dreg, which at the very least will make me laugh. Yipeeee!

Next up, shops, money, and the other suits of armour.

Tuesday, March 9, 2010

Happiness is a procedurally generated explosion


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Dreg goes Boom now!

Well, sort of - he throws grenades! To make it work, hold S start holding a grenade, then release S to throw it (I did it this way so that you can hold a grenade and wait until just before it explodes to throw it at an unsuspecting enemy who won't have time to run away). Or you could simply not release S then get blown up. As you wish.

This was a big ol' undertaking! It required a bit of work everywhere - I needed to make the grenades respond to the gravity shifts, and seeing as I'd been a bit stupid this meant fiddling around with things that I'd done badly, but hey, I'm used to that by now.

So yeah, it meant working on collision and physics for the grenade, on computer AI to make the thugs run away, on graphics for the explosions, on level set-up to have walls that can be blown away and on player input.

To give the player a decent amount of control over how Dreg throws grenades, I decided to have the arrow keys dictate a fair amount of how the grenade is thrown, as well as Dreg's movement at the time of the throw. Notice that if you throw the grenade while Dreg is crouched, he'll just drop it in front of him.

It also caused unexpected headaches, more on which later!

Anyway, I now have all the major items for Dreg to find within the game. By major item I mean those things that allow him to access new areas. At the beginning of the game, Dreg will have no objects and will only be able to wall jump once at a time. As he progresses he'll get these (probably in this order):

- triple wall jump
- whip (can latch on to poles and damage enemies - can be upgraded)
- double jump
- grenades (deadly against enemies, and smash through weak walls to reveal new areas)

If the list seems a little small, bare in mind this is only the beginning - I think I mentioned in an earlier post that I want to make a couple of "chapters" for Dreg. This is nice because it justifies all this work on the game engine (if more than one game will come of it), and it allows me to make the aims for the first game more realistic. In later games I can have additions like guns, grappling hooks, instant transportation devices etc.

Also, there'll be other items to get, such as better armor and offensive stuff (but focusing on unarmed combat). There'll also be stuff like the ability to have unlimited wall jump, but it won't be vital to complete the game.

It all feels so close now! we might see this game completed yet!

Anyway, if you're interested in the nitty-gritty of the grenade-a-thon of last week, read on!

< geekanisation >

So the reason I had to do a lot of fiddling is that I had foolishly focused on the Character class (Dreg and the thugs are extended from Character) when a lot of the functionality (such as collision detection and resolution) should have been in the parent class, MovingObject. Grenades, obviously, are moving objects, but not characters. So that was boring

But the really weird problem was the issue I had with having Dreg hold the grenade in his hand before throwing it. I thought this would be necessary to give the player control over when the grenade blows up after being thrown, but the issue was that I wanted the grenade visible before it got thrown.

I obviously didn't want to animate a run, jump, skid etc. cycle for Dreg with him holding a grenade, so I thought I could simply add an image of a grenade to Dreg's hand and be done with it.

The issue is that Dreg and his various components are scaled to different degrees, and the grenade would fiendishly change shape depending on what animation loop Dreg was in. I had a problem: I needed to have the grenade appear behind his hand, at the same position and rotation as the hand, but maintaining the grenade's original scale.

The solution involved a hell of a lot more involvement with transformation matrices than I would ever have liked to experience. That said, I feel super smart now.

Easiest of all, surprisingly enough, were the explosions. I had a clear idea of what I wanted, and it worked pretty quickly!

The most annoying part was making the map screen aware of walls being blasted away. It was all very hacky. At least it seems to work now!

< geekanisation />

Sunday, February 28, 2010

On health and maps


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick.


Hello!

Doubtless you all missed me - I was working on another project for a while, but now I'm backing with ever increasing vim!

Anyway, I've made a couple of changes that should hopefully make things easier when I finally get round to actually making the game (yeah, as if that's ever going to happen!). I decided I didn't want to have to draw a map for every level, so instead I've made a system which will automatically create a map from the level elements that I draw. So that's cool, innit?

Anyway, press M to see the map. The right hand space will be for giving extra information about places of interest.

Also, health! Yeah, I decided to be inspired (steal from) Oni for learning how much health an enemy has - each time you hit an enemy a sort of coloured circle appears. The colour of the circle indicates how much health the enemy has left. I tried giving the enemies health bars but it looked horrible. You might think this system looks horrible too, but wotcha gonna do about it? It's my game and I decide, ok?

Also, I've decided to build upon (rip off) Zelda for Dreg's health - little red circles in the top right (ok, in Zelda they're hearts, but still, very similar). Just like Zelda, you'll find objects that increase your maximum health hidden around the levels. In the sample above, you have one that increases your health by a whole circle, but in the actual game it'll probably only be a quarter of a circle at a time.

Finally, all of the enemies will drop some health every time you kill them. Try letting them get you close to death, then kill them to get your health back, there's a little colour thing going on when you're a third of your health down which draws from (copies) what we see in most FPSs nowadays.

Anyway, thanks for those of you who can still be bother to humour me - I know this is taking too bloody long!

Tuesday, January 12, 2010

Dreg wishes you a noisy 2010


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. ENTER to interact with buttons and things. S to use objects.


It's a new year! And my Christmas deadline is looking more and more ridiculous!

It's not through want of trying, at least this time, it's mostly through want of skill, but I'm working on that, and soon I shall be an uber-programmer!

This latest update is a case in point - I had an idea of how I wanted to deal with music, but thought it might not work, then I had an even better idea, but had no idea how to do it, then went through the horrendously difficult struggle to understand the tools to make the idea work, a process which took me a few weeks, then the idea worked, but was too slow, so I went back to the original idea, which I set up in about 20 minutes. Hooray!

Though it's never really time lost. Very often I've had a problem that I've tried to solve with the wrong tool (a tool I don't understand) then I fruitlessly toil away trying to fit a square peg in a round hole (or is it the other way round?) until I give up and do it the right way. I feel like I've wasted loads of time, but then a few weeks down the line I come across another problem which requires the tool that I'd so uselessly mucked around with earlier, and the problem is solved effortlessly. So now, thanks to my initial silliness, I can add a few more strings to my hat, and feathers to my bow, and birds to my stone, or whatever the damn expression is (on a side note: since moving to Spain my already tenuous grasp of English idioms is rapidly failing).

Anyway, as you can probably hear (and wish you couldn't), the game now has crappy music, and a couple of crappy sound effects. I need to figure out the best way to record sounds, and make decent music. I'll have another shot at it later. Also, I've only added noises for his footsteps (banging my shoes together - doesn't sound anything like footsteps... *sigh*) and jumps (me grunting embarrassingly into the microphone).

The point so far is to figure out how I'm going to integrate all these things, and I'm relatively happy about that. The next bit gets technical, so casual readers can stop here. Have any of you found all 10 pointless collectibles yet?

< geekology >

So my problem was to keep the size down. A two minute mp3 could add a huge amount to the size of my .swf, unless I made the quality really crappy. So I decided my approach would be to just add the individual instrument and drum loops to the game, then stitch them together within the game. This way I kept the music load to about 700 K, which is still twice as much as the rest of the game put together.

Then the problem became synchronisation. It still is a problem, and you'll sometimes here the music not quite loop properly. It sucks, but the solution I found for it made things worse. But I'm quite proud of it nonetheless.

What I wanted to do was extract the sound data for each loop, then create a new sound file with all the others combined into it. It turned out to be more complicated than I had anticipated, but after the afore-mentioned head-banging, I got it all to work! I felt very proud!

The problem was that stitching the loops together took a lot of processing power, and the game would pause for ages before starting as it worked. I tried all sorts of optimisation techniques but to no avail, so in the end I just went with a sound channel that played each loop when required (but this occasionally leads to the pauses between loops).

Maybe I'll have another go one day and see if I can make the sound combination method worthwhile...

Anyway, enough! I must have lunch!

</ geekology >

Friday, December 18, 2009

Just when you thought all hope was lost...


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A is for punch and D for kick. ENTER to interact with buttons and things. S to use objects.


I'm back!

Yes, I know, it's been a month. The blog hasn't been progressing, but the game certainly has!

The thing is the game has got to a point where I have lots and lots and lots of little things to do, and the sheer number is pretty intimidating. The problem was that if I were to do a new blog post for each advance (and therefore have to design a level demonstrating these things) it would take forever!

So instead I just rushed through lots of things I wanted to do, making sure they worked, then made a level that demonstrates all of these things. I won't tell you what those new elements are - I'll let the level do the talking (in fact, a lot of the new additions allow me to explain these things in-game!).

I'm very excited about how things are going, though obviously my self-imposed Christmas deadline was wildly ambitious. Anyway, it's very late, and I'm tired, so it's time to go to bed.

Enjoy!

Saturday, November 14, 2009

Collision revisited... again... please may it be for the last time!


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Try to make the collision detection fail!

If you want to check out the combat go here



Today's been a good day. I like it when I figure out solutions to long standing problems. Do you remember a while ago when I did a whole update about the bugs I'd fixed? Well this is more of the same, really.

I'm sure you've all noticed that I've always had floors sort of overshoot the walls they're over. This was due to several reasons, all of which would have Dreg happily drop through a floor/wall into oblivion. This is not good for gameplay.

I'd resigned myself to the fact that I would I'd have to make the floor extend beyond the wall whenever designing levels.

But then I noticed some other problems. If Dreg jumps just high enough to be above the wall, but not quite high enough to land on the floor above, this happens:


oh noooooooooooooo!


Yeah, that sucks. You can try to do it on the previous post - it's not so difficult once you realise it's there.

Also, You can very easily fall through the geometry of the little podium at the end. As I said before, I'd simply decided that this would be a limitation of the game engine, so I couldn't have that kind of geometry.


Dreg and the podium are one


But today, as I said, was a good day. My brain was working even better than usual, and I though up a solution. Well, specifically it was to solve the problem presented in the first picture, but the solution was so simple and effective, I realised I could extend it to everything, and it would even work for the podium!

Then I did more stuff to deal with all the little problems I knew existed. Somehow the programming muse was on my side today, and I sorted them out. What a good day it's been!

This is a much bigger deal than you might think. I means I've suddenly liberated myself from constraints while designing my levels. I can have the geometry all over the place and not have to worry about the issues from before. It's amaaaaazing. Did I mention this is a good day?

So I quickly cooked up the level you see above, and it shows all the sorts of things that couldn't be done before, but now can. You'll see there's still some overlap at the corners, but this is done automatically - in the level editor I just have the lines meet each other (of course, don't forget that in the final game you won't be seeing any of these lines - just beautiful, beautiful backgrounds, yeah?).

Play around with it - I'm pretty sure the collision detection doesn't fail, though obviously if it does for you, pleeeeaaaaase tell me!

Thursday, November 12, 2009

Speaking fun!


Walk up to Pendy and press ENTER to have a conversation with him.

Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Press L then use the arrow keys to look around, and press M to bring up the map (- and + zoom)

If you want to check out the combat go here



Right, time for me to start having lots of fun giving Dreg people to interact with!

So a warm welcome please for my new class: the NPC!

At the moment, the NPC doesn't actually do anything, apart from speak to you, which is pretty bloody cool in my opinion. I've made it so that their heads appear in the right place and everything! Press enter when you're near Pendy (a character from the comic strip) to see what I'm talking about.

The thing I'm happiest about is how I've integrated this into the ever-growing chaos that is my level editor. The thing is, I want to keep the mechanics of level design as simple as possible so that I can get on with the fun of inventing puzzles and whatnot.

I've also worked a lot on the underlying architecture for the HUD to work (which is my warped mind include speech boxes). I'll be adding to it as I see fit, because it's my game which makes me the boss.

Later these NPCs will animate, walk around (perhaps) and generally be very cool. I wanted to get the conversations down so I knew that was sorted, and later I'll have to integrate them into mission progress and stuff... oh so much work ahead of me! The Christmas deadline is looking ever more ludicrous, I have to admit. It doesn't help that I've clearly slowed down recently. But never fear - I will not give up! This bloody game will be made!

Oh and I've made him stripey. Isn't it cool?

Be sure to tell me what you think!

Thursday, November 5, 2009

I'm back!


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Press L then use the arrow keys to look around, and press M to bring up the map (- and + zoom)

If you want to check out the combat go here


Hello!

Ok, so it's been a while. I think I was working myself up over my self-imposed Christmas deadline, and I needed a Dreg holiday. I know that makes my Christmas deadline somewhat less realistic, but let's face it, as well as world fame and massive amounts of money, I'm making this game to have fun, and there's no point in getting stressed, yeah?

Anyway, the hiatus has given me lots of energy to delve right in. I think one of the main reasons that I needed a break was that I'd found a whole bunch of small bugs and issues that needed resolving, and I didn't have the heart to face them. After a week and a half of doing bugger all I was able to sort most of them out (a couple of big bloopers are still lurking around though).

As for actual real changes that are of interest to you, I decided to focus on navigation. With a such potentially confusing level design, full of tricky little platforms and such, I needed to give the player the ability to check out his or her surroundings, so I've added two things: the ability to look around, and a map.

To look around, press L, then use the arrow keys to look around. For the map press M and press - or + to zoom in and out.

I had to think for a while about what form the map should take - I want it to show information, but only for those places the player has visited. But you can see the dark red shape that indicates the general shape of the level. But I didn't want to show secret paths, so they're not included in the silhouette of the map (but if you use them, they'll show up on the map).

I also wanted some way to indicate the gravity in a certain part of the level. I've gone for a gradient, but I'm not sure if that's clear enough. Maybe I should just physically stick some arrows in there!

I also couldn't decide whether the player should still be able to move while looking at the map, or if the game should be paused. I've gone for the former - what do you guys think?

The reason why the map isn't centred is that the right hand side will contain information and instructions - I want to make it so that important buildings and objectives will appear on the map, and the player can add markers on the map. Maybe that'll be my next update!

In any case, as always, feel free to point out all the bugs/issues you come across!

Thursday, October 22, 2009

Time to flex those platforming muscles


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump.


This post is mostly focused on acrobatics. If you want to see what combat will be like in this game go to this post!

Look - a new place to run around in! Try to find the little podium - there's more than one way to get there (the more difficult the path, the faster it is).

But what's the point?

Well the thing is I've been thinking about how the game is going to be set up, and it dawned on me that I had a whoooole lot of level designing in front of me, so I wanted to work on my "level editor" to make it quicker and easier to use. I found lots of nice little tricks and techniques, as well as programming a lot of stuff that would automate the boring bits.

There are still a few issues - it's annoying that I have to have floors overshoot walls, instead of having nice, clean corners. This is a collision detection problem (as always), though I've already started working on a solution for that.

In any case, I thought I'd give you something to do as well as try out my new level building tools by making this little area (I say little, but it's the biggest I've made so far).

It was a useful experience because it showed up several bugs that I had to sort out (more collision detection fun!). The nice thing is that my collision detection engine is getting better and better, all without having too big of an effect on the frame rate (animation and big images are still the big processor hoggers). Increasingly I feel completely free in how I design my levels - just that corner thing that still needs to be sorted out...

In any case, please, feel free to try to break the game! Find walls that let you drift through, areas that are too difficult/easy/stupid. Any ideas you think could improve level design etc. As always, your feedback is really, really useful to me!

So what's next?

Well I want to start making the game elements that make up a real level - a sense of progress. This means NPCs, items, switches and all of that nonsense. This also means developing a talking mechanic to have Dreg interact with other characters. I imagine the next update will be just that...

Sunday, October 18, 2009

Now, now boys


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Press refresh to have it all start again!


This is a bit of a silly update, but I find it incredibly fun, as no doubt you will too!

I'm working on techniques for saving my input, so as to be able to quickly and easily create cut-scenes within the game (or have NPCs perform actions for demonstration / race purposes). I need to make something that isn't too processor expensive, but reliably reproduces the actions I tell it to. I think I have it, though they may still be some bugs around.

To test it, I had lots of different versions of Dreg running around, falling into pits, getting squished etc. for a relatively long time to see if he'd end up where he was supposed to (in this case, the secret room - though one sort of falls off by being an idiot). The final result was so wonderful I had to share it with you all!

I admit this is a silly post, and there still isn't anything incredibly exciting for you to do, but I find the sight of all those little Dregs gleefully bouncing around to be hilarious. Don't you?

Thursday, October 15, 2009

Suited and Booted


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A and D to attack.

See below for a list of Dreg's fight moves.



Urgh, today was a lot of work...

I did to Dreg what I'd done to the thugs, and it was generally a rather horrible experience. As I mentioned in the previous post I had to do a few changes to the Thug MovieClip for the variety of clothing to work, and this had to be done for each bit of animation. I spent a good five hours today just converting graphic symbols into MovieClips. It was horrible.

But after I'd done all that, I was able to give Dreg a suit! I think he looks dapper, don't you? With his cheesy big collar and his cheesy white socks...

Also, after all the fine tuning I'd done with collision detection regarding moving objects, I'd screwed things up in other areas and had to fix them today. I also added a very simplistic preloader (I had to read my own tutorial to remember how!). It was all rather difficult work. So I decided to cheer myself up by doing this:


I think it's hilarious. I might use as a billboard within the game. Disarea is the name of the world, by the way.

Anyway, I feel that things are shaping up!

Once again, for newbies, here are the fighting moves:

punch him in the face lots:
A + A + A

kick'im:
D

upper-cut:
DOWN + A

get his ankles:
DOWN + D

dirty my trousers:
D while running

flying kick:
D while jumping

kick 'im onto 'is butt (more powerful kick with ever-so-slightly different animation):
A + A + D
OR
DOWN + A + D (this one is fun - you fling him into the air then kick him off into the distance)

Sort of roll over backwards then then kick him in a sensitive place, thereby flinging him away:
A OR D while moving into him

No, look over there!
move into him and press A while he's facing away from you

slingshot! (my favourite):
Run towards him and press A just as you get to him

Double dragon rip-off:
DOWN, release DOWN and press D while rising.

Wednesday, October 14, 2009

Variety is the spice of fight


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. A and D to attack.

See below for a list of Dreg's fight moves.



Wahey!

Well, for those of you who come regularly, I'm afraid there's nothing new gameplay wise for you to enjoy. I've been working on an essentially aesthetic thing... the thugs are all different now!

I've taken advantage of the ability to play around with movie clips to give each thug his own look. It's all rather simple, really, but the problem was that I had set up the characters awkwardly, and I spent a lot of my time going through the thug movieclip and fixing it (namely, replacing graphic symbols with MovieClips). It was slow, dull and annoying. Now I have to do it with Dreg too, argh!

But at least what this means is that in the future I can make a character, then whenever an instance of that character is created he'll be a little different to the other instances, making the game feel that tiny bit more varied and organic.

I've also made them slightly different sizes, to add to the fun!

It also means that as the player buys new items for Dreg, they can alter his appearance, making everything very cool.

This is also an opportunity for you to immortalize yourself on the rankings page. For those of you who are new to this, these are the fighting moves:

punch him in the face lots:
A + A + A

kick'im:
D

upper-cut:
DOWN + A

get his ankles:
DOWN + D

dirty my trousers:
D while running

flying kick:
D while jumping

kick 'im onto 'is butt (more powerful kick with ever-so-slightly different animation):
A + A + D
OR
DOWN + A + D (this one is fun - you fling him into the air then kick him off into the distance)

Sort of roll over backwards then then kick him in a sensitive place, thereby flinging him away:
A OR D while moving into him

No, look over there!
move into him and press A while he's facing away from you

slingshot! (my favourite):
Run towards him and press A just as you get to him

Double dragon rip-off:
DOWN, release DOWN and press D while rising.

Wednesday, October 7, 2009

Tweakage galore!


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump.

If you haven't already tried it and want to know what the combat is like, go to this post.



"Hey Awoogamuffin!" I hear you cry, "What's the big deal? You haven't changed anything! You're so boring and unsexy!"

Well, I won't lower myself to your frankly insulting level, but I'll happily dignify your uncalled-for comment with an explanation.

And anyway, I still haven't received any proof that any of you have found the secret room. There's nothing in the room. But it's secret. Go find it.

Though it may not seem that anything has changed, the collision detection has undergone a revamp. The version in the previous post was plagued with lots of bugs - Dreg often would get stuck to walls, and worst of all, in several places he could actually drift right through them!

Here are a couple of examples:


This one is relatively easy to replicate - if you jump as if you're going to grab the ledge of the bottom cube just as the top one is moving towards you, this happens. It's horrible.



This one is more difficult to replicate - you have to jump just as the block is coming down on you and it'll push you through the floor. The line underneath was to "catch" this happening, and though it works (more or less) it annoyed me that it was necessary


There were also plenty of plenty of places where Dreg would get "squished" for no apparent reason, other places where he would fall through the geometry and the whole thing was generally plagued with nonsense. But now it's all fixed! I'll go into a longer explanation later in the geek section...

I've also made a few visual changes - giving the platforms a foreground element so that Dreg can get hidden behind rails or walls that are facing away from the camera. It looks a lot better when Dreg gets squished now because he's half-obscured by the right-hand block.

I also made it so that it doesn't look stupid if you roll off an edge (down + jump to roll).

So now the geekiness!

< geekment >

So yeah, I realised what was happening with the first bug picture I showed was that when the collision detection saw that dreg was in position to grab the ledge, the game would simply teleport Dreg straight to the ledge. This would sometimes teleport him right through a wall!

Now even though I knew that to keep collision detection functional you should never directly modify the x and y values, I had been doing that regardless because I'm lazy and a little stupid. Anyway, I wrote a function that would perform a new collision detection test before placing Dreg on the ledge (I had to do clever things to avoid the wall underneath the ledge counting), and it worked!

This was when I thought I should comb through the whole game and make sure that the x and y values are only ever directly changed once all the collision detection has been completed, which meant performing additional checks whenever Dreg ran into a wall, landed on the floor or hit a ceiling. Now Dreg never gets teleported anywhere unless I want him to!

I also completely re-wrote the stuff that handled Dreg's interaction with moving floors and walls to avoid the stickiness I mentioned earlier.

In any case, the lesson learned is that with collision detection, you can't cut corners - every time you want to move a character, check whether there's nothing blocking him first. Tralaaaa!

</ geekment >

Monday, October 5, 2009

It's squishtastic!


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump.


Yay! More stuff!

Well I've considerably worked on the whole moving platforms thing, the best bit being the implementation of squish mechanics (that's the technical term) so that Dreg can be crushed and squeezed to your delight. It also allows for some fun pseudo-puzzle acrobatics which test your block negotiation skills (also a technical term).

It's still a little buggy in places - sometimes Dreg grabs onto a ledge when he shouldn't, and there's the occasional odd sticking to walls. I've uploaded it anyway because I need more attention!

I'm certain there are plenty more bugs. That's where you, my play-testing monkeys, come in - I want to hear all of the weird bugs and quirks you find, and I'll do my best to fix them!

This has got me really excited about the possibilities for level design. This little demo is only scratching the surface - I can make the moving lines be at any angle, and travel along a path of my choosing (I've even half-coded something that would allow me to use the paths within Flash to create paths for my platforms).

The nice thing about this being a science-fiction world, and a 2D computer game, is that I can get away with crazy level design, involving huge moving parts and whatnot (I'm toying with the idea of a giant robot, trapped and spanning across various gravity zones and feeling generally unhappy with the world).

So can you navigate Dreg through the fun? There's also a little "secret" room (not much of a secret now that you know about it) of which I hope the game will have plenty!

Tell me what you think!

Monday, September 28, 2009

transportational joy


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump.


I have moving platforms!

This is still just a simple demo of new stuff. If you want something more involved, and haven't done it yet, go fight some thugs and upload your high score here.

Yeah, they're glorified collision lines that have velocity. I had to do a lot of fiddling to get everything working just right, but I'm happy with the final result.

I was going simply to have a platform helping you get across the pit, but that would be too boring, so I've given you a very simple puzzle - can you get to the other side? a brain teaser that should take you all of two minutes to figure out! Fun fun fun!

So, the nice things about what I've done in these last two posts is that there are multiple uses for each - the line that kills Dreg then resets him could also be used to avoid game-breaking bugs. If for dodgy collision code or dodgy level layout Dreg falls through the floor, I could have a sort of "safety net" that will put him back where he should be...

As for the moving platforms, they could also be things like floating objects, or cars, or whatever, to keep the level layout interesting.

So what's next? Well I still need to integrate moving platforms into the level editor, as well as design different kinds (those that move in loops, those that are only activated when Dreg jumps on them, etc.)

After that, here's my "to do" list:

- menu screens
- NPC interaction
- the HUD
- items
- cut scenes
- stitching zones together (as in, the whole game can be explored freely, but to avoid too many demands on the processor, the world will be split into zones that are loaded as the player enters them...)
- level design - how are events triggered? how are missions given and stored?
- potentially other acrobatics (monkey bars, ladders etc.) but I'm not sure I can be bothered with them

Once I've got all these engine elements together I'll be able to get down and busy with making the actual game - designing, animating and maybe doing some extra coding for enemies, designing levels etc.

The plan is to have the whole game done before Christmas. Excitement.