-
Notifications
You must be signed in to change notification settings - Fork 20
Score
noooway edited this page Mar 12, 2017
·
19 revisions
- Score display
local vector = require "vector"
local score_display = {}
score_display.position = vector( 680, 32 )
score_display.score = 0
function score_display.update( dt )
end
function score_display.draw()
love.graphics.print( "Score: " .. tostring( score_display.score ),
score_display.position.x,
score_display.position.y )
end
-
Modifications to
side_panel
side_panel.lives_display = lives_display
side_panel.score_display = score_display
function side_panel.update( dt )
side_panel.lives_display.update( dt )
side_panel.score_display.update( dt )
end
function side_panel.draw()
side_panel.draw_background()
side_panel.lives_display.draw()
side_panel.score_display.draw()
end
function side_panel.reset()
side_panel.lives_display.reset()
side_panel.score_display.reset()
end
- Modifications to "game"
Feedback is crucial to improve the tutorial!
Let me know if you have any questions, critique, suggestions or just any other ideas.
Chapter 1: Prototype
- The Ball, The Brick, The Platform
- Game Objects as Lua Tables
- Bricks and Walls
- Detecting Collisions
- Resolving Collisions
- Levels
Appendix A: Storing Levels as Strings
Appendix B: Optimized Collision Detection (draft)
Chapter 2: General Code Structure
- Splitting Code into Several Files
- Loading Levels from Files
- Straightforward Gamestates
- Advanced Gamestates
- Basic Tiles
- Different Brick Types
- Basic Sound
- Game Over
Appendix C: Stricter Modules (draft)
Appendix D-1: Intro to Classes (draft)
Appendix D-2: Chapter 2 Using Classes.
Chapter 3 (deprecated): Details
- Improved Ball Rebounds
- Ball Launch From Platform (Two Objects Moving Together)
- Mouse Controls
- Spawning Bonuses
- Bonus Effects
- Glue Bonus
- Add New Ball Bonus
- Life and Next Level Bonuses
- Random Bonuses
- Menu Buttons
- Wall Tiles
- Side Panel
- Score
- Fonts
- More Sounds
- Final Screen
- Packaging
Appendix D: GUI Layouts
Appendix E: Love-release and Love.js
Beyond Programming: