diff options
author | ubq323 <ubq323@ubq323.website> | 2023-01-27 13:43:49 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-01-27 13:46:41 +0000 |
commit | d0916d568a00f5171b96fbc3bfc19ff263affc27 (patch) | |
tree | ef007be582d2b872ff2ac407def9d0ad64e3bc86 /client/main.lua | |
parent | 0eab09311f6634aefe0e79ecafd975ab68b2812c (diff) |
coords, hexagons, drawing, chunks
Diffstat (limited to 'client/main.lua')
-rw-r--r-- | client/main.lua | 11 |
1 files changed, 11 insertions, 0 deletions
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() |