CommunityNews

CommunityNews

Tutorial: Writing a Tiny Rust Game Engine for Web

In this tutorial we’ll use the Rust programming language to code a tiny game engine. Our game engine will respond to key presses, draw rectangles, and define a structure that could accomodate a larger engine.

Our engine will use no code other than Rust’s standard library and the APIs the browser provides us. It will compile near-instantly (less than a second on my computer) and be about 130 lines of code total.

If you aren’t familiar with Rust it’s a relatively new programming language that runs fast and helps you write better code.

This tutorial includes some Javascript and web code, but the general ideas apply to non-web as well.

To follow along you should already know the basics of programming. This tutorial is written to be legible for a Rust beginner and skimmable for a Rust expert.

Let’s begin!

Read in full here:

https://ianjk.com/game-engine-in-rust/

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular Backend topics Top

First poster: bot
Powerful, flexible, complex: The origins of C++ date back 40 years, yet it remains one of the most widely used programming languages toda...
New
New
First poster: bot
One of Haskell’s features that I really liked was list comprehensions, so I was very pleased to discover how nice Julia’s comprehensions ...
New
CommunityNews
By the end of this guide we’ll have a minimal, working implementation of a small part of Lua from scratch.
New
CommunityNews
Martin Thompson On How To Manage Software Complexity | The Engineering Room Ep. 4. In this episode, Dave Farley chats with Martin Thomps...
New
First poster: dimitarvp
Rails is not written in Ruby. I’m born and raised in Kraków, a beautiful city in Poland, maybe you’ve heard about it, maybe you’ve even ...
New
First poster: bot
Rails adds support for Fiber-safe ActiveRecord ConnectionPools. Ruby on Rails and ReactJS consulting company. We also build mobile appli...
New
First poster: bot
GitHub - WhatsApp/waraft: An Erlang implementation of RAFT from WhatsApp. An Erlang implementation of RAFT from WhatsApp. Contribute to ...
New
First poster: bot
crubit/design.md at main · google/crubit. Contribute to google/crubit development by creating an account on GitHub.
New
gfqdjb
The goal of this book is to help you get from a vague idea of what you need to implement (e.g.: “I need to build a website to manage sche...
New

Other popular topics Top

AstonJ
Or looking forward to? :nerd_face:
483 11078 254
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
New
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1147 28379 760
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
New