Update README

This commit is contained in:
Jay Oster 2019-10-13 18:35:47 -07:00
parent b6fcf803e7
commit a793787292
3 changed files with 33 additions and 2 deletions

View file

@ -13,9 +13,19 @@ Rapidly prototype a simple 2D game, pixel-based animations, or an emulator for y
## Features ## Features
- Built on modern graphics APIs: DirectX 12, Vulkan, Metal, OpenGL. - Built on modern graphics APIs: DirectX 12, Vulkan, Metal, OpenGL.
- Use your own custom shaders for special effects. - Use your own custom shaders for special effects. (WIP)
- Hardware accelerated scaling on perfect pixel boundaries. - Hardware accelerated scaling on perfect pixel boundaries.
- Supports non-square pixel aspect ratios. - Supports non-square pixel aspect ratios. (WIP)
## Examples
To demonstrate `pixels`, I've written a Space Invaders clone. The game logic can be found in the `simple-invaders` crate. The included example uses `simple-invaders` to rasterize the image, and `pixels` to display it. `winit` provides the windowing and event handling.
```bash
cargo run --example invaders
```
See the [example's README](./examples/invaders) for more information.
## Comparison with `minifb` ## Comparison with `minifb`

View file

@ -0,0 +1,21 @@
# Pixel Invaders 👾
![Pixel Invaders](../../img/invaders.png)
The pixels have invaded!
## Controls
<kbd>Left</kbd> <kbd>Right</kbd> Move tank
<kbd>space</kbd> 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.

BIN
img/invaders.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB