Bah, so plans never go as planned. This is not the "milestone overcome" sort of post it's supposed to be, but it does tie in with what I'm supposed to do next. And it was getting absurdly overdue.
This last week plus a couple days, I've been focused on fixing the final issues with tpweb so that it could support the tp04 standard. This last "issue", which immenesified the further I attempted to eradicate it, was the order manipulation functionality. As one issue was solved, so another took its place, and the amount of code rewriting that I've done is abundant. However, here are some of the issues that have since impeded me.
Figuring out how the order structure changed was very difficult as I don't know anywhere that listed specifically the new structures, such as submitting a position change order. The nesting seems to have changed, and I'm not sure what the reasoning behind it was. For example, a move order looks like this: [[[0,0,0]]]. Another weird thing is that the code submits dummy orders and then updates those orders once the player has decided on the specifics. The apparent problem with this is if they submit a dummy order and their turn ends before specifying those details, the order is a waste. Another change to the data structure, which took a lot of time and figuring to get correct was the build order, which changed the inner most container to a tuple. It looks like this:
[0, 10, -1, 2, 0, [], [[(1, u'Scout', 100), (2, u'Frigate', 100), (3, u'Battleship', 100)], [[1, 1]]], [0,"A Fleet"]] Null_000 was very helpful in helping me out, and now that I have internet at home, maybe my time can be spent on actual programming and not research.
The cache has been giving me problems again as well since it was converted to a variable that remains in memory as opposed to storing it in a pickled file. There's some sort of issue that's arising between calls to the python backend.
Since the orders have been separated from the objects in cache, it uses a separate id to point to an object's order queue. Both the javascript and python sides had to be thus changed in order to handle this, and it took some effort to harmonize the two coding sets.
In terms of progress, the basic functionality for dealing with orders has been fixed. Again, I'm still having an issue with the cache (something to do with the incompatibility between threads), but it appears that orders can now be sent, updated, and removed. In order to continue working on this cache issue, as well as make some progress on my milestone goals, I'm going to change the schedule a bit. I was slotted to work on implementing the dynamic media capabilities (have the objects retrieve their icons from a repository rather than having their locations hard-coded into the javascript) but I think I'll work on modifying the code to handle multiple order queues that the tp04 standard supports. Since I've been working with queue manipulation for the past week, it should make it somewhat easier to accomplish this within a small time frame. I shall make another blog post in a few days to reflect the progress I've made and get back on schedule, now that I can hole myself in my room for however long I need.
Sunday, June 13, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment