Thursday, December 30, 2010

Path finding

Path finding is a very important part of any rts, so I wanted to get that done early.

Been working on path finding yesterday and today, and have got it working. Units in the game now go around water, cliffs, and buildings. and try to avoid other stationary units.

First I went with a classic grid based A-Star path finding system. I then setup 3 layers of costs so they could be updated independently: Map, buildings, and units. with a value of -1 meaning it's uncrossable.

My first implementation run in 21 secs, but with a bit of work and a lot optimisations I got it down to 38 ms for a big map, and long distance path. Would still like to get it faster but.

Grid based path:

I worked out a nice way to make the grid based path better is to running it though an A-star again but this time treating each point as a node, and letting the connections be made as lines. Not sure if this is the best way or if any one else has though of it before.

Doing that I get:

Which is a lot nicer. It is still a bit slow doing long distances, as it has do lots of line to square collision checks, but I think I can fix that.

Tuesday, December 28, 2010


I released the full version of box fox!! Will be adding more maps and element to it in future.

Have done some random work on the RTS,

-Cleaned up a lot and made the controls nicer
-Have created stationary turrets
-Have started some the AI, it currently works out where to put a base, and builds up, but doesn't attack yet.

I decided that the AI is going to be very spatial based. it will mark out areas for it's base, areas that need more defence, areas that do lots of damage to the enemy, and areas that it takes heavy losses and should avoid.

The multiplayer is going to be done using the classic lock-step method (where all orders are queued, and run in sync), that way it works well on slower mobile connections, and handle lag better if done right. I feel supporting saving and loading multiplayer games at some stage is necessary due to the game being on a mobile phone, so I'm going to have to write code to resynchronize games. I'm also not sure how well mobile phone CPUs match with floating point maths so I may be forced to write that resynchronizing code anyway.

Monday, December 20, 2010

Very close now

Very close now to meeting my self set targets for the full version of box fox.

Just did a christmas snow map yesterday:

Thursday, December 16, 2010


Getting close to having a full version of box fox complete, but done a bit of work on an rts for my next android project.

It's still very early days and I haven't put much time into it yet but it's close to being playable, the touch interface, orders, waypoints, constructing buildings, training units, money, attacking units, teams, etc are all working in it's basic form, so it shouldn't be long till I have something playable.

Wednesday, December 15, 2010

First post :p

I've decided to start a development blog for some of the games I've been working on...

Been working on getting a full version of the android game 'Box Fox' done, made quite a few new elements and puzzles now, including remote controlled cars, mirrors, lasers :)

Here is a screenshot of the lasers in a new puzzle.

I have also started developing android RTS, going to work on adding some A* pathfinding, and AI soon.