pixels/examples/invaders
Jay Oster 6392ff9481
Fix syntax in the example (#27)
- This works because `wgpu` is a dependency for `pixels`
- But this example should be demonstrating how to ony depend on `pixels` ... And whatever windowing system and event-loop you might want.
2019-10-27 20:27:42 -07:00
..
main.rs Fix syntax in the example (#27) 2019-10-27 20:27:42 -07:00
README.md Update README 2019-10-13 18:35:47 -07:00

Pixel Invaders 👾

Pixel Invaders

The pixels have invaded!

Controls

Left Right Move tank

space Fire cannon

Goal

Shoot all of the invaders before they reach Earth and begin a hostile takeover. Be careful, because the entire fleet is coordinated and acts as a hive mind. Their aggression increases as their numbers dwindle.

Architecture

Pixel Invaders uses the simple-invaders crate for all game logic and drawing. Be sure to check out that crate if you are interested in any of the inner workings of the game.

This example is simply glue code that uses winit for windowing/event handling and keyboard input. The winit event loop is used to drive the simple-invaders state and rasterize each frame. Finally, pixels takes the rasterized frame buffer and sends it to the screen, optionally through a series of render passes.