fixed basic movement, now add world loading

This commit is contained in:
anonoe 2026-02-09 22:44:11 +01:00
parent 34ba37312a
commit 50f37ebc5f
Signed by: anonoe
SSH key fingerprint: SHA256:OnAs6gNQelOnDiY5tBpDYKQiuTgBvnmIdMo5P09cdqg
23 changed files with 482 additions and 27 deletions

View file

@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Text.Json;
public record WorldIndex(int schema, string world_id, string display_name, int chunk_size_px, int tile_size_px, int[] start_pos_px, List<WorldIndexChunk> chunks)
{
public Dictionary<(int x, int y), string> BuildChunkMap()
{
var map = new Dictionary<(int, int), string>();
foreach (var c in chunks)
map[(c.x, c.y)] = c.path;
return map;
}
}
public record WorldIndexChunk(int x, int y, string path);