• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Programmin games - A 10 minute crash course
 

Programmin games - A 10 minute crash course

on

  • 1,651 views

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 ...

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.

Statistics

Views

Total Views
1,651
Views on SlideShare
1,613
Embed Views
38

Actions

Likes
8
Downloads
0
Comments
2

2 Embeds 38

https://twitter.com 37
https://web.tweetdeck.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • 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
    Processing…
  • xc = x + width / 2 ?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Programmin games - A 10 minute crash course Programmin games - A 10 minute crash course Presentation Transcript

    • Programming Games The 10 minute crash course Rails Girls The Hague 2013
    • Name: Patrick Huesler Email: patrick.huesler@wooga.com Github: phuesler Twitter: phuesler
    • Read User Input Update Game World Draw Game World Game Loop
    • Drawing
    • Pixel
    • 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
    • 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