Microcell Distribution

March 28th, 2010


The images in this post show the successful distribution of space over the network, allowing clients to connect and be assigned a section of the world to process. Currently the framework allows functions for distributing cells to be added when the simulation starts, as additional nodes connect, and/or at regular intervals. These can be managed either by the central server, or initiated by worker nodes themselves. The majority of the remainder of the project involves the algorithms for distributing cells between nodes.

Additionally, the framework now supports both hexagons and quads as cells. Hexagons have the advantage that only 3 cells meet at any corner, limiting the maximum number of nodes which might be involved should an event take place there. Here’s some images of the view from the server with the most basic (block) distribution of cells:

Ada Lovelace Day

March 24th, 2010


Today is Ada Lovelace Day and like 2000 other bloggers across the globe, I’ve pledged to write a post on a woman in technology and/or science. Research has shown that women need female role models and given the disparity between genders in science and technology, at first it can seem like potential candidates are few and far between. On Ada Lovelace Day we hope to highlight numerous women in these fields, both to celebrate their achievements and to encourage others.

While last year many blogs covered technical superstars, this year I’d like to write about someone a little closer to home: my mum, Karin McKendrick. As well as being an insane long distance runner, she’s also a programmer and systems analyst; suffice to say I wouldn’t be where I am today without her influence.

Perhaps surprisingly, my mum originally studied Classics at university. I don’t know when she first started programming (a number of older computers and gaming systems still lurk around our house), but she returned to work after the birth of my brother and I in time to work on Millennium Bug related problems. During her break from employment (not that I think you could class raising children as “taking a break”) she completed Open University degrees in mechatronics and product design. I didn’t see much significance in basing our holidays conveniently at summer school locations as a child, but as a student myself now I really admire and appreciate the commitment that completing self-study courses must involve.

In high school, I guess a lot of the need to encourage women in technical fields confused me (one of the most shocking times was when a particularly intelligent friend suddenly decided she was terrible at maths overnight), because I was never given any reason why my gender should affect my abilities or aims. Now, I feel hugely fortunate to be where I am.

Hope that wasn’t too cheesy!

Microcell Testbed Images

March 20th, 2010


For once I have something visual relating to my honours project, so it seemed appropriate to share a sample here.

A major part of the project involves distributing microcells (fixed areas of the world) between a series of worker nodes both statically and dynamically. In order to test methods of achieving this, I created a small testbed application which simulates the task without networking. It is capable of using various methods to distribute cells, both at the start of the application and as it runs, both controlled by a central server and initiated by worker nodes and gives graphical and numerical feedback.

The images below were taken with a greatly reduced number of cells, and the work involved in processing each cell is artificial: there are no pathfinding characters yet. However hopefully it demonstrates to some extent how division of the world takes place, and allows me to easily test distribution methods before using them in the proper simulation.

Coloured by number of characters per cell.

Initial block distribution.

Random distribution for comparison.

Block distribution with dynamic passing after time.

As the actual application I am working on is written in C#, I used XNA to create the images here. As it is possible to render XNA frames to a windows form application with little difficulty, this is also the approach I will employ for visualising the complete project.

Search For A Star Competition

March 10th, 2010


Shortly before Christmas, students in my class were invited to participate in Aardvark Swift’s Search For A Star, a games related programming competition split over several knock-out rounds.

Although the first round was taking place on the day before an exam, myself and two other students from Abertay took part. This round involved answering ten programming questions: 9 based on the C++ language and a final question focussing more on object oriented design. Continue reading »

Comms Library Progress

February 28th, 2010


Unfortunately my honours project is not particularly visual, so it can be hard to update this blog with my progress when I have nothing I can really show. However, progress is being made. The first component of the project, a communications and network library, was completed almost a week ago.

The most useful thing I can share is the class diagram this was based on. It’s rough, it doesn’t detail methods or member data, and it’s far from beautiful, but perfection is an easy trap to fall into. I thought it was better to have a functioning library and an ugly diagram than a work of art demonstrating a library which I then would have no time to create.

The current phase of the project is far more interesting in my opinion, and thankfully should result in something slightly more visually interesting. It concerns the division of the world, hierarchically, into microcells. This spatial partitioning, and more importantly the assignment of work to specific processors is fast becoming the major focus of the project, and I hope to follow up with more on that topic shortly.

EDIT: I have replaced the original diagram with a still-ugly but slightly more descriptive update (if you actually view it at a decent size, that is). The majority of member data and functions are still missing, but hopefully the few I’ve added will make my intentions slightly clearer.