Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Procedural generation map #1

Closed
Lod34 opened this issue Jun 11, 2024 · 2 comments
Closed

Procedural generation map #1

Lod34 opened this issue Jun 11, 2024 · 2 comments
Assignees
Labels
🐛 Bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@Lod34
Copy link
Owner

Lod34 commented Jun 11, 2024

I'm having trouble creating the game map. Initially, the issue was understanding which terrain set should go first. Based on the texture of the land and water, the water terrain set would be the last one (3). So, if it says "cliff," it actually means the water level. Therefore, if water was the last level, the first one should be the cliff level. But bitmasking for the latter isn't working, probably because I haven't inserted an atlas for the cliff level that has all 9 cells filled. In any case, I've tried to solve it in multiple ways, but I can't.

here's the code:
Scripts/proc_gen_world.gd

immagine_2024-06-11_130154715

immagine_2024-06-11_130128429

immagine_2024-06-11_125412743

immagine_2024-06-11_125441112

immagine_2024-06-11_125501739

@Lod34 Lod34 added 🐛 Bug Something isn't working help wanted Extra attention is needed labels Jun 11, 2024
@Lod34 Lod34 added this to the Pre-alpha milestone Jun 11, 2024
@Lod34 Lod34 closed this as completed Jun 12, 2024
@Lod34 Lod34 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
@Lod34 Lod34 reopened this Jun 12, 2024
@Lod34 Lod34 moved this to Todo in Scoundrels Kingdom Jun 12, 2024
@Lod34 Lod34 moved this from Todo to In Progress in Scoundrels Kingdom Jun 13, 2024
@Lod34 Lod34 pinned this issue Jul 19, 2024
@Lod34
Copy link
Owner Author

Lod34 commented Jul 19, 2024

I had a great idea. to solve the bug in my opinion you could create "masks" for the terrain.
Let me explain better:

let's say the order of the terrains layers is cliff, grass, water

Ok, so let's set the various tiles... and the famous bug remains to be solved.
Initially I would have filled the entire level 0 with water, but we can create cases, for example:

if above this block there is a grass tile --> then fill level 0 with grass

if there is a water tile above this block --> then fill level 0 with water

and so for the other cases.

While if you want to add the "scorched earth" effect with the dirt, just create a new tile map above the main one, but it must be created with another type of noise, so as not to be the same. And always using the if system:

if this block is a grass tile --> replace the grass tile with a dirt tile following the pattern of the noise just created

This system has only one problem: if the dirt is close to a level boundary, it will appear broken. It can be solved by setting a padding, but I don't know how to do it.

@Lod34 Lod34 closed this as completed Aug 31, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Scoundrels Kingdom Aug 31, 2024
@Lod34 Lod34 moved this from Done to In Progress in Scoundrels Kingdom Aug 31, 2024
@Lod34
Copy link
Owner Author

Lod34 commented Nov 5, 2024

The issue got fixed but it isn't efficient to work in about

@Lod34 Lod34 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Scoundrels Kingdom Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working help wanted Extra attention is needed
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants