From d0916d568a00f5171b96fbc3bfc19ff263affc27 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 27 Jan 2023 13:43:49 +0000 Subject: coords, hexagons, drawing, chunks --- client/main.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'client/main.lua') diff --git a/client/main.lua b/client/main.lua index 5884186..b5d322e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -6,6 +6,9 @@ local PLAYER_SIZE = 30 local local_player = nil + +math.randomseed(os.time()) + -- { -- pos={100,100}, -- color={love.math.colorFromBytes(0xdf,0x73,0xff)}, @@ -13,6 +16,9 @@ local local_player = nil local host,peer + +local chunk = require"common.chunk".Chunk.make() + local function draw_player(pl,me) local hplsz = PLAYER_SIZE/2 love.graphics.setColor(pl.color) @@ -103,12 +109,17 @@ function love.update(dt) end function love.draw() + love.graphics.clear(1,1,1) if local_player then draw_player(local_player,true) end for _,pl in pairs(remote_players) do draw_player(pl) end + + -- require"drawing".drawhex({x=200,y=200},40) + require"drawing".draw_chunk(chunk) + end function love.load() -- cgit v1.2.3