Saturday 20 October 2012

Bu-Bump. Bu-Bump. Bu-Bump.

It's alive interwebs!  It's ALIVE!!!

I realize that doesn't make much sense out of context, so let me backup.

Firstly, I am obligated to tell you that the rumours of my death have been greatly exaggerated.  I had a lot of things to balance as this semester at UVic began:  I moved back to my old house, then into my new one two weeks later, I've been organizing my design project for next semester, and trying to keep up with my coursework.  Unfortunately, I kind of failed that last one, and the last couple weeks have been an un-punctuated cluster-f*#$.

But at last I have emerged from under the oceans of work, and just in time for Jam'oween at UVic.  And of course, with my head above water, I blew the dust off Eclipse, opened up Stratagem, and got back to work.

I have to be honest, it's taken me almost two days to comprehend my old code.  This is partly because of my poor documentation, but also because I was halfway through testing something when I stopped working on it, and there are a number of vestigial and half implemented constructs cluttering up my screen.

But among the disabled print statements and half sarcastic notes to myself, there were two statements just above the parse_order method:


#This is the key.  When you have tested this, the prototype is ready for further design.
#Until then, CODE YOUR ASS OFF!!!!

And I have.  

As of tonight, the parse_order method, the beating heart of the system, can take a series of orders, created from json strings, and execute the operations seamlessly on the board, producing a series of json statements that detail the individual results of the orders as they occurred.  The key part of the engine is running.  

That being said, the server side development is still a ways away from being able to support a client side, and I'm really not sure how to set that up yet.  This weekend's goal is now to create the data structures that go around the game on the server.  This is mostly the player order lists and the single order list that the player lists will combine to form.  There is also the matter of how the board will be stored and sent to the client for viewing, but that shouldn't be too difficult.  Hopefully I will be able to leave the jam with a ruby server side for a prototype version and a javascript program that can send and receive a json string, in at least a primitive fashion.  If I have an awesome weekend, I'd like to be able to print the board and list the turn results.  Orders can be done in text form for now.

But the first thing to do tomorrow is something my colleagues have been asking for for quite a while.  I will at last be throwing the code onto github.  This is partly as a source control and management aide to myself, but also to allow me to start showing off the early prototype, and getting some feedback on the technical side.  All I want to do first is clean up and comment the existing code base for newcomers, and myself the next time I go a month without working on this.  

Of course, all of that will be difficult to do without sleep, so goodbye for now.  I'll talk more about the system after the jam when the code is up.  

Oh one quick piece of advice:  If you ever find yourself writing a note to yourself tell yourself to "code your ass off,"  be specific as to what it is you want this coding to be on.  Otherwise you wind up looking at a spline editor/interpolator and a link layer protocol for two sleepless weeks.

Man it's good to be back.