hostgroups.blogg.se

Rust video game android
Rust video game android







rust video game android
  1. #Rust video game android how to#
  2. #Rust video game android full#

None of these styles felt “second class”, and I felt trusted as a programmer to make the right decisions about how to structure my code. structs with no pub fields, with everything hidden behind a constructor, encapsulated methods, and drop) are the best way to handle certain pieces of data other times, dumb data bag structs with all of it fields marked pub and almost no impl worked best. 2Ĭertain sections of my code worked best in a functional style and made heavy use of pure functions and Iterator other sections were mostly cleanly expressed with imperative code, and a for loop and mutable collections did the trick. Rather than being locked into one paradigm, I found myself being able to cleanly use different programming styles as warranted in different situations. rustc seems like a friend who’s trying to help you write better code, rather than a gatekeeper working to slow you down. Holy cow are the compiler error messages generally fantastic. etc.) make minute-to-minute programming much nicer. the ownership model), the “small ideas” that most other systems-y language don’t contain ( Option, Result, Iterator, discriminated unions, pattern matching, etc. On to the promised thoughts and feelings! Overall, Rust is a fantastic languageīeyond the “big ideas” contained in Rust (e.g. (That list might seem short or might be missing your favorite crate more about that later.) gl_generator for loading OpenGL functions.

rust video game android

sdl2 (and consequently the SDL2 C library) for windowing, input, audio.It is also not my first take on writing a game in Rust, but the previous attempts have never seen the light of day.

#Rust video game android full#

It consists of ~7700 lines of Rust (and ~500 lines of GLSL), written entirely by me over the course of 10 months (during the last 2 of which it received my full time attention). I’ve written a number of small, hobby games in the past, but A Snake’s Tale is my first commercial release. TL DR: I’m glad I picked Rust for A Snake’s Tale, and I will be continuing to make my games in Rust for the foreseeable future 1 however, I can’t strongly recommend Rust for gamedev in the near-term, especially if you’re hoping for a batteries included experience. Here’s a brain dump of my thoughts and feelings about how that went and where I think Rust currently stands for game development. It’s not the largest or most technically demanding of games, but I’m proud to have an existence proof for the viability of gamedev in Rust. Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.Ī Snake’s Tale was programmed entirely in Rust, and to the best of my knowledge, it is the first commercial game made in Rust to be released.









Rust video game android