New font, proper score and accuracy labels
This commit is contained in:
parent
5f9b4286eb
commit
0a49f9e06a
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,10 +1,5 @@
|
||||
.vscode
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
settings.json
|
||||
=======
|
||||
|
||||
settings.json
|
||||
settings.json
|
||||
>>>>>>> 77b988b12d6638bf3085a33f181f082b2b93ef1a
|
||||
log.log
|
BIN
fonts/FridayNightFunkin-Regular.ttf
Normal file
BIN
fonts/FridayNightFunkin-Regular.ttf
Normal file
Binary file not shown.
26
log.log
26
log.log
@ -5,14 +5,34 @@ No chart file
|
||||
No chart file
|
||||
No chart file
|
||||
Is chart file
|
||||
<<<<<<< HEAD
|
||||
No chart file
|
||||
Is chart file
|
||||
No chart file
|
||||
No chart file
|
||||
=======
|
||||
Is chart file
|
||||
No chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
Is chart file
|
||||
>>>>>>> 77b988b12d6638bf3085a33f181f082b2b93ef1a
|
||||
Is chart file
|
4
main.lua
4
main.lua
@ -43,7 +43,7 @@ local function setup()
|
||||
freaky:play()
|
||||
end
|
||||
|
||||
local font = love.graphics.newFont("fonts/Phantomuff.ttf", 40)
|
||||
local font = love.graphics.newFont("fonts/FridayNightFunkin-Regular.ttf", 40)
|
||||
|
||||
local gettingKey
|
||||
|
||||
@ -69,7 +69,7 @@ function love.draw()
|
||||
curState.draw()
|
||||
else
|
||||
myTypes.drawSprites()
|
||||
love.graphics.print({{0,0,0}, string.format("Song: %s, Difficulty: %s, List: %s", curSong.name, curDiff, logging.dump(curDiffList))}, font, love.graphics.getWidth()/4, love.graphics:getHeight()/2 + 250, 0, 1, 1, 200)
|
||||
love.graphics.print({{0,0,0}, string.format("SONG: %s, DIFFICULTY: %s", curSong.name, curDiff)}, font, love.graphics.getWidth()/4, love.graphics:getHeight()/2 + 250, 0, 1, 1, 200)
|
||||
love.graphics.print(
|
||||
{{0,0,0}, string.format("Left: %s, Down: %s, Up: %s, Right: %s \nDownscroll: %s",
|
||||
keybinds[1],
|
||||
|
@ -63,6 +63,14 @@ local function state(songName, songDifficulty)
|
||||
|
||||
local icons = {}
|
||||
|
||||
local ui = {
|
||||
timebar = true,
|
||||
healthIcons = true, -- If halth is false it wont render either way
|
||||
health = true,
|
||||
score = true,
|
||||
ratings = true,
|
||||
}
|
||||
|
||||
local settings = {}
|
||||
|
||||
local ratings = {
|
||||
@ -73,6 +81,8 @@ local function state(songName, songDifficulty)
|
||||
miss = 0,
|
||||
}
|
||||
local score = 0
|
||||
local totalScore = 0 -- If you hit ALL sicks
|
||||
local accuracy = 100
|
||||
|
||||
local rankWindows = {
|
||||
{
|
||||
@ -127,6 +137,7 @@ local function state(songName, songDifficulty)
|
||||
|
||||
local font = love.graphics.newFont("fonts/Phantomuff.ttf", 15)
|
||||
local biggerFont = love.graphics.newFont("fonts/Phantomuff.ttf", 30)
|
||||
local evenBiggerFont = love.graphics.newFont("fonts/FridayNightFunkin-Regular.ttf", 50)
|
||||
|
||||
local receptors = {}
|
||||
local splashes = {}
|
||||
@ -247,6 +258,9 @@ local function state(songName, songDifficulty)
|
||||
closestNote:destroy()
|
||||
|
||||
score = score + rating.score
|
||||
totalScore = totalScore + rankWindows[1].score
|
||||
|
||||
accuracy = (score / totalScore) * 100
|
||||
end
|
||||
end
|
||||
|
||||
@ -511,34 +525,43 @@ local function state(songName, songDifficulty)
|
||||
|
||||
myTypes.drawSprites()
|
||||
|
||||
if ui.ratings then
|
||||
for index, window in next, rankWindows do
|
||||
love.graphics.print({{0,0,0,1}, tostring(ratings[window.rating])}, evenBiggerFont, 200, 330 + 75 * (index - 1))
|
||||
end
|
||||
-- love.graphics.print({{0,0,0,1}, string.format("Sick: %s \nGood: %s \nBad: %s \nShit: %s \nMiss: %s", ratings.sick, ratings.good, ratings.bad, ratings.shit, ratings.miss)}, biggerFont, 0, 100)
|
||||
end
|
||||
if ui.score then
|
||||
love.graphics.print({{0,0,0,1}, string.format("Score: %s Accuracy: %s", score, tostring(accuracy):sub(1, 5))}, evenBiggerFont, 760, settings.Downscroll and 1030 or 50)
|
||||
end
|
||||
|
||||
-- HEALTH BAR
|
||||
if playing and ui.health then
|
||||
love.graphics.setColor(255,0,0)
|
||||
love.graphics.rectangle("fill", 560, settings.Downscroll and 30 or 1020, 800, 30)
|
||||
love.graphics.setColor(0,255,0)
|
||||
love.graphics.rectangle("fill", 1360 - health * 400, settings.Downscroll and 30 or 1020, health * 400, 30)
|
||||
|
||||
love.graphics.setColor(0,0,0)
|
||||
love.graphics.rectangle("line", 560, settings.Downscroll and 30 or 1050, 800, 30)
|
||||
|
||||
love.graphics.setColor(255,255,255)
|
||||
|
||||
if ui.healthIcons then
|
||||
love.graphics.draw(icons.bf.image, health > .2 and icons.bf.alive or icons.bf.dead, 1510 - health * 400, settings.Downscroll and 0 or 930, 0, -1, 1)
|
||||
|
||||
if characters.dad then
|
||||
love.graphics.draw(icons.dad.image, health < 1.8 and icons.dad.alive or icons.dad.dead, 1210 - health * 400, settings.Downscroll and 0 or 930)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- HEALTH BAR
|
||||
|
||||
love.graphics.setCanvas()
|
||||
|
||||
love.graphics.draw(mainCanvas, (love.graphics.getWidth() - (love.graphics.getWidth() * zoom)) / 2, (love.graphics.getHeight() - love.graphics.getHeight() * zoom) / 2, 0, love.graphics.getWidth()/1920 * zoom, (love.graphics.getHeight()/1080 * zoom))
|
||||
|
||||
love.graphics.print({{0,0,0,1}, string.format("FPS: %s \nVolume: %s", love.timer.getFPS(), volume)}, font)
|
||||
|
||||
love.graphics.print({{0,0,0,1}, string.format("Sick: %s \nGood: %s \nBad: %s \nShit: %s \nMiss: %s", ratings.sick, ratings.good, ratings.bad, ratings.shit, ratings.miss)}, biggerFont, 0, 100)
|
||||
|
||||
|
||||
-- HEALTH BAR
|
||||
if playing then
|
||||
love.graphics.setColor(255,0,0)
|
||||
love.graphics.rectangle("fill", 440, settings.Downscroll and 30 or 690, 400, 15)
|
||||
love.graphics.setColor(0,255,0)
|
||||
love.graphics.rectangle("fill", 840 - health * 200, settings.Downscroll and 30 or 690, health * 200, 15)
|
||||
|
||||
love.graphics.setColor(0,0,0)
|
||||
love.graphics.rectangle("line", 440, settings.Downscroll and 30 or 690, 400, 15)
|
||||
|
||||
love.graphics.setColor(255,255,255)
|
||||
|
||||
love.graphics.draw(icons.bf.image, health > .2 and icons.bf.alive or icons.bf.dead, 960 - health * 200, settings.Downscroll and 0 or 720, 0, -1, 1)
|
||||
|
||||
if characters.dad then
|
||||
love.graphics.draw(icons.dad.image, health < 1.8 and icons.dad.alive or icons.dad.dead, 715 - health * 200, settings.Downscroll and 0 or 720)
|
||||
end
|
||||
end
|
||||
-- HEALTH BAR
|
||||
end
|
||||
|
||||
love.window.setMode(1280, 720, { fullscreen = false , resizable = false})
|
||||
@ -764,6 +787,31 @@ local function state(songName, songDifficulty)
|
||||
end
|
||||
module.characters = characters
|
||||
end
|
||||
|
||||
local sickImage = myTypes.Image("images/ui/sick.png")
|
||||
local goodImage = myTypes.Image("images/ui/good.png")
|
||||
local badImage = myTypes.Image("images/ui/bad.png")
|
||||
local shitImage = myTypes.Image("images/ui/shit.png")
|
||||
|
||||
sickImage.position.y = 330
|
||||
goodImage.position.y = 405
|
||||
badImage.position.y = 480
|
||||
shitImage.position.y = 555
|
||||
|
||||
sickImage.ui = true
|
||||
goodImage.ui = true
|
||||
badImage.ui = true
|
||||
shitImage.ui = true
|
||||
|
||||
sickImage.layer = 7
|
||||
goodImage.layer = 7
|
||||
badImage.layer = 7
|
||||
shitImage.layer = 7
|
||||
|
||||
sickImage.resize = myTypes.Vector2(0.5,0.5)
|
||||
goodImage.resize = myTypes.Vector2(0.5,0.5)
|
||||
badImage.resize = myTypes.Vector2(0.5,0.5)
|
||||
shitImage.resize = myTypes.Vector2(0.5,0.5)
|
||||
end
|
||||
|
||||
function state.finish()
|
||||
|
@ -1 +1 @@
|
||||
{"Downscroll":true, "Keybinds":["a", "s", "up", "right"]}
|
||||
{"Keybinds":["a", "s", "up", "right"], "Downscroll":true}
|
@ -8,7 +8,7 @@
|
||||
"opponent": [200, -175],
|
||||
"hide_girlfriend": false,
|
||||
|
||||
"camera_boyfriend": [150, -300],
|
||||
"camera_boyfriend": [150, -400],
|
||||
"camera_opponent": [-300, 300],
|
||||
"camera_girlfriend": [0, 0],
|
||||
"camera_speed": 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user