SlideShare a Scribd company logo
Programming Games
The 10 minute crash course
Rails Girls The Hague 2013
Name: Patrick Huesler
Email: patrick.huesler@wooga.com
Github: phuesler
Twitter: phuesler
Programmin games - A 10 minute crash course
Read User Input
Update Game World
Draw Game World
Game Loop
Drawing
Programmin games - A 10 minute crash course
Programmin games - A 10 minute crash course
Pixel
Programmin games - A 10 minute crash course
GPU
Frame rate (FPS)
~60 frames per second
~30 frames per second
x
y
0,0
frames
frame 1 frame 2 frame 3 frame 4 frame 5
Animations
Sprites
Programmin games - A 10 minute crash course
x
y
0,0
P(10, 5)
x = 10
y = 5
School
x
y
0,0
P(10,5)
x = 10
y = 5
Computer graphics
x
y
0,0
width
height
Update
Game World
X
Y
0,0
Movement
-y
+y
-x +x
ground
X
Y
0,0
Falling
vy : vertical velocity
vy > 0
ground
y = y + vy
vy
X
Y
0,0
Jumping
vy : vertical velocity
vy < 0
ground
y = y + vy
vy
x
y
0,0
Hit Detection
Hit Boxes:
Are the
rectangles
overlapping?
5,10
15,5
width
height
https://en.wikipedia.org/wiki/Hit-testing
x
y
0,0
Center
xc = x + height / 2
yc = y + widht / 2
xc = 5 + 11 / 2 = 8
yc = 5 + 11 / 2 = 8
center = p(8, 8)
5,5
width = 11
height=11c
x
y
0,0
Distance
https://en.wikipedia.org/wiki/Pythagorean_theorem
cTrollX - cRacoonX
cTrollY-cRacoonY
distance = sqrt(a^2 + b^2)
distance
a
b
Ruby GOSU
https://github.com/jlnr/gosu/
https://github.com/jlnr/gosu/wiki/Window-Main-Loop
RG Tutorial*
https://github.com/FloorD/gosu_tutorial_RG_TH
*work in progress
Images
http://www.flickr.com/photos/71753457@N00/2490975442/ orangeacid
http://www.flickr.com/photos/83542829@N00/2778794704/ William Hook
http://www.flickr.com/photos/60648084@N00/2462966749/ Ѕolo
http://www.flickr.com/photos/34196372@N04/5906065484/ Keith Bloomfield
http://www.flickr.com/photos/99652207@N00/421447321/ Charles Williams
http://www.flickr.com/photos/97223988@N00/6432357463 Flооd
http://www.flickr.com/photos/45145879@N00/47714548/" 4tik
http://www.flickr.com/photos/89455291@N00/4402938286 Fr3d.org
http://www.flickr.com/photos/14443853@N07/5362778675 superUbO
http://www.flickr.com/photos/26291754@N02/3720812250 Jen Son
http://www.flickr.com/photos/14384226@N07/4768786395 Matteo Sorba

More Related Content

PDF
Aprendendo a Aprender - Evento de Verão em Montes claros
PPTX
EJERCICIOS PROPUESTOS DE BOOLE
PDF
Utility Classes Are Killing Us
DOC
Find the output of the following code (Java for ICSE)
PPT
numbers system
PDF
The Ring programming language version 1.9 book - Part 60 of 210
DOC
Graficas y tabulacion
PDF
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Aprendendo a Aprender - Evento de Verão em Montes claros
EJERCICIOS PROPUESTOS DE BOOLE
Utility Classes Are Killing Us
Find the output of the following code (Java for ICSE)
numbers system
The Ring programming language version 1.9 book - Part 60 of 210
Graficas y tabulacion
Rapid Game Development with RUby and Gosu – Ruby Manor 4

Viewers also liked (6)

PDF
Riak & Wooga_Geeek2Geeek Meetup2014 Berlin
PDF
How to hire the best people for your startup-Gitta Blat-Head of People
PDF
2013 04-29-evolution of backend
PPTX
Story of Warlords: Bringing a turn-based strategy game to mobile
PDF
Redis to the Rescue?
PPTX
High-Volume Data Collection and Real Time Analytics Using Redis
Riak & Wooga_Geeek2Geeek Meetup2014 Berlin
How to hire the best people for your startup-Gitta Blat-Head of People
2013 04-29-evolution of backend
Story of Warlords: Bringing a turn-based strategy game to mobile
Redis to the Rescue?
High-Volume Data Collection and Real Time Analytics Using Redis
Ad

Similar to Programmin games - A 10 minute crash course (11)

PDF
Introduction to Game programming with PyGame Part 1
PDF
ODP
Creating masterpieces with raphael
PPTX
Game dev 101 part 2
PDF
Ludo system project report management .pdf
PDF
Multiplayer Networking Game
PDF
Fun With Ruby And Gosu Javier Ramirez
PPTX
A graphic library and an application for simple curve manipolation
PDF
Programming methodology lecture11
PPTX
Evolution Explosion - Final Year Project Presentation
PPTX
ACM Mid-Southeast Slides
Introduction to Game programming with PyGame Part 1
Creating masterpieces with raphael
Game dev 101 part 2
Ludo system project report management .pdf
Multiplayer Networking Game
Fun With Ruby And Gosu Javier Ramirez
A graphic library and an application for simple curve manipolation
Programming methodology lecture11
Evolution Explosion - Final Year Project Presentation
ACM Mid-Southeast Slides
Ad

More from Wooga (20)

PDF
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
PDF
In it for the long haul - How Wooga boosts long-term retention
PDF
Leveling up in localization! - Susan Alma & Dario Quondamstefano
PDF
Evoloution of Ideas
PDF
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
PDF
Saying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
PDF
Innovation dank DevOps (DevOpsCon Berlin 2015)
PDF
Big Fish, small pond - strategies for surviving in a maturing market - Ed Biden
PDF
Review mining aps2014 berlin
PDF
Staying in the Game: Game localization practices for the mobile market
PDF
Startup Weekend_Makers and Games_Philipp Stelzer
PDF
DevOps goes Mobile (daho.am)
PDF
DevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
PDF
CodeFest 2014_Mobile Game Development
PDF
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
PDF
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
PDF
Pocket Gamer Connects 2014_The Experience of Entering the Korean Market
PDF
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
PDF
DevOps the Wooga way (Webmontag Berlin)
PDF
Why Having Impact Matters for Good Developers (GOTO Berlin)
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
In it for the long haul - How Wooga boosts long-term retention
Leveling up in localization! - Susan Alma & Dario Quondamstefano
Evoloution of Ideas
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Saying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
Innovation dank DevOps (DevOpsCon Berlin 2015)
Big Fish, small pond - strategies for surviving in a maturing market - Ed Biden
Review mining aps2014 berlin
Staying in the Game: Game localization practices for the mobile market
Startup Weekend_Makers and Games_Philipp Stelzer
DevOps goes Mobile (daho.am)
DevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
CodeFest 2014_Mobile Game Development
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
Pocket Gamer Connects 2014_The Experience of Entering the Korean Market
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
DevOps the Wooga way (Webmontag Berlin)
Why Having Impact Matters for Good Developers (GOTO Berlin)

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Dropbox Q2 2025 Financial Results & Investor Presentation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
gpt5_lecture_notes_comprehensive_20250812015547.pdf

Programmin games - A 10 minute crash course