Sunday, October 30, 2011

Ganked Android Interface


I have not spoken much about Ganked lately, but I have modified the library to use Boost shared pointers for memory management, Boost graph library for path finding algorithms, Boost serialization for map state, and I have created google V8 bindings to the library for use in Node.js .

I have recently started working on the Android interface to the game server. for the QuickAction bar, I used the great code provided by Lorensius in his Blog Post on QuickActions. The great RPG icons for the interface concept are coming from Ails as part of the collection you can find at Ails' Deviant Art RPG Collection.




At the moment, persistence works, you select a location and it gives you the option to change the current item or clear the existing item.




If you choose to change the item, a list of items in your inventory is presented that is appropriate for the given slot.

You are returned to the previous screen with the selected item in the appropriate slot.

Friday, October 14, 2011

Moved to Node.js

It has been quiet for a long time on the game development front. It is a hobby that I do not get to spend much time with, but I have not been completely lazy! I have refined the Ganked library and created bindings for Node.js. I am currently trying to decide how to document the system in terms of a user guide. Look for more soon!

Monday, January 24, 2011

Quick Note on Partitioned Maps


I wanted to add a visual dot graph of the partition space described in my previous post. I hope you enjoy!

New Phase to the Map Processing


I mentioned in my previous post that I had partitioned the map to generate hallways. Next I have begun to tackle the problem of navigation. Taking a 200 x 200 map, that generates 40,000 vertices, each vertex can have an edge with an adjacent vertex. It is easy to see this problem could get big! Finding your way from point A to point B could be very expensive. The map you see above turns out to have 6776 vertices (i.e. X,Y coordinates) with 28,669 edges between those vertices. To try to reduce the problem, I have taken a common approach of creating a navigational mesh. By creating partition spaces, I can reduce the problem set dramatically. It would probably be better if my partitions were of similar size, but I have expanded them as much as I could x and y. I may take a square approach at a later time, but hallways.... "Bleh!" In the picture above, each partition has its own colour. I measure the weight of an edge between two partitions to be the distance from one partitions centre to the centre of an adjacent partition. This reduces the navigation problem to finding the best path from a point within a partition to the edge of an adjacent partition, and a path of partitions. The partition graph in the example above is only 65 vertices (partitions) with 66 edges ( shared sides between partitions). I apologize for the horrible description, but hopefully you found this interesting.

Monday, January 17, 2011

Dynamic Map Generation in Ganked

I have been working on the dynamic map generation for Ganked. I have been prototyping it in python; though, the final implementation will likely live in C++. I currently have 4 phases of map generation:

Phase 1: Using a room placement strategy ( 2 strategies exist at the moment), place the rooms



Phase 2 : I create a navigation map with lines extending from the center of rooms, but terminating just before any other room it may run into. This will form the paths that hallway generation will use to create hallways in later steps.




Phase 3: Using a clustering algorithm based on distance between centers, I cluster the rooms to determine what will be connected to what. Rooms are initially turned into a cluster node and then cluster nodes are clustered into composite nodes based on distances between centers. This continues until there is only one node left in the list. In the graphic above, each clustering is outlined in its own color.



Phase 4: Using a depth first approach to the clustered nodes, begin connecting nodes to each other with a simple A* pathfinding hallway generator with all spaces blocked except those identified in phase 2 (the lines). Now we have hallways connecting all of our rooms!



In future iterations I hope to have hallway "diggers" widen out the hallways based on relationships to room sizes they connect to and potential space they have to dig in.

Tuesday, January 4, 2011

GankWar Lives!

I have started work on GankWars again. My first approach is to revamp the C++ libraries to use boost. I have started, and am almost 80% complete. Next phase will likely be Google V8 bindings. I good friend of mine has joined in on the fun, Brian Watson. Hopefully we can make some headway.

Saturday, May 15, 2010

Workflow added to CAJS

CAJS has been updated on Google code hosting. Would love any peer review and input. The tests could do with, well .. more tests! Suggestions for improvements are welcome, as I am sure it can be improved in many ways.