Compare commits
10 Commits
aaf04c9e1a
...
refactor
| Author | SHA1 | Date | |
|---|---|---|---|
| 453983a0d3 | |||
| e6ad65992a | |||
| 7e5960ef02 | |||
|
|
53d717dee4 | ||
|
|
a26ec7afed | ||
|
|
5c60c9b74d | ||
| 175f44692a | |||
| 7e8ab5e180 | |||
|
|
678c14b680 | ||
| 7f7cbc567b |
BIN
builds/linux/assets/player/player.png
Normal file
BIN
builds/linux/assets/player/player.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
builds/linux/assets/player/player.pxo
Normal file
BIN
builds/linux/assets/player/player.pxo
Normal file
Binary file not shown.
BIN
builds/linux/assets/tiles/master_tilemap.png
Normal file
BIN
builds/linux/assets/tiles/master_tilemap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
builds/linux/assets/tiles/master_tilemap.pxo
Normal file
BIN
builds/linux/assets/tiles/master_tilemap.pxo
Normal file
Binary file not shown.
9
builds/linux/assets/tiles/master_tilemap_addresses.txt
Normal file
9
builds/linux/assets/tiles/master_tilemap_addresses.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
0 - martian ground
|
||||||
|
1 - martian ground barrier UP
|
||||||
|
2 - martian ground barrier DOWN
|
||||||
|
3 - martian ground barrier LEFT
|
||||||
|
4 - martian ground barrier RIGHT
|
||||||
|
5 - martian ground barrier TOP RIGHT CORNER
|
||||||
|
6 - martian ground barrier TOP LEFT CORNER
|
||||||
|
7 - martian ground barrier BOTTOM RIGHT CORNER
|
||||||
|
8 - martian ground barrier BOTTOM LEFT CORNER
|
||||||
BIN
builds/linux/game
Executable file
BIN
builds/linux/game
Executable file
Binary file not shown.
4
ideas.md
4
ideas.md
@@ -1,4 +0,0 @@
|
|||||||
# Ideas
|
|
||||||
- Lovecraftian/liminal space
|
|
||||||
- Space exploration/research
|
|
||||||
|
|
||||||
BIN
src/assets/interactables/interactables_spritesheet.png
Normal file
BIN
src/assets/interactables/interactables_spritesheet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/interactables/interactables_spritesheet.pxo
Normal file
BIN
src/assets/interactables/interactables_spritesheet.pxo
Normal file
Binary file not shown.
@@ -1,24 +1,21 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "core:fmt"
|
import "core:fmt"
|
||||||
|
import "core:strings"
|
||||||
import "vendor:raylib"
|
import "vendor:raylib"
|
||||||
|
|
||||||
player: Player
|
player: Player
|
||||||
grid: [][]Tile
|
|
||||||
tilemap_sheet: TilemapSpritesheet
|
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
fmt.println("Brackey's Game Jam 2026 :) ")
|
fmt.println("Brackey's Game Jam 2026 :) ")
|
||||||
|
|
||||||
|
config_flags: raylib.ConfigFlags = {.WINDOW_RESIZABLE}
|
||||||
|
raylib.SetConfigFlags(config_flags)
|
||||||
|
|
||||||
raylib.InitWindow(1920, 1080, "Game")
|
raylib.InitWindow(1920, 1080, "Game")
|
||||||
raylib.SetTargetFPS(60)
|
raylib.SetTargetFPS(60)
|
||||||
|
|
||||||
tilemap_sheet = load_tilemap_sheet(
|
init_world()
|
||||||
"assets/tiles/master_tilemap.png",
|
|
||||||
TILEMAP_TILE_SIZE,
|
|
||||||
TILEMAP_TILE_SIZE,
|
|
||||||
)
|
|
||||||
grid = create_tile_grid(100, 100)
|
|
||||||
|
|
||||||
player = {
|
player = {
|
||||||
position = {0, 0},
|
position = {0, 0},
|
||||||
@@ -30,7 +27,6 @@ main :: proc() {
|
|||||||
sprite = load_sprite(PLAYER_SPRITE_PATH, PLAYER_WIDTH, PLAYER_HEIGHT),
|
sprite = load_sprite(PLAYER_SPRITE_PATH, PLAYER_WIDTH, PLAYER_HEIGHT),
|
||||||
}
|
}
|
||||||
|
|
||||||
set_tile(grid, 10, 10, nothing_tile)
|
|
||||||
|
|
||||||
for (!raylib.WindowShouldClose()) {
|
for (!raylib.WindowShouldClose()) {
|
||||||
|
|
||||||
@@ -47,6 +43,7 @@ main :: proc() {
|
|||||||
|
|
||||||
raylib.EndMode2D()
|
raylib.EndMode2D()
|
||||||
raylib.DrawFPS(20, 20)
|
raylib.DrawFPS(20, 20)
|
||||||
|
draw_player_grid_debug()
|
||||||
raylib.EndDrawing()
|
raylib.EndDrawing()
|
||||||
|
|
||||||
update(delta)
|
update(delta)
|
||||||
@@ -57,13 +54,26 @@ main :: proc() {
|
|||||||
|
|
||||||
@(private = "file")
|
@(private = "file")
|
||||||
update :: proc(delta: f32) {
|
update :: proc(delta: f32) {
|
||||||
|
update_world(delta)
|
||||||
update_player(&player, delta)
|
update_player(&player, delta)
|
||||||
update_tile_grid(grid, delta)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@(private = "file")
|
@(private = "file")
|
||||||
draw :: proc() {
|
draw :: proc() {
|
||||||
draw_tile_grid(&tilemap_sheet, grid)
|
draw_world()
|
||||||
draw_player(&player)
|
draw_player(&player)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_player_grid_debug :: proc() {
|
||||||
|
gx, gy := player_pos_to_grid_pos()
|
||||||
|
|
||||||
|
tile := get_tile(&interactables_layer_grid, gx, gy)
|
||||||
|
type := tile.type
|
||||||
|
|
||||||
|
s := fmt.tprintf("Player Grid Pos: (%d, %d) | Tile: %v", gx, gy, type)
|
||||||
|
cs := strings.clone_to_cstring(s, context.temp_allocator)
|
||||||
|
|
||||||
|
|
||||||
|
raylib.DrawText(cs, 20, 40, 20, raylib.GREEN)
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "core:fmt"
|
import "core:math"
|
||||||
import "core:strings"
|
|
||||||
import "vendor:raylib"
|
import "vendor:raylib"
|
||||||
|
|
||||||
PLAYER_SPEED :: 2
|
PLAYER_SPRINT_SPEED :: 2.5
|
||||||
|
PLAYER_SPEED :: 1.5
|
||||||
PLAYER_WIDTH :: 32
|
PLAYER_WIDTH :: 32
|
||||||
PLAYER_HEIGHT :: 32
|
PLAYER_HEIGHT :: 32
|
||||||
PLAYER_SPRITE_PATH :: "assets/player/player.png"
|
PLAYER_SPRITE_PATH :: "assets/player/player.png"
|
||||||
@@ -57,28 +57,40 @@ handle_player_input :: proc(p: ^Player, delta: f32) {
|
|||||||
|
|
||||||
is_moving := dir.x != 0 || dir.y != 0
|
is_moving := dir.x != 0 || dir.y != 0
|
||||||
|
|
||||||
if (is_moving) {
|
if is_moving {
|
||||||
|
is_sprinting := raylib.IsKeyDown(.LEFT_SHIFT)
|
||||||
dir = raylib.Vector2Normalize(dir)
|
dir = raylib.Vector2Normalize(dir)
|
||||||
dir = dir * PLAYER_SPEED
|
|
||||||
p.position = p.position + dir
|
|
||||||
|
|
||||||
if dir.x < 0 {
|
speed: f32 = is_sprinting ? PLAYER_SPRINT_SPEED : PLAYER_SPEED
|
||||||
p.facing_left = true
|
p.animator.anim.fps = is_sprinting ? 11 : 6
|
||||||
|
|
||||||
|
velocity := dir * speed
|
||||||
|
|
||||||
|
new_pos_x := p.position
|
||||||
|
new_pos_x.x += velocity.x
|
||||||
|
|
||||||
|
foot_offset_y := f32(p.sprite.height)
|
||||||
|
foot_offset_x := f32(p.sprite.width) * 0.5
|
||||||
|
|
||||||
|
if !is_wall_at({new_pos_x.x + foot_offset_x, new_pos_x.y + foot_offset_y}) {
|
||||||
|
p.position.x = new_pos_x.x
|
||||||
}
|
}
|
||||||
|
|
||||||
if dir.x > 0 {
|
new_pos_y := p.position
|
||||||
p.facing_left = false
|
new_pos_y.y += velocity.y
|
||||||
|
if !is_wall_at({p.position.x + foot_offset_x, new_pos_y.y + foot_offset_y}) {
|
||||||
|
p.position.y = new_pos_y.y
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dir.x < 0 do p.facing_left = true
|
||||||
|
if dir.x > 0 do p.facing_left = false
|
||||||
|
|
||||||
p.state = .WALKING
|
p.state = .WALKING
|
||||||
} else {
|
} else {
|
||||||
p.state = .IDLE
|
p.state = .IDLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
idle_animation: SpriteAnimation = {
|
idle_animation: SpriteAnimation = {
|
||||||
start_frame = 0,
|
start_frame = 0,
|
||||||
end_frame = 5,
|
end_frame = 5,
|
||||||
@@ -94,10 +106,6 @@ player_walk_anim: SpriteAnimation = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
draw_player :: proc(p: ^Player) {
|
draw_player :: proc(p: ^Player) {
|
||||||
// raylib.DrawRectangle(i32(p.position.x), i32(p.position.y), 32, 32, raylib.BLACK)
|
|
||||||
|
|
||||||
// draw_sprite_frame(&p.sprite, {0, 0}, p.position, raylib.WHITE)
|
|
||||||
|
|
||||||
draw_sprite_animated(&p.sprite, &p.animator, p.position, p.facing_left, false, raylib.WHITE)
|
draw_sprite_animated(&p.sprite, &p.animator, p.position, p.facing_left, false, raylib.WHITE)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,3 +124,26 @@ update_player :: proc(p: ^Player, delta: f32) {
|
|||||||
update_animator(&p.animator, delta)
|
update_animator(&p.animator, delta)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player_pos_to_grid_pos :: proc() -> (gx: int, gy: int) {
|
||||||
|
tile_size := f32(TILEMAP_TILE_SIZE)
|
||||||
|
|
||||||
|
foot_x := player.position.x + (f32(player.sprite.width) * 0.5)
|
||||||
|
foot_y := player.position.y + f32(player.sprite.height)
|
||||||
|
|
||||||
|
gx = int(math.floor(foot_x / tile_size))
|
||||||
|
gy = int(math.floor(foot_y / tile_size))
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
is_wall_at :: proc(world_pos: raylib.Vector2) -> bool {
|
||||||
|
tile_size := f32(TILEMAP_TILE_SIZE)
|
||||||
|
|
||||||
|
gx := int(math.floor(world_pos.x / tile_size))
|
||||||
|
gy := int(math.floor(world_pos.y / tile_size))
|
||||||
|
|
||||||
|
tile := get_tile(&ground_layer_grid, gx, gy)
|
||||||
|
|
||||||
|
return tile != nil && tile.type == .WALL
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,43 @@ ground_tile := Tile {
|
|||||||
animator = nil,
|
animator = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_wall_tile := Tile {
|
||||||
|
type = .WALL,
|
||||||
|
frame_index = 1,
|
||||||
|
color = raylib.WHITE,
|
||||||
|
interaction = .NONE,
|
||||||
|
resource = .NONE,
|
||||||
|
animator = nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
plant_tile := Tile {
|
||||||
|
type = .FLORA,
|
||||||
|
frame_index = 0,
|
||||||
|
color = raylib.WHITE,
|
||||||
|
interaction = .HARVEST,
|
||||||
|
resource = .FLORA,
|
||||||
|
animator = nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
plant_2_tile := Tile {
|
||||||
|
type = .FLORA,
|
||||||
|
frame_index = 1,
|
||||||
|
color = raylib.WHITE,
|
||||||
|
interaction = .HARVEST,
|
||||||
|
resource = .FLORA,
|
||||||
|
animator = nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
plant_3_tile := Tile {
|
||||||
|
type = .FLORA,
|
||||||
|
frame_index = 2,
|
||||||
|
color = raylib.WHITE,
|
||||||
|
interaction = .HARVEST,
|
||||||
|
resource = .FLORA,
|
||||||
|
animator = nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
draw_tile :: proc(
|
draw_tile :: proc(
|
||||||
tilemap_sheet: ^TilemapSpritesheet,
|
tilemap_sheet: ^TilemapSpritesheet,
|
||||||
tile: ^Tile,
|
tile: ^Tile,
|
||||||
@@ -88,7 +125,3 @@ update_tile_anim :: proc(tile: ^Tile, delta: f32) {
|
|||||||
tile.frame_index = tile.animator.current_frame
|
tile.frame_index = tile.animator.current_frame
|
||||||
}
|
}
|
||||||
|
|
||||||
set_tile :: proc(grid: [][]Tile, x: int, y: int, tile: Tile) {
|
|
||||||
grid[x][y] = tile
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
106
src/tilemap.odin
106
src/tilemap.odin
@@ -10,6 +10,16 @@ TilemapSpritesheet :: struct {
|
|||||||
tiles_y: i32,
|
tiles_y: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VisibleTileRange :: struct {
|
||||||
|
start_x, start_y: int,
|
||||||
|
end_x, end_y: int,
|
||||||
|
}
|
||||||
|
|
||||||
|
Grid :: struct {
|
||||||
|
width: int,
|
||||||
|
height: int,
|
||||||
|
tiles: []Tile,
|
||||||
|
}
|
||||||
|
|
||||||
load_tilemap_sheet :: proc(path: cstring, tile_width, tile_height: i32) -> TilemapSpritesheet {
|
load_tilemap_sheet :: proc(path: cstring, tile_width, tile_height: i32) -> TilemapSpritesheet {
|
||||||
tex := raylib.LoadTexture(path)
|
tex := raylib.LoadTexture(path)
|
||||||
@@ -23,35 +33,89 @@ load_tilemap_sheet :: proc(path: cstring, tile_width, tile_height: i32) -> Tilem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
create_tile_grid :: proc(width, height: i32) -> [][]Tile {
|
create_tile_grid :: proc(width, height: i32, fill_tile: Tile) -> Grid {
|
||||||
grid: [][]Tile = make([][]Tile, height)
|
w, h := int(width), int(height)
|
||||||
for y := 0; y < int(height); y += 1 {
|
grid_slice := make([]Tile, w * h)
|
||||||
grid[y] = make([]Tile, width)
|
|
||||||
for x := 0; x < int(width); x += 1 {
|
for i := 0; i < len(grid_slice); i += 1 {
|
||||||
grid[y][x] = ground_tile
|
grid_slice[i] = fill_tile
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return grid
|
return Grid{width = w, height = h, tiles = grid_slice}
|
||||||
}
|
}
|
||||||
|
|
||||||
update_tile_grid :: proc(grid: [][]Tile, delta: f32) {
|
update_tile_grid :: proc(grid: ^Grid, camera: ^raylib.Camera2D, tile_w, tile_h: f32, delta: f32) {
|
||||||
for y := 0; y < len(grid); y += 1 {
|
range := get_visible_tile_range(grid, tile_w, tile_h, camera)
|
||||||
row := grid[y]
|
|
||||||
for x := 0; x < len(row); x += 1 {
|
for y := range.start_y; y <= range.end_y; y += 1 {
|
||||||
update_tile_anim(&row[x], delta)
|
for x := range.start_x; x <= range.end_x; x += 1 {
|
||||||
|
tile := &grid.tiles[y * grid.width + x]
|
||||||
|
update_tile_anim(tile, delta)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_tile_grid :: proc(sheet: ^TilemapSpritesheet, grid: [][]Tile) {
|
draw_tile_grid :: proc(sheet: ^TilemapSpritesheet, grid: ^Grid, camera: ^raylib.Camera2D) {
|
||||||
for y := 0; y < len(grid); y += 1 {
|
tile_w := f32(sheet.tile_width)
|
||||||
row := grid[y]
|
tile_h := f32(sheet.tile_height)
|
||||||
for x := 0; x < len(row); x += 1 {
|
|
||||||
tile := &row[x]
|
range := get_visible_tile_range(grid, tile_w, tile_h, camera)
|
||||||
if (tile.type == TileType.NOTHING) do continue
|
|
||||||
pos := raylib.Vector2{f32(x * int(sheet.tile_width)), f32(y * int(sheet.tile_height))}
|
for y := range.start_y; y <= range.end_y; y += 1 {
|
||||||
draw_tile(sheet, tile, pos, raylib.Color{255, 136, 0, 255})
|
for x := range.start_x; x <= range.end_x; x += 1 {
|
||||||
|
tile := &grid.tiles[y * grid.width + x]
|
||||||
|
|
||||||
|
if tile.type == .NOTHING do continue
|
||||||
|
|
||||||
|
pos := raylib.Vector2{f32(x) * tile_w, f32(y) * tile_h}
|
||||||
|
draw_tile(sheet, tile, pos, raylib.WHITE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_visible_tile_range :: proc(
|
||||||
|
grid: ^Grid,
|
||||||
|
tile_w, tile_h: f32,
|
||||||
|
camera: ^raylib.Camera2D,
|
||||||
|
padding: int = 1,
|
||||||
|
) -> VisibleTileRange {
|
||||||
|
screen_w := f32(raylib.GetScreenWidth())
|
||||||
|
screen_h := f32(raylib.GetScreenHeight())
|
||||||
|
|
||||||
|
world_w := screen_w / camera.zoom
|
||||||
|
world_h := screen_h / camera.zoom
|
||||||
|
|
||||||
|
min_x := camera.target.x - world_w * 0.5
|
||||||
|
min_y := camera.target.y - world_h * 0.5
|
||||||
|
max_x := min_x + world_w
|
||||||
|
max_y := min_y + world_h
|
||||||
|
|
||||||
|
start_x := int(min_x / tile_w) - padding
|
||||||
|
start_y := int(min_y / tile_h) - padding
|
||||||
|
end_x := int(max_x / tile_w) + padding
|
||||||
|
end_y := int(max_y / tile_h) + padding
|
||||||
|
|
||||||
|
return VisibleTileRange {
|
||||||
|
start_x = clamp(start_x, 0, grid.width - 1),
|
||||||
|
start_y = clamp(start_y, 0, grid.height - 1),
|
||||||
|
end_x = clamp(end_x, 0, grid.width - 1),
|
||||||
|
end_y = clamp(end_y, 0, grid.height - 1),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get_tile :: proc(grid: ^Grid, x, y: int) -> ^Tile {
|
||||||
|
if x < 0 || x >= grid.width || y < 0 || y >= grid.height do return nil
|
||||||
|
return &grid.tiles[y * grid.width + x]
|
||||||
|
}
|
||||||
|
|
||||||
|
set_tile :: proc(grid: ^Grid, x: int, y: int, tile: Tile) {
|
||||||
|
if x < 0 || x >= grid.width || y < 0 || y >= grid.height do return
|
||||||
|
grid.tiles[y * grid.width + x] = tile
|
||||||
|
}
|
||||||
|
|
||||||
|
delete_tile_grid :: proc(grid: ^Grid) {
|
||||||
|
delete(grid.tiles)
|
||||||
|
grid.width = 0
|
||||||
|
grid.height = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,65 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
WORLD_SIZE_X :: 1000
|
||||||
|
WORLD_SIZE_Y :: 1000
|
||||||
|
|
||||||
|
ground_layer_grid: Grid
|
||||||
|
ground_tilemap_sheet: TilemapSpritesheet
|
||||||
|
|
||||||
|
interactables_layer_grid: Grid
|
||||||
|
interactables_tilemap_sheet: TilemapSpritesheet
|
||||||
|
|
||||||
|
init_world :: proc() {
|
||||||
|
ground_tilemap_sheet = load_tilemap_sheet(
|
||||||
|
"assets/tiles/master_tilemap.png",
|
||||||
|
TILEMAP_TILE_SIZE,
|
||||||
|
TILEMAP_TILE_SIZE,
|
||||||
|
)
|
||||||
|
|
||||||
|
interactables_tilemap_sheet = load_tilemap_sheet(
|
||||||
|
"assets/interactables/interactables_spritesheet.png",
|
||||||
|
TILEMAP_TILE_SIZE,
|
||||||
|
TILEMAP_TILE_SIZE,
|
||||||
|
)
|
||||||
|
|
||||||
|
ground_layer_grid = create_tile_grid(WORLD_SIZE_X, WORLD_SIZE_Y, ground_tile)
|
||||||
|
interactables_layer_grid = create_tile_grid(WORLD_SIZE_X, WORLD_SIZE_Y, nothing_tile)
|
||||||
|
|
||||||
|
set_tile(&interactables_layer_grid, 2, 2, plant_tile)
|
||||||
|
set_tile(&interactables_layer_grid, 4, 2, plant_2_tile)
|
||||||
|
set_tile(&interactables_layer_grid, 6, 2, plant_3_tile)
|
||||||
|
|
||||||
|
set_tile(&ground_layer_grid, 5, 5, test_wall_tile)
|
||||||
|
set_tile(&ground_layer_grid, 6, 5, test_wall_tile)
|
||||||
|
set_tile(&ground_layer_grid, 7, 5, test_wall_tile)
|
||||||
|
set_tile(&ground_layer_grid, 8, 5, test_wall_tile)
|
||||||
|
}
|
||||||
|
|
||||||
|
deinit_world :: proc() {
|
||||||
|
delete_tile_grid(&ground_layer_grid)
|
||||||
|
delete_tile_grid(&interactables_layer_grid)
|
||||||
|
}
|
||||||
|
|
||||||
|
update_world :: proc(delta: f32) {
|
||||||
|
update_tile_grid(
|
||||||
|
&ground_layer_grid,
|
||||||
|
&player.camera,
|
||||||
|
f32(TILEMAP_TILE_SIZE),
|
||||||
|
f32(TILEMAP_TILE_SIZE),
|
||||||
|
delta,
|
||||||
|
)
|
||||||
|
|
||||||
|
update_tile_grid(
|
||||||
|
&interactables_layer_grid,
|
||||||
|
&player.camera,
|
||||||
|
f32(TILEMAP_TILE_SIZE),
|
||||||
|
f32(TILEMAP_TILE_SIZE),
|
||||||
|
delta,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_world :: proc() {
|
||||||
|
draw_tile_grid(&ground_tilemap_sheet, &ground_layer_grid, &player.camera)
|
||||||
|
draw_tile_grid(&interactables_tilemap_sheet, &interactables_layer_grid, &player.camera)
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user