Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.lua #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saiganesh-glitch
Copy link

--[[
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant