solved a seed thingie

This commit is contained in:
bizcochito 2021-03-18 19:08:58 +01:00
parent eea008e8c1
commit f52803aaea
No known key found for this signature in database
GPG Key ID: 4A514B3A7A673EB6
1 changed files with 16 additions and 0 deletions

View File

@ -7,6 +7,10 @@ function love.load()
notsorandomseed = personalseed notsorandomseed = personalseed
math.randomseed(tonumber(personalseed, 16)) math.randomseed(tonumber(personalseed, 16))
-- Reset variables
fps_second = 0
fps_count = 0
fps_draw = 0
-- GRAPHICS -- GRAPHICS
-- GOOD PIXEL -- GOOD PIXEL
@ -37,6 +41,15 @@ function love.update(dt)
if not pause then if not pause then
g3d.camera.firstPersonMovement(dt,5) g3d.camera.firstPersonMovement(dt,5)
end end
-- count frames per seconds
if fps_second >= 1 then
fps_second = fps_second - 1
fps_draw = fps_count
fps_count = 0
end
fps_second = fps_second + dt
fps_dt = dt
fps_count = fps_count + 1
end end
function love.keypressed(key) function love.keypressed(key)
@ -64,6 +77,9 @@ function love.draw()
obj:draw() obj:draw()
end end
-- Print FPS
love.graphics.print("FPS: "..fps_draw.." Frametime: "..fps_dt)
-- print "Press [z] to generate a new museum" -- print "Press [z] to generate a new museum"
love.graphics.print("Press [z] to generate a new museum", 20, 20) love.graphics.print("Press [z] to generate a new museum", 20, 20)