Project Good Robot 1: Not Project Good Robot

By Shamus Posted Thursday Aug 15, 2013

Filed under: Good Robot 65 comments

I have hinted about this on the Diecast, on the blog, on Spoiler Warning, to friends, and to anyone else that’s exchanged more than two words with me in the last couple of weeks. I have hinted at this so often that I really should stop calling it “hinting”. To wit: Yes, I’m programming again.


The why is often as interesting as the what, so before I talk about what I’m working on let’s talk about what I’m not working on. Let’s jump back to three weeks ago…

I’ve got this idea in my head for making a city of destructible buildings. Maybe it’s because we watched Pacific Rim recently and I’ve got building-pulverizing action in mind. I’m not sure WHAT – in gameplay terms – would destroy the buildings. Superheroes? Godzilla monsters? Missiles? I dunno. We’ll figure that out once we have a working demo of blasting away at a building until it falls over.

The idea works like this:

I’d have a procedurally generated city of buildings. The buildings would be made from voxel cubes, Minecraft-style. Note that the world isn’t made of Minecraft cubes. One of the drawbacks of Minecraft is the huge memory footprint required for huge volume of cubes. But here each building would be its own local cube space and the area between, below, and above each building wouldn’t need to be tracked. This would give us a nice set of mutable data that doesn’t need to eat tons of memory or take tons of time to generate. Each little cube space would have its own local axis, which would mean the buildings don’t need to be aligned to the world axis. In plain terms, you could have buildings along curving roads and turned at an angle without turning their walls into jagged blocky diagonals.


Each building would have these conceptual support pillars going up through them. Every block must be within a certain distance of a support pillar to be considered… erm… supported. If we hit the building with an explosion, it will remove a volume of cubes. If a support pillar is broken, then we remove the pillar above the point of the break. After the explosion and particle effects go off, we re-evaluate the building again and look for cubes that lack support. Any cubes that are without support will be removed from the building and dropped as physics objects.

This is not the problem.

The problem is this:


No, not the yellow background. Although I do wish I could fathom why I set the background to yellow. Was that an accident? I can’t remember. Anyway, this looks too photo-realistic. I’m not saying it looks real, I’m saying it looks like it’s trying to look real, which is even worse.

Remember Pixel City? That was this:

Link (YouTube)

One of the most common comments from people was that I should make a daytime version of this city and turn it into a GTA clone. I know these people are trying to encourage me, but that’s about the most annoyingly demoralizing thing to hear. It’s like if I drew these eyes:


Nice picture, Shamus.

Thanks, it was hard for me to-

But you should make a version where we can see the monster.

I.. what?

Yeah, just brighten it up a bit so we can see the face.

Pixel City was a cute trick, which is what I set out to accomplish. But it’s no use to us here. This problem is on a much larger and more complex scale. Somehow, I need to depict this building in a way that won’t scream “REALISM!”. I want cartoony, stylized, or some other cue for your brain that this is far removed from reality and shouldn’t be judged as such.

So what do I do? Blocky pixel textures? Cell shading? Flat color? Ultra bright colors?

The problem isn’t that this can’t be solved. The problem is that there are a dozen ways we could attempt to do it, and I have no idea which one might yield interesting results. This is an art problem.

I suppose I could just proceed with the job I intended and ignore the visuals, but:

  1. If we build a huge city generator and THEN pick an art style, we could end up having to go back and re-write a lot of the building-maker code. This isn’t an art pipeline where we can ask an artist to make different things. We have to know what we want ahead of time.
  2. It’s a real drain on enthusiasm to work on something that looks horrible. It’s like, “THIS? THIS IS WHAT I SPENT FOUR DAYS ON? WHAT AM I DOING WITH MY LIFE?” It’s one thing if you’re coding for a paycheck, but if you’re doing it for fun then it needs to be fun.

As I ponder this, I realize that I’m always running into problems like this. Like, that was a big part of my job and my hobby programming for a decade and a half. There’s nothing wrong with that, but I’m suddenly feeling very restless. Do you know that in all my years of programming I’ve never written a single implementation of A*? I’ve never written sound code. I’ve barely messed with physics and I’ve spent very little time with gameplay.

So that’s what I’m going to do. I’m going to make a project specifically designed to let me blow past all the graphical hassles and work on the other stuff.

Brace yourself. We’re going to move to 2D.

EDIT: And to be clear, I’m not doing the destroying-buildings idea. I’m doing something else entirely. I say this because so many people are talking about Rampage and I don’t want you getting your hopes up.


From The Archives:

65 thoughts on “Project Good Robot 1: Not Project Good Robot

  1. miroz says:

    2D rules!
    I really want to see what you can do in 2D but using all the modern tricks.

  2. somebodys_kid says:

    Are you making a platformer, Shamus?
    If so…AWESOME!

  3. 4th Dimension says:

    Where we are going we won’t need not pixelbumped beveled shaders optimizers or whatever. :)

  4. Corpital says:

    I’ve more or less no programming background, but read enough to know pathfinding is evil and may try to swallow your soul. I wish you all of the successes and a ring of immunity to negative energy.

    Lots of questions, but most are probably all better suited for a later entry, so just one:

    Do you intend to do all the textures etc. yourself, after an appropriate art style has been found?

    1. LazerBlade says:

      I second the path finding is evil motion. I’ve written path finding code, and it’s always broken in ways that you can never find because of how crazy complex it gets. I tried to implement A* and D* for one of my games for a month before I gave up and ripped off someone else’s code.

      [/vent under guise of warning]

      1. The Snide Sniper says:

        Many programming languages provide some method of keeping the complexity down, such as encapsulation.
        When implementing A* in C++, for example, the heuristic can be a separate function or functor, and the open set can be an instance of std::priority_queue. The closed set should be chosen carefully, as different search-spaces may benefit from different data structures, but for a general algorithm, std::set or std::unordered_set should suffice.

        With the implementation of the open and closed sets hidden, the algorithm itself is quite simple (5-10 minutes should be plenty).

    2. Retsan says:

      I (well, in a group of 3) actually did an implementation of basic 2D path-finding as a project for a Discrete and Computational Geometry class.

      And, yeah, it’s fairly tricky. We limited ourselves to convex Polygonal robots, trying to find a path through arbitrary polygonal obstacles, and didn’t allow for rotation. This probably took us about 25 hours of coding, I’d say, which is neither great nor terrible.

      But allowing for non-convex robots, or allowing for rotation makes it much more difficult.

  5. X2-Eliah says:

    Hm. Arguably, 2D is even worse about requiring artwork and such. A lot of the recently-popular indie 2D games have thrived solely, or primarily, on either gorgeous artwork in 2D / 2.5D / faux-3D (think Braid, Isaac, Trine, Spelunky, Bastion), or a stylistic sense of aesthetics (frex, Thomas Was A Loner).

    Anyway. I’m just joking.


    On the note of music (heh): You could look into procedurally arranged music (or dynamically arranged soundbites strewn into musical-kind-of-performance) – there have been hints of games trying to use it, and it being a thing in some upcoming games, to the point where I think it *might* become more of a thing than it is. That might work around the lack of musicianship, and work to join the part of you that likes programming to the part of you that regrets not having done anything musicwise.

    1. Corpital says:

      Ever since a friend sent me a link to The Infinite Jukebox I’ve been baffled how it is possible to rearrange parts of a song without losing cohesion, so a Shamus explanation on how to do a whole song out of some notes should be great.

      1. Holy cow. That is the best link ever.

        You may have just destroyed my life.

        Thank you.

    2. Daemian Lucifer says:

      Its not just newer games either.Many of the well remembered 2d games are well remembered because of their art.

    3. Retsan says:

      I think the point of Shamus’ post was not “I’m doing 2D artwork” but, “I don’t want to deal with art; I’m doing a 2D project that won’t involve artwork”.

  6. Pete says:


    Looking forward to reading about a new project.
    How much of your work could you keep, when you switched to 2d?
    a 2d building destroyer reminds me of the Rampage series.
    Looking forward to see how this turns out.

    1. Amstrad says:

      Rampage was exactly what I was thinking when he started talking destructible buildings. I’d love to play an indie version of that game.

    2. Cuthalion says:

      Yes. That was my thought as well — moving to 2d and getting something along the lines of the NES Rampage I played way back when. But maybe more physics-y.

      Of course, I like 2d games in general, so I look forward to reading about the project. And maybe even playing it if it gets finished. (And if it isn’t another platformer — I’d still enjoy reading about that, but probably wouldn’t actually play it.)

  7. Jarenth says:

    That is one scary monster, though. Maybe that monster could be what destroys the buildings?

    1. Corpital says:

      Speaking of scary…your new avatar scares me. Are YOU the monster, Jarenth?

      Lurking in the dark. Always watching. Judging. Waiting for the right moment to leap at the unsuspecting prey to take something that is probably important to them, because otherwise they would have left it at home. Like pants.

      1. krellen says:

        It’s the same avatar, just done by a new artist.

        1. Corpital says:

          I meant the whole picture, not just the character. Should have been clearer.

          1. Jarenth says:

            Maybe I could be the one to destroy the buildings.

            1. JPH says:

              I would pay to play that shit.

  8. Pyradox says:

    Ever since I saw that movie I’ve also wanted to program something like this, only my idea was more of an X-Com style management sim, but it cut into fighting mode with destructable buildings whenever a Kaiju surfaced.

    My plan was to draw buildings in several layers, then when a Kaiju hit it, I’d randomly select one of those layers to do the most damage to, one to do the second most and the last would take minimal damage. I’d then draw the monster at the appropriate depth as it hit the building, so everything would look nice when it hit.

  9. Horfan says:

    I’m very glad to hear this! I first found your Reset button (loved it) and then your project Frontier (loved it) so i found this blog and read about every project you ever wrote about, all game reviews, all about game design etc. Anyways, really glad you’re doing this, i’m looking forward to it!

  10. Eldiran says:

    Nothing like 2D to make a project orders of magnitude simpler! Not just in terms of graphics, but also in terms of collisions, physics, level design, camera, controls, gameplay, concept, animations, art assets, debugging, etc. etc… can you tell I prefer to work in 2D?

    I’m excited to see what you’re going to work on.

  11. Humanoid says:

    Cool, now what are your stretch goals? Is there a T-shirt?

  12. swenson says:

    Well, I’m excited. Your programming posts are the best (mostly because they make me feel thoroughly inadequate). And a destructible environment sounds interesting. Figuring out how to make it look realistic (like you’ve begun to mention with the support pillars) sounds like quite an interesting problem.

    The pictures you posted did make me curious about one thing, though–in first image, the original building has two support pillars, then an explosion happens, and then the final building (sans the bits that would fall off) only has one support pillar. Was that intentional, that the lower bit of the second support went away? I’m just curious about the intent behind that.

    1. Shamus says:

      Nope, the missing second pillar was just a result of hasty image hackery.

  13. Weimer says:

    2D, huh. 3D models chained within (x,y) dimension? Drawn sprites? Digitized sprites based on photos of real actors? Hm.

  14. Daemian Lucifer says:

    Hey,nice eyes there Shamoose.Is that the monster in the darkness?So you have seen it up close.Ok,enlighten us then,what is it?

  15. X2-Eliah says:

    Forgot to mention: People, people, let’s not get carried away with graphics.

    Shamus said it would be 2D. You know what’s in 2D? TEXT.

    Clealry we are looking at a new Word-processor-game project (aka text adventure).

    1. Daemian Lucifer says:

      Well he did a text FPS.And he did mention that he wants A* now,so logically he is going to do a text RTS.

      1. X2-Eliah says:

        No, no. It was a riddle. Shamus wants A*. A star. So, clearly we are looking at a text-adventure space game about stars. OR, it is a text-adventure celebrity-factory simulator.

      2. Dave B. says:

        Maybe it’s a text-based SC2 clone. I would play that.

        “Your pylon has been completed. Your 2 gateways are now powered. You are being approached from the west by 5 zerglings.”
        >Build 2 zealots

  16. Rob says:

    Yay! Shamus’s epic tales of programming are making their comeback! I let out an embarrassingly high-pitched squeal the moment I saw this post, to be honest…

  17. Akri says:

    Yay for 2D! I approve of this decision.

    Also, this is OT but I want to say that I just finished Free Radical and it was amazing. Particularly when Deck interfaces with Shodan the second time, and we get to see just how much psychological pain she’s in. It completely changed my opinion of how I wanted things to end. I didn’t want Shodan to die anymore. Really awesome work, Shamus.

  18. Jimmy Bennett says:

    First of all, let me add my voice to the chorus of people rejoicing at a new programming series. I’m looking forward to seeing what you produce.

    Are you planning on continuing to go over the Quakecon keynote speech? I watched ahead a little bit and Carmack has an interesting discussion on static vs. dynamic typing and I was curious to hear your thoughts about it.

  19. Tse says:

    I think the main problem is the repeating texture. It shows the seams, so the semi-realistic look will become even more jarring once the destruction begins.

  20. kikito says:

    I bet it’s a rogelike. About time!

    1. Weimer says:

      Those dastardly Roges, stealing mah Golpices.

      Or is it a Roger-like? A game about liking Roger? Or being similar to Roger?

      Roge on its own sounds like an underwear brand for men though. “Roge, Comfort With Attitude.”

      1. kikito says:

        Come on. I was on mobile and I had no English locale. Autocorrect kept changing all my words.

  21. Jacob Albano says:

    For what it’s worth, I would play the hell out of a lowpoly game set at night in Pixel city.

  22. Ed Lu says:

    It’s weird, actually; I’ve been dealing with exactly the same problem (maybe because I was inspired by you). Usually I work on the game, hit a big problem, and then just stop before I even get to the gameplay; really, all I’m doing is making poor game engines, not games.

    1. Humanoid says:

      You should apply to work at Bethesda with that skillset.

      1. Ed Lu says:

        I felt bad for about two seconds, then I laughed because it’s so true.

  23. neolith says:

    Rampage… awww, now you’ve put me into nostalgia mode.

  24. Atarlost says:

    Little dots running around procedurally generated non-rectilinear office buildings sort of like Monaco. That way he’ll have a sensible building interior generator available for when some artist shows up to help make that pixel city FPS.

    1. Humanoid says:

      So he’s going to reboot Monaco as an FPS (first-person sledgehammerer) where you play as the mole?

  25. Deadyawn says:

    Sound great. I’ll be looking forward to this.

  26. Paul Spooner says:

    I’m really looking forward to seeing how Project Good Robot turns out! What makes the robot good? Why does it take so much code? Are there contrasting bad robots? Does a robot write the code? Is that what makes it good? Do the bad robots write bad code? If a bad robot wrote the code for a good robot, and the good robot wrote the code for a bad robot, would it really be good or bad? How good can a bad robot be? How badly does the good robot want to understand bad robots?
    So many questions! Looking forward to seeing the outcome!

  27. Mike O says:

    I’m afraid Shamus has been Carmack’d. It’s like being twitterpated, but for nerds.

    I felt it too, Shamus…

  28. John says:

    “So what do I do? Blocky pixel textures? Cell shading? Flat color? Ultra bright colors?”

    I was going to say “ask your children” but since you aren’t doing that project there is no point.

  29. MaxEd says:

    That’s why I’m always do my pet projects in 2D. I can get myself a somewhat OK looking sprite (without animations) in half an hour, and proceed on to gameplay. But making even a single 3d model, even just choosing a style for 3d model, takes too long without an experienced artist.

    That’s also why I mostly try to do turn-based games: you can safely go without animating anything in them until you’re satisfied with other parts.

    1. Tse says:

      I am on the other side of things. I tried doing some things in unity and I reached the conclusion that I would do better if I just made 3D models. I am somewhat good at 3D modeling, but I am not used to making game assets. The transition is not easy. The mentality is completely different and I am not allowed to use some of the fancier stuff, since rendering it in real time would be impossible for the average PC.

  30. I’ve been really hoping somebody would do something like this for a very long time. Primarily – because I see it as the first step towards a real Superman game. And an end to Closed-Door Syndrome in Open World games.

    You’re doing well! Keep going!

  31. i want you to do a Spectre clone in Pixel City.

  32. drlemaster says:

    That is a cool monster. You should definitely have it be a boss fight when you make Project Frontier into a WoW clone.

    1. Syal says:

      Agreed. It’s rare to see a pitch-black mastodon with filed tusks like that. Creepy, with the added surrealism of wondering how it files them.

  33. Scourge says:

    What color to make it more realistic? That is simple.
    Real is Brown. after all!
    (This user is not responsible for the hazard caused by clicking on this link or any of the following links. By extended exposure to TVtropes please consult your nearest Doctor or WebMD)

  34. Steve C says:

    Mumbles you didn’t take “a trip into nature.” You took a trip into the 90s.

  35. Noumenon72 says:

    What happened to the last programming project you did on the blog? I remember some stuff about hills and sight lines, then a weird stick figure guy, then nothing.

  36. Cuthalion says:

    I'm not sure WHAT ““ in gameplay terms ““ would destroy the buildings. Superheroes? Godzilla monsters? Missiles? I dunno.

    Angry birds, obviously.

  37. Septyn says:

    Thanks for the reminder about Pixel City.::endsarc:: The screensaver that I want that was super awesome, except it generated the same city every time due to a debug value in the final code. I’d have fixed it and compiled it myself if I could, but I don’t have the tools or sk¡llzz. :(

    But hey, 2d. I see where this is going:

    West of House
    You are standing in an open field west of a procedurally-generated white house, with a boarded front door.
    There is a small mailbox here.

  38. D-Frame says:

    Finally! I don’t even care WHAT you’re programming. Even if you’d make a hello world program and write two hundred pages of dev blog about it, I’d still read that.

  39. Diego says:

    Hi Shamus :D I’ve been following your blog for not so long, enjoying some let’s play, reviews and critiques etc but I didn’t know you’re a game developer as well. I’m a hobbyist game developer and I can completely relate to what you’re saying here. Right now I’m trying to find an artist collaborator to work with me but it’s proving harder than it seemed.

    Anyway, I just read part 2 of this series and the game looks promising! I want part 3 with some videos now.

  40. Neil Roy says:

    This is a late reply, I never done A* either, it’s something I have been wanting to try. I did implement my own system, it wad cheap and simple. Probably not the best, but for what I needed, a small area map, it worked. The map is a 2D grid, you pick a location on the grid to move to, then set that point in your array as zero, then all grid locations that can be moved to from there to 1, then you go over the grid and set all locations around 1 that can be moved on to 2 etc… until you reach the location you are starting from, or there are no more locations that can be moved to (the path is blocked). Then when you move, you move to the next lowest number on your grid, so say you have 24, 28 and 13 next to you, you move to 13, then 12 etc… and you will be moving the shortest route to your destination. It’s not eloquent and probably not as fast as A* etc… but for my own small map with only the player and 4 enemies, it was enough for no slowdowns at all.

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun. Your email address will not be published. Required fields are marked*

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>

Leave a Reply

Your email address will not be published.