Giter VIP home page Giter VIP logo

tic-tac-gpu's Introduction

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?

tic-tac-gpu's People

Contributors

multisamplednight avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.