Compiling: (UN)Check!

Retasking an existing OOP oriented code base is like playing Jenga. You pull one block out, and no matter how careful you are when you pull the block out there’s always going to be the chance that there’s other blocks weighting themselves fully onto it. Crash.

When approaching the job of modifying the Portal2 code to become  Dear Esther I decided at first to go with the option of removing the preprocessor commands that specified that I was building the Portal2 specific game dlls (server and client). This was akin to approaching a game of Jenga by knocking the whole tower down and rebuilding it. Jenga in reverse… Maybe ‘pick up sticks’ is a better childhood game related analogy to use.

I was faced with over 300 linker errors where files were demanding that the portal2 files be located (and low level objects at that) I shifted my tact to pulling thing out bit by bit and leaving the preprocessor commands in. 300 linker errors isn’t 300 linker errors. Each file you remove will often cause another file/s to scream out with it’s own linker error demanding you locate the file you just removed… And you go on like this until you can either negate the screaming (with hacky macros oh joy!) or the screaming stops.

I quickly got a game running this way but unfortunately it suffered erroneous rendering (it was rendering EVERY viewport overlay material all at once aswell as rendering in splitscreen with the second player screen rendering an empty frame buffer). So then, and I guess this is where the Jenga analogy comes in, I set about carefully removing all the non-Dear Esther vital components hoping to be able to strip out all the Portal2 specific objects without causing too much of a hassle… There was hassle. All too quickly I was facing 200+ linker errors and realised that my original plan was probably just as good.

So I re-removed the preprocessor definitions and have spent the last 20 hours dealing with them all one at a time (aswell as building a dummy UI which is essentially a carbon copy of the Portal 2 UI with Portal2 specific features ripped out of it). Finally now I can run a game, there aren’t too many asserts being thrown to the debugger (for some reason it hates me noclipping around…) and by 3am this morning (or 3 am tomorrow we’ll see) I should have a build fresh off the press to run over to Robert.

I have drunk upwards of 20 cups of coffee in this period… Probably well up 😀


About jacklouismorgan

Programmer and visual design artist extordinaire.
This entry was posted in Uncategorized and tagged , , , , , , , , , , , . Bookmark the permalink.

8 Responses to Compiling: (UN)Check!

  1. fawstoar says:

    Very interesting…

  2. Azerty says:

    I like how you are so exhausted that you don’t bother tagging the post anymore.

    • Ohhh yeah… It was a pretty drastic stretch of work and at the time of posting this blog I was barely even aware of corporeal existence. I’ll go ahead and add some tags just for you 🙂

  3. Azerty says:

    lol, that was unexpected.
    Keep up the updates on your use of the Portal 2 source engine.

  4. Clamchop says:

    Is this still getting an August release?

  5. lexz says:

    How much later is “(not too much) later than that”? 🙂

  6. 🙂 We worked our butts off, there’s always time munching factors that a small team doesn’t have the perspective to account for. We certainly went beyond our initial time estimates, but trust me it’s worth the wait.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s