Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Threeclaws

2
Posts
5
Following
A member registered May 03, 2020

Recent community posts

I'm not really an expert on procedural generation, but if your entire level is procedurally generated you could give your resources a radius and before spawning a new resource you create a new random position until the newly generated resource's radius and the old resources' radiuses don't overlap.

If you have fixed levels and only allow resources to spawn in certain areas, I'd recommend using tilemaps where each filled tile signifies a position where a resource can be placed. When generating the new resources you first check where it can be placed and if the tile is already occupied (a dictionary with vec2s might be useful to store the data here). If there is a valid tile where the resource can spawn you add the resource at the given position into the level and the runtime data.

If you only allow resources to spawn at specifc points, it'd be useful to implement a spawn point with a memory. I've heard some games do that by giving each spawn point a unique identifier (id) and storing the state of the spawn point in the runtime data (spawned, waiting for respawn). When the spawn point is then added to the scene it checks its state in the runtime data and acts accordingly (producing the resource or staying empty).

Nice to hear that more people are willing to try out Godot. To be honest I was quite critical of it at first, but after working with it for close to two years I've taken quite a liking to the engine.

Seeing you try to give Godot a chance even inspired me to write a tutorial on how to build an inventory system in the engine. I hope Godot doesn't disappoint and that it enables you to fulfill your vision for your games.