Saturday, 10 December 2011

More AI stuff

 Here the AI is building a village in an ideal location: lots of wood and stone. It takes ages to test this sort of stuff!

Sunday, 27 November 2011

Transparent intentions

I've added a nice transparenty effect for buildings which have been ordered but haven't been built yet. I've also added a tea-stall for hungry or thirsty serfs.

Sunday, 20 November 2011

4K Frolics

I love the annual 4K competition, it's a chance to break every rule in the coder's rulebook!
This year I've (predictably) ripped off a major game;

Phew, now that's out of my system I can get back to my serfs!

Sunday, 13 November 2011

One year old today!

It's been a whole year since I started on this game. I'm quite pleased with the direction it's taken but there still seems to be a huge amount of work to do - I just hope it won't take another year to get it all finished! Still, if it's worth doing it's worth doing well I suppose.
My serfs were unusually thoughtful and in the picture you can see young Dicken Wildhouse bringing me a cake with icing and a candle and everything! Aww, bless their little faces!

Tuesday, 8 November 2011

Baby's first village

There's a certain satisfaction in building villages. Three serfs is the minimum required as it'd take one serf a while to chop all that wood and hew all that stone. I have a farm, a mill and a baker, and with the food produced I can use the house to make new serfs. Once I've built iron and coal mines I can build an armoury and start recruiting my army.

Tuesday, 1 November 2011

Fried eggs with Holly Cowrider

All of the serfs have unique generated names now - Holly Cowrider is one of my favourites and I can't help feeling sorry for poor old Dumpy Stumpfoot. On the down side, for MP testing I'm having to have 2 or more clients running simultaneously which is getting my CPU hot enough to fry eggs. I've put in some bigger case fans and a CPU temperature monitor but even so, looks like it's short test sessions only unless I can get hold of a better graphics card.

Friday, 28 October 2011

1000 loyal followers

Well, 688 actually but I got bored of pressing the spawn-a-serf cheat key! Even with all 688 pathing at once (which would almost never normally happen) the server only takes 5% of the CPU - not too shabby!

Tuesday, 18 October 2011

Community spirit

These 5 villages are all sharing labour between them depending on when the harvest is ready. Paths form automatically when the serfs use a route frequently and eventually (as in the village centres) paths become roads.
I've completely refactored the server (thank goodness for OOD!) so it runs more smoothly independent of the number of players logged on, and can be configured to run in real time. Though there's no theoretical limit on the maximum number of players, in reality a server on run-of-the-mill machine will start to chug a bit with more than 32 players. For the meantime I've limited it to 16 just to stay on the safe side.
In other news the armoury is now available to produce bows and swords and houses take food and produce new recruits for your armies.

Monday, 10 October 2011

The Isle of the Wonky Wise

I still haven't got those walls quite right...
On the plus side the economy's (nearly) working!

Saturday, 1 October 2011

Gone Fishing

I'm tinkering with the economy at the moment - what will happen to those fish?

Tuesday, 20 September 2011


I realised it would be quite inexpensive to add a minimap, so I did.
Off in the distance you can see the town walls I'm working on, but they're not quite ready to show you yet!

Tuesday, 13 September 2011

Texture blending

I finally bit the bullet and did the texture blending. It didn't turn out to be quite as tricky as I thought it would be so I added a nicely graduated, time-of-day-based sky texture as well.

Wednesday, 7 September 2011

1000 gold pieces!

I found a serious gold mine and got rich! Now I can afford a serious army!
Actually this could only happen in sandbox mode - no-one's going to let me get so wealthy if there's any competition.

Tuesday, 6 September 2011

Oh, I do like to be beside the seaside!

Lots of new items and buildings! Windmill, iron smelter, coal, iron and gold mines, bakery, mint and a quarry have all been added along with their corresponding items.

Tuesday, 30 August 2011


Trying to be too clever is never a good idea! I managed to break loads of things and I've only just got everything back to normal. The good news is that I found a nice new font.

Tuesday, 23 August 2011

Nobbled Goblins

These goblins have just emerged from their lair to find that the potential for pillaging is low. I haven't worked out if some units can swim or not. I suppose it makes sense... ...maybe later.

Wednesday, 10 August 2011

New building - forester

Wood is now a resource so a forester is needed for those times when you've denuded the landscape. Here's a time-lapse video of a forester in action.

Friday, 5 August 2011

Nobblings by goblins

Roving bands of goblins can really spoil your day if you don't have a bodyguard.

Sunday, 31 July 2011

Boats and roads

I decided to make the shipyards just keep making ships, but not as fast as in this video.
You can now place roads by dragging from one place to another, which is much more intuitive, but it's not quite perfect yet...

Tuesday, 26 July 2011

Splash Damage

Cannon now cause splash damage to all nearby units and buildings so beware of mixing melee attacks and cannon or you might end up trashing your own troops!
I'm sure I've said before that the hardest bit about this dev lark is the testing. If there's a 10% chance of a cannon hitting at long range and a 10% chance of a neighbouring building catching fire then there's a long wait to check it works correctly.
In this vid I cheated and made it 100% probability that the buildings would burn.

Monday, 18 July 2011

New building - shipwright

I haven't quite decided how the shipwrights work yet. Maybe they'll just keep making ships or maybe you'll have to make a request to build one.

Sunday, 17 July 2011


I've been a bit sidetracked by this idea of making short videos of local walks just using an ordinary camera and freeware and tying the photos together to make a sort of google 'path-view'. There wasn't any freeware which could do it so I had to write some. Here's a test run with some test photos a friend took. If you want the software just let me know. (It's in java, of course).

PS sorry about the ads on the vid - it's price you have to pay for free music!

Friday, 8 July 2011

Struck by lightning

Rare footage of a lightning strike. Well, two lightning strikes. I just missed the one that set light to the farm!

Thursday, 7 July 2011

Thief testing

If you leave your forts unattended then the AI might send a thief to try and capture it. Ideally forts should be manned with either archers or a cannon.

Tuesday, 5 July 2011

Normal service will be resumed as soon as possible #2

Events, my dear boy, events...

Don't worry folks, I'm still on the case!

Friday, 24 June 2011

Zimmerman's Trench

Zimmerman's trench is the gulf that lies just after the effort and just before the result. Suddenly a whole valley filled with 'things no yet done' opens up at your feet. Ulp. Still 'testing times', as they say.
I'm currently trying to balance the units' strengths and also make fights look more credible. Some way to go yet, I think!

Saturday, 18 June 2011


I put cliffs in and found this promontory which (when manned with cannon) is unassailable - a good place for headquarters. Especially now I've fixed the 'cannons don't shoot ships' bug...
Possible new unit: rocketeer. Very expensive for only one shot but - Boom! - it makes the unassailable assailable.

Friday, 10 June 2011

Charge of the Dark Brigade

Shocking what a few cannon can do to a rabble...

Thursday, 2 June 2011

More farms

Currently I'm tweaking the LOD bits to try and bump up the frame rate. Meanwhile here's a time-lapse of farms working on into the night.

Monday, 30 May 2011

Working farms

Here's a vid of farms in action (I've yet to do the serfs' planting/harvesting animations). The more land farmed, the more recruits produced. New recruits walk to the nearest barracks and whoever owns it can then use them to make new troops.
I must work out why some serfs just disappear rather than walk into the buildings.

Thursday, 26 May 2011

Serfs and turf

Serfs hard at work in a tiny Ozzy empire.

Monday, 23 May 2011

Serfs and roads

The serfs are the ones who do all the work (except fighting!). You don't have any direct control over serfs, they automatically do any required jobs of farming, mining, carrying &c.
Also shown is the new road system. I'm not entirely happy with the texture but the roads do link together well.

Saturday, 21 May 2011

Normal service will be resumed as soon as possible.

In the meantime here is some music;

Edit: It has been pointed out to me that this music could be associated with fascism and nazism. Well, nuts to that. Wagner was indeed a nationalistic bastard but having said that, Mozart was an irritating tit and Schubert was a mushroom (trés sophisticated musical reference there!)
Hey, give me a break - I just like good music!

Monday, 16 May 2011

The King is dead. Long live the King!

After downloading a few more free 3D models and messing them about I've finally got a new 8-way graphic for the king.

Friday, 13 May 2011

Flags of all nations

There are now 16 tribes, 12 of which have rather familiar flags...

Tuesday, 10 May 2011

Primitive villages

I've re-worked some of the models to give the natives a more bronze-age look.

Saturday, 7 May 2011

All at sea

Ships add a whole new dimension to exploring. Once I found two huge seas joined by a canal so convenient that it seemed almost man-made...

Thursday, 5 May 2011

Messing about on the water

First attempt at ships. There's still a few glitches and I haven't even thought about naval warfare yet!

Wednesday, 4 May 2011

Those blue remembered hills

I've tampered with the terrain system to give a much wider variety of zones. There are now island-dotted seas, large fertile valleys, moorland, rocky plateaus and mountain ranges like the one pictured.
The sight of a chest on a lonely island has set me off working on ships. More to follow!

Sunday, 1 May 2011

Back to building

Now the server's humming nicely, I'm going back to looking at the building system like wot my fans demanded.
Now's the time if I'm going to make any major changes so I'm doing a lot of feasibility tests to see what I can and can't do...

Tuesday, 26 April 2011

Move along there, move along, there's nothing to see...

Still thrashing out the server side of things (eg, you can now ban or kick players) so no pretty pictures to show you ATM. Keep checking though, I'll keep you posted!

Friday, 22 April 2011

Spaghetti Bolocscodi

*pant, pant* Finally managed to get the lobby system functional after much hair-pulling-out. At one point I actually had 5 IDEs all open at once trying to tie everything together. It works like this;
The player goes to the log-in page and is directed to a lobby applet. From here he can choose to join a game or start a game. If he starts a game a new game server is downloaded onto his machine and fired up, informing the central server as it does so. Now the player's machine has become a server, it appears in the central server game list and other players can connect to it by choosing to join the game from the lobby applet. If they do this, the client applet is downloaded from the central server and connects to the game server. Simple, no? *cough*
Fortunately the game server is very CPU light, so a player can both host a game and play in it without any problems.

Monday, 18 April 2011

New server under test

Phew! The new server is now up and running and I'm currently combing through it looking for gotchas. It's much simpler than the last version, a whole lot faster and it uses less memory. So far, so good!

Saturday, 16 April 2011

Garbling with TCP

I'm still plodding along with the new server and tinkering with the landscape meantimes. I'm pretty happy with what I've got so far; a good variation in terrain with some nice scenery - like the valley pictured which I'm using as the new spawn location.
The new server will be TCP/IP+disc based rather than HTTP+DB, so it should be an awful lot faster.

Wednesday, 13 April 2011

More terraforming

Given that I have to re-jig the server anyway, I'm restructuring the landscape generation code. While I'm at it I'm giving the landscape a bit more variation. To help me out I've knocked together a 'satellite camera' *ahem* for a good overview. In the game each of those squares is 320 meters across, so this part of the map is about 6km by 4km. What I'm looking for is a good mix of farmland, moors, mountains and seas, with plenty of interesting islands. Memo to self: Must add ships!

The moor the merrier!

I got tired of depressing test results - I guess I'm going to have to rethink the server - so to perk myself up I added some moorland. Farms on moorland are much less efficient than lowland farms, so there's a trade-off between building in the lowlands for good productivity or building in the highlands for a good defensive position. I also realised I could do some cheap texture smoothing which has reduced (a bit) the jagged edges between landscape textures.

Sunday, 10 April 2011

Further closed test results

Hum. It's looking like my current server setup is not going to work very well in the real world. It's OK for testing and fortunately I carefully kept the server logic separate from the network code so its not too hard to migrate to another solution.
The two major problems I've found are;
Latency - varies from 300ms to 20000ms. Yup, you read that right, a 20 second delay in the worst case. It only happened once or twice but that's still way too often.
Data integrity - occasional random losses of data. Never happens on the dev server, but occasionally on the deployment server a building or two will just vanish without reason. This only happens when there are no players logged on so it's not super serious, but it bodes ill.
The latency issue is the one that annoys me most. I can understand the server taking a few seconds to initially deploy itself, but a constant latency of 10-20secs? What the hell are they doing with my data? Bouncing it off Uranus or something? (mutter, grumble).

Thursday, 7 April 2011

First closed test results

OK, we just finished the first closed test and it was an spectacular success, though not quite in the way I was expecting...
First off, the server crashed with a totally inexplicable NPE just before the test - not a good omen! I stuck a band-aid over the place and restarted the server. No further problems.
My co-tester, Mick, was half a mile away on a linux machine, I was using XP.
We started the test and all went well. We could both see each others units moving around. Though the ping was really bad (~500ms) the game was designed with this in mind and still ran smoothly. On to testing the chat system. Press 't', type chat and press enter. Flawless. Then disaster struck! Mick forgot to press 't' before typing a message. Unfortunately I'd forgotten to disable the hot-keys I use for testing, so when Mick hit the 'n' key a new enemy village began spawning right next to us and started attacking us. Despite using another hot-key to instantly spawn units we both ran out of gold pretty quickly and had to fight hard to keep them off. Then some bears attacked. Mick fled with his 6 remaining archers - straight into the path of another enemy's cavalry troop who'd come over to investigate. Doomed! I wish I'd videoed it now, it was very entertaining!
There's plenty of flaws in the thing still, (the most annoying is the way it gives you an extra king every time you log on) but overall I'm pretty pleased. It seems stable and playable.
My biggest worry was the quota usage. Setting up and running the test used a whopping 6% of my daily bandwidth quota. Admittedly most of that was the repeated ~5MB download of LWJGL, the game and its resources. This a problem which client side caching should much reduce when I enable it.
My CPU usage was 3% of daily quota for a fairly short test. This is a much bigger problem to fix. There's a lot going on in the game so it needs a lot of CPU, but I'm not going to worry too much. I wrote the code for clarity rather than efficiency so I'm sure there's a lot of optimising I can do. If I really have to I can buy more quota anyway. Let's hope it gets that popular!

Tuesday, 5 April 2011

New enemy placement

In addition to the villages (mentioned in this post) I've added hamlets like the one shown here. I did this because villages are pretty tough to beat, but you can beat a hamlet with just two units - if you're careful!

Sunday, 3 April 2011

Oy! Referee!

Just like in real wars, there's a referee that tries to break it up when things start to get rough. And just like in real wars both sides turn on him and obliterate him before going back to killing each other.
Only kidding! Referees can't actually do anything except move around. They're there so players know that a moderator is keeping an eye on them. They're also very useful for checking AI behaviour without getting attacked!

Wednesday, 30 March 2011

Bearing up

Another minor glitch on the server caused this cave to spawn bears like there was no tomorrow - which there wasn't for the bears.
Trivia aside, the server's looking pretty robust. A little more local testing and then on to the closed live tests, and after that - at last - Playtesting! Are you ready folks?
The music is courtesy of NoSoapRadio some of which I'm thinking of using in the game.

Sunday, 27 March 2011

FP view and compass

I've put in an optional first-person view. It's not very useful for battles but it does make exploring much more exciting! I've also added a compass (not that easy to see in the video - it's just above the bottom panel).

Friday, 25 March 2011

Invisible Zombie Ghosts!

OK, so my archers are attacked by a bear, which they kill, but then it's the Attack of the Invisible Zombie Ghosts! The archers keep dying even though nothing can be seen. Cree-py! Anyone who says this is just a bug on the server needs to open their minds to the realms of the supernatural! o_O

Wednesday, 23 March 2011

Civil war

Though it doesn't look like they're being very civil!
The server is much cleaner now, so to test it I planted loads of enemy villages close to each other to see what happened. Instant carnage! Everything seems to be holding up under the strain, but look at that frame rate - ouch! Still playable though (just). More optimisation called for, I wist.

Tuesday, 22 March 2011

Normal service will be resumed as soon as possible

I'm doing a pretty major re-factoring of the server, so I'm taking my time - I don't want to swap one load of problems for another!
In the meantime here is some music...

Friday, 18 March 2011

You couldn't see far for paste...

Been called away on decorating duty so little new to report - seems pretty calm in SMW2 land also, though I notice those pesky bears have nibbled away at my archers while I was wasn't looking...

Wednesday, 16 March 2011


Sorry for the no posts, I've had trouble with my ISP, but I *think* I'm good now. Every so often they mess me around so I have to spend hours on the phone to them, then they deluxe my service just when I've sworn to ditch them. Almost like being married!
Having no interwebs is an uncomfortable experience. It makes you realise just how dependent on it you really are...

Saturday, 12 March 2011

Cursory inspections

One very apparent problem which emerged from the battle tests was that selecting and directing units wasn't very easy, so today I've been looking at improving that. Now there are contextual cursors (see the hand over the cavalry in the picture?) and you can select a unit by clicking on any of its soldiers instead of just on their banner. Lots easier, and now means you can attack animals - you couldn't before because they don't have a banner...

Friday, 11 March 2011

Battle testing

In this battle test the plan was to push forward the infantry backed by the archers, then flank the enemy archers with my cavalry while they're busy with my infantry.
That was the plan...
All my infantry bunched up! I'm being attacked by bears! My archers have just wandered off somewhere! Oops, erm...
This is useful stuff as it shows up problems with the control system and the AI, but to restore my battered pride I made another attempt against a *cough* slightly smaller foe;
Whew! Total annihilation of the enemy. This control system needs some serious work though, as does the camera. I'm also not quite sure why my cavalry do a triumphalist lap of the enemy king before they kill him. Cute though.

Wednesday, 9 March 2011

When three tribes go to war

Lots of under-the-bonnet work today. I've shortened the night and made it rain a bit less. The weather system seems pretty solid now!
Mostly though I've been fixing it for players to be able to choose their allegiance from 'Empire', 'Republic' or 'Anarchist'. I'm not completely happy with these - any suggestions anyone?
As things stand you can change allegiance by logging out and logging back in with a different allegiance - I don't think I've thought through the full possible consequences of this...

Tuesday, 8 March 2011

A hard rain's gonna fall

Theoretically it's only supposed to rain 25% of the time on average, but it seems like every time I log in it's heaving it down! Seems like it's dark a lot of the time as well - I think I'm going to make the nights shorter...


Sorry for the late posting but testing the weather system is a pain - it takes ages. Worse still, because it's a chaotic system you never know when it'll rain or be sunny - this the first out of five time-lapse vids where it didn't either rain constantly or not rain at all!

Saturday, 5 March 2011

Where is my mind?

OK, I swore I wasn't going to use fogging when I started on this game because it's so often used as a cheap device to hide the edges of the map and I wanted to be different. I've changed my mind and now I totally like it - it really adds atmosphere (as it were) and edge - the mist gets thicker and suddenly you're thinking: "Where was that village again?"

Thursday, 3 March 2011

Rain stopped play

Can't really do much in this weather...
(Actually this is just a mock-up. I'm still pondering the implementation!)

OK, I'm really getting quite wet now, and I can't see much either!
I very much like this - you've just made your plan of attack and got your troops positioned when suddenly  - wham - rainstorm! Can't see a bloody thing!
I wonder if I can make this happen...

Wednesday, 2 March 2011

Things you'll never see in the game #3

Floating chests. I reckon I'm going to have to rethink the terraforming aspect of the game...

Monday, 28 February 2011

And the green grass grew all around

Experimenting with what I call 'fluff' today. There's probably a proper name for it but I don't know it. That's stuff like the grass in the picture - it has no effect on the gameplay but it makes the game look prettier.
And yes, that is a dead bear over there. It attacked me first! It was self-defence, honest!

Friday, 25 February 2011

Don't look now...

...cos there's blood everywhere! I'm sooo tempted to try and make it trickle downhill and turn the rivers red (like in the history books) but I think that might affect my ESRB rating.

Wednesday, 23 February 2011

More baddy baiting

It would be nice to have a taunt button. I can almost hear the bloke in the tower yelling: "You empty headed animal food trough wiper! I fart in your general direction. Your mother was a hamster and your father smelt of elderberries!"

Monday, 21 February 2011

Baddy baiting

Here's where two players can easily take out an enemy - one player draws the troops out of the village and the second player can swoop in and kill their king!
This vid also shows an issue I haven't resolved yet; at about 18 secs the camera dips below the ground and you can see water underneath. I don't much like this but I also don't much like any of the alternatives (like zooming or blocking the camera movement).
What's the best solution for this? Or shall I just leave it as it is?

Friday, 18 February 2011

House to house

Still fettling the combat system. Currently my units have an alarming habit of staring into space when they're supposed to be busy slaughtering. Idle gits.

Thursday, 17 February 2011


First really big battle! Just archers & it's pretty hard to control the troops ATM - I'll have to work on that.

Monday, 14 February 2011

All aboard the SMW express!

It turns out the game was doing an expensive visibility check on the unit labels - most of which were too small to read anyway. I limited unit labels to a readable range only and voila! 10 extra fps. I bet there's loads of gotchas like that lurking in the code... Now, where's my shrimping net?

Sunday, 13 February 2011

On the slow train...

Once I start piling stuff in the framerate starts to tumble. 14 FPS for such a simple scene? It could well be optimisation time.

Friday, 11 February 2011

Rich invaders

An AI king spends a bit of money on a new village. Those arrows the archers fired killed my (carelessly unprotected) king. Good thing I haven't done the 'Game Over' bit yet...

Tuesday, 8 February 2011


These squares (rather unromantically called 'buckets') are how the server tells which units to check against which. Each bucket holds a list of units so the server need only check adjacent buckets to look for enemies. I had them displayed to check that caves were working properly (they weren't). By coincidence a bad cave thing emerged and attacked my archers just as I was taking this screenshot.

Monday, 7 February 2011

Catapults it is!

Thanks to all of you who voted - it's a deafening 'no' to modern warfare. SMW2 will be staying firmly in the middle ages. I shall have to start building knights and catapults...
In other news, I'm working on unit balancing. As things stand, archers are almost unbeatable!

Saturday, 5 February 2011

The long and winding road

I think I've finally got pathing cracked (the hard bit's keeping data concurrency across a low-latency network).
Keep voting on the C21 idea I mentioned in my previous post - I'll count all the votes up on Monday and obey the will of the people - so vote now!

Thursday, 3 February 2011

SMW2 goes C21?

I've been seriously thinking about bringing SMW into the 21st century. Guns, tanks, planes, mines, all that sort of thing. I reason thusly: Vehicles are much easier to build and manage than troop formations and there aren't many medieval vehicles to play with. I can get a wider range of structures to play with, like gun turrets, force walls &c. I also get a wider range of weapons... I'm very tempted!
What do you think? Guns and bombs or arrows and catapults?
Give an 'I like it' response if you like the idea of going modern (or leave a comment). I'm still on the path-finding code so I don't have to decide just yet.

Monday, 31 January 2011

Sitting on the dock of the bay...

...wasting time. I love Otis Redding. Anyway, the worst thing about developing this game is the waiting. Will bad things come out of that cave? Will they attack me? Will I win? (winning is pretty unlikely with just a king).
So why am I waiting for bad things during the day when they come out at night? Actually, it is night-time, I've turned on the dev lighting so I can see properly.

Saturday, 29 January 2011

Things you'll never see in the game #2

Lighting test. Seems to be handling 100+ lights with no problems.
Something you will see in the game is caves;
Bad things come out of caves - especially at night, so don't build near them! Unless you can be bothered to block them off...