Skip to content

Simple arkanoid game witten in Hrust with experimental collision detection

License

Notifications You must be signed in to change notification settings

PixelsuftGames/hrusty-arkanoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hrusty-arkanoid

Simple arkanoid game written in Hrust with SDL3

What is Hrust?

Like Crust, it is Rust that is actually fun!
What is different?

  • No use of rust std (but libc or SDL3 stdlib is allowed)
  • Many unsafe code
  • Use of C libs

What about collisions?

I tried to make precise collisions by approximating collision time using binary search (not colliding state -> colliding state) and processing collisions like sub-frames. But what about situations when a small object "teleported" through another between frames?
Updated: Added a new experimental deep collision detection. We can calculate distance between two objects (rects). So we can find distance delta in a very small time (f32 epsilon). If distance was decreasing and then became increasing (again binary search), there is chance that there was a collision at the smallest distance.

Dependencies

Everything is already bundled

TODO

Test on platforms other than windows

About

Simple arkanoid game witten in Hrust with experimental collision detection

Topics

Resources

License

Stars

Watchers

Forks