Update all remaining games to use text_scaled with scale=2

Updated games:
- pong.lua: All text now uses text_scaled with scale=2
- air_hockey.lua: All text now uses text_scaled with scale=2
- asteroids.lua: All text now uses text_scaled with scale=2
- ball.lua: All text now uses text_scaled with scale=2
- breakout.lua: All text now uses text_scaled with scale=2
- counter.lua: All text now uses text_scaled with scale=2
- flappy_bird.lua: All text now uses text_scaled with scale=2
- lunar_lander.lua: All text now uses text_scaled with scale=2
- snake.lua: All text now uses text_scaled with scale=2
- tetris.lua: All text now uses text_scaled with scale=2

All 14 games now have consistent 2x text scaling for better readability.
This commit is contained in:
Adolfo Reyna
2026-02-12 21:33:00 -05:00
parent f398d62af2
commit b26f3bf775
10 changed files with 69 additions and 69 deletions

View File

@@ -92,8 +92,8 @@ function draw()
local state = game.vars.state
if state == STATE_MENU then
renderer.text(game.width() / 2 - 30, game.height() / 2 - 30, "BREAKOUT", true)
renderer.text(game.width() / 2 - 50, game.height() / 2, "Tap to Start", true)
renderer.text_scaled(game.width(, 2) / 2 - 30, game.height() / 2 - 30, "BREAKOUT", true)
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2, "Tap to Start", true)
elseif state == STATE_PLAYING then
-- Draw bricks
@@ -115,18 +115,18 @@ function draw()
renderer.circle(math.floor(game.vars.ball_x + 0.5), math.floor(game.vars.ball_y + 0.5), BALL_RADIUS, true, true)
-- Draw score and lives
renderer.text(5, 5, "Score: " .. tostring(game.vars.score), true)
renderer.text(game.width() - 50, 5, "Lives: " .. tostring(game.vars.lives), true)
renderer.text_scaled(5, 5, "Score: " .. tostring(game.vars.score, 2), true)
renderer.text_scaled(game.width(, 2) - 50, 5, "Lives: " .. tostring(game.vars.lives), true)
elseif state == STATE_GAME_OVER then
renderer.text(game.width() / 2 - 40, game.height() / 2 - 20, "GAME OVER", true)
renderer.text(game.width() / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true)
renderer.text(game.width() / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
renderer.text_scaled(game.width(, 2) / 2 - 40, game.height() / 2 - 20, "GAME OVER", true)
renderer.text_scaled(game.width(, 2) / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
elseif state == STATE_LEVEL_COMPLETE then
renderer.text(game.width() / 2 - 50, game.height() / 2 - 20, "LEVEL COMPLETE!", true)
renderer.text(game.width() / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true)
renderer.text(game.width() / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2 - 20, "LEVEL COMPLETE!", true)
renderer.text_scaled(game.width(, 2) / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
end
end