Your Kickstarter Dollars At Work!
Mar 20, 2015
No ego-fueled narrated video this time, maybe next week.
For me, most of this week was taken up in getting the first pass at a game engine debugger, tweaking Wimpy, and separating the game assets from the engine code.
Up until this week, there was no debugger in the game engine other than just debugging issues with Xcode. While Xcode is a powerful debugger (so is Visual Studio, so let's not turn this into a religious IDE war), it's really not appropriate if you are just trying to track down an issue in the scripts. There is little need to step into the c/c++ backend code to do that, and I don't feel a requirement of a good game programmer should be knowing c/c++ or having Xcode or Visual Studio installed.
First step was to get a debug console window running independent from Xcode (or VS if running on Windows). Any warnings or other output is redirected to this window, and there is a place to enter commands.
You can dump any variable, room or object...
And set them...
You can also execute any valid Squirrel code from the command line, so the game programmer can invoke functions or start scripts at any time. You can also read a stream of commands in from a file if you have a complex situation to set up.
This is just the first phase of the debugger, in the next few months I'll add the ability to visually single step through code and add breakpoints. Phase two. Coming soon: an awesome toolbar.
I've also been making various tweaks to Wimpy to streamline the workflow. When you add an object in Wimpy, there is now an option to automatically insert the object's code into the script file. It's amazing how much time this saves. Add the object in Wimpy, then open up the Room's source and just fill in the details.
Probably the biggest task this week was separating all the game assets from the Xcode project. Mac applications like all the resources embedded in the .app file. This is nice because it keeps the file system clean, but it's not very conducive to rapidly iterating during Thimbleweed Park's development.
As I mentioned above, I don't want a requirement of game programmers to be the need to muck around with Xcode or Visual Studio, plus I like to think about the game engine as a very separate "product" from the game.
Much of this work was figuring out the structure and filesystem layout for the project...
I wrote a quick bash script to create new rooms. You enter new_room Diner and it creates the room's .nut code and the .wimpy file (The files beginning with __ are the template files) and any needed folders.
From the time Gary gives me art, I can be walking around the room, clicking on objects in under 5 minutes.
The _SpriteSheet folder is built whenever art changes (from Images/) and can safely be deleted at anytime (and is not version controlled).
The other goal in separating the engine from the game assets was to have two version control repositories, so game programmers can pull down all the assets without the engine source code. All they need of the engine is the compiled program, then point it at the game assets.
I'm sure a lot of this will change as we see what works and what doesn't. David Fox should be coming on soon and I'm sure he'll have a lot of "feedback".
Also: yaaay, the GNU Terry Pratchett Clacks header is here too! Awesome, guys. Best tribute ever.
As you can probably see, I have little confidence in Tim Cook.
do you use any library to make the debug console/input window to be cross-platform?
Keep up the great work!
What will you to with the tools you develope after the game is shipped? Have thought about releasing them under an open source license?
But something is wrong here.... Oh yeah! What's up with the name? "Debugger"? Shouldn't that by a crazy acronym or something? "Deubgger"... pfffttt - how conventional ;-)
By the way, what was debugging and testing like in the Mainac Mansion times? Lots of manual runs and clicks and seeing what happens this time around?
What's your general policy on documenting and commenting your source code by the way? Do you have savant like abilities to remember everything you've ever coded and structured or do you take care to document and comment the code as you go? I sometimes pay the price when I try to get back with non-documented old projects and actually struggle slightly to figure out how it all worked again :D Well maybe not struggle per se but spending more time than would be necessary.
If the GrumpyGameEngine exists beyond this one game, I'm sure that will also be true for it. Things keep moving forward, it's what keeps life interesting and also a reason I don't want to use the old SCUMM system for this game. Move forward.
Those primordial years were really tough and amazing at the same time. Are you agree?
These days, I could not live without versions control. Everything I do, even my one-person projects are version controlled.
By the way, for fun check out gource sometime - it's a revision code "visualizer".