Thursday, December 04, 2008
Our first project with Brandissimo is finally live, and sitting on the NFLRush site.

Just to caveat the excitement a little, the NFL site requires ( At the very least ) a sign up, and I'm sure it may be a subscription service ( Read: You've got to pay ).
Which is a real pity, as I'm guessing no one reading this right now is a paid up member or is going to be any time soon.

To compensate for this, I'm just going to post some screen shots, a couple from the intro movie, and one in-game one. Then in conjunction with the development posts ( For some joyous reason I can't look back at old posts and be logged in at the same time, which means I can't just simply give all the dev. posts a GMM category and then just refer you to the tag cloud. Cosmic. So instead, the development ran from the start of Sept '08, to the 1st Oct. Cutting edge blog technology in all it's glory ) you can use your imagination to play the game.
That's got to be better than actually playing it hasn't it ? I mean you can imagine any old mental things. For example, I'm imagining that I had the time to scroll the screen rather than just making it flick...

gmm_grab1.jpg

gmm_grab2.jpg

And a little something in-game...

gmm_inGameGrab.jpg


A really enjoyable project, some great assets to work with ( I'd never have opted for that art style in a million years ), some great people to work with at Brandissimo and quite a nice little game at the end of it. All good.

Squize.

Thursday, December 04, 2008 11:59:41 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 13, 2008
Every now and again there's a 48hr game comp on FlashKit games. I've not entered since the 2nd one ( Which I was really pleased to have won, so I wanted to keep my 100% record ) so I felt it was time again, to see if I can still turn it on.

It works by everyone offering up a couple of words and then at kick off two are chosen at random and that's the games theme. This time it was "human brain" and "micro-organisms".

The theme was announced at 1am ( Saturday ) and the obvious thing for me was a shoot'em up over the brain, zapping the invading baddies, so I went to bed. It's what us coders do best.
Saturday afternoon I was mulling it over, an arena shooter would be cool but I'm meant to be finishing Orbs off as it is without trying to do another, plus I knew realistically that I'd have about 16 hours to do this. Ok, a Galaga style shooter. But that means lots of attack waves, plus a scrolling background ( Without the scrolling background it would feel really really old school ). Scratch that then.

I've never written a mouse avoider as I've always found them trite and throwaway. Perfect!

Saturday I didn't get much done, the England match got in the way, mainly the front-end and the overall structure was nailed. The power-crystals ( Or "geoms" as they're actually called in the code 'cause I just couldn't think of a better term ) were in and running which was good 'cause I knew a lot of those routines would be used by the baddies.

Sunday, erm, well I finished it off. I managed to be the first person to post up a final game, as I was sick to death of working to be honest ( It only took around 12 hours in total, but by the end I was glad to see the back of it ).
The sounds were the last thing to be added, I found an old tune from a game I'm not going to finish so re-cycled that and the sfx are also from various old games. I'm not a 100% happy with them, and I wanted to add another baddie type that would explode when killed which would have caused a cool chain reaction with combo's etc. but I felt it was better to have a complete ok-ish game done on time rather than try for more but post a game with a lot of loose ends in there.
For me the comp is as much about finishing by the deadline as the game itself.

If you'd like to see the fruits of my labours, click me

Also I've posted the source, in two flavours:
Just the code ( 16k )
Code with fla's ( 2.5 meg )

It was written in Flex and I very much doubt it'll run out of the box straight away, but it includes the preloader code which may be handy.

Also all the comp entries are here. I can really recommend giving them all a play as there's some great work there in such a short space of time.

Squize.

Monday, October 13, 2008 12:33:38 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Wednesday, October 01, 2008
I'm currently touching wood ( tehehe ) that GMM is gold.

Guess how long it's taken ?

This is going to be a two pronged post, I'm going to both wow you with visuals and bore you with stats. Stats first I guess, here's the breakdown of how long the game took blow by blow

Attract Mode: 1hr 9mins
Bots: 13hr 33mins ( I had such a mare with these )
Class Structure: 10mins
Corn Power-Up: 5hr 20mins ( This was re-used for the other power-ups, hence it taking so long )
Display Map: 32mins
Dummy Trap: 2hr 34mins
Game Complete: 58mins
Game Over: 24mins
Golden Ball Power-Up: 49mins
Health Power-Up: 1hr 37mins
Hidden Baddie: 2hr 47mins
HUD: 1hr 38mins
Instructions: 2hr 33mins
Level Complete: 40mins
Level Design: 7hr 38mins
Level Plotter: 7hr 39mins ( What are the odds ? )
Level Structure: 1hr 22min
MiniMap Layout: 1hr 31mins
Mud Power-Up: 1hr 8mins
Pause Mode: 30mins
Player: 7hr 37mins
Points anim: 24mins
Preloader: 34mins
Score: 7mins
Sounds: 3hr 22mins
Tiles: 2h 54mins
Transition: 25mins
TrapDoors: 3hr
WaterTraps: 1hr 23mins

Now this may seem incredibly anal, perhaps to some degree it is, but when working for yourself it's important to keep track of where your time is going. It helps budget for the next game, as you'll see a pattern ( So for example a preloader won't take long, but you know the player and baddie routines will ). A lot of common sense I know, but seeing how long things actually take can be a useful eye opener.

Want to see the map for level 1 ? Go on then seeing how I promised

gmmMap.png

So from here the clients need to give it the once over, make sure I've fixed what I was meant to, tweaked where things should have been tweaked and sign this bad boy off.

K, time to work on the arkanoid game again...

Squize.

Wednesday, October 01, 2008 2:30:47 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [6]  |  Trackback
 Thursday, September 25, 2008
I worked 'til gone 3am last night, and I'm beyond tired, so rather than a blog entry covering how I knocked a lot of things off the to do list for GMM and designed level 2, here's a link to a viral clip that Chris at errorWare sent me today that made me laugh.

This, in it's own bizarre way is totally safe for work.

A less tired and lazy post tomorrow, if for no other reason than I've got to use the last lyric as a title.

Squize.

Wednesday, September 24, 2008 11:16:35 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, September 24, 2008
Well my days being split in two carries on.

During the day I'm working on the Arkanoid game for gimme5, evenings it's back to GMM. I can only say thank God both of these are coming to a close at roughly the same time 'cause it's so nasty working on two projects at once ( I equate it to writing two different novels at once ), not just in terms of swapping and changing ( as2 to as3 to as2 ) but the sheer number of hours a day I'm working on them.

Most of yesterday was spent on the g5 game. Myself and Ronnie the tech. lead at g5 spent hours nailing down the server side intergration for the level saving / swapping. That's nearly done, and I'm really hoping with one final push tomorrow it'll be done for good.

Between that I was adding all the speech to the game, and it works really well in place. Today was more of the same and clearing off some of the really obscure bugs. The To Do list for that is finally going down.

Last night on GMM was spent adding sounds too. Thankfully the client sent me a zip with pretty much all of them in there, and they're all pretty spot on, which is great.
It was also nice using my as2 SoundHandler class again, the one in as3 is very make shift at best, the as2 has been built up over the years and is so easy to use and does everything I want ( For example, sound.setPanDistance() calculates the mc's position in relation to the center of the screen and sets the pan accordingly ).

Pretty much a whole day doing sounds for both games then. This morning ( Before starting back on Arkanoid ) I managed to finish off the instructions for GMM. Not hard work, but lots of fiddly aligning and just boring really.

I think tonight I'm going to try and knock up a couple more levels for GMM. Only level 1 is done so far, so getting a couple more done will be good, and it's a break from actual coding. I'll be able to test it a lot whilst making sure the level plays well so the to do list will grow ( It's always the way, when a project is coming to the end you find you'll delete one thing off your list but find at least another 2 to add to it ).

I'm just going to be a bit self indulgent, not for the first time I know. I hope I'm not the only person who's wanky enough to google themselves. Well I googled "Gaming your way" and was wrapped to see we've "made" it on google.

gywGoogle.png

Check us out all indexed. Ok it's only the blog, the site itself seems to be as popular as the plague, but it's just a place for us to whore ourselves in a grown up way ( "In terms of traffic it has more than met their expectations" all nice and nu-media friendly )

After that, I thought sod it, let's see what "Squize" brings up. I came second, the top entry being

"I masturbate weirdly. I squize my hips with my hand in the middle. Even with my panties on... Weird?
Anyone else does that? I'm 13..."

I ( For once ) just couldn't make it up. That's my sails deflated, 2nd to a 13 year not knowing how to frig.

I guess there will be more of the same crap, just worded differently, tomorrow.

Squize.

Wednesday, September 24, 2008 5:18:35 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Monday, September 22, 2008
Back to Flash after Fridays rant.

Today was a bit of this and a bit of that.

I'm having to finish of an arkanoid clone for gimme5, a hang over from when I worked there. Improved the collisions ( Again ) and finally finished the baddies off.
Still a lot of things to do, it's becoming a long drawn out project that I can't wait to see the back of to be honest.

Back to the lot more fun GMM. I started the player shooting routines Friday and they're nearly finished after starting it up again today. Doing a game in ISO just adds that layer of complication to it, but I've got projectiles flying around quite nicely now, and in the past 30mins got it so the baddie bots know they've been hit and power-down for a couple of seconds allowing you to run past.

Right now my to do list stands at:

* Instructions
* Golden Ball - shoot / test for hitting bot
* Mud - shoot / test for hitting bot
* Bots
* Sounds
* Score
* Design levels
* Test right hand exit
* Remove traps from fore/background mcs

The Bots are nearly done, I'm just removing the final kinks with animation frames going a bit mental and stopping them just sitting on your head when they've hit you until they drain all your energy.
The two remaining power-ups ( Golden Ball / Mud ) shouldn't be too much work now the first power-up is in there and working ( It's really just the end result when a bot is hit by one which differs ).
Everything else is just bits and bobs, with the sound looking like it'll take the most time out of all that.

So it's slipped, but it's still on-track (  ie there's nothing left that fills me with fear ). In terms of actual time spent on it, 50 hours 48mins, which shows that I must spend an awful lot of the day just day dreaming instead of coding. It's something I really need to tighten up, if I was doing proper 7 hour days then we'd be looking at just starting day 6 now ( In my defence a decent chunk of the day seems to be taken up with admin stuff ).

Anyway until tomorrow that's it from me.

Squize.

PS. Just as a sidenote, we've got a great guest article coming up this week, which we're really proud to be presenting here.

Monday, September 22, 2008 9:22:49 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, September 17, 2008
So today is the last day I should be working on GMM. I've got a bit of a confession to make ( Well two actually ).

The first one is that today isn't actually the real deadline. I don't know when that is, I think 4 weeks or so away. That's when the client starts emailing a lot more and things start getting slightly strained. That's when clients are still firing off "It's perfect. Can we just alter...". That's when you're sick to death of it. The deadline is when you realise you've really under quoted on this job as you're still killing yourself trying to get it done on time. It's when you regret having those couple of lazy days and when you realise that the next job isn't already in the bag yet, so you've got both a game you're pretty jaded with to finish off, you've also got to whore yourself around to make sure the following months bills are paid.

Then why have I been counting today as the deadline ? Because you need to work to the budget and not the timeline ( Where possible ). You have your day rate and you divide the budget by that, that's how many days work it is.
When I started off trying to get into the industry and was just writing games to learn my art, I always did that even then ( Although my day rate was a lot less in those days. A couple of years experience and some shiny awards bumped that up ). It stops feature creep and ensures the game is done, not 95% done but good enough to release.

Now with GMM there was very little budget. No where near enough to do what was needed. Sometimes projects are like that, and sometimes you have to take a short term hit for a longer term gain. After seeing the assets and chatting to the client I knew I wanted to do this, so the hit in my pocket wasn't an issue ( Or rather not enough of an issue ).
So I did the above budget/dayRate=days formula, and then multiplied it by 2. I thought it would be possible to still make the game everything it should be in that timescale ( 10 working days ). In effect after day 5 I was making a "loss", and every day spent on it after today ( It's day 10 already ) I would be making a loss on my cheaper rate.

It's hardly the end of the world. I still think Flash developer wages are stupidly inflated compared to real life. A loss when earning good amounts is still better than a lot of people having to dig holes in the street or change patients bedding. It's all relative.
I speak to quite a few London based freelancers who charge a lot more per day than I do. That's great if you're working on some big ass media campaign where there is a silly budget involved. Rip the arse out of it, but personally I'd rather do the odd job that doesn't make as much rather than this rigid "£xxx" per day.
GMM is going to be a good little game, and if I'd stuck rigidly to my day rate then either I wouldn't have got the job or I would have had 5 days to do it, which would have resulted in a crap game ( 3 days to make it, a day to test and debug and a day for client amends. Hardly the most time in the world to make something shine ).

I think that's one of the key reasons why there are so many piss poor adver-games out there ( Don't believe me ? Check out thefwa. Filter it to show games, and have a play. They will look great, but tell me how many you'd play more than once. Or even how many you enjoyed playing. Or even how many you admire as examples of good gameplay ).
It's mainly due to the lack of good coders, never mind good game coders. This shortage means that either designers "Who can code a little" are making very pretty but very empty games, or agencies are getting freelance coders on board who know they can charge £xxx a day and sometimes it means there's not enough budget to make a good game, just enough to cover their costs and have something come out the other end ( There are of course other factors, clients with no concept of games, designers with no concept of games etc. ).

I don't think there's anyone to blame, and I don't mean it as a blankit critisim of freelancers ( Far far from it ) I'm just trying to put into lots of words that sometimes the art should come first.

Right I mentioned at the start that I had two confessions. The second is that the game isn't done yet. In fact the to do list has hardly been dented.

The "hidden baddies" proved to be a real bitch to get working, and as soon as I post this up ( And after a smoke, obviously ) I'm back onto the baddie bots ( Pac Man ghosts ) which I spent just under 4 hours on yesterday and need at least a couple more hours today to finish off.

Squize.

Wednesday, September 17, 2008 11:14:00 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Sunday, September 14, 2008
It's all got a bit blurry what's been done when. That's what happens when your diary slips, it just merges into whole big lump of vague memory.

I finished off the last entry about adding a play again button to the game complete screen. That's done, so the whole ability to play the game from start to finish and start again is in. Feeling like a proper game now.

I spent a long time adding the trap doors to the game. The traps themselves were straight forward enough, I just had a real problem getting rid of them once they were triggered. It all worked fine, you'd fall down a hole, recover, leave the screen but when you came back the trap would be there again. Glaring at you. It was just a silly mistake on my behalf, but took ages to find.

After that the water traps were pretty straight forward, they just used a lot of the same code. The only slight snag with these was the falling down splat on your face animation. It's a big bigger than normal ones and in one direction there would be a depth sorting issue with the players arm sticking out too far. A quick kludge check, and it's all good.

I also added in the preloader and a pause mode, and it's always nice to test the "Quit to menu" option and it works first time. No nasty code running in the background that I'd forgotten to kill.

After showing it to the client there was a bit of an issue about the control scheme, so a quickly knocked up controls page ( Only if you've skipped the instructions, and lets face it you will. I know I would ) was dropped in there at the start of the game.

Just out of interest ( And the fact that it looks like I've done very little for 3 days so I need to pad this post out a little with some boring filler ), below is the output from our sweet notifier app which tracks all that we do

Attract Mode: 13mins
Class Structure: 10mins
Dummy Trap: 1:22
Game Complete: 58mins
HUD: 1:10
Instructions: 51mins
Level Complete: 40mins
Level Design: 1:09
Level Plotter: 7:06
Level Structure: 45mins
Pause Mode: 30mins
Player: 5:32
Preloader: 34mins
Tiles: 1:55
Transition: 25mins
TrapDoors: 3:00
WaterTraps: 1:21

All that added up should come to 49 ( 7*7 ) hours, and if it doesn't it shows that I've been a bit lazy :)
( I know it won't even be close as the last couple of days I've been sorting out the tax man and dealing with the joys of tooth ache, so the work has had to take a bit of a back seat to those ).

This coming Wednesday is my deadline. I think it's going to be a bit tight, there's some big routines to do before then, and my to do list reads as follows:

* Instructions
* Power-ups
* Bots
* Dummys
* Hidden bad guys throwing dummys
* Sounds
* Player health
* Game Over ( After losing all health )
* Owls

( I know with no real concept of what the game is that's as vague as hell, sorry, my hands are tied as always. Power-ups are collectables which you can shoot at the Bots, who are going to be pacman ghosts. Dummy's are obstacles that are triggered by hidden traps which block your path, and that the Bots can push around. Everything else I think is clear enough, oh apart from the owls :) ).
So 3 days to do all that, fix any bugs ( I've noticed a couple with the fore-ground plotter ) and shoe horn in any ammends from the client.

This is why I can't give up smoking yet.

Squize.

Sunday, September 14, 2008 3:07:31 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, September 09, 2008
4
A quick little ol' recap of what was done yesterday ( On GMM ).

I designed the first level ( Using the always easy Mappy ) which took quite a while, and I think it's going to need some tweaking. It gets tricky if you leave / enter a screen on the tiles near the rear corner as you really can't see where the hell you are ( Esp. if there's a big tree slap bang in the middle of the screen ).
I'm hoping it's just a case of tweaking it slightly rather than re-doing it as today I'm at the half way point and there's very little time to dive in and re-do a whole level. Speaking of which, I'm going to hold off designing the next 4 levels until all the baddies / traps are in and working as it'll make a big difference.

Having a working level in place also highlighted a bug, where I'd miss-counted the number of tiles before changing screen, so you could walk out of one screen and straight into a wall on another. Not good.

Added some more tiles to the tileset. I think there's a couple more but they're only minor wall variations now.

Biggest job of the day was putting the level exit in there. I had a wealth of sorting issues with it ( It's huge ) and for a while I got that sinking "The depth sorting is screwed" feeling. I had visions of having to chop up this large vector object, which would have taken ages. Luckily I took the easy option and just changed the tiles alignment and that fixed it a treat ( All the "Bigger than one" tiles are aligned so the bottom right ( SE ) tile is aligned to the other normal tiles. With the exit I just altered it to being the back left tile aligned there. It would break if walking down the side of it, but some well placed wall tiles on the map stop that ever happening. Iso is so hard to explain in words, so thanks for fighting your way this far ).
So the exit is displayed, next up was getting it working. The exit is two tiles wide, so I just have to check the players x/y to the two exit x/y positions. Easy. Oh shit, the player needs masking as he walks through the exit door ( Remember the depth sorting is a big fat cheat, he can't really pass beneath tiles correctly ).
Creating a mask and positioning it correctly didn't actually take that long, it was just one of those [ Many during development ] moments of "ffs, I really don't need this".

With the player being able to complete a level now, next up was to do the level complete screen. I didn't actually get any assets for this so I just knocked up something nice and simple using the format for the game complete screen.
With the level complete screen done ( See how it all rolls into one ) it made sense to do the level bumping code, and with that the loading next level stuff.
Right from day 1 the game's been able to load and parse maps, so this was just a case of a couple of extra call backs ( No events in this game ) and figuring a way of showing that the next level was being loaded whilst you bask in the glory of the level complete screen.
Rather than add a spinner or loading bar, the level data is quite small, just over 10k atm, so I just hide the "Play next level" button until it's loaded. Lazy I know, but the majority of people have a nice fat connection these days so the wait will be a couple of seconds at most ( Plus the levels will be buffered internally once loaded, so the pause will only be there the first time you play it ).

Keeping this theme of rolling from one aspect to another, next up was the game complete screen. I just shoved some times and a bit of score in there and it's all but done.
I called it a night before finishing the "Play again?" button, so that's where I'm starting today. Right now infact. So until tomorrow, bye kids.

Squize.

Tuesday, September 09, 2008 11:52:54 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, September 05, 2008
I didn't touch GMM yesterday, so to keep up the constant supply of development highs and lows I thought I'd write up today's instalment whilst it's still fresh.

Today's objective was to be able to move from one screen to another, and joy of joys, you can. It was quite straight forward, took a little while to keep track of all the sets of coords I've got to use ( The local map position, ie the tile at 0,0 on the screen, the local player position within the current screen and the player's position within the whole map ) but nothing too painful. Messed up the re-positioning of the sprite a few times ( You leave the screen at the far right you should be repositioned on the left of the next screen ) but that was where the coords above were just not clicking into place in my head.

Once that was working it needed a quick and simple transition from moving from one screen to another. A quick use of draw(), and a tweened mask and it was all done and works nicely ( Same way as the transitions are done in both Fuel-Factory and Toxic Shock. Grab a bitmap of the current screen, attach a mask to it, run the effect ).

Finally I tried adding the big ass tree tiles. These bad boys took a while, but only 'cause I'd got the keyframe order out of sync ( The tiles are old school, laid out on keyframes like the good old pre-bitmapData days ).
Once that was working they went in there a treat and with no depth sorting issues with the player ( I'll have to be careful where I position the "wall" tiles around them though, as they are huge and it could cause problems, but nothing a little bit of forward thinking won't fix, and a million times easier than splitting the tile up into 32px wide strips ).

And I think that's it. Doesn't sound like much, but it's coming along nicely. Weekend off so Monday will be spent adding the exit to the maze and testing for it, so it should almost be a game then. If by day 5 all the level progression, game over, game complete stuff is done I'll be really happy and bang on target.

Also early next week Olli should be posting about a new complete project that he's been working on for a super sexy huge name client who we're obviously really pleased to be working with.

Squize.

Friday, September 05, 2008 8:49:07 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, September 04, 2008
I did write a great entry, quite possibly the greatest prose ever written, but I / the blog messed up and it was lost.

Instead you'll have to make do with the usual shit quality of writing.

Where did day 2 take me with GMM ( That's it's code name from now on ) ?

I added in all the "surround" tiles. In a usual iso game the playfield is a diamond shape. To fill this up a little and to keep it more inline with the look & feel images I've filled this area in with tiles that will be on other screens ( If that makes sense ). Hint of blur and darkened up a little and it looks pretty damn sweet.

Next up was the player. He's in. He walks. He stops at walls. All good.

After that, the dreaded nasty depth sorting. It's not something I'm usually very good add, I always struggle to get it spot on, so I had a bit of research around how other people do it. I found the way I normally do it, ie depth=mc.x+mc.y*playField.width, and a really nice looking way which calculated the z-depth correctly.
My solution was to do something totally different.
All the tiles have a big healthy gap in their depths so I can drop sprites in-between them without there being any sort of clash of depths ( as2, no depth management here ). The player sprite finds out which tile his on, gets it's depth, and make sure his depth is higher. As simple as that.
When moving the player sprite looks at the next tile and grabs it's depth, so it's always at the correct depth ( I wish I could find a way to explain this without using the word depth so often ). There was a slight issue when moving in directions which would mean the next tile would have a lower depth than the one he's standing on ( ie, moving up, or NE ), that was fixed by only updating his depth halfway through the walk cycle.

It all seems nice and solid so far, and quite simple to do. I'm just hoping it doesn't trip over when there are bigger / taller tiles in there.

Then there was a slight bug with the actual movement. He'd drift off course ever so slightly every move, which meant that after no time at all he'd be quite a way off the tile he was meant to be on. Olli came up with the fix, which is another simple one, the player just finds out which tile he's on when he's finished his walk cycle and then aligns himself to that. Piece of piss.

I think that's it. I'm sure I wrote a lot more first time, but it's never as fun second time around. Today has been spent working on an old project which is like an albatross hanging around my neck, so no new update tomorrow ( I know I've only lasted 2 days, but to be fair I'm not missing a day out as such ). Maybe I'll post some trite eye-candy here to fill the gap.

Squize.

Thursday, September 04, 2008 4:49:38 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, September 03, 2008
I started a new project yesterday so I thought it would be a good time to see how long I can maintain a diary of it's development. It's only got 2 weeks ( 10 working days ) allocated to it, so surely I can write something new and interesting every day for 10 days... well interesting is pushing it a little bit.

Starting a project is always a double edged sword. Cool, it's a new project with all the possibilities that go with it. Shit, it's a new project so I've got to set up all my usual classes for the millionth time.

To touch on things without giving anything away, it's an iso maze game. Before kicking off it was agreed it wouldn't scroll as the dev time is so tight, so it's just going to be a flick screen game like the old greats such as Head over Heels and Knightlore.

Day 1 is setting up classes. This game is going to be done in as2 ( Due to the tight deadline, did I mention that ? ) as although I've fallen for as3 at last, it's still a ball ache for a lot of things.
I've already received all the assets ( All of them. Up front. Amazing ) and there's lots of nested animated movieclips, which as2 does well, and as3 doesn't, so that helped swing me towards as2 for this one.

Hello fdt and mtasc, I've missed you bad boys. Still quicker and better than Flex. Things that are tripping me up though are Void ( It took forever to get used to void, and now going back it's taking just as long ) and _alpha, _x, _y etc. Any property with an _ basically.
It's amazing how quickly I've lost the habit of using those.

Code wise we've got the core classes in place ( Player, GameController, Master ( enterFrame mainloop ) ) and I've ripped the map loading routines from Toxic Shock ( External map files are a million billion times easier to work with ) so the game can load in it's data.
The biggest routine of the day after the LevelHandler is the LevelPlotter. I've only ever done 1 iso game before, Fuel Factory, and I'd forgotton what a pain it is to align the tiles correctly.

By the time I called it a day, we have a title screen ( No instructions button yet, and a missing anim, but almost done ), a swf that loads in it's own data and parses it, the game HUD with working timer and a 10x10 grid of iso tiles plotted. Good start to it, and I'm aiming to hit it hard again today.

Squize.

Wednesday, September 03, 2008 10:10:45 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Monday, August 04, 2008
Alpha is out, now there are just a few things left to do to improve the useability of the editor and wait for the final informations on how the main game should handle custom levels.

Oh and there are just a few levels to enter ... 130 to be honest.

On Friday I had the "more-than-bloody-stupid" idea to enter a few of them. I did 2.

The one that killed 100% of my motivation was a nightmare of force fields all pointing in different directions:
cc_lvl_22.jpg

Believe me when I say looking at this level in full size can make you want to puke.

After some agonizing hours, I finally started to write a file converter that should be able to read in the binary file format of the original game. OH JOY!

This somehow kills the edia of entering the levels and testing them along the way to see if the engine can handle all the weirdness of the original creators (and I still do believe that some of the levels where purely designed to piss the player off as much as possible).

oh well ...

nGFX

Monday, August 04, 2008 7:28:07 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, August 01, 2008
Well here it is, the "Too early to show mix" of Orbs.

No preloader, so stick with it ( About 700k )

I figure this post is more a show and tell as opposed to anything more. There are lots of bugs so I'm not really after reports ( Thanks ), this is very WIP, and I've only really posted it here due to reasons outlined in the post from the other day.

The gameplay will be more refined in the final version, "Campaign" mode will be the primary game type ahead of arcade ( There's not even an option for it yet ), and there are quite a few more baddie types and a lot of love to go into it yet.

A quick spurt of instructions:
Your objective is to protect the Orb. As long as it's got power it can re-generate your ship. WASD or Arrow keys move you around, aim and shoot with the mouse, P to pause.
Some of the options work ( Stats for example, although there are some unfinished ones in there, and a lot more to go in, along with a lot more medals ), but most don't.

It's mainly a case of looking around and watching the particles right now, but they are quite pretty so far.

As I do more work on it I'll flesh the posts out about the tech. side of it as I've gone to quite a bit of effort to get this bad boy running as fast as possible ( Which is sheer bliss. In real life you never have the time to even write the word optimise never mind doing it ) and hopefully development will go onlong in fits and starts like it has since the project started 'til one day it can go free into the world able to stand on it's own two feet.

Enjoy.

Squize.

Friday, August 01, 2008 8:19:41 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [8]  |  Trackback
 Thursday, July 31, 2008
Great day, Geometry Wars2 is out today ( And I've nearly nailed the collision routines in the arkanoid "style" game I'm doing at g5games, but I digress ). Regular readers will know I've been working on Orbs forever now, which is inspired by the GWars look and feel, so I've been keen to check the sequel out ( For the whole week or so since I heard it was coming )

800 points later, and wow. It's sex.

When you shoot a baddie, it drops a geom ( Correct me in the comments if I've given that the wrong name ). When you get close to them, they get sucked towards your ship.

Hmmm, just like the credits I coded the other day in Orbs.

Also there are new things, called "gates" ( Corrections always welcome :) ), where you can shoot them and your bullets rebound to kill baddies. It even keeps track of how many rebound kills you've got.

Hmmm, just like when you shoot the orb and it rebounds and kills a baddie.

Arse. For fear of Orbs coming out and everyone just pointing the finger of copy catness, it's forced my hand ( Yeah the title makes sense now, these posts aren't just thrown together you know ) to release a demo sooner than I'd rather.
Hopefully by Saturday we can have some particle porn up here. I'm just thankful that Bizarre haven't got Pong in the pause mode.

Squize.

Wednesday, July 30, 2008 10:21:16 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Thursday, July 10, 2008
I've been pulling my hair out for about an hour with this beauty, and after finding the solution I thought I should share here, if for no other reason that I know I'll get it again and lose another hour ( I'm 36, my memory is shot ).

When trying to make a new bitmap instance of a bitmap in the library, along the lines of:

        [Embed("/_assets/assets.swf",symbol="bouncerBitmap")]
        private var bouncerBitmap:Class;

        var bm:Bitmap=new bouncerBitmap();

I was getting invalid data when running the swf, basically it was failing big time.

Had a bit of a google and found this. For some beautiful unknown reason, sometimes when you import a png to the library and set the compression to jpg ( Although in this case I actually hadn't, Flash just took it upon itself to make it a jpg for me ) it screws up.

Joy.

Anyway all fixed now, and I've even got this as a reminder for next time.

Squize.

Wednesday, July 09, 2008 10:48:45 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, July 05, 2008
As regular readers will know, we've been done over with a hacked version of "Law of the West". Instead of just bitching about it, we've decided to be pro-active.

This is going to take a number of forms, one of which is SICO, or "Source In, Crap Out".
We looked at what encryption and obfuscator software there is out at there, and came across irrFuscator. It looks pretty cool, and at 69 euros isn't going to to break the bank, but it also looked like it was something we could do ourselves without too much effort.
Where SICO fails compared to irrFuscator is that from what I can tell it takes the whole project and messes it up, so public functions ( And therefore getters / setters ) get screwed with too, whereas our project just takes one file and so has to leave anything which could be called from a different class alone.
Also it converts strings, but it looks costly. Looking at the example on their page, "end" gets converted to irrcrpt(23, "uzd."). That kinda looks like a static class is added to the project with a method called irrcrpt, which takes the first value as the "key", and I guess it's just a simple XOR with the string value.
Fine for scrambling a filename, but I think it would be too harsh [ In performance terms ] to do that to every string in the game, so it's easy enough to just add a method in like that by hand for your filenames / passwords / cheat codes etc.

( In case this reads like I'm just bashing irrFuscator, I'm really not. It's better than SICO, I'm just pointing out the differences ).

So what can our baby do ? Here's the loader class we use for it:

package Classes {  
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import flash.net.URLRequest;
    
    public class IO {

//---------------------------------------------------------------------------------------
// Properties
//---------------------------------------------------------------------------------------
        private var loader:URLLoader;
        private var callBack:Function;
        
//---------------------------------------------------------------------------------------
//Constructor
//---------------------------------------------------------------------------------------
        public function IO(){
/*
Null constructor, we don't need to do anything here
*/

        }

//---------------------------------------------------------------------------------------
// Public
//---------------------------------------------------------------------------------------
        public function toString():String {
            return "IO";
        }        

//---------------------------------------------------------------------------------------
        public function loadScript(filename:String,callBackArg:Function):void{
            callBack=callBackArg;
            
            loader = new URLLoader();
            loader.dataFormat=URLLoaderDataFormat.TEXT;
            loader.addEventListener(Event.COMPLETE, xmlLoaded);

            var request:URLRequest = new URLRequest(filename);
            loader.load(request);
        }

//---------------------------------------------------------------------------------------
// Private
//---------------------------------------------------------------------------------------
        private function xmlLoaded(eventArg:Event):void{
            var source:String=eventArg.target.data;
            callBack(source);
        }

//---------------------------------------------------------------------------------------
    }
}

And here's what it looks like after being run through SICO:

package Classes {  
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import flash.net.URLRequest;
    
    public class IO {

        private var _V64K0q:URLLoader;
        private var _87qjufb1lsM:Function;
        
        public function IO(){
        }

        public function toString():String {
            return "IO";
        }        

        public function loadScript(M85u8En4i:String,_87qjufb1lsMArg:Function):void{
            _87qjufb1lsM=_87qjufb1lsMArg;
            
            _V64K0q = new URLLoader();
            _V64K0q.dataFormat=URLLoaderDataFormat.TEXT;
            _V64K0q.addEventListener(Event.COMPLETE, _v1zr6rD62q);

            var kDu541CN2C5:URLRequest = new URLRequest(M85u8En4i);
            _V64K0q.load(kDu541CN2C5);
        }

        private function _v1zr6rD62q(_wVl6q:Event):void{
            var n1XScOB03y:String=_wVl6q.target.data;
            _87qjufb1lsM(n1XScOB03y);
        }
    }
}

Pretty mashed up. There are still some quirks to it which need ironing out, and it's not got a list of reserved words or anything that cool, but that code is nasty once run through it.

Next we need to actually make some sort of front-end for it, ideally using Air to get to play with that, more possibly with Zinc to make it easier, and then decide what to do with it. It won't ever be for sale, it may be a case of we just give it to friends and let it spread gradually like that, we're not sure yet, but it will be given away. There's no point bitching about hacking, and then coming up with something that makes our stuff safe and screw everyone else.

And that's part 1 ( Or 0.5 ) of our push to try and get the community as a whole being a bit more protected, there is more to come. Olli and I have had some long chats the past couple of days. We both came to the conclusion that yeah, having hacked games floating around sucks, but there are some things which are more acceptable than others.
If LoW had been hacked to use the hi-score component of the system it's been hacked for ( Some "shovelware portal in a box" system ) and everything else had been left intact, then we can swallow that. Just. The game gets spread so the sponsors happy, we get our credit out so it's not too bad for us, the ad gets seen etc. It's not that bad. It's only when the game is just ripped of everything like that we get pissy.

Part of this process of stopping it is to actually get involved with the boards that link these games, for fear of sounding like a politician, it's about education. A lot of sites with hacked games on are run by decent people, just trying to make a couple of quid, and not really knowing about any harm they could be causing 'cause they never ever have any contact with a developer.
Flash games are percieved as such a throw away commidity that the line between IP theft and hosting becomes very blurred. A lot of people who run boards wouldn't dream of hosting mp3's, but see Flash in a totally different light.

We really fucking resent having to spend time on things like this, but if we're in the position of toying with ads and sponsorship as well as the client based work, then we need to protect our IP. Like we all do.

There's more coming,

Squize.

Saturday, July 05, 2008 4:49:49 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Wednesday, July 02, 2008
Sorry folks yet again no image ... but some code :)

The current game (let's call it CC for the sake of it) is getting close to the point where I would declare the main game engine done, most of the events are processed now and the final enemies are going to be done today (hurray!).

As the title suggests (wow it's something post related) I want to write about the dumb ass AI one, nope rather 4 of the enemies in CC use, if you were so bold to call it AI.

While reading up the docs about the original game I read this:

"goes around objects to the left"

And there are 3 more which go around things to the right.

HA!

I first simply ignored the fact of "going around" and just coded a simple "if enemie hits wall turn left".
cc_ai_00.gif
(ok, I lied, there are some images)

So after noticing my mistake I removed the old code and started to write the one that should allow my enemy to move around things. Sounds easy enough.
cc_ai_01.gif
Oh, that's easy.

"Go ahead as long as there is something to the left, if not, turn left ..."

After a while I really lost my temper and just coded something that could deal with right turns as well, by checking 3 tiles + one, as you can see in the next image.
cc_ai_02.gif
Well that is stupid, isn't it?

Jein, it's a dummy approach. (jein is a pseudo German word, combining "ja" and "nein", yes and no).

cc_ai_03.gif
Some of the common situations, the green arrow shows the next direction
and in "D" shows the use of the 4th check.


In order to simplify (though, yet unoptimised) the checking of the tiles I set up an array of points, holding the offset for each of the checks. To make my life even easier I just numbered the directions (which is used all over the game):
0 = north, 1 = east ...

So the array for 0 (north) looks like this:

this._aTest.push( [new Point(0, -1), new Point( -1, -1), new Point( -1, 0), new Point(1, 0)] );

And because this one should move to the left I added a second array that holds the next direction to go to:

this._aDirNext = [3, 0, 1, 2,  1, 2, 3, 0];

(You might wonder why it has eight entries instead of the needed four, I'll come to that later)
I now could just lookup the next direction I need to face by simply checking with the current direction:

this._iDir = this._aDirNext[this._iDir];

Now, with that in place checking the movement was easy:

private function checkMoveBug ():void {
            
    var strTest:String = "";
    var i:uint;
    var xx:int;
    var yy:int;
    
    for (i = 0; i < 4; i++) {
        
        xx = this._pPos.x + this._aTest[this._iDir][i].x;
        yy = this._pPos.y + this._aTest[this._iDir][i].y;
        
        if (this._refChipsGame.getTile(this._refChipsGame.aMapGame[xx][yy][0]).objProperties.bMonster && this._refChipsGame.aMapGame[xx][yy][1] == -1) {
            strTest += "0";
        } else {
            strTest += "1";
        }
        
    }
            
    switch (strTest.substr(0, 3)) {
        case "000":
// "C"
        case "100":
        case "110":
            this._iDir = this._aDirNext[this._iDir]; // turn to the next dir
            break;
        case "111":
// "A"
        case "101":
            if (strTest.charAt(3) == "0") {
                this._iDir = this._aDirNext[this._iDir + 4];
// this one uses the second pair for "A"
            } else {
                this._iDir = this.getOppositeDir(this._iDir); // this one is used vor "D"
            }
            break
        /*
        case "011":
        case "001": // "B"
            these are not needed because we can just move ahead
            (there is something to the left)
            break;
        */

    }
    
}

The final version has the 4th check removed from the loop and just checks it for "111" and "101".

And because we use an array to store the test offsets, we can make the enemy around things to the right by just changing the values (north):

this._aTest.push( [new Point(0, -1), new Point( 1, -1), new Point( 1, 0), new Point(-1, 0)] );

and changing the aDirNext array to face right:

this._aDirNext = [1, 2, 3, 0, 3, 0, 1, 2];

Vioal. Done.

I hope this is quite understandable (the code is, my writing might not)

nGFX




Wednesday, July 02, 2008 8:45:01 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, June 29, 2008
Preloading with Flex for actionscript projects still seems to be really under-documented. Personally I've found it to be a bit of a joke that you've got to search half a dozen sites to find out how it's done, I mean it's preloading, it's what Flash does.

So I thought I'd add "my" approach here. It's what I'm using and seems to work well, it's been cobbled together by reading through the half a dozen websites, so I'm not claiming it's all my code or my idea, it's other peoples code who are clever than me shoved together.

Let's start at the begining,

package {
    import flash.display.DisplayObject;
    import flash.display.Loader;
    import flash.display.LoaderInfo;
    import flash.display.MovieClip;
    import flash.display.StageQuality;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.utils.getDefinitionByName;

    [SWF(width="400", height="600", frameRate="40", backgroundColor="#FFFFFF")]

    public class Preloader extends MovieClip{
//---------------------------------------------------------------------------------------
// Properties
//---------------------------------------------------------------------------------------
        private var logoClass:Class;
        private var logoClassInstance:Object;
        
//---------------------------------------------------------------------------------------
// Constructor
//---------------------------------------------------------------------------------------
        public function Preloader() {
            stop();
            stage.showDefaultContextMenu=false;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.quality=StageQuality.LOW;

            addEventListener(Event.ENTER_FRAME,mainloop);
        }

//---------------------------------------------------------------------------------------
// Private
//---------------------------------------------------------------------------------------
        private function mainloop(e:Event):void{
            if(framesLoaded >= 2){
                nextFrame();
                triggerLogo();
                removeEventListener(Event.ENTER_FRAME,mainloop);
                addEventListener(Event.ENTER_FRAME,mainloop2);
            }            
        }

//---------------------------------------------------------------------------------------
        private function mainloop2(e:Event):void{
            if(framesLoaded == totalFrames){
//It's all loaded, has the logo finished ?
                if(logoClassInstance.animCompletedFlag==true){
                    removeEventListener(Event.ENTER_FRAME,mainloop2);
                    nextFrame();
                    triggerGame();
                }
            }            
        }

//---------------------------------------------------------------------------------------
private function triggerLogo():void{
            logoClass = getDefinitionByName("PreloaderLogo") as Class;
    if(logoClass) {
        logoClassInstance = new logoClass();
        addChild(logoClassInstance as DisplayObject);
    }
}

//---------------------------------------------------------------------------------------
private function triggerGame():void{
            var main:Class = getDefinitionByName("Main") as Class;
    if(main) {
        var app:Object = new main();
        addChild(app as DisplayObject);
             app.waiting();                        //Call the singleton to kick it all off
                logoClassInstance.dispose();
    }
}

//---------------------------------------------------------------------------------------
    }
}

Just to run through this nice and quickly, the preloader extends the MovieClip class as we're using 3 frames for the game ( The actual preloader class, the PreloaderLogo class and the Main one ( Which is the game itself )).
In the constructor we just do all the stage stuff that we want to do ( Hide that menu ), and then run an eventListener ( Mainloop ) which checks to see how much of the overall game has loaded. If frame 2 has loaded it means how logo is loaded, so we can fire that off ( See the trigger logo meth