Godot Version
4.3
Question
So I’m using procedural generation with tile map of size 16 on 256x256.
If i just leave this fps is good (100+) but if i add parallax2d to generate it infinitely fps drops to 30ish and if player is standing at corner of one tile where other corners meet fps is below 5 and way to optimize this?
My tile generation:
extends Node2D
@onready var tileMap =$Parallax2D/Layer0
const Map_size = Vector2(128,128)
const LAND_CAP = 0.2
func _ready():
generateWorld()
func generateWorld():
var noise = FastNoiseLite.new()
noise.seed = 1 #randi()
var cells : Array = []
for x in range(0,Map_size.x):
for y in range(0,Map_size.y):
var a = noise.get_noise_2d(x,y)
if a<LAND_CAP:
cells.append(Vector2(x,y))
else:
tileMap.set_cell(Vector2(x,y),1,Vector2(0,0),0)
tileMap.set_cells_terrain_connect(cells,0,0,true)
And then if im standing between one of those 256x256 map fps increases to about 30-40. I have been trying and nothing is working please help!!!