Sunday, January 20, 2013

Don't be square!

Minecraft gets many things right, but the top in my list is how easy it is to create. Nothing is simpler than laying out boxes. Since everything is square (even the cows), being limited to boxes does not feel bad at all.

If you are doing some sort of sandbox environment going beyond just boxes is not trivial. One possible approach is to do like Blockscape, where in addition to the classic box you now have a large repertoire of prefixed angular shapes. I do not like this approach as it makes the interface very complex and frustrating. It makes you forehead veins pop.

So I chose a different approach, where you still lay boxes the same as in Minecraft, but then you can go back and alter them. I saw that a single operation was enough to produce both curved and straight angled surfaces. If you applied it gently you would get curves. If you applied it more, it would straighten out.

Here you can see a round hole and a needle, both initially created as boxes. It only takes a few clicks to shift their shapes:


I think this is the right direction. Still it is not simple to implement. While I got this thing working, there are many issues to fix.

I leave you with a video, let me know what you think:


83 comments:

  1. You know what we think... "wow!"

    ReplyDelete
    Replies
    1. Oh, and when you demonstrate these things, please demonstrate them in the sun rather than the shade! In the first one especially it was difficult to see what was happening. :)

      Delete
  2. God damn it Miguel. I assume you're smoothing with the mouse wheel? Seems like the natural fit for it.

    ReplyDelete
    Replies
    1. I use the wheel for zooming. The smooth becomes active when I press SHIFT.

      Delete
  3. Keep this up, again awesome

    ReplyDelete
  4. This is totally going into the right direction, yes. You might solve the 'archway challenge' of Sauerbraten/Cube2 type engines with that: http://www.youtube.com/watch?v=H4ONIJAF2Vo

    ReplyDelete
  5. With the red fog highlight, isn't it hard to tell what surface you are touching? Perhaps you could adjust the color of it slightly based on the normal of the surface underneath. Red for north, green for south, yellow for west, etc... and weighted average them if the normal is facing diagonally.

    Its also a very harsh highlight, does it need to be so vivid?

    ReplyDelete
    Replies
    1. I'd guess, that at some point he'll get rid of the red fog altogether, it's not pretty (you can't stare at your amazingly awesome builds without seeing it?) Though he could just add a "hide UI" button, I suppose.

      Delete
  6. Another quick thought: would it be possible to ghost in the effect of adding stuff so you can see what you are placing? It would be very useful considering the more complicated nature of your environment.

    ReplyDelete
    Replies
    1. I had that kind of thing at one point. You can see it in very old this video I never published:

      http://www.youtube.com/watch?v=STU01Rb0WVY

      Then some people who actually tried the demo suggested it was really not necessary so I nixed it.

      Delete
    2. It is not public yet, I am sorry.

      Delete
    3. I hope someday it will :)

      Delete
    4. Amen. This is amazing. Seeing what my students can make with Minecraft, I'd love to see what they could do with this!

      Delete
    5. By ghost he may have meant something like this?

      http://www.youtube.com/watch?v=btPwbguPwng

      Delete
  7. wow wow awesome.
    you ever thought that the alignment of the blocks around the world can be a serious limitation? imagine a "top view" and then you realize that all buildings of the universe is perfectly aligned.
    I follow your blog for over a year and see your amazing progress.
    I saw that you care about the detection of patterns. So I wonder if you care about the problem of perfect alignment.

    ReplyDelete
    Replies
    1. Yes it is a problem. I do not have a simple solution for this, so I don't worry too much about it :)

      Delete
    2. One thing you might be able to do, is have the selection center around the cursor/targeting reticle, so that instead of selecting squares on a grid, you just have a certain sized square which is that size and that position relative to you regardless of where you are. Sure, this would mean you dont have nice big blocks in how the system works (oct-tree wise), but to the user, it will look a lot less like the system is trying to constrain them. Then you could take it a step further, and have it rotate with the user, so that instead of a smooth square, you have a square made of tiny squares if you are diagonal to the grid.

      This would probably be a lot less jarring to users.

      Delete
  8. When do you think this might be ready for download?

    ReplyDelete
  9. sculpting rounded corners... I didn't see that coming. Simple, intuitive. Looks dead easy on the example in the video - I wonder how it would work on a complex construction with many intricate faces? Does the selection process work on direct line of sight? I suspect that highlighting the correct square might become tricky...

    ReplyDelete
    Replies
    1. Not for now. There are many things to consider to make this right. For instance it would be nice if you could choose to smooth only in one direction (horizontally let's say) or over just one material, etc. These things are possible with the algorithm, the challenge is devising an intuitive UI.

      Line of sight may be useful for selecting some of this behavior. Thanks for the suggestion. I will see if there is a way to bring it in.

      Delete
  10. hi

    looks great- i have a question regards how this increased visual fidelity (curves, holes, spikes) etc feed through to other systems - player collision,physics,flowing water that kind of thing. i assume this all get proportionally more 'expensive' ,is this something you allow to be a concern as you design this or do you worry about those constraints later?

    - as you were building the 4 pillars with a roof- i wondered if you could red select the whole (set of blocks ) and smooth them all together- i guess depending on the smoothing/averaging method used you would get different results -including geometry floating in air?

    ReplyDelete
    Replies
    1. Well you would never get floating geometry from smoothing because it happens over the surfaces. The topology of the mesh never changes.

      As to adding complexity, it adds zero. For the engine square blocks are no different that smooth ones. For instance the terrain and trees are already smooth, also the procedural geometry already had aches and weird angles.

      It always had this ability, the trick was how to edit it.

      Delete
    2. i see -it smooths the surface only.
      re complexity- so if shot an arrow through the hole in the wall in the above video would if know how to collide with the wall bit of that block and not the hole bit ?(Not a great example perhaps but best way i can think of asking.)

      Delete
  11. Looks impressive, and it's probably really easy to use. In fact, this reminded me of a little 3D-modeling tool called sculptris, that is a real pleasure to use, even for someone with no experience and no talent (like myself).

    But, comparing this with my expereince in sculptris, I see one problem: it's very hard to smooth two different places in exactly the same way. In Minecraft, if you want to make your house simmetric, you just place the same blocks on both sides. But with smoothing in the equation, you'd also have to smooth them in exactly the same way... and I don't see any easy way to do it.
    That's probably not a "deal-breaker" problem, but something worth thinking about, i guess.

    ReplyDelete
    Replies
    1. Yes you are right. For things that are angled but flat not a problem, as they will match in both sides. For something curved it may be hard to see there is a difference.

      Delete
    2. I was wondering the same thing, but was hoping you would come up an intuitive UI to let you copy+paste features. Make an arch, somehow select JUST the arch, then copy and paste it wherever you wanted. Repeat for other geometry features.

      Like you said, it appears to be mostly in the UI at this point.

      Awesome, awesome work in any case. May I say that I predict you will become a millionaire soon? I mean, if Notch can do it with his engine...your engine absolutely can.

      On another note when do you plan on incorporating multi-player?

      Delete
    3. I'm not sure of what kind of game you're aiming to do but a copy/paste feature would be awesome indeed. May i add a possibility to save such copied content into a custom brush list for later use ? ( ctrl+c/ctrl+v/ctrl+s functionality )

      If you're looking for tools to implement, i think boolean operations would add a lot to the more creative users with an add/substract function but i can't seem to figure out how it would work in-game as in 3ds Max we get to use the gizmos (arrows and circles centred on the objects pivot point).

      Delete
    4. Yup, I do have plans for Copy/Paste. Actually there are some cool game ideas around that I want to explore first so I will shut up at this point.

      Delete
    5. How about AI-Minions who carry out the players building blueprints (like in Dwarf Fortress)? So the player can lay out entire cities (using powerful tools like copy&paste) without placing everything himself or beeing too overpowered (a problem Minecraft never solved).

      Delete
  12. Hey man ... just include redstone and you are good to go. :D :D But seriously, I adore your work so far. Once I grow up I will also be an engine programmer like you. :D

    ReplyDelete
    Replies
    1. Rather than Redstone, I would love to see actual mechanics XD. Stuff like clockwork, but thats kinda wishful thinking I guess.

      Delete
  13. It's got this Minecraft meets Zbrush thing going for it. Pretty awesome.

    ReplyDelete
  14. Great! Maybe you'll contact Notch to make some minecraft 2 together?

    ReplyDelete
  15. I'd love some audio commentary in your videos. To have you talk through what you are doing and how, as well as how it works, would make the demonstrations a lot more interesting.

    ReplyDelete
    Replies
    1. My English is not very good looking!

      Delete
    2. You don't have to do that in english :D
      (you could add subtitles)

      Delete
    3. Me personaly, I wouldn't mind commentary if it was in another language, as you could add subtitles to it, and people in your native tongue would like it also

      Delete
    4. O.O I am amazed at the support for subtitles.
      I personally love subtitles (Grew up with them, Im Dutch =3, its how I learned English) But I always thought English speaking people were pretty much completely against them XD.

      Delete
    5. Who cares about broken English, you write great blog posts and I'm sure you'd get something worthwhile said in your videos as well! Subs are also fine.

      Delete
  16. The smoothing thing looks awesome. I love the concept. Although watching you painstakingly build stuff reminds me of this:

    http://www.i-programmer.info/news/167-javascript/5359-javascript-comes-to-minecraft.html

    although it seems like your building grammar stuff is a better way of constructing structures. Or perhaps both with interactions between them, for different purposes?

    ReplyDelete
  17. I am not kidding when I say I would give you $20 right now for this.

    ReplyDelete
  18. <3 i believe you work could benefit from the building system used in starforge.. upon selecting a face as-long as the mouse is held you can draw in that plane horizontal/vertical ... to reiterate .. selecting a front panel allows you to draw left and right and up and down to create a wall that's the same plane as the panel that was selected. so long as the mouse is held down its not possible to miss click on the air or blocks behind/in-front of the wall.. this makes for fast intuitive building. <3

    ReplyDelete
  19. "For instance it would be nice if you could choose to smooth only in one direction (horizontally let's say)" you could use the idea from the above post to achieve this too..

    ReplyDelete
  20. what is it exactly? it's really awesome!!! and i'd wanna try it

    ReplyDelete
  21. I have only recently stumbled on to this and find it very very nice! Is this something you're working on to release as a game later on or is this more of a proof of concept and just something for you?

    I think you have something very good here and potentially as popular and innovative as Minecraft was. I'm hoping you are planning on going further with it and then letting the rest of us enjoy your hard work!

    ReplyDelete
    Replies
    1. Thanks, yes plans are great. We'll see what happens...

      Delete
  22. I have a somewhat unrelated suggestion: In Minecraft, I find it quite annoying how you put down a block, and that block then occupies your view in the exact spot you want to continue. It requires one to make micro-adjustments to the crosshair (see at 2:50 in your video) to keep it pointing on the correct block's correct side when building long lines. I suspect this could be improved with some optional snapping: Make the crosshair leave the center of the picture, and automatically stay on the equivalent side of the new block as the last side you targeted, as long as the mouse is not moved too much. To clarify: If I look at the west surface of a block, and place a block, then I want my cursor to automatically aim at the west center of the placed block. While not always good, that is a usecase that comes up very often.

    It would allow people to lay down long lines with very little effort.

    ReplyDelete
    Replies
    1. Yes, I agree this needs to be improved.

      Have you look at how they do it at StarForge?

      Delete
  23. Hello Miguel. I like your project and your video about this. I have question. If it is not secret, what is requirements (computer) for this engine and his procedure generation of environment world.

    ReplyDelete
    Replies
    1. Thanks.

      It takes a multi-core CPU (2 or more) and a gaming video card.

      These videos were captured in an Intel i5 CPU, ATI 4770 GPU. This is 4-year-old hardware.

      If you had 16 cores and a 7970 this would have a lot of more detail. This engine is able to exploit your system to its max.

      Delete
  24. How do you do the red highlighting? Are you using decals or shader magic?

    ReplyDelete
  25. wow this looks amazing, if it would also feature a MC style Gameplay (mining, mulitplayer) then i would definatly buy it.
    smoothing is good too, only problem i see, is that if your for example making a hallway of pillars, its hard to smooth out all those pillars in the same way. maybe there could be some numbers or another indicator, so you can see the grade of the smoothing/thickness ?

    ReplyDelete
  26. This looks incredible. If you build in a multiplayer feature so I could play with my friends online and make worlds etc., I would buy it :)

    ReplyDelete
  27. Sir, if you release this as a sandbox style game, my head might very well explode with joy and sunshine.

    ReplyDelete
  28. Freaking awesome....you could call it Maya-craft or, 3D Studio Skyrim, or....Tim?

    ReplyDelete
  29. How about using numeric values to represent curves. Assuming we use one of the mouse buttons to apply curves to an object, just use this equation:

    duration of button pressed (or mouse clicks) = numeric value.

    I know next to nothing about programming but shouldn't there already be a numeric value involving how much curvature is being applied to the object? Just give us a way to copy/paste the numeric value and you could replicate any curve that's possible in the engine.

    ReplyDelete
    Replies
    1. Also, out of pure hope, please tell me your going to implement a good physics system into the engine like starforge (you will spontaneously become my favorite developer if you do).

      Delete
    2. The problem with numeric values is rarely the programming side, its usually the user side, because users look at numbers and go WHAT THE HELLOUTA HERE! And run for the hills =3. Some of the biggest problems software developers encounter when creating tools, is making it easy and quick to use for users, while still retaining the correct amount of control.

      Delete
    3. If someone doesn't know how to copy/paste numbers then either they are not capable of learning or they don't belong on a computer.

      Delete
    4. I'm with Kamica on this one. I would like a game with no numbers in it. The last game I did was a number fest (a lot of accountants loved it). I'm not making that mistake twice.

      Delete
    5. Fair enough, I didn't think of it from a game's viewpoint. A standard point+click+copy+paste system would be far easier on the brain. Though the only way I can think of to get extreme detail is with numbers lol but its not like your trying to build a spaceship (where extreme detail really makes a difference).

      Delete
    6. Well, it can still be done like its done with the cubes: Have it scalable, but rather than scale in size like the selection square, have it sizable in terms of how fast it rounds.

      By the way, it might be easier as a tool if there is a copy paste function, but if its going to have multiplayer support (thinking way ahead again XD), then it would be interesting to see people with skill actually getting asked to do rounding etc. (Thats something I miss in Minecraft multiplayer, people dont really need eachother that much, because they can do it themselves just as well).

      That way, youd actually have masons, so perhaps have the copy paste function in, but if/once you add in multiplayer, make an option for the server started to disable it =3.

      Delete
  30. This is great. Well done, your work will surely add a great deal to the industry and games of the future. I do want to advocate for a paid alpha structure. This is obviously working to a degree that many would pay you just to play with it, and I know some would already pay you for a development license. I'm sure there's alot more coming, many bugs, and other things 'wrong' with it. However since you like the Minecraft analogy, please consider strongly the early access-highly buggy-low price alpha release. This does have to perfect to put out to us, and if it's that bad, lower the pricetag accordingly. Income,testing,joy --failing to see a downside here. Anyhow, thanks again, this is awesome.

    ReplyDelete
    Replies
    1. The downside of a payed alpha, is that it sort of undercuts the purpose of an alpha test.
      In any test, be it alpha test, beta test or play test, you want all manner of people, people who will like your game, people who dont, people who are good at your game, people who arent, rich people, poor people, people who never touched a pc etc. etc. (especiailly with the playtest), that way, you get as much feedback as possible, and you get all manner of bug reports. If you make it payed, only the people who are willing to pay for it will play the game, limiting the amount of people playing it. Those people will mostly play the game anyway, as they payed for it, so they want to play, and might not bother actually submitting a bug-report as they might think *Oh, I already payed for that, I dont need to do more effort*.
      Besides, as his previous blog posts pointed out. Sometimes the least likely bug-tester can find the most bugs (2 year old daughter finding camera bugs most other people wouldnt find or report).

      Also, yes, I do kinda make this post partially because I am a cheap bastard =3. But Im not making up stuff!

      Delete
  31. Please tell me what programming language you use for this?

    I'm just wondering, what language is so well procedurally generates around the world in real time (as far as I can tell from a video).
    Thank you.

    ReplyDelete
    Replies
    1. Hmm that brings me to something I'd like to ask you.

      I'd really enjoy some more tutorial like posts on certain topics. Not step for step tutorials but with more detail, like some pseudo code or stuff like that.

      For example how you choose the right parameters for the noise. I'm struggling with perlinnoise3d at the moment.

      Or something else would be how to generate the position for the trees? Do you extract the surface from the 3d array?
      I'm a total newbie on that stuff and it's difficult, at least for me, to figure it out on my own.

      I didn't find a good book on that stuff either.

      I don't want you to share all your "secrets" just some basic procedural generation stuff to get one going. :)

      Delete
    2. Oh, i forgot to mention. You once answered someone with, "at this point you should buy a licence...". He asked some very detailed questions, i do not.

      But what i wanted to say is this, you could make this "tutorial blog" series a premium feature, i'd be totally willing to pay for that.

      I just would not want to licence your software as all i'm doing is just for the fun of it, i've no intent of doing anything productive.

      Delete
    3. Well it is not really about protecting secrets. It is about a large number of little things coming together, tying to each other. The reason why I don't go into this kind of detail is lack of time.

      Delete
  32. Question: and when is it going to be this creation?

    ReplyDelete
  33. Well like the minecraft, where to build, whether the official opening of the game? ( of course I'm sorry I'm from Russia and especially understand you )

    ReplyDelete
    Replies
    1. It could be because of onion

      Delete
    2. I think he's asking if your engine will become a game like Minecraft.

      Delete
    3. In that case, yes, this engine could be used to create games like Minecraft. Will my game be like Minecraft... yes, also like Skyrim, Doom and Wikipedia... Cannot say much more.

      Delete
    4. Wikipedia...? Now I'm totally baffled!

      Delete
  34. I have to say that i am clapping behind the screen. This is the far most impressive i've seen when it comes to game engineering.

    Though just some questions about details which makes me curious.
    1. While the game is generated inside the GPU, Are any plans of physics tests (PhysX or Bullet Physics GPU) planned?

    2. I haven't seen any oceans or rives in the engine yet.
    I assume you use some kind of clay-mesh creation.

    3. Perhaps far distanced terrain would be faster to render with some kind of heightmap raytracing, which they use in Just Cause 2?

    4. How much CPU is left out for game logic in general? Does most games with this engine require more than 2 cores if they are impleting heavier algorithms (such as physics, Mass flocking and that) or is the CPU rarely used in the engine?

    ReplyDelete
  35. I keep throwing money at the screen, but nothing's happening.

    ReplyDelete
  36. Please tell me this game has an open beta or some kind of release date?

    ReplyDelete