Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.69 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.69 KB

Tic-Tac-GPU

A simple (cough cough) example on a tic-tac-toe game with wgpu.

Why?

Because I didn't find that many small applications which use wgpu as their rendering interface, which is understandable with wgpu being quite verbose. Nevertheless, I wanted to create one, also just to step into real water for the first time without a tutorial.

Installation

You can just use cargo install for that, assuming you installed Rust already (If you didn't, check out rustup):

cargo install --git https://github.com/MultisampledNight/tic-tac-gpu.git

This will by default install to $HOME/.cargo/bin, or whatever the equivalent on your OS is. Either put that path on $PATH, or just run the tic-tac-gpu binary directly.

Totally asked questions

Why are so many comments in src/render.rs, but almost none in src/main.rs?

These were more of a reminder to myself what components of wgpu actually do. I happen to learn things better if I try to formulate them out.

Why is the UI so ugly?

The final look didn't matter to me, more about the rendering itself. This is not a full-featured super accessible tic-tac-toe game with multiple AI modes and beautiful text rendering.

Gamepad support?

See rust-windowing/winit#944. TLDR: No one seems to have time to implement it in winit, the windowing library I use, and I don't know anything about X11, evdev, Wayland and Quartz, so I can't implement it either.

Screenshots?

Screenshot showing a near-done game

Was it really worth it?