test tiles

This commit is contained in:
2025-06-16 20:46:03 -05:00
parent ba6ecf9006
commit c9f795e55c
10 changed files with 188 additions and 84 deletions

View File

@ -1,20 +1,23 @@
{ {
"activeFile": "overworld.tsx", "activeFile": "overworld.tsx",
"expandedProjectPaths": [ "expandedProjectPaths": [
".", "templates",
"templates" "."
], ],
"fileStates": { "fileStates": {
":/automap-tiles.tsx": {
"scaleInDock": 1
},
"entities.tsx": { "entities.tsx": {
"scaleInDock": 1, "scaleInDock": 1,
"scaleInEditor": 1 "scaleInEditor": 1
}, },
"map.tmj": { "map.tmj": {
"scale": 4, "scale": 3,
"selectedLayer": 1, "selectedLayer": 1,
"viewCenter": { "viewCenter": {
"x": 6622.75, "x": 6909.5,
"y": 6689.625 "y": 6948.166666666666
} }
}, },
"overworld.tsx": { "overworld.tsx": {

View File

@ -28,15 +28,15 @@
}, },
{ {
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@ -270,7 +270,6 @@
}], }],
"height":32, "height":32,
"id":1, "id":1,
"locked":true,
"name":"Base Layer", "name":"Base Layer",
"opacity":1, "opacity":1,
"startx":384, "startx":384,
@ -285,16 +284,16 @@
"chunks":[ "chunks":[
{ {
"data":[0, 0, 0, 2, 3, 3, 3, 3, 4, 0, 0, 0, 0, 0, 0, 0, "data":[0, 0, 0, 2, 3, 3, 3, 3, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 10, 11, 11, 11, 11, 6, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 18, 0, 0, 0, 0, 6, 3, 3, 3, 3, 3, 3, 3,
0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 10, 11, 11, 11, 11, 14, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 18, 0, 0, 0, 0, 22, 35, 35, 35, 35, 35, 35, 35,
0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0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,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":16,
"width":16,
"x":432,
"y":432
}], }],
"height":32, "height":32,
"id":5, "id":5,
"locked":true,
"name":"Overlay Base Layer", "name":"Overlay Base Layer",
"opacity":1, "opacity":1,
"startx":400, "startx":400,
"starty":400, "starty":416,
"type":"tilelayer", "type":"tilelayer",
"visible":true, "visible":true,
"width":32, "width":48,
"x":0, "x":0,
"y":0 "y":0
}, },
{ {
"draworder":"topdown", "draworder":"topdown",
"id":3, "id":3,
"locked":true,
"name":"Object Layer 1", "name":"Object Layer 1",
"objects":[ "objects":[
{ {
@ -356,6 +421,18 @@
"template":"templates\/NPC.tx", "template":"templates\/NPC.tx",
"x":6737, "x":6737,
"y":6672.91666666667 "y":6672.91666666667
},
{
"gid":257,
"height":16,
"id":6,
"name":"Player Spawn",
"rotation":0,
"type":"player_spawn",
"visible":true,
"width":16,
"x":6743.33333333333,
"y":6989.33333333333
}], }],
"opacity":1, "opacity":1,
"type":"objectgroup", "type":"objectgroup",
@ -364,7 +441,7 @@
"y":0 "y":0
}], }],
"nextlayerid":6, "nextlayerid":6,
"nextobjectid":5, "nextobjectid":7,
"orientation":"orthogonal", "orientation":"orthogonal",
"renderorder":"right-down", "renderorder":"right-down",
"tiledversion":"1.11.1", "tiledversion":"1.11.1",
@ -375,11 +452,11 @@
"source":"overworld.tsx" "source":"overworld.tsx"
}, },
{ {
"firstgid":65, "firstgid":257,
"source":"entities.tsx" "source":"entities.tsx"
}, },
{ {
"firstgid":129, "firstgid":321,
"source":":\/automap-tiles.tsx" "source":":\/automap-tiles.tsx"
}], }],
"tilewidth":16, "tilewidth":16,

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="overworld" tilewidth="16" tileheight="16" tilecount="64" columns="8"> <tileset version="1.10" tiledversion="1.11.1" name="overworld" tilewidth="16" tileheight="16" tilecount="256" columns="16">
<image source="tilemap.png" width="128" height="128"/> <image source="tilemap.png" width="256" height="256"/>
</tileset> </tileset>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<template> <template>
<tileset firstgid="1" source="../entities.tsx"/> <tileset firstgid="1" source="../entities.tsx"/>
<object name="NPC" gid="1" width="16" height="16"/> <object name="NPC" type="npc" gid="1" width="16" height="16"/>
</template> </template>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

View File

@ -9,6 +9,7 @@
#include "assert/assert.h" #include "assert/assert.h"
#include "input.h" #include "input.h"
#include "display/render.h" #include "display/render.h"
#include "world/world.h"
void playerInit() { void playerInit() {
entity_t *ent = &ENTITIES[0]; entity_t *ent = &ENTITIES[0];
@ -16,8 +17,8 @@ void playerInit() {
entityInit(ent, ENTITY_TYPE_PLAYER); entityInit(ent, ENTITY_TYPE_PLAYER);
ent->id = PLAYER_ENTITY_ID; ent->id = PLAYER_ENTITY_ID;
ent->x = 32; ent->x = WORLD_PLAYER_SPAWN_X;
ent->y = 32; ent->y = WORLD_PLAYER_SPAWN_Y;
} }
void playerNPCInit(entity_t *entity) { void playerNPCInit(entity_t *entity) {

View File

@ -47,6 +47,7 @@ void drawOverworldDraw(void) {
}; };
uint8_t colorCount = sizeof(colors) / sizeof(Color); uint8_t colorCount = sizeof(colors) / sizeof(Color);
BeginBlendMode(BLEND_ALPHA_PREMULTIPLY);
do { do {
// Base layer // Base layer
for(uint8_t i = 0; i < CHUNK_TILE_COUNT; i++) { for(uint8_t i = 0; i < CHUNK_TILE_COUNT; i++) {
@ -98,6 +99,7 @@ void drawOverworldDraw(void) {
chunk++; chunk++;
} while(chunk < CHUNK_MAP.chunks + CHUNK_MAP_COUNT); } while(chunk < CHUNK_MAP.chunks + CHUNK_MAP_COUNT);
EndBlendMode();
// Entities // Entities
entity_t *entity = ENTITIES; entity_t *entity = ENTITIES;

View File

@ -45,7 +45,7 @@ void renderDraw(void) {
// Draw the render texture to the screen. // Draw the render texture to the screen.
BeginDrawing(); BeginDrawing();
ClearBackground(WHITE); ClearBackground(RED);
// Keep aspect and center the render // Keep aspect and center the render
int32_t renderWidth, renderHeight, renderX, renderY; int32_t renderWidth, renderHeight, renderX, renderY;
const int32_t width = GetScreenWidth(); const int32_t width = GetScreenWidth();
@ -74,6 +74,8 @@ void renderDraw(void) {
void renderDispose(void) { void renderDispose(void) {
UnloadRenderTexture(RENDER_SCREEN_TEXTURE); UnloadRenderTexture(RENDER_SCREEN_TEXTURE);
UnloadTexture(RENDER_TILEMAP_TEXTURE);
UnloadTexture(RENDER_ENTITIES_TEXTURE);
CloseWindow(); CloseWindow();
} }

View File

@ -365,8 +365,11 @@ for chunkY in range(mapHeightInRealChunks):
f.write(f" .entities = {{\n") f.write(f" .entities = {{\n")
for entity in entities: for entity in entities:
# Entities are center aligned in tiled. # Entities are center aligned in tiled.
localX = entity['x'] - (topLeftTileX * TILE_WIDTH) localX = round(entity['x'] - (topLeftTileX * TILE_WIDTH))
localY = entity['y'] - (topLeftTileY * TILE_HEIGHT) localY = round(entity['y'] - (topLeftTileY * TILE_HEIGHT))
if 'type' in entity and entity['type'] not in ENTITY_TYPE_MAP:
continue
f.write(" {\n") f.write(" {\n")
f.write(f" .id = {entity['id']},\n") f.write(f" .id = {entity['id']},\n")
@ -379,6 +382,20 @@ for chunkY in range(mapHeightInRealChunks):
f.write("};\n\n") f.write("};\n\n")
# Determine map global things
playerSpawnX = 0
playerSpawnY = 0
for ob in objectLayer['objects']:
if 'type' not in ob or ob['type'] != 'player_spawn':
continue
if 'x' not in ob or 'y' not in ob:
print(f"Error: Player spawn object does not contain 'x' or 'y' key.")
sys.exit(1)
playerSpawnX = round(ob['x'])
playerSpawnY = round(ob['y'])
break
# Output header file. # Output header file.
headerPath = os.path.join(worldDir, "world.h") headerPath = os.path.join(worldDir, "world.h")
with open(headerPath, 'w') as f: with open(headerPath, 'w') as f:
@ -404,5 +421,7 @@ with open(headerPath, 'w') as f:
f.write("NULL, ") f.write("NULL, ")
f.write("\n") f.write("\n")
f.write("};\n\n") f.write("};\n\n")
f.write(f"#define WORLD_PLAYER_SPAWN_X {playerSpawnX}\n")
f.write(f"#define WORLD_PLAYER_SPAWN_Y {playerSpawnY}\n")
print(f"chunks.h generated at: {headerPath}") print(f"chunks.h generated at: {headerPath}")