Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
--[[
GD50 2018
Pong Remake
pong-0
"The Day-0 Update"
-- Main Program --
Author: Colton Ogden
[email protected]
Originally programmed by Atari in 1972. Features two
paddles, controlled by players, with the goal of getting
the ball past your opponent's edge. First to 10 points wins.
This version is built to more closely resemble the NES than
the original Pong machines or the Atari 2600 in terms of
resolution, though in widescreen (16:9) so it looks nicer on
modern systems.
]]
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
--[[
Runs when the game first starts up, only once; used to initialize the game.
]]
function love.load()
love.window.setMode(WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
resizable = false,
vsync = true
})
end
--[[
Called after update by LÖVE2D, used to draw anything to the screen, updated or otherwise.
]]
function love.draw()
love.graphics.printf(
'Hello Pong!', -- text to render
0, -- starting X (0 since we're going to center it based on width)
WINDOW_HEIGHT / 2 - 6, -- starting Y (halfway down the screen)
WINDOW_WIDTH, -- number of pixels to center within (the entire screen here)
'center') -- alignment mode, can be 'center', 'left', or 'right'
end