Legend of Goblit
An Adventure Stage Play by Daniel Pope.
You play a young trainee wizard named Goblit who is unexpectedly required to rise to new challenges.
This game was inspired by classic adventure games, but also took inspiration from single-set stage plays. Naturally, all of the action is set in one room.
I am your father!
Presented by grummi
Alas, poor Yorick!
Presented by mit-mit
The Wet Fish
Presented by dholth
Ratings (show detail)
|7.2 MB||mauve||2014/10/12 08:12|
|7.2 MB||mauve||2014/10/12 08:12|
Final day screenshot
|141.9 KB||mauve||2014/10/12 00:36|
|117.5 KB||mauve||2014/10/09 00:50|
Routing around NPCs
|97.8 KB||mauve||2014/10/08 00:10|
Input to pathfinding system
|65.1 KB||mauve||2014/10/08 00:10|
|90.6 KB||mauve||2014/10/08 00:05|
|4.1 KB||mauve||2014/10/06 23:55|
There exists one room
|81.6 KB||mauve||2014/10/05 22:30|
Day 7 - It's a wrap
Day 6 was a bit of a downer. I tried to build a system for saving games, but I wanted it to tolerate slight changes to the script, which proved to be difficult. It sort of works, but I don't fully trust it - but then I'm changing the script all the time, which makes it really difficult to restore everything correctly. I was also feeling a bit tired of the script and lacking inspiration as to the puzzles needed for Acts 2 and 3. So I turned in early last night, and after 20 minutes of being in bed, the inspiration started to flow - so much so that I got out of bed to make notes of it all.
From yesterday's low, today was a lot more positive. I started with a solid idea of how the script was going to tie together. I spent the vast majority of the day building out the puzzles and the script, which hasn't changed significantly from day 1. There are some big set pieces in acts 2 and 3 that took a while to draw and write. The game was finally completable with about 3 hours to spare. So I quickly threw in some music and title screens, polished a couple of bits of art, and all too quickly I was out of time.
I didn't get the chance to write responses for that many combinations of objects that you might try, but I think don't think the puzzles are too difficult, so you'll have to try it and let me know.
As always there are things that I'd like to improve, but I think the game is fun, and funny, and I think that the core idea of having the game engine play a stage script is powerful, and the language is extensible. I've started thinking already about how I might pull some of this work out into libraries; some of my colleagues at work are inspired to build on it for their own projects.
Day 5 - Completable puzzles
So far I have one whole scene completed... of 10. But the engine is practically all there now, so the content production can accelerate. There are no major features to implement tomorrow, just puzzles and dialogue. On Saturday morning I'll spend some time honing the script and then I'll have the rest of the day to bring everything together.
I'm still wrestling with the number of combinations of things, but I have a system of wildcards that allows certain responses to cover off a lot of object combinations. There's also a 'random' directive to pick a random phrase, which will help reduce the repetitiveness of such an approach.
It is still very surprising how much effort it takes to organises the states correctly, even with a directive-driven system like I have. I have to be careful about the wrong handlers being left in - for example, referring to an object that has since been disposed of, or a dialogue that involves a character who has left. I had more time perhaps I could write some sort of clever validation of the state machine would be useful, to prove that the script is completable, and so on. But I don't, so it's a manual and slow process. Lots of play testing still to do.
Day 4: Combinatorial Explosion
Today I added the bulk of the item and inventory system. Here's just one of many things you might try that will not work:
There are already a large number of potential combinations of items, and very few have any custom dialogue. To make matters worse, the dialogue for an item can and should change between scenes, but none of that is written. I have a pretty powerful system for defining interactions between objects, but there are lots of edge cases and missing features that I may hit, so I'm still pretty close to the wire.
Tomorrow I need to tackle the dialogue system. With that done nearly all the functionality will be in place, and I can push to the finish line working on the content alone.
Day 3: Movement
Up until now my game characters had been rooted to the spot. Nearly all my work today has been put into making them move around freely.
First I implemented pathfinding so that characters can avoid obstacles. Input to the pathfinding is just an image showing which pixels they should be able to stand on - easily generated with Inkscape:
The pathfinding downsamples this image and finds a route using the A* algorithm (note the debug minimap in the corner, corrected for foreshortening):
Lastly, NPCs are plotted onto the map, so you won't be routed through another character:
With this, the characters are coming to life! It's still not a game - you can't do anything with items, for example. But the engine is nearly done, and there's plenty of time left, so I think I'm on target.
I've made solid progress on the game engine today. I can now play complete sections of the script, and also drop into interactive mode to click on things, adventure game style. It has largely been coupled through the script system I mentioned yesterday, so all of the dialogue and cutscenes are completely data-driven from the start.
It's quite a powerful technique, and it reminds me of things like lettuce-style BDD tests. I can write a stage direction in the script, and later write the binding in code that implements that stage direction (and each character might have different stage directions implemented). This lets me completely separate the activities of designing the story and programming an adventure game. But the script system goes beyond just a list of steps: directives let me play arbitrary bits of script in response to events, so even looking at an object can trigger a dialogue between the characters.
I can't give too many screenshots without giving away bits of the story, so here's Ralph's walk cycle. Ralph is your buddy, who will drop in at various points and give you useful advice.
I'm doing an adventure game this Pyweek. I've never done one before, but had been thinking over previous contests that it might be possible to write an adventure set it in a single room; that the limited environment might put it just the right side of too ambitious.
This is obviously going to require some cleverness in order to organise a whole story to happen all in the same place. I'm inspired by single-set stage plays, where some of the action happens off-stage, and the actors talk about it in the scene. People going in and out offers the opportunity for them to bring or drop props.
So I spent the first six hours or so of today knocking up a first draft of the script. I've written it in a Restructured Text-inspired format, which can be parsed and hopefully played back once there are characters in the scene. Here's an excerpt:
RALPH: You only just passed the basic certification! .. choice:: I turned someone into a frog! GOBLIT: I turned a man into a frog! RALPH: That was a toad. And he still had man lips.
I started knocking up some graphics but the room is very bare still. Adventure games certainly require a lot of art, but the programming should be much more simple than some of my previous entries. I've kept the art style for the characters deliberately simple too, to make it faster to animate them.