REWORKED HOW THINGS ARE SCALED

speed values should be adjusted accordingly, but maybe i slipped some

i changed:
player acc
arrow speed

i intentionally didnt change:
jump speed
This commit is contained in:
lustlion
2021-10-25 02:00:21 +02:00
parent 1e1f9edb45
commit b8b2525975
5 changed files with 27 additions and 22 deletions

View File

@@ -11,7 +11,7 @@ function love.load()
love.keyboard.setKeyRepeat(true)
love.graphics.setDefaultFilter("nearest") -- good pixel
game = {
scale = 1,
scale = 2,
width = love.graphics.getWidth(),
height = love.graphics.getHeight(),
paused = false
@@ -26,8 +26,8 @@ function love.load()
main_Player = Player:New(1220,220)
LoadedEntities = {}
table.insert(LoadedEntities,main_Player)
table.insert(LoadedEntities,Kupo:New(700,200))
table.insert(LoadedEntities,Kupo:New(500,300))
table.insert(LoadedEntities,Kupo:New(450,100))
table.insert(LoadedEntities,Kupo:New(250,150))
main_Player.sprite = love.graphics.newImage("assets/characters/nancy/idle1.png")
main_Player:LoadAnimation(animation.nancy.idle)
end
@@ -102,6 +102,8 @@ function love.keypressed(key)
end
function love.draw()
-- GAME WORLD
love.graphics.scale(game.scale,game.scale)
LevelDisplayBackground()
for _, enty in pairs(LoadedEntities) do
enty:HandleAnimation()
@@ -112,11 +114,14 @@ function love.draw()
-- Save color
local pcr, pcg, pcb, pca = love.graphics.getColor()
-- HUD
love.graphics.scale(1,1)
-- Scale control
if game.height > game.width then
textScale = game.height/480
textScale = game.height/480/2
else
textScale = game.width/640
textScale = game.width/640/2
end
--debug