Attempt to improve performance

This commit is contained in:
Bill Niblock 2024-11-03 18:56:31 -05:00
parent ff214a11ad
commit dc8efafba5
6 changed files with 9 additions and 11 deletions

View file

@ -76,7 +76,7 @@ release="compat"
love_version="11.5" love_version="11.5"
canvas_colour="54,69,79" canvas_colour="54,69,79"
text_colour="240,234,214" text_colour="240,234,214"
initial_memory=0 initial_memory=96000000
module_size=$($DU_CMD -b $love_file | awk '{print $1}') module_size=$($DU_CMD -b $love_file | awk '{print $1}')
title=$(echo $name | sed -r 's/\<./\U&/g' | sed -r 's/-/\ /g') title=$(echo $name | sed -r 's/\<./\U&/g' | sed -r 's/-/\ /g')
version="" version=""

View file

@ -1,6 +1,6 @@
love.conf = function(t) love.conf = function(t)
t.gammacorrect = true t.gammacorrect = true
t.title, t.identity = "Survivor", "Bill Niblock" t.title, t.identity = "escape-the-crash", "Bill Niblock"
t.modules.joystick = false t.modules.joystick = false
t.modules.physics = false t.modules.physics = false
-- This scales the game, and it still looks quite nice at 1440p! -- This scales the game, and it still looks quite nice at 1440p!

View file

@ -1,4 +1,4 @@
VERSION=0.1.0 VERSION=0.2.0
LOVE_VERSION=11.5 LOVE_VERSION=11.5
NAME=escape-the-crash NAME=escape-the-crash
ITCH_ACCOUNT=vagabondazulien ITCH_ACCOUNT=vagabondazulien
@ -54,7 +54,7 @@ web: releases/$(NAME)-$(VERSION)-web.zip
runweb: $(LOVEFILE) runweb: $(LOVEFILE)
buildtools/love-js/love-js.sh $(LOVEFILE) $(NAME) -v=$(VERSION) -a=$(AUTHOR) -o=releases -r -n buildtools/love-js/love-js.sh $(LOVEFILE) $(NAME) -v=$(VERSION) -a=$(AUTHOR) -o=releases -r -n -d
# If you release on itch.io, you should install butler: # If you release on itch.io, you should install butler:
# https://itch.io/docs/butler/installing.html # https://itch.io/docs/butler/installing.html
@ -67,6 +67,6 @@ uploadwindows: releases/$(NAME)-$(VERSION)-win.zip
uploadweb: releases/$(NAME)-$(VERSION)-web.zip uploadweb: releases/$(NAME)-$(VERSION)-web.zip
butler push $^ $(ITCH_ACCOUNT)/$(NAME):web --userversion $(VERSION) butler push $^ $(ITCH_ACCOUNT)/$(NAME):web --userversion $(VERSION)
upload: uploadlinux uploadmac uploadwindows uploadweb upload: uploadlinux uploadwindows uploadmac uploadweb
release: linux mac windows web upload clean release: linux mac windows web upload clean

View file

@ -189,7 +189,7 @@
(var data-maze (convert-cells meta-maze leave-cell)) (var data-maze (convert-cells meta-maze leave-cell))
(var data-map (generate_cell_map data-maze)) (var data-map (generate_cell_map data-maze))
(var map (generate_map data-map spawn-cell leave-cell)) (var map (generate_map data-map spawn-cell leave-cell))
(print_map map) ; (print_map map)
(values map spawn-spot)) (values map spawn-spot))
; (print (.. "SPAWN: " spawn-cell "(" (. spawn-spot :x) "," (. spawn-spot :y) ")")) ; (print (.. "SPAWN: " spawn-cell "(" (. spawn-spot :x) "," (. spawn-spot :y) ")"))

View file

@ -82,6 +82,7 @@
) )
; This draws a compass bar at the top of the HUD ; This draws a compass bar at the top of the HUD
(var compass-font (love.graphics.newFont 20))
(var hc-bar-east ["-" "-" "|" "N" "|" (var hc-bar-east ["-" "-" "|" "N" "|"
"-" "-" "|" "NE" "|" "-" "-" "|" "NE" "|"
"-" "-" "|" "E" "|" "-" "-" "|" "E" "|"
@ -115,13 +116,10 @@
hc-output) hc-output)
(fn hud-compass [] (fn hud-compass []
(var old-font (love.graphics.getFont))
(love.graphics.setNewFont 20)
(love.graphics.setColor 0.5 1 1 0.5) (love.graphics.setColor 0.5 1 1 0.5)
(var compass-bar-output (compass-bar)) (var compass-bar-output (compass-bar))
(love.graphics.printf compass-bar-output 0 50 screen-width :center) (love.graphics.printf compass-bar-output compass-font 0 50 screen-width :center))
(love.graphics.setFont old-font))
(fn overlay [dx dy pos-x] (fn overlay [dx dy pos-x]
(love.graphics.translate dx (- dy)) (love.graphics.translate dx (- dy))
(oxygen-ui (+ (/ screen-width 2) 100) (- screen-height 100)) (oxygen-ui (+ (/ screen-width 2) 100) (- screen-height 100))