I may have used ai for some of the proc gen..

This commit is contained in:
2025-03-01 22:52:34 -06:00
parent 8c0601c7aa
commit 2be653504a
9 changed files with 599 additions and 62 deletions

View File

@@ -24,9 +24,8 @@ main :: proc() {
rl.SetTargetFPS(60)
player = {
position = {CELL_SIZE * 10000, CELL_SIZE * 10000},
position = {CELL_SIZE * 10, CELL_SIZE * 10},
camera = {
zoom = 4,
target = {player.position.x + (CELL_SIZE / 2), player.position.y + (CELL_SIZE / 2)},
@@ -38,13 +37,9 @@ main :: proc() {
load_tilemap()
defer unload_tilemap()
world = create_world("test_world", 5761)
set_tile(&world, tree_tile, {400,400})
world = create_world("test_world", 23462547245)
save_world(&world)
game_loop()
}
@@ -58,7 +53,7 @@ game_loop :: proc() {
update()
rl.BeginDrawing()
rl.ClearBackground({10,80,10,255})
rl.ClearBackground(rl.BLACK)
rl.BeginMode2D(player.camera)
draw()
@@ -69,11 +64,10 @@ game_loop :: proc() {
player_grid_pos := get_player_grid_position(&player)
player_grid_pos_tile := get_world_tile(&world, vec2_to_vec2i(player_grid_pos))
status_string := rl.TextFormat("POS: [%i,%i] : %v | MODE: %v", int(player_grid_pos.x), int(player_grid_pos.y), player_grid_pos_tile.type, player.mode)
current_chunk := get_chunk_from_world_pos(&world, player_grid_pos)
status_string := rl.TextFormat("POS: [%i,%i] : %v | Chunk: %v : %v | MODE: %v", int(player_grid_pos.x), int(player_grid_pos.y), player_grid_pos_tile.type, current_chunk.position, get_biome_from_id(current_chunk.biome_id).name, player.mode)
rl.DrawText(status_string, 5, 25, 20, rl.RED)
rl.EndDrawing()
}