Project Frontier: Week 3

By Shamus
on Jun 17, 2011
Filed under:


As we reach the end of week 3 of the project (I didn’t start blogging until I was a week in) I decided to make a demonstration video:

Link (YouTube)

I’m not crazy about how the video turned out. There are annoying framerate skips. (Which only happen when I’m recording via Fraps. The program itself doesn’t have slowdowns like that.) I’d disabled dirt and forgot to re-enable it before recording this, so the surface is a lot less diverse than it should be, especially in the badlands-type areas. The rocks are colored to match the grass, due to a bug that I fixed after editing the video. In general, this just doesn’t show off the program as well as it could. I almost trashed it and started over, but then realized that those two hours could be spent improving the program instead of editing a two-minute video to show it off.

Also, I must thank the person who suggested Mercurial for source code control. Everything about it is awesome. I hooked my source up with Mercurial, and then put it in my Dropbox* directory, meaning I now have continuous, off-site backups of my entire revision history.

So, thanks for that. If I had access to professional-grade Perforce again, I’m not sure I’d go back. It really is that good.

On the subject of the source code:

Under normal circumstances, I’d share the source for this as I have in the past. However, I’m nominally unemployed and so I’m playing things a little closer to the vest. I have no idea how far this project will go or who will take interest. To be blunt: Minecraft has made a pile of thirty-three million dollar bills. It’s outsold a bunch of AAA games and it’s beaten them on the profit margins by a humiliating degree. Now, I’m not making Minecraft and what I have here is not worth millions. (Going by how much I’ve been offered so far, it’s worth zero. Heh.) But it’s entirely possible the employers or investors are looking for another game that hits those same notes: Replay value, retro-graphics, low system specs, unconventional gameplay. Someone might want to hire me because of this. Someone might want to buy the project. Giving away the source might make this less likely. Employers are sometime strange beasts, and they don’t always view source code the same way we do. People are less likely to buy code when they can get it for free, or if they’re concerned that the code is a group effort and they are worried of the group-fights that might appear once money is part of the equation.

I’m not ruling out sharing the source in the future, and I realize I’m giving up a lot by keeping the source to myself. Other coders out there could probably solve some problems that are difficult for me, or spot bugs I’ve missed. And it’s always nice to be able to show off a really well-polished bit of code.

But the point is, I’m holding onto it for now. Please respect this decision.

* My praise for Dropbox is somewhat less enthusiastic. It’s too stupid to ignore unwanted files and directories, which means it backs up a ton of useless intermediate compile-time files, and it freaks out a bit over the blink-and-you’ll-miss-them temporary files that are created during compile. The designers have flatly stated they won’t add a feature to exclude files, which means 95% of the crap in my Dropbox is stuff I will never want but can’t stop it from uploading. Clarification: You CAN tell Dropbox you don’t want certain files, but if you do that it DELETES THEM. Stupid, brain-dead design. Still, it’s free and it gets the job done.

Enjoyed this post? Please share!


A Hundred!20202019Many comments. 179, if you're a stickler

From the Archives:

  1. General Ghoul says:

    i offer you the sum of $5 for your dead parrot.

  2. Kian says:

    (Cue fanboyish gushing)

    Nice video!

    I can understand (and respect) the desire to keep the code to yourself. Open Source is a privilege, not a right. On the other hand, maybe you could make demos available. Would give you plenty of feedback on whether it is running on different makes of computers, and lots of testing hours as people explore every bit of functionality in the project.

    Saves you the time of running into the bugs yourself, and gives us a cool new toy to mess around with.

    • Eltanin says:

      You are such a fanboy Kian. It’s embarrassing. But at least we have that in common. Remember yesterday when you got him to reply to a question of yours? Squee!

      +high five+

      In all seriousness, love the series Shamus, thanks. I’m not a programmer, but I love reading about it and Kian explains the parts that I miss.

  3. Chr0n1x says:

    Bitbucket has private Mercurial hosting for free. I’d recommend them if you want offsite Mercurial backups without syncing every build file to Dropbox.

    • Simon Buchan says:

      I was literally scrolling down to recommend this. You can set up Mercurial to push all your changes every commit pretty easily if you don’t want to ever think about it, and it should be far faster to update since it knows exactly what changed.

      I don’t really have a problem with you keeping the source. Thankfully it seems companies are starting to get less scared of open source nowadays, and see it as just work experience they can check easier. If you are thinking of going commercial with this though, it totally makes sense to be closed source. Games are different enough software beasts that even Stallman himself has been heard to say they don’t need to be open.

      * I’ve heard about 70% of software is not sold – eg. internal tools, drivers/firmware/support for hardware, custom developed software also sort of counts. It makes me wonder how much cheaper software development could be for everyone if the default was to just release everything. Probably not that much :(

    • Chris says:

      It sounds like Shamus isn’t quite using Mercurial to its full potential if he’s syncing directly with his working tree. He should set up a second repository with no files checked out (hg clone, hg update null), and have Dropbox back up that repository. Then he does his work as normal and pushes his changesets out to this “bare” repository when he’s happy with them.

      This should also better facilitate working from other machines, if he ever planned on doing that.

      • Tim Keating says:

        Yeah, Shamus, you’re doing Dropbox a disservice here. The design is that anything you put into your Dropbox goes to the cloud. Anything more complicated than that would make it less useful.

        Chris is right. You should clone from your Dropbox repo to elsewhere on your local system, and build there. Then when you have committed a bunch of changes you are happy with, push back to your Dropbox repoo.

    • HarveyNick says:

      I’ll second the recommendation for BitBucket. It does exactly what you’re looking for. DropBox, however, does not. But then, it isn’t designed to, and what it is designed to do it does more or less flawlessly. You are, quite frankly, rampantly misusing it.

      The world’s looking pretty damn good, though.

  4. Henebry says:

    Video looks great. But why are we walking around with a camera strapped to our knees? Or is this perhaps a hobbit simulator?

    You might try SugarSync in place of DropBox. Bigger default (free) account size and better customization controls. I think it handles the issue you mention.

  5. GiantRaven says:

    I know I’m probably being an overly nitpicky jerk of a guy but the height of that camera feels like I’m peering out of someones stomach, rather than being at eye level. It just feels a little too close to the ground.

    It’s a breathtaking world though. It’s definitely something I would buy if it were a released game.

    edit: Heh, it appears I was ninja’d due to taking some time to deliberate on whether my comment sounded too rude or not (apologies if it did).

    • Shamus says:

      I think the “low camera” sensation is due to the overly high grass. The camera is about 1.6 meters off the ground, which is roughly right. Currently grass is about ankle height in dry areas and a meter and a half in the super warm, tropical places.

      It might help once we have more things on the terrain. Or I might need to lower the maximum grass height. We’ll see.

      • Jonathan says:

        The image for the grass is of a generic “short” type of grass. Tall grass is usually a bunch of long, narrow stalks like wheat, hay, alfalfa, etc. in appearance, so the grass makes everything look a lot smaller than it may be.

        • krellen says:

          Not necessarily.

          Regular “short grass” can get pretty tall if un-cut. Shamus may have had recent personal experience with this fact.

          • Shamus says:

            It was all just research for my project!

          • Jonathan says:

            Yes, but that image is still a bunch of vertical stalks, where the grass image he uses is a lot more bushy-looking.

          • Octal says:

            Maybe the tall grass should be thinner, then? When I look at that picture, it does look like tall grass, not short grass close up… I’m sure part of the effect comes from the presence of trees in the background and shorter grass in the foreground, but I think part of it is that it does look thinner and denser than short grass would close up. Oh! And it’s bendier. It bends more under its own weight, I think. The grass in the video seems to mainly stand straight up or straight at an angle, especially in the first bit.

        • Winter says:

          What it probably needs is a separate layer of shorter grass. Tall grass, but then shorter grass underneath when it gives way. That might be a bit complicated, admittedly.

          • aldowyn says:

            actually, that doesn’t sound that difficult to me. If you can make the grass variable in the first place, having it switch models at a certain point shouldn’t be hard.

            And if you want them on the same place, just make them separately and not connected to each other.

            • Peter says:

              winter is talking about the whole “not connected to each other” bit, though. layering one set on top of another.
              which could possibly give some nice looking terrain, but i’m not sure how heavily it’d tax those poor old laptops shamus wants to be able to run his stuff.

      • Groboclown says:

        Sounds like you have a game idea right there – lawn mowing.

      • X2-Eliah says:

        1.6 meters off the ground is not right (unless you are going for a boobcam) ;) You at your 6’1 (Iirc) should know that ;)

  6. Guts says:

    I’ve been using BitBucket to store my projects. In combination with TortoiseHg (the mercurial client), it’s wonderful.
    I don’t know what functionality Dropbox offers though, so I can’t really comment on whether or not it offers everything you’d need.

    This project you’re working on is really interesting, btw :)

  7. Brian says:

    Really nice work! I’d love to take a stroll, there.
    Any idea yet of what you want to do in that landscape, besides enjoying the scenery, I mean? :D

  8. Raygereio says:

    unconventional gameplay

    While on that subject, Shamus: what exactly is your idea that players are going to do to mess up that pretty, procedurally generated world of yours?
    Build things? Explore around? Have awesome-superduper-pantsless-dance-offs?

    • Alexander The 1st says:

      Excuse me while I go to the doctor to re-affix my jaw.


      Is there a reason you only show so little of the Sindarin Ered Nimrais at 1:52? It’s very striking, and really adds variety to the shots (Most of the places just have grass of some sort, though it’s not bad by any means, the hobbitness of the camera doesn’t seem to show there), and it’s where I’d make my base.

      Also, I’m glad your keeping the source to yourself. With it limited to the single island, I think this could be a fun game that feels like it will end. Well…depending on the mechanics, that is.

      EDIT: Sorry – wasn’t meant to be a reply. My bad.

    • bit says:

      That last one is no fair, Rutskarn would win every time.

  9. Jonathan says:

    I particularly like the mountainous areas. A few nit-picks or points:
    1) The hills, mountains, cliffs, etc. are all too small. The terrain is too varying over too small an area to be realistic. The source noise needs to be “blown up” over a larger area.
    2) Shouldn’t the tops of mountains (over a certain altitute, etc) be covered with snow in snowy areas, instead of being bare?
    3) The hobbit cam has already been mentioned, and is tied to the size of the gameworld.

    • Shamus says:

      To be clear, those aren’t supposed to be mountains. Those are just rocky hills. The REAL mountains are… not done. They look like the Great Pyramids right now: giant, smooth spikes. Proper mountains are on my to-do list.

      • MrWhales says:

        I do like everything in that video. Particularly the meadows with the flowers. Very nice. And the snow regions in that mountain look amazing. Although I think the “mountains” or what I assume you are referring to as the badlands area(appropriate name) needs some lovin’
        Like when you go over that tiny crest on the side of the “mountain” and the grass sticks straight out in the air. Maybe it was due to the things you fixed after recording, but very nice either way

    • theLameBrain says:

      I agree with what was said before about tall grass, adding a model specific to tall grass will help a lot. Also I was thinking that it is too same-ish. There should be a certain chance of outlier vegetation showing up. An example of what I mean is at the 1:00 mark. See that bit of green in the barren canyon? More like that please.

  10. Kian says:

    Interspersing some shrubbery might help with the scale issue, and liven up the world. It breaks up the grass without going all the way to making trees. You’d just have to give the grass a certain chance of being shrubs instead, make a roundish texture and add a few more polis (three quads in the shape of an asterisk instead of two in the shape of an x).

  11. Slip says:

    I really enjoyed the snowy areas (and the overly dramatic music, of course). :)

    • anaphysik says:

      The snow looks wonderful now. Was this fixed by varying the lighting conditions based on location like you mentioned, Shamus, or some other way?

      • anaphysik says:

        [can’t edit post for some odd reason…. (permission denied)]

        (The hills completely covered in snow in particular look just like snowdrifts (to me, at least). It might be interesting to have swathes of snow change the hit detection of the hills under them, to simulate deep snow.)

      • Shamus says:

        Yep, the lighting change was all I did.

  12. DanMan says:

    As I was watching the video, a thought hit me and I was wondering if you’d ever considered it. It’s basically procedural aging. You mention that the world will look the same every time you view it until you “reload a new world.”

    My idea was basically taking this deterministic logical world (deserts in the rain shadow, snow to the north etc) and make the world age. Deserts move as mountains form or erode, rainforests grow during years of extra heavy rain.

    I thought it would be interesting to explore how the world evolves as environmental systems impact it in the same way as how the world pops into existance the way the environmental systems work.

    • aldowyn says:

      Shucks, that sounds like it’s approaching an environment simulator. It’d be a neat trick, but I think that’s approaching the point where the added complexity just isn’t worth it.

      • WJS says:

        From what I understand, Shamus already has a bunch of systems like this (Procedural, NOT “Random”), only the entire process happens too fast to see (or is done before the chunk renders, which is basically the same). It could be a bunch of work to make this happen over an observable timeframe, but I don’t think it would increase the simulation complexity.

  13. Caffiene says:

    How far out are you generating the grass and flowers? I noticed a fair bit of popping, especially near the end (1:49ish) where pink flowers popped on a brown hill.

    Its a pity because the scenes with heavy grass and flowers are some of the most impressive… Might you consider some basic billboards out past the current limit if the 3-plane grass and flowers are too expensive?

    • Dev Null says:

      I noticed the popping too. Could you even just add a few pink dots to the surface textures, where flowers are present? I don’t know if that would make the close areas look weird – it _might_ make it look more layered, but it might also just look dumb. Could you use a different texture when its far our than when its close? Or is that too expensive?

      There were also a couple of places – mostly where the grass was sparse – where the X shape of the grass tufts was really obvious. Would it look better if the two planes were set at a random angle from one another (within a reasonable range) rather than just being always at 90 degrees? Or where the number of grass tufts is sparse, could you afford to add an extra plane to it? Or both?

  14. Kevin says:

    Good work so far Shamus the world is really shaping up and looks pretty cool. Now if only we can find something to do in it. I suggest flower picking simulator we don’t nearly have enough of those on the market ;).

  15. J Greely says:

    As much as I like Perforce, the next time I have to set up source control for a company, I’ll use Mercurial. Its only significant disadvantage compared to Perforce is handling people who should only have access to subsets of a repo, and there are decent workarounds for that.


    • Simon Buchan says:

      I’m guessing either push/pull acls or subrepos? Haven’t needed to deal with that myself.

      I do love using Mercurial at work though, the benefit of small companies is the developers have pretty much free reign to use what they want.

      Still looking for bug tracking that doesn’t suck though. FogBugz was OK I guess, but a bit too aggressive pricing wise for what we actually needed. Everything more complicated than a spreadsheet just seems to get in the way :(

      • Mathias says:

        Coding confuses my fragile music student mind. I think I’ll go put on some blues now.

      • J Greely says:

        Subrepos are the primary workaround, yes; the problem is that you have to plan ahead. If you start out with a single repo for your software stack, and then six months later have to bring in licensed code from an outside vendor that only certain people are allowed to see (with nasty legal paperwork involved), or worse, have people from a competing vendor working on another piece of your code, Perforce’s permissions and view mapping come in handy.

        Bug tracking is another giant time-sink, especially trying to integrate it with source control. I’ve come to believe that you should never try to tightly link the two; checkins shouldn’t change bug status, bug assignment shouldn’t map to source-control users, and the whole thing should be managed by a separate system that keeps track of the difference between “this should fix the bug”, “this went it into build 17”, “this was deployed in QA”, “QA verified the bugfix”, and “this went into production”, also separating the concepts of branches and releases…


    • Heron says:

      Having spent a year and a half using Perforce, I have to say I greatly prefer source control systems that do not do centralized locking. I absolutely hate opening a file to edit, trying to type something, then having to wait ten to fifteen seconds while my IDE contacts the Perforce server to let Perforce know I’m editing the file.

      Basically if given the choice between Perforce and anything other than Visual SourceSafe, I wouldn’t choose Perforce.

      At any rate, for my personal repos I switched from Subversion to Mercurial a few months ago, and I haven’t looked back.

      • J Greely says:

        On multiple occasions, centralized locking has saved me from spending hours resolving merge conflicts. It’s also quite handy when you discover that someone who has no business editing a particular file has it open. Of course, if there are no idiots anywhere in your organization, you may not need that particular feature. :-)

        And if your IDE takes fifteen seconds to open a file for editing in Perforce, either your server or your IDE needs replacement.


  16. Andrew B says:

    I can’t help but agree that there is something funny about the height/grass/perspective thing going on. I found that the really high grass was fine (it felt high) and the very, very short stuff was ok, but the knee high meadow bits had a touch of hobbit-cam going on.

    That said, I _love_ the meadow look.

    • Alexander The 1st says:

      It felt worse during hilly parts, where he would drop into a height that made the grass on the hill seem too tall, but when he was on top of a hill, it was well done.

  17. Ben Munson says:

    You could configure visual studio to put all of those intermediate files in a folder that is a sibling of your project/source folder rather than a child.

  18. Glenn says:

    I really hope you plan on addressing the stretched textures on ridges and cliffs, because it is rather jarring at the moment. Nonetheless, looking good. Reminds me of Outcast, which I know you’ve heard of/are familiar with.

    • Piflik says:

      Outcast had a Voxel Engine for the terrain, so there were no stretched textures there…great game in any case…maybe that could be an aspiration for you, Shamus ;)

      Anyways…fixing these kinds of issues are not trivial, especially for procedural geometry. The UVs are most likely created before deforming the terrain (I guess a simple planar projection)…you could relax the UVs after deforming to reduce the stretching, but you can’t get rid of it without introducing seams…creating these seams automatically doesn’t work very well…relaxing alone would reduce the stretching, but it would also cause seams at the borders of a terrain-tile, unless you exclude the border of the tile from relaxing, in which case the stretching will still be there, but distributed across the complete tile…and in the cases where the stretching is really apparent, like the cliffs, automatic relaxing might even introduce overlapping parts, and that is really bad…

      In the end you’d have to find some tradeoff…texture coordinates are a science in itself ;)

  19. X2-Eliah says:

    But the point is, I’m holding onto it for now. Please respect this decision.

    I’m a bit quizzed about why you even felt the need to declare this.. The code has your effort and ideas in it, and it’s only natural that you’d want to keep it as your own. But isn’t that granted? Or do people really demand that everything must be public-source immediately?

    Edit – Okay, watched the vid..
    The grass seems a bit too lush, doesn’t it? I’m sorely missing empty patches. Also, the tiny hills – no offense – look a bit, well, bad, with the stretched textures and, er, well, let’s just ay that while I did joke about mass effect 1’s hills, these seem even worse – tho again, with texture-fixing it would not be such a problem.

    Minor niggle – the text you placed in the vid for explaining deterministic is very unconvincing. I mean, I can generate a random world and it will also stay the same until I generate a new random world. You didn’t exactly sell the benefit of procedural generation there, I’m sorry to say.

    Edit 2: Hey.. you did mention climates.. What about micro-climate weather too? For example, over the areas which have snowy land, you put snowflakes falling; over flowery places you put warm sunlight, over deep green places you put rain, desert gets wind, and so on. I think it could really end up like a cool, unique thing if you have, like, 5 or 6 different weather ‘patches’/’fields’ in close proximity and all visible on the screen with slightly intermeshed borders but kept apart enough so that they can be distinguished..

    • Shamus says:

      Some people do take umbrage at that sort of thing. That was my way of saying, “I’m not interested in debating this.”

      • mac says:

        That’s because you owe them the source code. They’ve spent hours reading your blog, and they deserve recompense.

        Teh codez want to be free!

        Sorry, couldn’t resist :p

        ETA: Whoops, forgot to write my real comment :)
        It looks nice so far, and you can add another person to the list of “people who will buy this if you turn it into a real game”. This series has also been a great read so far.

  20. klasbo says:

    This project needs more trees. Also wavy grass that responds to pretend-wind.
    Yes, there’s lots of stuff to do, but I really think trees will help break up the scenery nicely – more so than more different types of hills/mountains would.

    • Alexander The 1st says:

      I’d personally prefer game mechanics first. How is this game going to play? Do the trees need to be climable for jumping puzzles, harvesting, etc.?

      Having trees for the sake of trees…just doesn’t really do it for me. Halo:CE had entire levels without a single tree, and it was still fun.

      • X2-Eliah says:

        Headbanging against trees. That must be a feature in the game.

      • Simon Buchan says:

        Of course, half of those levels were the Library….

        • Alexander The 1st says:

          Also, alien ship.

          Both the library and the ship were parts with major plot reveals.

          Though to be fair, I was thinking multiplayer levels. Blood Gulch was still a favourite last time I played.

          • Simon Buchan says:

            Yeah, I didn’t even mind the Library much, it’s just… traditional to mock it whenever Halo comes up. :)

            • aldowyn says:

              The Library is just really repetitive sometimes. Fun, though. Shotguns FTW.

            • Reet says:

              Yeah I was trying to play through halo on legendary and it was kicking my ass. I’m only on the truth and reconcilliation but I just die a lot. that game can be hard.

              On topic: I have to say that this project is looking good. Consider me impressed. I don’t know squat about programming but this seems really good for just a few weeks. I love how vibrant it is, it makes me feel happy…thats a bit odd maybe I should get that checked out.

        • klasbo says:

          Of course, half of those levels were the Library…

          Hah, so true.
          The amount of times my friend and I skipped that level in coop.. uncountable.

          Anyway, Halo was not a vast open-world game. They didn’t need trees because they had massive massive cliffs to break the monotony of the scenery.

          I still think trees lend themselves very well to this kind of procedural programming, and will simultaneously make the world less of a grass plains exhibition.

  21. SolkaTruesilver says:

    Shamus, now that you have explored geographical features, have you considered going into more social-simulator?

    I’d be interested to see how you could simulate towns building up and interacting in procedural contents. This is probably the kind of thing that you need to generate not the end result, but the whole process of growing and interacting, so you end up with an final result that makes sense.

    Hmmm… We need a weather simulator too.

    • Jeff says:

      Clearly there needs to be virtual people that react to the world and build their own virtual villages, virtual towns, virtual empires!

      …and then we need procedurally generated star systems. It would be glorious!

      • SolkaTruesilver says:

        One thing at a time. first, I’d go with stimulating weather and fertile soils. See with rainfall where the minerals gather, and check where would be the best spots to grow. Then, with water masses, you could simulate wildlife migration in your world.

        Then, include primitive society. Since basic hunter/gatheres have the same social behavior as animal herds, we can skip that step. We could go into primitive agrarian societies, that would develop based on fertile soil and water access. Then you simulate basic resources availability, you establish primitive trade and thus trade routes between these towns. Maybe you could even allow trade hubs to grow.

        Don’t go much farther than that. You only need the prototypical towns, establishing where the people would be naturally living.

        It’s a complex project, but it would go a long way toward giving a natural way of having a primitive society established without some arbitrary decisions. Man develops where Man can develop du to necessities.

  22. bingbong says:

    I can’t wait for the mountains! And trees! I’m really excited to see how this turns out :D

  23. HeroOfHyla says:

    Maybe… a wider field of view would help with the scale issue some people have been mentioning? I dunno. It seems like when I change the FOV in Team Fortress 2 from 70 to 90 everything looks bigger and further away.

  24. Alan says:

    Hey, I have no problem with you keeping hold of the source, particularly if in some roundabout way it helps you get a good job. I look forward to seeing it completed.

    Do you have gameplay ideas for this world, or are you building it to see where it goes?

    If it does turn into a game, I know that a lot of people would not be averse to purchasing such a thing.

    In fact, make a few basic character models, a basic AI*, some weapons, and some means of keeping track of scores, and what you have here would be enough for a zombie slaughterfest worth a couple of dollars to fund further development.

    *In retrospect, given what you have said about AI in the past, this is probably no trivial thing.

  25. Exetera says:

    The video looks pretty awesome. I personally can’t wait for clouds…

    The Project Hex overhanging grass texture looked kinda weird with the 3D grass on top of it, I think… perhaps a more neutral vegetation texture would be better? Also, there were a few places (most notably as you zoomed into the icy area) where the grass made a very visible grid, which didn’t look good. Maybe consider rotating the grasses at a random angle? I think I saw the bottom edge of a grass quad poking over the top of a hill as well…

    • Hitch says:

      First off, let me add to the praise. Overall what you’ve done so far looks really great and interesting.

      However, I also noticed the grass grid effect at about 0:40 to 0:45. It was jarring evidence of the underlying mechanics of how the terrain was generated. Major big studio games release things just as noticeable at times, but Shamus, you tend to call them on it. I don’t expect you to be perfect, but if you know that people can see something like that, I’d be surprised if you didn’t want to minimize it.

  26. Nathon says:

    Re: Mercurial – You’re welcome!

    I’ll third the people who mention bitbucket, too. While you have to hg push to get the off-site backup, it only backs up things that you care about.

  27. DanMan says:

    All I can say is that I’m disappointed that you’re hanging on to the source code. I understand it fully and it’s totally your choice. Just to hear you talk about it is educational.

    I just would really like to dive through the code and see how things are happening.

    I say this because this is a very interesting concept that I have absolutely no experience in. Take the fact that I and others want to see your source code as a compliment and please ignore the ignorants who want to demand you freely share something you have spent a long time building.

    • Nathon says:

      I think those “ignorants” are straw men. I haven’t seen anyone actually demanding the source; that would be unreasonable. I would like to have a go at porting it to a non-windows platform, but given that it’s C++, part of me is really glad that isn’t an option.

      Whatever happens, we’ll either be able to play with the source or we’ll be able to play with a real game based on it. Personally, I think it’s most likely that Shamus will find a real job and they won’t mind him releasing this code.

  28. Jarenth says:

    As a reply to the video: It seems like it would be quite interesting to have a game set in a non-deterministic procedurally generated world.

    It could be the world’s first authentic Crazy Hollywood Drug Trip simulator.

    • X2-Eliah says:

      Isn’t determinism implied in the concept of procedurally generated world (when contrasted against a randomly generated one)?

      *genuine question*

      • Piflik says:

        Well…most generators use some kind of starting settings (called ‘Seed’) to create their results…different seed -> different results; same seed -> same result. So they are deterministic.

        You could randomize the seed (or pseudo-randomize it, since there’s no algorithm for real random could measure some physical property for real randomness, but that’s a whole different matter…) over time and area to have a non-deterministic world…or at least as close as you will get…

      • Dev Null says:

        Not necessarily. If you generate each zone totally at random as it turns up on the edges of your vision, and “forget” anything about any zone as it drops over the horizon, then walking 10 miles north then 10 miles south might not get you back to where you started from. This would be a pretty strange thing to do, but technically procedurally generated as I understand the term.

        • X2-Eliah says:

          But how is that any different than a streaming random generated world? Isn’t the entire premise of procedural generation in that it does give the same output for the same input (‘world seed’)?

          I mean.. if you forget it and tell it to generate something else, then that’s random generation right there.

          • Atarlost says:

            Procedural means there’s a — well, a procedure. The output isn’t just noise. Random is exactly that: just noise. It can be stored truly random values or seeded pseudorandom values and be static, but it really is ugly. It makes Blue Poles look like a Mondrian.

            Dynamic procedural content has been around as long as procedural level generation. Originally it was about not having anywhere to store levels. The Nethack lineage has stored levels, but in most other roguelikes if you climb down a staircase and then back up you don’t wind up where you started. The levels are still very definitely not noise.

          • Piflik says:

            But how is that any different than a streaming random generated world?

            It isn’t, but it still would be procedurally created…

      • Kian says:

        Not necessarily. The determinism is achieved by the fact that he uses a pseudo-random function that provides the same results when given the same inputs.

        This means that when he says ‘something has a given chance of being a given way’, the ‘dice roll’ that determines what the result will be is always the same. However, if you make it so that this function takes another variable (say, time), then results will change according to time as well as position.

        The program would still be deterministic, however the only way for you to visit the same spots would be to visit them at the exact same time that you saw them before. Otherwise, the terrain would have changed.

        Actually, that gives me a cool idea to play around with. Could be fun to implement.

      • Blake Winton says:

        Hopefully, if the project does take that direction, Shamus could use the shaders to do something like this. :)

    • Shamus says:

      We can’t stop here. This is wombat country.

  29. Dragomok says:

    I’m not sure if somebody has said that already, but the world in the project looks many, many times better in motion than in screenshots.

    • X2-Eliah says:

      I actually disagree. The stuttering and the popping, not to mention some poor canyons with texture-stretching, kinda made the video feel very unpolished.

  30. Mirthlani says:

    Shamus! I will pay you $10 if you make the trees such that each tree is generated dynamically using a fractal algorithm.
    Your project is exactly the sort of thing I wanted to build when I was getting my CS degree back in ’96. I took a fractal geometry class specifically with the hopes of using fractals to generate terrain and plants.
    Unfortunately, my ability with math and the hardware back in ’96 wasn’t up to the challange. Ended up building web sites to pay the rent.
    So I’m re-living my early game building dreams through you. Can’t wait to see the final product!

  31. Shamus, all you need to do now is start thinking of procedural solar systems and galaxy, add some spaceship building/player modification, resource hunting and traderoutes etc and you got yourself a Frontier 2 (Elite 4) kinda game, which would rock as Elite 4 is apparently in limbo, looking up Elite 4 is a sad thing indeed, nothing happening since 2010 (vaporware?).

    Imagine walking around inside your spaceship,
    traveling between solar systems,
    docking at stations and walking around inside,
    or landing on planets and exploring the terrain,
    mining resources or wildlife etc.

    Besides the Sol system (which could be semi-generated), few would care if the rest of the galaxy(ies) was correct, so procedurally generated would work great in galaxy creation.

    • X2-Eliah says:

      There is a HUGE difference between procedurally generated stuff, and actual enjoyable content. Likewise, the difference between tech demo and a fun game.

      You can take a loot at how Infinity engine/game turned out, where the devs just focused on technical details and completely screwed around on actual content, to the point where the project more or less stalled and fell apart as far as releasing an actual game is concerned.

      • *sigh* yay somebody is patronizing me like I do not know about coding, game development and design, thanks…

        Let me break down what I said above in a different way so that normal people like you can understand:

        Shamus could do a full universe simulation with his engine,
        thanks to progress and evolution it is possible to make games today as an individual, which would have taken a small team back in the day.

        the original Elite looks like crap by current standards, and two people made that one.

        A universe “skeleton” would allow Shamus to test future ideas easily whether they would be space or land or sea or air related, maybe even mess around with space physics, and so on. (imagine simulating a black hole, wow).

        • X2-Eliah says:

          Well. I bow to your clearly superior wit, oh lord priest of coding, game development and design.

          To my lowly earthen eyes your claiming that all it took for Shamus to do was to ‘just start thinking’ and ‘imagine’ of galaxy creation where now he has a terrain-based rendering engine with grass and flowers seemed pretentious and detached from reality. It’s not even remotely in scope with his goals, and frankly nullifies nearly everything Shamus has done in this project. In short, to reach your non-normal folk mind, you took a look at his work, and wrote ‘Oh wow, this is cool. Now all you need to do is make something completely different and wouldn’t it be cool then?’

          But what do I know, being one of the normal people.

        • Kian says:

          “Shamus could do a full universe simulation with his engine”

          Oh hey, a ‘flat-earther’! Cool.

          I kid, I kid. Honestly though, there’s a huge leap from ‘terrain engine’ to ‘universe generator’.

          You’re talking about simulating fluid dynamics (for the water) aerodynamics (for flight), relativistic physics (for space), and find the unification theory (to simulate black holes). And find algorithms that do it all in real-time.

          Starting from the fact that he can emulate (not simulate) some weather and terrain types, and pepper it with grass and flowers. He doesn’t even have trees yet.

          If you are familiar with programing, I’m sure you’re familiar with the concept of ‘scope creep’. Your suggestion is looking more like ‘scope death march’.

  32. kikito says:

    I’m not really interested in reading the source code (ok, maybe a bit, but I can leave with that, and sharing/not sharing it is totally your call)

    Would it be out of place to ask for some metrics, though? Like, how many classes are there (no names, just a number) or where is most of the execution time spent – that’s the sort of thing I’m really into.

    • Shamus says:

      I’m not sure how we want to count classes. I have a TON for open GL stuff. Vectors, texture coords, matricies, color values, and a dozen other things I can’t remember. Most of them are just generic utility things that I use in all my projects. (You can see early, rudimentary forms of them in the Pixel City source.)

      For classes specific to this project, there are only a few: Pages of data, terrain blocks, grass clumps, and trees*.

      We could count regions as classes, but they don’t have any methods. So, they’re structs, basically.

      So the answer is either four, or dozens, depending on how you categorize them.

      * The tree class currently generates one tree. With no foliage. Or branches. So, a pole, basically.

      • Shamus says:

        To answer the other question:

        I have not done any profiling. (I’m pretty sure Visual Studio 2010: Hippie Freeloader Edition doesn’t even support profiling.) However, it’s obvious that the vast majority of CPU cycles is spent filling in the terrain data. Everything else is lightning quick. Once the data is cached, I can zip around the terrain and it can keep up with me with no difficulty. As soon as I enter an area that needs data, the elevation & surfacing system starts up. I can throttle it, so I can decide if I want horrible framerates or if I want to wait a long time. (A long time being a few seconds.)

        When it comes time to optimize, that’s where I’m going. It’s naturally a dangerous place of deep iteration, table-walking, and massive amounts of floating-point interpolation.

        It’s going to be hell when I crawl down in there to optimize the thing. People may die.

        • Rick C says:

          This sounds like a job for a background thread: create, possibly ahead of time, additional regions. You could have the thing, for example, create them in concentric rings around where the player currently is, if there aren’t already any.

          • Winter says:

            Technically you could start N threads (where N is some number possibly related to the number of cores/processors your computer has) that fills in the game world in a certain slice around you. Hey, easy multithreading!

            • Kdansky says:

              There is no such thing as easy multithreading. At best, you still have to bother with locking and critical sections. Writing multi-core code is incredibly hard, especially with tools that were never meant to be used for it (such as C++).

        • Kdansky says:

          Good (or just decent) profiling tools cost quite a bit of money. You can improvise with timing macros at best.

  33. Joe Cool says:

    Cool. When do I get my gun/sword/spells/motorcycle/helicopter so I can run/drive/fly around and shoot/kill things?

  34. Lesquille says:

    I imagine an RPG using entirely procedurally generated content, something like how the world is made in Dwarf Fortress. It generates a huge world with mountains, lakes, plains, rivers, caves, oceans, forests and so on. Then it places towns and cities according to where they would logically settle. Then it populates them with various creatures, hostile and otherwise. Quests could be procedurally generated too. If a goblin town appears close to a human town, the nearby human town will have lots of quests to fight goblins, and you could get involved in battles between them.

    We’re counting on you, Shamus! Make the best game ever!

  35. anna says:

    Others have mentioned bitbucket for mercurial. I’ve personally been using git for my projects, and github to store the changes offsite (and used sourceforge+cvs/svn for years before that), and I can attest that it is painless and avoids the annoyances that dropbox has there.

    I am curious what advantages mercurial might have over git – is there a compelling reason to use one over the other? Anyone have any thoughts there?

    • Halka says:

      I’ve used both, and considering basic usage, there is virtually no difference between the two. Mercurial seems to be a bit easier to pick up ( Git does appear to have more features geared towards power users.

      As far as hosting services go Github is fine (and from my experience, a bit snappier than Bitbucket), it does offer just one private project when using a free account though (unlike BB, which has unlimited private repositories). Also, there is Google Projects, but I don’t know whether they offer private repositories at all.

      Windows users seem to prefer mercurial, since it does not come with any baggage like Cygwin (well, aside from Python interpreter) and Linux users seem to prefer Git, since it has a bigger share of the user base (and even the kernel project uses Git).

      But mostly it just comes down to the fact that you can type `hg` faster than `git` >_>

      • Kdansky says:

        You can make an alias for your git commands.

        ga -> git add
        gc -> git commit
        gm -> git move

        and so on. ;)

        But I’m more of an Eclipse/VS2010 user, so I have (and want) my source control integrated into the IDE.

  36. swimon says:

    Ok so where the treeless rainforest meets sand that’s a beach right? I thought it was a desert at first but it’s a coastline. Why is the water brown? I know you said before that the water is just a single polygon and will be changed later but it looks like you changed it from blue to brown and it just does not look like water. I know real water is very rarely all that blue but it’s a nice shorthand in understanding the environment and it makes a nice contrast (as it is now it just looks confusing to me at least).

    Other than the desert/water it looks beautiful, the flower filled meadows and the snowy “mountains” especially looks fantastic. I’m really curious as to where you go from here and how this game will eventually work.

  37. Zagzag says:

    I would pay for this game when it’s finished, if it runs on my computer. For this reason a demo would be useful, as due to my not very good computer I’m not always sure.

  38. Eltanin says:

    I share your opinion of Dropbox but for different reasons. It seems that they have several brain-dead design flaws. The one that I don’t like is from a security angle. Dropbox creates a host identifier for your computer that is stored unencrypted and never changes even if your password changes. This means that it is trivial to go find it (after compromising your compute of course) and use that to get into your Dropbox from my computer and you would never know. That’s a problem if toy don’t want me to see your files, but it is also an open invitation for me to replace your files with malware ridden versions. Dropbox claims to be working in a fix and maybe they’ve already released it even – I haven’t checked recently.

    But I like people to be aware that Dropbox introduces a lot of risk into your network.

  39. James Pony says:

    Would it be reasonably easy to add a mechanic for stuff like explosions and/or bulldozers to alter the terrain permanently?

    I’m thinking this from the perspective of a basically infinite, dynamic RTS wargame.
    How easy would it be, for example, to add code for procedurally generated fortifications and other fixed structers and systems that make sense? I.e. observation posts on top of high ground, not trying to put airfields in canyons or in a lake, etc.
    And in general, settlements and roads and such.

    I always feel the existing games end just when you get to the good part. For example, you just gathered your massive armies and your economy is more solid than the bedrock it stands on, and you got nothing left to conquer. Or any mission in most RTS games, you’ve built your damn bases and gathered all your units and poof, you’ve already won, congratulations, now start over from scratch.

    Speaking of infinite worlds to conquer, at what point does the existing world become too large for any new and shiny machine and can anything be done about it?

    • aldowyn says:

      “basically infinite, dynamic, RTS wargame”

      … Huh. An RTS with a much different POV… on dynamically generated terrain… Now I want multiplayer… where certain areas are more valuable because of increased minerals and stuff… Huh. Sounds awesome XD

  40. Kdansky says:

    I feel so proud for recommending Mercurial. ;)
    But to be honest, I am surprised you actually tried it. I feared you were already gone down the horrible path of “I ain’t using that newfangled crap!” Thanks for proving me wrong.

    And yeah, I also have my crap on Bitbucket. You can make all your projects completely closed and invisible to anyone else.

    Git vs hg: Git is smaller, faster and has a few extras for real powerusers. Hg comes with a good GUI, and is just a tiny bit easier to use, especially on Windows. Both are great and totally blow SVN/CVS out of the water. SVN cannot even merge something correctly if two people made the identical change to the same file (which is a pain when 50 people work on one project). Hg merge feels like magic, it just always works, even when you think it should not.

    Video: I think the view point is too low, but Hot Damn does that look awesome. I want an open world RPG (like Morrowind) using that.

  41. Murkbeard says:

    Have you considered making the game you felt FUEL should have been?

    Apart from the car physics, which could be made very simplistic, it seems most of what needs to be there for an offroad car exploration game is an interesting world, and you’ve certainly got that well underway.

    It doesn’t capture a creative soul in the same way that Yet Another Minecraft Clone would, but it might make for a relaxing game if you can just… Drive.

    Alternatively, you could always make Horse Riding Simulator 2014.

    • Octal says:

      Hang glider sim? Well, maybe not exactly, but I think something where you could fly around over it, come in for a landing and run around at ground level, find a cliff and jump off it to start flying again, etc., would be neat.

  42. bit says:

    Wow, that looks excellent! It definitely does need some variety in vegetation types, the textures are a bit muddy and stretched, and the lack of general variation in local ground types (needs more dirt, yes) looks a bit boring at times, but the geometry generated looks absolutely stunning and the overall graphical stylization is very slick. One quick thing about the grass; randomize the orientation. Them all facing the same direction looks very artificial.

    That all sounded far more negative than I wanted it to. Point is, good job!

    I think a sort of free-form fantasy hunter type of game would work here; scavenge materials for weapons, use those weapons to take down monsters, gather materials (bone, scales, etc.) from those to make better weapons, and take down better monsters. Add a touch of survival to that and you’re gold. If your monsters were styled simply, Eg. Minecraft, you might even be able to have them be generated procedurally.

  43. burningdragoon says:

    As an very occasional commentor on you blog I demand you to release the source code! Or… not I guess. One of those two though!

    Anyway, still looks like an overwhelming amount of grass to me sometimes, but still super awesome overall.

  44. Odoylerules360 says:

    It already looks better than Oblivion!

    I noticed that in large groups of grass tufts, the grass polys seem to line up into a grid that is somewhat distracting. Would you be able to rotate each tuft by a different amount, so they don’t all line up so well?

  45. PaperStab says:

    Shamus, this is pretty amazing stuff! Have you considered selling it to other developers somewhere down the line?

  46. SteveDJ says:

    Loved the video – EXCEPT for the last 5 seconds. The 3 or 4 pages of text just flew by. I couldn’t even get the full name of the dramatic music.

  47. RichVR says:

    Shamus, I hate to be a wet blanket here, but… Do you really feel completely sanguine about using Dropbox or any “cloud” solution for saving your stuff? I mean considering the LulSec stuff that has been happening? I personally have never trusted the idea of off site storage that didn’t have a physical aspect that I could get to and pick up in my own hands.

    Yeah, I know Steam and all that. But I could live through a Steam fiasco, because that’s just games.

    I hope you understand that I’m just curious and not in any way berating you or anyone else that utilizes that kind of service. Just curious.

    • Kian says:

      The point of off-site storage is that it reduces the risk of losing everything to a single event. Cloud storage is a cheap and easy way of getting off-site storage.

      If thieves enter his house and steal his computer, or lightning strikes and fries everything, he can recover the code from the cloud. If the cloud server collapses, he has the local storage in his computer.

      Sure, having a place of your own to serve as off-site storage is a nice idea, but that means having a second house, or a friend’s house or something. It means setting up a virtual network, keeping a second computer running to serve as back-up, etc. It’s not cheap, and it’s not easy in the way that dropbox, github or bitbucket are.

      If his code is ever worth a couple million then sure, he could afford to own the backup servers. But before then it would be a pretty big expense.

  48. Ander the Halfling Rogue says:

    To get it out of the way so you know I’m not “missing the point”: The world is beautiful. The climates and the transitions between them are great. I love the snow area, especially.
    Now for the far-too-open question: What kind of game would you play on this?
    (that’s not supposed to sound derogatory; I’m just wondering)

  49. Shamus, you know what this landscape makes me think of?


    I totally want to launch that thing off the biggest hill available. WHEEEE!!!

    • (apologies before hand to whomever did the terrain at BioWare but..)
      Actually, I kinda wish the terrain/landscape had been this interesting, Mako’ing around would have been a lot more interesting then.
      ME2 kinda improved but it’s no longer as open as in ME1.

      The “planet” could have been generated (5 sec Shamus writes in the video) during the loading screen.

      Just do some higher quality textures, more production value and someone to assist on the coding and this baby could have been used to make truly “alien” Mako terrain.

    • Chargone says:

      see, my only complaint about the mako was that once you got going it was more vulnerable to everything but the heaviest artillery than you were on foot.

      the hover tank was way less awesome.

      i seem to have been a minority though.

      (and yes, the non-story planets could have done with a bit more variety and detail. the story planets tended to be more liner in exchange for having that though)

  50. Sucal says:

    You should work on the world, then split it into several different games or similar, once the generation is down perfect. A battlezone like rts/fps hybrid would be completely awesome way to take advantage of the ease of code.

    Or an old fashioned hack and slash rpg type thing. One that has a seemingly randomly generated plot each time. Considering how proud you are of the Terrain and generation, you could even try a life/mining simulator, where you try and support a large enough ecosystem without damaging the local environment.

    Then you can finish it off with a pony ranch type game, where you find and tame horses. Something for the kids.

  51. Shamus, I bet you love just exploring the landscapes your engine makes, like that ravine there, awesome.

  52. Cybron says:

    Some wonderful landscapes in there. Keep up the good work!

  53. cody says:

    This is awesome, these projects are what initially got me reading your blog and I’m super excited to see you doing another one. I can’t wait to see how it turns out, keep up the good work.

  54. Josh R says:

    If you could make procedural quests and put monsters into the game you could make a very interesting survival hack and slash

    Also – just out of interest, what does Mount & blade use to generate it’s maps?

  55. James Pope says:

    It would probably do wonders for the environment if you flipped a light switch up there in the sky and added some procedural fluffiness floating up there too.

  56. Shezi says:

    Just a little idea here: If you want to make some money off of the project why not set up a kickstarter fund for it? You could offer it as an exploration game, maybe add some vehicles and a “shoot the nicest picture” competition. Peg it at 10k, which should keep you floating for a few months.

    Anyway, I really enjoy reading your great series and am looking forward to the next installment.

  57. StranaMente says:

    Don’t know if it’s already said, but I think the height of the grass is disproportioned to the world.
    Anyway I think it looks very nice!
    I’m waiting to see more of this,

  58. Vekni says:

    Respect the decision? How about admire (and a touch of envy) it? :)

  59. Gobo says:

    Nicely done. Was looking into the same way way back, but it ended up in nothing. (Probably because the hardware wasn’t quite there yet, this was about ’99).

    As for the Dropbox issue: Check if you can tell your compiler to use a different directory for temporary stuff. I’m pretty sure most of them would have an option for that. For GCC at least it is done by setting the environment variable TMPDIR.

  60. wererogue says:

    I don’t suppose you’ve thought about dropping procedurally-sized Pixel Cities onto your landscape…? >:D

    • WJS says:

      While that sounds cool, it wouldn’t work. Pixel City used a whole bunch of tricks to make it look good at night. Making a procedural city look good by day would sure be possible, but it would involve a lot more effort than just dropping it in. You could reuse a bunch of the code, but you’d need to write a lot from scratch too. I think it goes without saying that surrounding a night-time Pixel City with this terrain would be kind of pointless. :P

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *


Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

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>