Instantly distracted

So I haven’t worked on Platformer (directly) in a couple days. Spent the past several days working on a C# networking library (something like the basics of Twisted for handling TCP and UDP sockets in an event-based way, so I don’t have to think about threading.) ┬áThe plan is ultimately to make a fancy-pants networked debug console for Platformer or other future games.

It’s a somewhat vague idea, but the general concept is that the game could expose a tree of objects with associated properties and commands. The console would be a separate process that connects and lets you browse the tree, view and edit properties, execute commands, and present the game’s log. This would be a more comprehensive version of the debug menu that’s present in Platformer right now, and would allow me to have a richer UI like sliders, color pickers, etc.

Wow, that sounds completely vague and tangential. Way to get distracted, self.

Projects & Tests :(

Agh, not enough time to work on platformer recently.

I did get a little time to implement a prototype of a throwing knife weapon, which is interesting, but I still need to add some actual enemies and gameplay.

Also, I messed around with the scripting language, doing some completely unnecessary (but fun) work like control-flow graph optimizations and peephole optimizations. Some graphs follow:

Before optimization (notice jump-to-jumps) and some slightly redundant bytecode:

output_beforedot1

Before

After:

After

After

There’s some weirdness still, like right now the STVAR (store variable) opcode doesn’t actually eat the top-of-stack because it results in less instructions for a naive code generator to support things like A = B = C, but now that there’s peephole support I’ll probably change it to be more reasonable — the codegen can just emit DUP, STVAR to support that, all statements will be suffixed with a POP, and I can add a peephole rule to change that to just STVAR for the common case.

There’s also a bunch of things that it still doesn’t support, like right now it doesn’t actually assemble the basic block graph into linear code yet because I haven’t thought of a smart way to choose how to order blocks so it can take advantage of fallthrough and not need a JMP at the end of every basic block, or a JT <ifTrue>, JMP <ifFalse>.

It also doesn’t do anything really fun like variable liveness analysis, common subexpression elimination, or code motion; it’s also a stack based architecture so there’s no register allocation to be done. Maybe I’ll spin this into a separate project to write a JIT or something, so I can actually get a game done while also satisfying my bizarre compiler desires.

void SHilbert::Update(float delta) {

Okay, so the semester started again and now I don’t have as much free time anymore. Which is not great, because when I had free time over winter break I didn’t get much of anything done. Current project statuses follow:

PLATFORMER.

I didn’t work much on this over the break. My laptop is running Linux now because the poor thing is dying and somehow it seems to work alright with Ubuntu (as in, it only freezes intermittently, as opposed to Windows which can’t get through the installer without bluescreening.) So, being that I was away for the majority of my break, and thus using my laptop, which runs Linux, I didn’t get much done on a game that uses XNA. I have done a little more design work but it’s mostly on the silly kinds of details I worry about that noone else is interested in. I’m hoping that eventually I’ll get to a point where I can release a demo (or at least a video) every month or two of the progress, it’ll depend on how classes go.

PORTAL TURRET.

Not a whole lot since the last update. I have some more details worked out for motor control but it’s still all basically resting on fabricating the body at this point. I am going to talk to someone at NCSU about using the school of design’s CNC router to do this. I am also still unsure about how the thing should be controlled – complete autonomy is sort of boring, and adding a proper remote control unit would be a giant pain because I’m not that great at electronics. Besides that, the rest of it is just details, hopefully.

SHILSCRIPT++

I got some work done on this over the break. I’m working on static checking for expressions right now. Basically I need to clean up the classes used for types and implement some kind of overload resolution function. I haven’t implemented overloads yet, as expression static checking isn’t even done yet, but the C# spec defines the available builtin operators in terms of function overloads, and that seems like a clean way to do it. Hopefully I’ll get to codegen sometime this century. Other things that are outstanding are storing location information on AST nodes for error messages with actual locations, and adding memory tracking so I can make sure there aren’t any leaks.

So, that’s the project status. I am feeling kind of crappy recently because I haven’t gotten much of anything done and I feel like I’m atrophying just sitting here not coding anything. Usually when that happens I open up SS++ a little or think about tinkering with FE or low-level rendering, but never get around to it.

HOLIDAY STUFF

I got to see Tim while I was in California. He’s pretty much always up to something and this time was no exception. Here is a brief list of things we did:

  • Spent forever trying to get Defcon netplay to work on a hotel wireless network. Once we finally did get it to work we found out my laptop hard freezes a few minutes into the Defcon stage, so that was kind of lame. Next time I am going to just bring a wired switch so I don’t have to start considering scavenging a hotel ethernet cable to make a crossover cable. Oh, and get a new laptop that isn’t subtly broken.
  • Watched Tim do some parkour crap in public places. I am pretty sure somewhere there is a little kid jumping off his roof because he saw a little Asian man do it at the park.
  • Walked around in downtown Pasadena while everyone was sitting on the roadside claiming spots for the Rose Parade. We were looking for some bizarre kind of shoes Tim wanted but the closest he could find were freeking expensive.
  • Played Megaman X ‘together’ by exchanging the controller. I totally beat Sigma on the first try. I wasn’t so hot at Mega Man X2, though, I had to actually use the boss’s weaknesses against them. :(

The whole thing made me really want to work on FE more, despite already having too many projects and not getting any work done on any of them.

Also, apparently captchas (or the captcha I added) aren’t good enough for comment spam protection, let alone trackback spa protection. I am really getting tired of this.

How to make a NEXT GEN CONSOLE TITLE

STEP ONE: Create your characters. You can choose from a wide range of possibilities, such as muscley guy in the military, or the other extreme, muscley guy who is a mercenary.
STEP TWO: Choose their heads. Flip coin to decide of head is shaved.
STEP THREE: Attach form-fitting futuristic body armor. This step is extremely important!
STEP FOUR: Profit! (Unless you’re Silicon Knights, in which case: Lawsuit!)