Only visible tiles update
This commit is contained in:
@@ -21,7 +21,7 @@ main :: proc() {
|
||||
TILEMAP_TILE_SIZE,
|
||||
TILEMAP_TILE_SIZE,
|
||||
)
|
||||
grid = create_tile_grid(1500, 1500)
|
||||
grid = create_tile_grid(5000, 5000)
|
||||
|
||||
player = {
|
||||
position = {1500, 500},
|
||||
@@ -61,7 +61,13 @@ main :: proc() {
|
||||
@(private = "file")
|
||||
update :: proc(delta: f32) {
|
||||
update_player(&player, delta)
|
||||
update_tile_grid(grid, delta)
|
||||
update_tile_grid(
|
||||
grid,
|
||||
&player.camera,
|
||||
f32(tilemap_sheet.tile_width),
|
||||
f32(tilemap_sheet.tile_height),
|
||||
delta,
|
||||
)
|
||||
}
|
||||
|
||||
@(private = "file")
|
||||
|
||||
Reference in New Issue
Block a user