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

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Idea: use a second thread to detect input. That way, were don’t have to worry about hacking nurses to be non blocking.

To implement next

  • shape rotation:
    • state.shape becomes a load of vectors
    • we add an extra struct: Shape { relative_vecs: origin: }
    • we add a matrix geometry struct & implement multiplications
    • add rotation to the matrix’s functions.
    • profit

todo:

  • add random shapes in. eg. have swirling triangles in ‘hard’ mode
  • Add sdl or something.. make this properly graphical.
  • improve key-press cycle (include toggle)
  • 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…

Other things to think about

  • how generic do we want to make this?

Toggle

input: paused_toggle: bool state: paused: bool

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages