A Randomly Generated World

Ok, that works. I’ve named The basic blocks, now I’ll change their size. How big do you want them?

@thebrickccentric Probably 2x2.

Ok, so that’s smaller than what mine are. Are they going to spawn as a group or something like that?

I would only create one land tile and put the different ‘biomes’ into animation frames.
So the parent tile is the ‘generator’ and refers to them accordingly.
I think … still in meeting, LOL

That sounds great! It’ll save on blocks created, too. What do you think, The Kodex?

Ok, quick coffee break and I had a look @“The Kodex”
… there is NUTHIN … lol, I thought we help, not we create it from scratch :slight_smile:

Gonna run again soon, but I am tempted to suggest to make the tiles 3x3 cells. Consult Dr.Google, I propose we use so called ‘Wang Tiles’.
Here someone using them: random-map-generation-via-wang-tiles
Similar example here, using the same principle: procedural-tileset-generator

Just a thought, I will think about, you think about it, we decide later.

It would create maps that look less uniform

P.S. silly me, it also works with 2x2, just leave it for now. Just less options.

Clarification:

Ok, I got a minute. So , this is a so called ‘Wang’ tile, sorry for the confusion, but that’s the name I know them by.
wang
It’s one of those color/picture puzzles where you have to match the sides.
Ok, you might ask, how does this relate to map making???
Just replace the colors with different landscape types and you get something you probably already used a dozen times if you ever created RPG maps. Because the simplest form of it looks like … drum roll
THIS:

tiles_8x3_32

Or spaced out, then it is obvious:

overview 64x64

GET IT?
So instead of colors that have to match along the edges in our case it would be ‘grass’, ‘land’, and sure we would need ‘water’.

So sorry for the confusion, happens when I don’t have time to think things through and type in a hurry. You see how this system makes the map look less ‘square’ and more organic.

Now … try to follow. Let’s say those tiles are 32x32 and my map cell (lets call it structure to keep someone happy grin) is 64x64, you see that I can create quite a variety of different layouts matching those 32x32 tiles in there.
It allows me to create even more variations, like this:

combined

because I doubled the possible edge variations.
But the simple one might be good enough as is, just throwing out why I had 2x2 or 3x3 in mind.

P.S. wang tiles are lined up by their edges. So each edge needs its own ID. For example a tile with the ID ‘LLLG’ would have 3 Land edges and 1 Grass edge.

That looks much better and more organinc too…wow, alright, so how do we assign a 4-letter code to each animation? I made the animations in a wang block, and I made a code for each in a spreadsheet, but what now?

Dang you are quick @thebrickccentric , LOL
About the 4 letter code … we don’t. Full Stop!
We encode them binary.

LOL, you already encoded them, I’m just not sure if on purpose or by accident confess
I downloaded what you did and put a little overlay over it:
wang2

It’s called binary encoding, are you familiar with it? You assign binary digits to the edges, as in North=2^0=1, East = 2^2=2, South= 2^3 =4, etc. Let’s say white is the land (or whatever). So now we just add those numbers together for each edge that is white, Voila, all encoded.
The way you laid it out it’s already done, good job.

So was it on purpose, or by accident :slight_smile:

P.S. if you search opengameart.com for ‘wang’ I am pretty sure I have seen wang tilesets there. Can’t check, our company network blocks it.

@thebrickccentric I would suggest using equasions, filters, maybe extractors and other complex things mainly set to math. I think @TinkerSmith Can help in that area, but for now from what I have seen paths would be good to have in the biome to give customisation.

I made a model map which features a structure, lakes, lava lakes, and a new sand biome. This is what the whole map should look like:
[Edit: The map is randomly generated, so this is something of what it could look like zoomed out. P.s loving the grass path coding yoi guys are working on. And @TinkerSmith Any way to reduce the lag while doing this?]

97d6612724e943c

Whew, lots to take in. I think I do understand the binary encoding. (It was sort of on purpose; I copied from the site you linked.)
So in the end each block gets a number 0-15 based on its individual pattern. What do we do after that? How we code this so that blocks only touch based on shared side colors?
The Kodex, that map looks great. Are the different biomes there to show where each biome should spawn? (but the borders are randomized?) Or do you not care and this was just to show each different feature? In other words, do you want a randomized map, or do you want it to look exactly like that one?
The paths idea would also help characters / enemies move around without having to do a bunch of complex pathfinding. I don’t know about you all, but I know basically nothing about pathfinding, so the paths created would enable characters to only move on or near generated paths.

@thebrickccentric Defiantly randomised, the map is just something that the end result should look like. The biomes are randomized.

I hoped @Superstargames could code a structure block to build a structure like what is on the map.

Over time, the map will become more complex but for now what I posted above should start as a basis for what we want.

I’ll get to work on that when I am free to do so.

@Superstargames Thank you. Whenever you have the time, create about 5 objects that collectively builds a house (e.g a door object, wall, floor, roof, window…) And have a spawner which generates this structure. Then when the map reaches Bata phase we will have more structures that generate in certain biomes.

Ufff @“The Kodex” … I must have forgotten to read the fine print, LOL.
When I accepted the invite I was under the impression you already had something together and just needed help to get it going. To be honest, I don’t think I have the time for a fully fledged development, see me more as the occasional contract advisor.

Just putting the cards on the table :slight_smile: My time is limited, a little bit here and there during the week and if nothing comes up a little bit more at the weekend. So yes, sometimes it is just advice and you would have to do the work to sort the details. Are you happy with that? Might take ages with me being on board only now and then.
I got my own things running and don’t want to let them fall behind. There is still the raycasting, I have a dungeon generator in development and also a game I fancy. I just can’t commit to too many things at the same time :slight_smile:

And this … overworld view, details, etc. seems to be a mega project. My advice, split it up into smaller segments. Ideas are easily thrown around, but if you put them down on paper and try to structure them you see where the traps are.

Ok, back to the map. At this stage I think it all depends on if we get a map generator running. And I’m not talking about the world map, I am talking about the area one. If one is running (Land/Grass), the other areas are just copies of that with different tiles (Stone/Lava), (Ice/Snow), etc. Do I see that right?

Footpaths? I would worry about them once the map is sorted. Can be a layer on top of the map. Keep things separate where you can, easier to manage and debug. So at this stage I am not worried about those at all. Same for trees, bushes etc. each can be it’s own module.

About the tiles @thebrickccentric . I guess we have to use logic operations AND/OR etc. so that we can do bit-wise (side-wise) comparisons. Is possible in Flowlab, I use the same principle for my dungeon generator:
dungeon
I use the bit encoding for the exits and logic functions to ‘drill’ my way through the walls to create the paths.

I have not used Wang tiles for ages, but I remeber that there is a trick where you can use the bit encoding to your advantage. By what I remember they arranged the tiles on a grid (can be imaginary) in a way that they connect correctly, like here -> Wang Intro

Just imagine that grid wraps around ( I hope it was this, I check later)
The idea, you start by randomly picking a tile. Now, for the next random you only allow the ones surrounding this one … that way you make sure it connects! And so on, there is more to it and there are traps. I’m not saying this IS the solution, just to give you an idea what I am after.

If both of you could squeeze Dr.Google to find an example? Would help a lot :slight_smile:
My coffee break is over, back to work and tonight we have visitors. But I will check in now & then.

P.S. @“The Kodex” you said:

… loving the grass path coding yoi guys are working on. And @TinkerSmith Any way to reduce the lag while doing this?

What lag and where? Grass path?

Oh, one more question about the map. You showed us the zoomed out world map. What details do you expect in the area/bio maps? Could you post images of what it could look like, got some sprites ready made from your other attempt?

Cheers :slight_smile:

@TinkerSmith No, no… I am working on a really big sperate project too, this is just something else I am working on. It will not be too big, the endgame is it to generate a mainly basic but most importantly successful fully generated world that is big, has no lag, works and can be saved using seeds, like you mentioned. Earlier I just wanted to know once the actual world generation works it would be so big that the lag would be unbelievable, so before we got to there, anything that can stop that future lag…

hmmm. so you want a world map check
Then from there, are you playing on the world map as it is, or do you want to click somewhere and then zoom into that area so that the action happens there?
Need to know, because that would determine the approach.

P.S. i might be busy from the 7th onwards. Depends on what flavor the ‘jam’ is :wink:

this is unrelated but anyone here thinking about participating in the summer flowjam in 7 days?

Ok, I have a lot of questions for TinkerSmith (when you have time):
How do bit wise comparisons work? (I’ll look it up, too.)
How do you measure blocks against each other based on their number? (Is there a special equation or something like that?)
That method of using Wang tiles seems like it would work, but wouldn’t it just create that same tile pattern over and over again?
I looked up on the web how this works, and it seems like they have a separate program that lays down each tile in order while analyzing whether a tile fits. Would this version of it involve raycasting? How would the specific blocks communicate?
Also, I found your “fake 3d” car game and it is amazing! I don’t understand how you achieved a 3d effect with so little code.