shanecelis,
@shanecelis@mastodon.gamedev.place avatar

Leaving Rust gamedev after 3 years

This is one of those scary articles because it’s hard to find fault with it and the author’s experience beats my own in terms of time with rust and breadth in gamedev. https://news.ycombinator.com/item?id=40172033

shanecelis,
@shanecelis@mastodon.gamedev.place avatar

2/ It’s a little odd that the author faults rust on prototyping but then shows code with clone() as a solution, which it and unwrap() very much is what you want to do while prototyping.

shanecelis,
@shanecelis@mastodon.gamedev.place avatar

3/ Sometimes clone() is a kind of obvious wart, which you often can avoid with some refactoring if performance is paramount. But a lot of this article insists performance isn’t paramount; prototyping speed is. It’d be a stronger article if the author embraced clone() and unwrap() to boost his prototyping speed and said it was still unacceptable.

shanecelis,
@shanecelis@mastodon.gamedev.place avatar

4/ But overall the article has a lot of merit. Nice of him to share his experience. I’m still having too much fun to consider giving up rust gamedev but this is a sobering perspective.

aeva,
@aeva@mastodon.gamedev.place avatar

@shanecelis not every project has to be a serious one. if you're having fun and you're happy with the results, what's the harm?

shanecelis,
@shanecelis@mastodon.gamedev.place avatar

5/ An interesting counterpoint in the discussion, admitting that rust is not gamedev scripting friendly but why not have the high level scripts in lua, the low-mid in rust?

https://news.ycombinator.com/item?id=40173585

aeva,
@aeva@mastodon.gamedev.place avatar

@shanecelis I'm about 2/3 the way through reading the Leaving Rust Gamedev article, but something that stands out to me is that the author's frustration with game development in Rust mirrors some of my frustrations with architectural decisions I made with Tangerine's internals (C++) in the name of all that is Good, Safe, and Clean; which right now put forward enough friction that I can't really progress on the stuff I want to DO with Tangerine without fixing it first...

aeva,
@aeva@mastodon.gamedev.place avatar

@shanecelis and as Tangerine embeds Lua for high level logic, I can say, that the limitation of the "well I'll just write the crunchy parts in the crunchy language and the Unclean parts in the Unclean language" is that the crunchy half of the project can in fact still cause the wheels to fall off. If you're unrelentingly self disciplined with the design of the engine side and have perfect knowledge of what you want, well, maybe it could work. But who really fits that bill?

aeva,
@aeva@mastodon.gamedev.place avatar

@shanecelis I can't imagine that writing Lua boilerplate in Rust is likely to be a great time, but I don't know Rust so don't take my word for it. Lua boilerplate is a bit hm eccentric see

porglezomp,
@porglezomp@mastodon.social avatar

@aeva @shanecelis my experience with Lua bindings in Rust (via mlua https://github.com/mlua-rs/mlua) was that it was pretty nice and lower boilerplate than back when I used it in C++.

aeva,
@aeva@mastodon.gamedev.place avatar

@porglezomp @shanecelis I suppose it would make sense that if you simply never need to interface with Lua's C API directly, you will have a good time.

aeva,
@aeva@mastodon.gamedev.place avatar

@porglezomp @shanecelis although, it would appear that this library is not without some of the general problems mentioned in article https://github.com/mlua-rs/mlua/issues/318 (in this case a relatively normal task being 14 times slower to do in Rust than Lua because Rust demands it so)

I'm sure it's probably fine for basic use though and you can likely adapt your Lua code around the library's limitations because Lua is nice like that.

shanecelis,
@shanecelis@mastodon.gamedev.place avatar

@aeva @porglezomp 14x slower in rust than lua, woah!

aeva,
@aeva@mastodon.gamedev.place avatar

@shanecelis @porglezomp maybe it would make sense to have a more gradual gradient from squishy to crunchy. Like, you have all the squishy stuff in Lua, then you have an API adapter layer written in C or whatever to translate your game's high level semantics and structures to something more consolidated for Rust's benefit, and then finally, a much simpler Rust layer so you can do all your Rust things

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • DreamBathrooms
  • magazineikmin
  • Youngstown
  • everett
  • rosin
  • slotface
  • thenastyranch
  • ngwrru68w68
  • PowerRangers
  • kavyap
  • cisconetworking
  • tsrsr
  • mdbf
  • tacticalgear
  • Leos
  • khanakhh
  • Durango
  • ethstaker
  • vwfavf
  • InstantRegret
  • modclub
  • tester
  • cubers
  • GTA5RPClips
  • osvaldo12
  • normalnudes
  • anitta
  • provamag3
  • All magazines