claymore icon indicating copy to clipboard operation
claymore copied to clipboard

Consider using piston-window

Open kvark opened this issue 10 years ago • 3 comments

https://github.com/PistonDevelopers/window

It's a new window abstraction that is compatible with gfx::Canvas. Transitioning to it would unlock the path to dev_menu in #27

cc @bvssvni

kvark avatar May 07 '15 21:05 kvark

There are many ways to plug into the Piston ecosystem:

  • Depend directly on "window" and poll the events from the window and handle your own update/render
  • Use it in combination with the "event" crate which adds .events() to get a game loop
  • Use "piston" crate which reexports "window" and "event"
  • Use the "piston_window" crate
  • Implement event::GenericEvent for a wrapper around the input structure you are using

GenericEvent is designed in a such way that it possible to use it with any structure. The input structure in Piston is merely for convenience. Suggestions for making this even better are welcome.

bvssvni avatar May 08 '15 00:05 bvssvni

I was thinking about for a moment of moving GenericEvent to its own library to make it easier to use the Piston libraries, but realized it would not be usable without the event traits and the input library.

bvssvni avatar May 08 '15 00:05 bvssvni

@bvssvni thanks for the info! I like the composability of the libraries in Piston ecosystem. I believe piston/window fits in there quite nicely.

kvark avatar May 08 '15 01:05 kvark