Skaldarnar

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
  • Name: Tobias 'Skaldarnar' N.
  • From: Dresden, Germany
  • Skills / Tools: Mainly Java, a bit of C/C++ and Scala
  • Found via: I've found Terasology via google a long(er) time ago searching for an open source alternative for MC.
  • Interests: Game Development, Coding, Procedural Generation
  • Extra: I'm studying Computer Science at TU Dresden and I think you can call my a theoretician.
Hello guys,
as mentioned above I'm quite theoretic and experimental.
I would like to work on a grammar-based system for procedural building creation (if it fits into any concept).
I liked to see the villages in MC, but they are quite small and always look the same (no biome-based generation or something), that's why I thought about how you can achieve village generation with varied building styles.

Please let me hear what you think about this suggestion.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Welcome, Skaldarnar! Your system idea actually fits in perfectly as we need to expand on our current meager definitions into a fancier grammar-based system like that, both for procedural buildings and all sorts of things. ironchefpython for instance suggested a crafting system based on a sort of grammar system a while back, and I figure a creature definition system could work similarly (hierarchical definitions of everything from anatomy to ethics and indeed architecture)

In the past we've juggled around the idea of a DSL for defining stuff like that, including my personal tinkering with what requirements a selection of blocks should meet to count as a "portal" - as in "one layer deep central section of portal blocks surrounded entirely by portalframe blocks; flat along any axis;" would be the requirement, then as long as you match that you could make a vertical or horizontal portal with optional decorator blocks around the frame.

However, I've never done a DSL, don't know if that would even be appropriate, and rarely ever get time to code anyway with all the administrative stuff I try to take on, including greeting all the new arrivals and finding them something to do that they would enjoy :D

Would you like to take on the design of a grammar-based system then, for use in multiple different systems? Putting together blocks to make architecture, or pre-defined buildings to make a village would be a fine start. Or even something similar for creatures as we badly need them defined :)
 

Kai Kratz

Witch Doctor
Contributor
Architecture
Logistics
  • Name: Tobias 'Skaldarnar' N.
  • From: Dresden, Germany
  • Skills / Tools: Mainly Java, a bit of C/C++ and Scala
  • Found via: I've found Terasology via google a long(er) time ago searching for an open source alternative for MC.
  • Interests: Game Development, Coding, Procedural Generation
  • Extra: I'm studying Computer Science at TU Dresden and I think you can call my a theoretician.
Hello guys,
as mentioned above I'm quite theoretic and experimental.
I would like to work on a grammar-based system for procedural building creation (if it fits into any concept).
I liked to see the villages in MC, but they are quite small and always look the same (no biome-based generation or something), that's why I thought about how you can achieve village generation with varied building styles.

Please let me hear what you think about this suggestion.
Welcome aboard, iv had a cursory look into this topic already and collected some papers on the subject. If you are interested ill can put up the links to them (Don't have them available at work).
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Welcome aboard, iv had a cursory look into this topic already and collected some papers on the subject. If you are interested ill can put up the links to them (Don't have them available at work).
Thanks. The links would be nice. I recently had a look on some papers from Peter Wonka, namely
and
If you have any other papers I would appreciate the links. ;)

Cervator, a DSL was in my mind, too. But as you I've never designed some. Although I want to start with a grammar for building generation, one could hold the thought of grammars for monsters/races and/or crafting in mind.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Certainly an area that needs to be looked into. The main trickiness from the world generation point of view is at any time you are only dealing with the generation of a 16x16 chunk of the world. So whatever algorithm used needs to work with that. Although I imagine you could generate a wider area and add it to chunks as they are generated.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Yes, I thought that a building would be generated and stored in a fitting data structure. From this data structure the building's blocks can be distributed to the different chunks. But I see the point that every functionality has to be checked over different chunks.
Moreover, I think that a testing tool for buildings etc. would be nice. So, if you have an algorithm for procedural building generation or something like this you can easily check the algorithm's output by passing the output to the testing tool. But for such a tool there needs to be a common API or normalized data structures.
 

Ten'son'

Member
Contributor
World
Before thinking about the building generation you have to think about the city generation. Indeed, you have to organise your buildings with streets, places, etc. ;)

Look at this :
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Honestly, I'd start with some very simple basics - like using a BlockCollection to define a multi-block object and be able to place it in the world :)

That was the last "major" thing I was working on before I got swallowed by administrative stuff and never finished. I added a couple new storage classes for blocks and had a test tool that would place a multi-block portal in the world. This was even pre-entity system, so not sure any of that code would be useful now. I did commit the block storage classes long ago though.

We also used to have a plain copy paste tool that put blocks back into the world (as opposed to the miniaturizer that creates a "mini chunk" that then renders in the world).

The PortalBlueprint + BlockCollection you could initialize with the blueprint allowed to you paste a set number of blocks into the world on top of an attachment coordinate. That wouldn't be hard to recreate, the challenge I faced was two-fold:

1) Interacting with a multi-block object after it is placed. I was close but wasn't doing this quite right (was trying to adopt the entity system way, but it was still new to me). I had a PortalComponent that stored a few coordinates (a BlockSelection, I think?) along with a zone within which mobs would spawn (in a CubicBlockSelection or Collection... been a while). But we really need a generic multi-block Component that will be able to spin off single BlockComponents for per-block interaction. That's #259 now

2) Defining what could be a Portal. The Blueprint simply had a 3x4 frame with a couple portal blocks in the middle. However, I think of that more like an implementation of a Portal than a definition for it. A 4x5 frame with portal blocks in the middle should also count as a Portal. This is where I got into thinking about how we define that properly, and got into thinking DSL, grammar, and fun stuff like that. Which I have no experience with at all :D

So I'd say just a simple example like that would be a way to get started. Even just #2. How do you describe what a Portal (or another object, like a Door) should be, and how do you check a given object against that definition and declare that it's a Portal (or Door)

Edit now that I'm home and can see Youtube: Nice video Ten'son' - yeah, procedurally generating a small village won't be quite that involved, but there is still a lot to it :)
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Thanks, I'm already reading/watching/following :D
I think the third point you mentioned in your listing is most interesting for me...
But at first I'm trying to create simple buildings/models from a grammar...
 
Top