Skip to content

Pong written in Rust... ❤️ rust is super duper

Notifications You must be signed in to change notification settings

will-clarke/Pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme https://travis-ci.org/will-clarke/pong.svg?branch=master

Stuff to get this working:

  • improve key-press cycle (include toggle)
  • add scoring to L paddle

Toggle

input: paused_toggle: bool config: paused: bool

only update config when input is released -> input paused == true && keyboard event: paused == false

TODO:

  • [ ] Change drawing stuff from IO module to UI
  • [X] Create angles / reflection code
    • I think we’ll have to do the cumborsome way of:
      • Finding nearest intersection point
      • Finding distance to intersection poing
      • Finding angle to draw from intersection point
      • Drawing from intersection point (and the searching for another intersecting line): back to the first step
  • [ ] benchmark different intersection algorithms to find the most efficient
  • [ ] ? Rename line to line segment & generally rename words about lines / segments / chords / rays / points / slopes etc…
    • We need some way of differnetiating lines which are [(x,y), (x,y)] and lines which are y = 2x + 4 (<- slopes?)
  • [X] Create a to_slope method for Vectors ?

-

Other things to think about

  • how generic do we want to make this?

About

Pong written in Rust... ❤️ rust is super duper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages