


Giving attribution is not required, but appreciated. Other Basic Gamesīasic HTML Games are made possible by users like you. When you become a Patron, you get access to behind the scenes development logs, the ability to vote on which games I work on next, and early access to the next Basic HTML Game. getElementById ( 'game' ) Ĭonst context = canvas. ball velocity (start going to the top-right corner) keep track of when need to reset the ball position start in the middle of the game on the right side start in the middle of the game on the left side getContext ( '2d' ) Ĭonst maxPaddleY = canvas. check for collision between two objects using axis-aligned bounding box (AABB)Ĭontext. prevent ball from going through walls by changing its velocity prevent paddles from going through wallsĬontext. List of scenarios discussed in this book.ġ.3 Interacting with objects.ġ.8 Understanding the class diagram.Ģ.1 The Little Crab scenario.Ģ.4 Dealing with screen edges.Ģ.5 Summary of programming techniques.ģ.9 Summary of programming techniques.Ĥ.1 Adding objects automatically.Ĥ.5 Instance variables (fields).Ĥ.7 Using actor constructors.Ĥ.12 Summary of programming techniques. I1.4 Publishing on the Greenfoot Gallery.Ĭhapter 5 Making music: An on-screen piano.ĥ.3 Abstraction: Creating multiple keys.ĥ.5 Using loops: The while loop.ĥ.7 Summary of programming techniques.Ĭhapter 6 Interacting objects: Newton’s Lab.Ħ.1 The starting point: Newton’s Lab.Ħ.2 Helper classes: SmoothMover and Vector.Ħ.3 The existing Body class.Ħ.4 First extension: Creating movement.Ħ.5 Using Java library classes.Ħ.6 Adding gravitational force.Ħ.12 Summary of programming techniques.Ĭhapter 7 Collision detection: Asteroids.ħ.1 Investigation: What is there?.ħ.5 Colliding with asteroids.ħ.9 Interacting with objects in range.ħ.11 Summary of programming techniques.
#Greenfoot pong software
Introduction to Programming with GreenfootĬompanion Website Additional material and resources for this book can be found at For students: G The Greenfoot software G The scenarios discussed in this book G The Greenfoot Gallery-a scenario showcase G Tutorial videos G A discussion forum G Technical support For teachers: G A teacher discussion forum G Additional exercises related to the book G The “Green Room” containing worksheets and other teaching resources I2.2 Programming your Greeps.Ĩ.3 Sound recording and editing.Ĩ.4 Sound file formats and file sizes.Ĩ.6 Image files and file formats.Ĩ.8 Combining images files and dynamic drawing.
