pixels/examples/invaders
Jay Oster 3891192796
Update dependencies (#337)
Breaking changes:

- Updates `wgpu` to 0.16
2023-06-11 21:25:25 -07:00
..
simple-invaders Added R key to reset game (#350) 2023-03-26 23:59:20 -07:00
src Update dependencies (#337) 2023-06-11 21:25:25 -07:00
Cargo.toml Update dependencies (#337) 2023-06-11 21:25:25 -07:00
README.md Added R key to reset game (#350) 2023-03-26 23:59:20 -07:00

Pixel Invaders 👾

Pixel Invaders

The pixels have invaded!

Running

cargo run --release --package invaders

Keyboard Controls

🡰 🡲: Move tank

Space: Fire cannon

Pause P: Pause

R: Reset Game

escape: Quit

GamePad Controls

D-Pad 🡰 D-Pad 🡲: Move tank

XBox 🅐 PS 🅧 Switch 🅑: Fire cannon

XBox/PS ≡ Switch ⊕︀: Pause

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.