Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 30 — August 22nd-25th 2014 — Theme: Connected Worlds
  • Judging Ends: in 18 days, 1 hour, 42 minutes, 47 seconds
  • [ Real World Gatherings | Ludum Deals | Warmup Weekend (Games) | MiniLD #53 | Wallpaper (1) (2) (3) | Mailing List ]

    [ Play+Rate | Edit | View All Games | My Game ]


    Paper Town: A Ludum Dare Post-Mortem

    Posted by
    December 21st, 2011 5:03 am

     

    Click here to play my game: Paper Town!

    Developers often do a “Post-Mortem” after completing a project, exploring the things that went right and wrong. This helps them keep track of what they’ve learned and also help other people who are going to try the same thing.

    What went right

    The Story

    “Alone” is really a mood theme, rather than a mechanics one, and that had me a bit stumped at first. All the neat “physics” and “sim” ideas I had in my head needed to be thrown out.  The gameplay was to be a slave to the story, which is pretty much the inverse of how I usually think.

    Right from the beginning, I had toyed with the idea that the protagonist is not literally alone — just that he feels alone.  Paper Town takes that the next level and places the player in the mind of someone who is psychologically damaged and is living in a world where he perceives himself to be alone and can’t recognize the presence of people around him who are trying to help.

    I believe it’s an idea that can resonate with a lot of people. You may feel lonely, but at the same time you pull away from other people and avoid talking to strangers.  This explores the extreme outcome of that:  The character will in one line of dialog lament the fact that everyone has left him, but in another line of dialog scream “LEAVE ME ALONE” to the nebulous entities that sometimes appear.

    It’s through the development of the story via note pickups that the character finally gets a chance to recognize that his solitary universe is self-inflicted and that he can break out of it through a true desire to be with other people.

    Unity 3d

    For a lot of people, the spirit of Ludum Dare is to build everything from scratch — or as much as is possible without implementing your own programming language and basic library of functions.  However, I very much wanted to build a complete game and starting with a fully functional gaming engine went a long way towards ensuring that.  Being able to drop in primitives and start programming behaviour 5 minutes after deciding on an outline for my game was incredible.  Not having to worry about how to load images and sound, nor do physics, was likewise amazing.  Also, having access to some great pathfinding middleware was also exceptionally helpful, though it brought its own problems (see below).

    On the other hand, since my challenge wouldn’t be about the base engine, it means that I had to make certain that my execution of the theme was top notch.  I wanted to tell a complete story, and I wanted to make sure that there was a way to win and to lose the game.  I think it takes about 10 minutes to win.

    I didn’t have the time or the ability to do any 3d modelling, but I did as much as I could using pure primitives (cubes, planes, spheres, and capsules).  I’m also pretty keen on my moody lighting effects.

    Time Management

    While there are certainly things I would have liked to have gotten done if I had more time, I actually didn’t feel very rushed during the 48 hours, and I think a lot of it had to do with having a solid time plan right from the beginning.

    The theme announcement and start of the competition was at 9:00 PM my time on a Friday, so that evening was all about coming up with the idea for the gameplay and story, and to setup the initial environment in Unity (terrain, character, a simple building, and the ability for the player to click/pathfind around the obstacle).

    Saturday was planned to be “gameplay” day. I generally didn’t worry about the actual looks/art.  The game just had to be playable, and by the end of the day all the major gameplay features were present:

    • Randomly generated city, including 4 types of buildings, streets with intersections, lightposts with actual lights
    • Enemies that would spawn, patrol around, and chase the player if they saw him — dealing damage if they got close.
    • Pickups for the player, which would be stored in inventory
    • The ability to create a “paper doll” with the right items. A “paper doll” is a turret that shoot bullets at enemies.

    Sunday was planned to be “story development”.  I know it may seem weird to play on having 50% of your time to do all the “real” features and 50% of the time to do “fluff” and polish, but in practice the big features don’t take that much time. They’re often far more straightforward and easier to understand. It’s the fine-tuning that can be really time-consuming, but it’s also the thing that truly sells your product in the end.

    I think my final story is a bit cliche and maudlin, but still works to really sell the theme.  This time allocation meant that I was also comfortable spending time making sounds and intro/end screens, which I think are an important part of the “complete” package but often get overlooked in the face of adding more gameplay features.

    Things I did on the final day:

    • Redid city generation (it was crap and the road/fence were very crap)
    • A dialog system, allowing the story to be told during gameplay (and also to explain gameplay mechanics as they come up)
    • Added a new pickup type: Notes. These are used for the victory condition and also trigger lots of dialog.
    • Changed player to WSAD/Mouse movement
    • Fiddled with the pathfinding multiple times
    • Rebalanced the enemies and pickups multiple times
    • Added a day/night cycle, which looks good and controls enemy spawning
    • Intro screen!
    • Win and loss screens!
    • Sound effects!
    • Music!

    Food and Drinks

    Lots of good, satisfying food at my disposal.  No junk food, and nothing that would leave me with messy fingers. Also, everything could be prepared in just a few minutes, minimizing downtime.

    Meal examples:

    • Bacon and Eggs
    • Avocado with Sriracha hot sauce (sooooo goood)
    • Tuna salad
    • Leftover ground beef/veggie casserole

    Note that these are low-carb, high fat foods that fit into my Keto diet. If someone on a standard diet ate like this for 48 hours, they’d probably feel a bit foggy-headed, which wouldn’t be ideal for the competition.

    Live Streaming

    This was by far the single best choice I made with regards to Ludum Dare.  Having hundreds of people watching me all weekend kept me motivated and entertained and provided me with a veritable army of beta-testers!  I had to create all the game code and content myself, but having people provide immediate feedback was invaluable.

    All the videos from the stream should be available on my Twitch.tv account, starting with this one.

    Sound

    Many Ludum Dare games don’t have any sound, or at best just include a few bloops and bleeps generated with a tool like BFXR – which was absolutely my plan too.  However, in practice I really wasn’t happy with these sounds. I felt like their arcadiness took away from the mood of the game, and I’d just about given up on the sound (which was already an Final Hour job)…but my stream viewers made a case for the importance of sound and music. And I’m happy they did!

    So I went to Plan B for sound, which was simply to use my microphone. Sound effects for item pickups came from flipping pages in a book (Python & XML in a Nutshell), and music came from something I’ve never done before: Me playing an instrument in front of an audience.  I played a few bars of some badly off-tempo blues scale on my harmonica and then slowed down the recording (which also lowered the pitch). The result is a haunting soundtrack (with two songs) that – while far from good – is way better than no sound at all.

     

    What went wrong

    Pathfinding

    One of the resources that was in my toolbox even before the theme was announced was the great A* Pathfinding middleware by Aron Granberg.  It’s a very simple drop-in solution that makes it pretty easy to add basic pathfinding to a project.  I like to use it by attaching an empty “pathfinding target” gameobject to my units and just moving that target around to make things happen.

    Unfortunately, I ran into some limitations with the default way of using the middleware that caused to pretty serious problems and almost wrecked my whole idea.  I wanted a fairly large city for the player to explore, but the combination of a large area with the need for a fairly fine pathfinding grid (to be able to maneuver around furniture around buildings) meant that we were generating far too many nodes and Unity would crash.  After some fiddling, I was able to find a compromise between city size (3×3 blocks with 2×3 buildings each, for a total of 54 buildings) and grid resolution. At that point, things seemed to work pretty well until I started balancing the game.

    It quickly became apparent that I needed quite a few enemies to appropriately populate my relatively large city space, but as I increased the number of units my pathfinding system started to lag.  Luckily it’s pretty intelligently designed, so the actual game performance was unhindered, but the pathfinding request queue was taking longer and longer to get through.  This wasn’t necessarily a problem for the AI, since it’s not the end of the world if it takes them half a second to change to a new path in response to stimulus (it just makes them a tad easier to juke).

    For the player’s mouse-controls, however, it was a big problem.

    Mouse Controls

    One of the first things I added to the game was a click-to-move functionality.  Reasons for this were varied, but a big part of it was a drive for simplicity. I wanted a game that was utterly intuitive for anyone to play.

    My initial approach was to do a raycast from the screen to the ground when the mouse was clicked, which worked great. Unfortunately, Unity doesn’t provide a simple way to eat mouseclicks when the player hits the GUI, so interacting with it meant the player was moving unintentionally.

    The second approach was to have the ground react to OnMouseClick events, which worked just as well but wouldn’t be triggered when the user was clicking on the UI. Unfortunately, it also does not trigger if the user is clicking on another model, including my road segments and building floors, so I had to ensure that my “HandleMouseClick” behaviour existed on all relevant objects, including pickups.  This worked okay.  Until I ran into my pathfinding issues.

    During the day, everything was pretty good (minus a little funniness due to the pathfinding grid resolution), but at night when enemies showed up, there was a noticeable delay when clicking due to the pathfinding queue being pretty full.

    In the end, I gave up on mouse controls and switched to WASD/Arrow controls, leaving the player feeling very responsive.

    Raycasting/Line-of-sight

    I’d decided pretty early on to make the building outer walls quite low, that way the player could easily click on the ground inside and also not worry about the player being hidden behind a wall (due to my fixed camera angle). This lead to me having to fiddle a bit with my line-of-sight tests with enemies, because they shouldn’t see the player through a wall.  I had to make sure that my raycast was low enough to be blocked by the short walls, but high enough to not get screwed up by the lip around the road or the strange mesh deformity on the player’s capsule model.  It ended up being kind of fiddly.

    It would have been nice to put an invisible wall around the buildings and have them block enemy LOS rays, but between the UI, the “shade” block inside the buildings, and the invisible walls I couldn’t figure out a way to allow mouse-click raycasts to get through while blocking enemy raycasts.

    Of course, that was all moot by my switch to WASD/Arrow movement, but that change happened way too late in development to save me any trouble with the enemies.

    Randomly generated content

    This always SOUNDS so cool, but for a game like this I’m not sure it does anything for the gameplay, nor am I sure that it saved me any time.  Yes, placing individual buildings would have been a pain, but I spent so long having to tweak the system so that the buildings and roads all ended up in the correct location that I think it took longer than doing it manually would have.  And it’s still not perfect!  There’s slightly more space on one side of the blocks than on the other.

    Even things like Pickup spawns were totally random at first, but sometimes pickups would land on top of objects and be inaccessible to the player.  Ultimately, I placed empty gameobjects to act as spawn points and that worked so much better (I also did this with enemies).

    So if I *did* want randomized buildings, without having to worry about getting my placement math right, I should have manually positioned building placeholders and just have them be populated at program start.

    Note that I had intended to make my city bigger (which is why I felt that random generation was the way to go), but I had to scale down my plans due to pathfinding contraints.  I do think my final city is a good size for the actual game.

    Paper Dolls

    The idea that the protagonist has devolved to making paper dolls in order to combat his loneliness came about very early and was meant to be a major part of the gameplay, adding in a “tower defense” component. However, this never came to be and as a result the act of creating the paper dolls and their use in gameplay is rather secondary.  It’s still better than not having them at all (and having the game just be about exploration and hiding), but I think more could have been done with them.

    To a certain extent, the weakness of the doll theme is a result of the time limitations with regards to creating more enemy types and behaviours and just general game balance.  I also think that the dolls are dependent on a certain amount of art development — I think they deserve a cutscene for their creation, to add real emotional depth.

    Another contributing factor to not further developing the paper dolls idea was the conflict between static, unmoving, tower-defensive gameplay and the need to explore to find notes to advance the story (and win the game). Making the dolls secondary (and have very limited ammo) turned them into something that was just a tool to help you survive a bit longer and facilitate your exploration (and thus completion of the story).

     

    Conclusion

    I consider this project to have been a HUGE SUCCESS! I program all the time, but usually I’m making business-oriented web applications.  I have started many games, but I’ve never finished one before.  Paper Town may be rough, but it is a complete game and that makes me extremely happy.

    Also, even if the game hadn’t worked out, we still had a stream that averaged 100 people for an entire weekend.  That’s amazing!

    I absolutely hope that I can participate in the next Ludum Dare, but I also hope that I can find more time to make games in general.

     

    Tags: ,

    Leave a Reply

    You must be logged in to post a comment.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]