Skip to content

Commit

Permalink
Created smaller graphics.
Browse files Browse the repository at this point in the history
This way the scaling does not have to be done at runtime.
  • Loading branch information
Brandon Blodget committed Nov 5, 2010
1 parent 1026a56 commit 6fd23b3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Done 11/5/2010
- swap the pos of "again" and "back" buttons
- Edit the game graphics to natively be the correct size

To Do List
- Edit the game graphics to natively be the correct size
- Fix it so each level keeps track of nonsense word length
- Create a test for love 0.7.0 by checking for functions that only
exist in 0.7 (hack). Create routine that makes text anchor point
Expand All @@ -12,6 +11,8 @@ To Do List
- When plane hits word have them wiggle a little bit
- Write Lessons 4 - 8
- Add ability for TAB and ENTER to select menu choices
- Allow spacebar to work like enter during game?
- Add and "About" or "Credits" page



Expand Down
11 changes: 5 additions & 6 deletions game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ function Game.create(data)
again = Button.createTextButton("Again", 500, 350)
}

self.plane = { img = graphics.plane, line=1, x=0, y=self.y1, xSpeed=self.START_SPEED, scale=0.25 };
self.cloud = { img = graphics.cloud, line=2, x=800, y=self.y2, xSpeed=-200, scale=0.50 };

self.plane = { img = graphics.plane, line=1, x=0, y=self.y1, xSpeed=self.START_SPEED};
self.cloud = { img = graphics.cloud, line=2, x=800, y=self.y2, xSpeed=-200};

self.objects = {
self.plane,
Expand Down Expand Up @@ -237,8 +236,8 @@ end


function Game:draw()
local wAdjust = ((graphics.sun:getWidth() * 0.25) / 3)
local hAdjust = (graphics.sun:getHeight() * 0.25) / 2
local wAdjust = graphics.sun:getWidth() / 3
local hAdjust = graphics.sun:getHeight() / 2

if (not self.game_over) then

Expand All @@ -250,7 +249,7 @@ function Game:draw()
love.graphics.printf(w.word, w.x, w.y,800,'left')
elseif (w.state == "sun") then
love.graphics.setColor(unpack(color.overlay))
love.graphics.draw(graphics.sun, w.x -wAdjust, w.y -hAdjust, 0, 0.25)
love.graphics.draw(graphics.sun, w.x -wAdjust, w.y -hAdjust, 0)
end
end

Expand Down
Binary file added images/airplane_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cloud_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sun_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ function love.load()

graphics = {
logo = love.graphics.newImage("images/love-ball.png"),
cloud = love.graphics.newImage("images/cloud_plain.png"),
plane = love.graphics.newImage("images/airplane_happy2.png"),
sun = love.graphics.newImage("images/sun.png")
cloud = love.graphics.newImage("images/cloud_small.png"),
plane = love.graphics.newImage("images/airplane_small.png"),
sun = love.graphics.newImage("images/sun_small.png")
}

sound = { beep = love.audio.newSource("sounds/button-pressed.ogg", "static")}
Expand Down

0 comments on commit 6fd23b3

Please sign in to comment.