Wimpy
Mar 16, 2015
Welcome to the first narrated Thimbleweed Park video. Sit back end enjoy 4 minutes of my smooth sultry FM radio voice as I explain our latest tool: Wimpy.
This is the first time I've ever done a narrated video (for anything), so I do apologize for it being a little choppy and scattered. I'll get better. I found it odd doing narration because I'm just talking to myself. I guess it's one of those things you get used to the more you do it. Next time I might try it was someone else in the room, listening to me.
One of the challenges I face with doing narration is that I'm not naturally a talkative person. I like to sit and think about things, I can't just ramble on about stuff. And I'm OK with that in my personal life, it just makes doing fun stuff like videos and twitch streams difficult, unless you like watching a video where I sit around and think about stuff.
OK, enough about me. Let's talk about Wimpy.
Wimpy is a tool I've been working on for the past few days and it's purpose is to allow game programmers to visually define the objects that appear in a room. They can select an object, change it's hotspot rect, use position, as well as move the image around the screen.
Up until last week, I was editing the room's .JSON files by hand, which is fine for a few test rooms, but we're starting to build the rough-cut and I need to be able to quickly get rooms defined and into the game. Our goal over the next few weeks is to have a completely walkable version of the world. This will allow us to walk around and see how the size and connectivity feels. Based on this, we might change how the map is connected, or add and remove rooms as needed. It's important to do this BEFORE you've spent the time creating final rooms.
When I started the tool, I wasn't sure if I wanted to built it into the game's run-time, or as a standalone tool that used the same library as the engine, or as a native GUI app.
Building tools into the actual game can be nice. It means when you're playing the game, you can flip it into an editor mode and change objects live. There benefits to doing tools like this, but I also feel that it can add a lot of baggage to the game's run-time and I often find that integrated editors are harder to maintain and aren't as slick as they can be when done stand-alone. I also like to keep the game's run-time code as clean as possible. There are fancy-pants ways around all this, but the end goal is to build a great adventure game, not build a toolset.
The other issue with building tools into the run-time is saving data. When the room's .JSON files are loaded into the running game, they are instantly parsed and turned into internal game structures. If the data was editable, I'd have to reconstruct the files and then save them out. The internal data structures just aren't conducive to that.
I also looked at building Wimpy as a truly native program, which would have given me access to all the list controls, buttons, menus, etc that your used to on the OS. This was problematic for a couple of reasons.
The first is I wanted Wimpy to be cross platform. Gary, David and I all work on Macs, but we might bring someone on that works on Windows and I don't want to maintain two versions of all the tools. I could have used wxWidgets or Qt, but I don't know them very well and the look and feel of the UI always seems off. No matter what OS you're running them on, it's just slightly (or more than slightly) wrong.
So, what I decided to do was build it as a separate program, but use all my engine code so it replicated the look of the game as much as possible. For the game programmer, it's important that they see things as close to how they will actually appear in the game. Wimpy reuses a lot of code for the room and object rendering, animation, and loading. It means if I change how objects are rendered or data is stored, Wimpy will get these changes as well.
Wimpy reads and writes the room .JSON files, as follows:
name: "Bank"
sheet: "BankSheet"
objects: [
{
hotspot: "{{146,114},{171,88}}"
name: "bankClock"
pos: "{158,101}"
usedir: DIR_BACK
usepos: "{159,26}"
zsort: 88
animations: [
{
name: "state1"
frames: [ "bank_clock1", "bank_clock2", "bank_clock3" ]
}
{
name: "state0"
frames: [ "bank_clock3", "bank_clock2", "bank_clock1" ]
}
]
}
{
image: "bank_rope"
name: "bankRope"
pos: "{300,32}"
prop: TRUE
zsort: 6
}
...snip...
]
I know I promised to show some actual code during this weeks update, but I think I'll save that for another post. Just think of it as the first in the long line of broken Kickstarter promises.
OK, I lied. Here is a little bit of C++ code from the engine that loads objects:
{
if (array == GGNullPtr) return;
for (GGDictionary *dict : *array) {
if (dict->intForKey("prop") == true)
continue;
GGString *key = dict->stringForKey("name");
Object *object = Object::findObjectWithKey(key);
if (object == GGNullPtr) {
object = GGAutoRelease(Object::newWithDictionary(key, dict, _sheetName));
Object::addMasterObject(object);
}
_objectArray.addObjectToBack(object);
object->createImages();
if (object->sprite()) {
object->sprite()->zSort(object->zSort());
object->sprite()->position(object->roomPosition());
addSortedRenderNode(object->sprite());
}
}
}
My library started out as objective-c and I converted it to C/C++ a little over a year ago. I really enjoyed objective-c's retain/release model of memory management, so I replicated it, as well as NSDictionary and NSArray (complete with verbose method names). The stl drives me crazy.
- Ron
I don't think he's ever really made a bad game (and he has made several truly great ones), but he's no longer making the classic games that this particular audience enjoys.
http://style64.org/c64-truetype
It's nice because it's proportionally spaced, which the original C64 font was not, and that makes reading so much easier. I won't be able to use it in the final game due to licensing issues, plus it doesn't have the full Latin character set. I might have to find someone to make a TT font for the project.
Keep up the good work!
I define this for portability reasons. It will probably never be an issue, but you never know.
http://stackoverflow.com/questions/13816385/what-are-the-advantages-of-using-nullptr
It was very insightful. So if you two find time to make such videos in the future, then please do so :-)
Small question: What does the grey horizontal line indicate?
Slightly bigger question: Do you plan to have a series of small one-purpose tools oder do you want to integrate a loot of functionality in one universal editor? If you plan to do a bunch of tools: Where is the advantage over a monolithic approach for an editor?
I like to keep editors and tools simple, so I don't usually go for the monolithic approach.
I think it helps a lot to have the tools built into the engine. Coding editors is quite tedious - why do it when you can have the graphics and animations right there to fiddle with.
Not a waffle in site.
Anyway... on to the reason I'm here... Video with commentary, awesome. Love the updates.
But all in all, Wimby does look like a pretty elegant little object editor. It's simple, but does whats needed.
I myself am a game developer and have been developing my own game engine (using SDL, C++, and OpenGL) and have been looking for a simple one.
LOL.
that I call Thimbly. I hope you don't laugh too hard when you see it.
http://i.imgur.com/XiZLi3N.jpg
I think Ron's voice sounds perfectly normal.
Just a curiousity - how are the Paypal contributions going compared to the main crowd funding? Do they add a noticeable amount or is more like a 98/2% ratio?
I always wondered since I backed few other projects on Kickstarter, but little to no word was given to the post-funded campaign.
Yeah! I'm with the 1%!
whatyearisit.jpg
You might not be a "skilled" video-type-guy (if that's a skill), but I personally have no complaints if you keep doing videos just like this one :)
Makes me want to break out good old MI1... actually, I might just have to do that! Who needs sleep anyway? ;)
Looking more and more forward to this game! And while waiting, there's this blog. All in all: Win :)
Plus, it has "improved" graphics that don't fit its old style. Not that the old graphics are better, but at least they are consistent.
I understand the money won't go to the original developers, but it means that the game will be accessible now by a wider audience than before, and so in that way, it's a plus for adventure gaming in general, and could be a help to this game by way of an indirect advertising. Personally, I've been trying to look for a deal on the game on eBay for a long time, and have never played it. (which I'm ashamed to admit on this blog) Now I can (and plan to, this weekend).
In any case, this is getting me excited for Thimbleweed Park. When I get through Zak, then I need to play through Maniac Mansion all the way... I have that one through the minigame in the Day of the Tentacle got from an Ebay a while back.
That can be an interesting idea for game creator or Adventure Game Studio users who search an alternative to it
Of course it would be great. But I would be even more happy, if TP doesn't remain Ron's only game based on Grumpy. Naturally I have liked MM (and DOTT), but a lot of people hope for a spiritual successor to MI 1 & 2 - and who would be more competent for realizing it than Ron!
Nice simple editor! With the bounding boxes I normally code them so initially they are automatically the same size as the graphics image and then I alter them afterwards if needed - does Wimpy do this? If not, it may save you some time to do so :)
Looking forward to the game!
Steve