#Should I use gleam for game dev
1 messages · Page 1 of 1 (latest)
Gleam isnt very good for client apps with the erlang target since launching the beam is very slow. There also isn't any game dev tooling.
ok
You might be able to make games in Gleam with the JS target. Depends on what kinds of games you're looking to make
I've really liked Godot engine for my hobby projects if u want an alternative
unless you're interested in the JS target, I'm starting to think gleam is probably not best for gamedev right now. There's the problems mentioned above and also it seems that the beam vm is simply very slow at the tasks gamedev uses a lot, and fast at the tasks gamedev uses only a little.
I've been trying to work on things that would make it better for gamedev but there's not really a way around the VM just not being very performant for general-purpose applications. I'd like to be proved wrong though, I think it could be very interesting.
If we're plugging alts, I use bevy myself. It's written in rust, and that's the only language involved unless you specifically embed a different scripting language into it yourself.
I don't think Gleam is great for gamedev, but the VM doesn't boot slowly
In some trivial programs I found the BEAM VM would boot faster than the Ruby interpreter, and people are happy to use that for CLIs etc
It's certainly not like the JVM
Not state of the art by any means but this is a GUI powered by processes: https://youtu.be/w3L-VZtP_dY?t=456
Scenic is a powerful new library that empowers us to build our own user interfaces from scratch that work outside of the browser. Let’s put it to the test in building our very own video game. We’ll explore a variety of techniques for basic game development such as animation, finite state machines, alternate input devices, etc. With Scenic, is El...
@frozen moat if your render remains mainly static (like doing a web game in html) the beam might be an appropiate choice
gleam godot bindings when?
why do you then think its bad for gamedev?
i thought about it before but godot relies way too heavily on OOP
pass around the object and the calls in two bits and do the oo calls in ffi? naive idea
its probably pretty easy to get something working but i can't imagine it would be a good developer experience
because of the ecosystem or the lang/vms?
gleam would be a great choice for a multiplayer game server
https://github.com/X-Plane/elixir-raknet here’s an elixir implementation of raknet
the networking layer for an mmo
because of the language
Godot functions all need to be inside of for them to work and make sense in the editor. Gleam doesn't have this so I don't think it would work very well.
On top of that theres no typeclasses so your bindings would need to repeat a lot of code or how a clunky editor experience.
There are libraries for using phoenix channels in Godot to use phoenix as a server. Would be a fun project to do the same for Gleam
there is a functional game engine in F#, might look that for inspiration