Pong is a two-dimensional sports game which simulates table tennis. This implementation is built with Löve
Learn about the development of 2D and 3D interactive games in this hands-on course, as you explore the design of games such as Pong.
- To Build this game we used lua language similar to javascript manual
- Framework used is named LÖVE
LÖVE is an awesome framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android and iOS. Link to Download Docs
- Display Text: Starting of game building with displaying a text in center of screen.
- Low resolution: Display text in low resolution using push library.
- Adding Rectangles: For pong game adding rectangle paddles on screen.
- Moving Paddles: Using dt - the most common shorthand for delta-time.
- Add Velocity to Ball: Using - math.randomseed(), os.time(), etc. And Starting game on keyPressed.
- Updating Code with OOPS!
- FPS Update: Frames Per Second, using love.window.setTitle(), love.timer.getFPS()
- Collision Detection: based on "axis-aligned bounding boxes"
- Adding Scoring
- Assigning Service to player after scoring
- Victory Updates for a player
- Adding Audio for scoring, ball hitting paddle or wall, using bfxr.net.
- Reszing Game window with push library, love.resize(width, height), push:resize
- concatenation (..) operation
- status == nil, kid of null
- a == b and 1 or 2 (kind of ternary a==b ? true : false )