• Save
Programmin games - A 10 minute crash course
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Programmin games - A 10 minute crash course

  • 2,665 views
Uploaded on

Introduction to simple 2D game programming illustrating the basic concepts behind frame rates, animations, movement and hit detection leading into a tutorial and 2 sample applications written in......

Introduction to simple 2D game programming illustrating the basic concepts behind frame rates, animations, movement and hit detection leading into a tutorial and 2 sample applications written in Ruby for Rails Girls The Hague 2013.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • I Got The Full File, I Just Wanna Share to You Guyszz.. It's Working You Can The Download The Full File + Instructions Here : http://gg.gg/setupexe
    Are you sure you want to
    Your message goes here
  • xc = x + width / 2 ?
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
2,665
On Slideshare
2,052
From Embeds
613
Number of Embeds
6

Actions

Shares
Downloads
0
Comments
2
Likes
8

Embeds 613

http://www.huesler-informatik.ch 424
http://huesler-informatik.ch 116
https://twitter.com 37
http://localhost 31
http://www.hueslerinformatik.ch 4
https://web.tweetdeck.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Programming Games The 10 minute crash course Rails Girls The Hague 2013
  • 2. Name: Patrick Huesler Email: patrick.huesler@wooga.com Github: phuesler Twitter: phuesler
  • 3. Read User Input Update Game World Draw Game World Game Loop
  • 4. Drawing
  • 5. Pixel
  • 6. GPU
  • 7. Frame rate (FPS) ~60 frames per second ~30 frames per second
  • 8. x y 0,0 frames frame 1 frame 2 frame 3 frame 4 frame 5
  • 9. Animations
  • 10. Sprites
  • 11. x y 0,0 P(10, 5) x = 10 y = 5 School
  • 12. x y 0,0 P(10,5) x = 10 y = 5 Computer graphics
  • 13. x y 0,0 width height
  • 14. Update Game World
  • 15. X Y 0,0 Movement -y +y -x +x ground
  • 16. X Y 0,0 Falling vy : vertical velocity vy > 0 ground y = y + vy vy
  • 17. X Y 0,0 Jumping vy : vertical velocity vy < 0 ground y = y + vy vy
  • 18. 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
  • 19. 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
  • 20. 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
  • 21. Ruby GOSU https://github.com/jlnr/gosu/
  • 22. https://github.com/jlnr/gosu/wiki/Window-Main-Loop
  • 23. RG Tutorial* https://github.com/FloorD/gosu_tutorial_RG_TH *work in progress
  • 24. 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