~/talk

Writing a simple game in Rust

Talkat The Conf 2018 · on Wednesday, 2018-11-14· [rust, game-development]
links:none on file
slides:none on file

Builds a fully playable Snake using Rust and the ggez game library, compiled with cargo, with a 20x20 pixel grid mapped to a 400x400 window and an FPS cap of 8. Implements ggez’s EventHandler with update/draw, keyboard input via key_down translating to directions (using Option and if let), RNG fruit placement via rand RNG, collision detection and reset, and a clone workaround for the borrow checker. Uses ggez and pix 20, screen 400x400 to produce a working game.

AI-written summary · about

  1. 0:00Introduction
  2. 0:40Disclaimer
  3. 5:18Cargo
  4. 11:05Domain
  5. 14:19Implementing the game
  6. 18:17Refactoring the game
  7. 23:20Looking into the GG
  8. 23:45Copy and Paste
  9. 24:04Acceleration
  10. 25:54Check update time
  11. 26:12Check number of frames
  12. 26:55Control the snake
  13. 27:46IfLet
  14. 28:41Window Bounce
  15. 29:05Clever Implementation
  16. 29:30Dub Implementation
  17. 30:14Body Implementation
  18. 31:55Snake Implementation
  19. 32:17Snake Collision
  20. 33:06Cargo Run
  21. 33:34Regenerate
  22. 35:21Game Over
  23. 35:35Snake Reset
  24. 36:36Snake Run
  25. 38:05Bug fix
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.