ovidiubadita
Elixir for game development
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but after discovering Elixir, I think I will spend a lot of time learning it well. For web development seems to be a great tool.
This is just out of curiosity, more than a practical question, but I want to understand the limits of this technology.
Can you make games in Elixir and deploy them on client systems?
I know it works in Erlang Vm, but I suppose the VM can also be installed on the client. But can Elixir render rich graphical content and use graphical resource?
First Post!
NobbZ
In theory, you can use erlangs :wx module to have GUI, you can even do OpenGL, but to be honest… Don’t!
The interface to :wx and OpenGL through erlang is very clumsy, because a multi-layered inheritance graph has been hammered down into a single behaviour. Mixed with a kind of mutable state that feels foreign in erlang/elixir, its no fun at all.
Also OpenGL is plain OpenGL, not the cool helpers which make OGL “accessible”… Many of the very useful helpers are missing and you need to rebuild them yourself.
Also there have been versions of SDL for the BEAM, but AFAIK they are all abondoned.
So I wouldn’t suggest to build the client with “pure” BEAM technology.
What could work though, is to build logic in the BEAM and also have a “Port” which communicates to another prgram which deals with user interaction/communication.
You can use any language you like for that interaction-Port.
You might probably require two different run-time systems on the clients computer. The BEAM and maybe the one for the Port…
And at the end of the post, I do remember, that @Qqwy or @OvermindDL1 planned to make a GUI package on top of a FRP-framework he build himself, but I’m not sure who of those two…
Perhaps you can build on top of that if it is already ready to use…
Most Liked
aseigo
Which IMHO is very, very unfortunate. BEAM languages, especially Elixir, would be amazing to write client applications in if there was a good rich GUI facility. wxWidgets is not that (just look at the fun the last weeks on the erlang list about this!), but one can imagine such a thing existing. The lack of a good modern toolkit is one of the last things that holds the BEAM forever on headless services.
Concurrency is absolutely huge for modern GUI applications, something we’ve been working around for the last couple decades with one hack or another. Threading is a nightmare, so it is often faked with event loops and async I/O to varying degrees of success.
Good, modern UI toolkits put as much of the UI as possible in threads (QtQuick does this in several ways, as well as putting as much on the GPU as possible) leaving the application code to languish in yesterday’s development paradigms. It would be absolutely wonderful to be able to develop rich client applications with a language that gave you good concurrency out of the box. The other benefits like FP rather than OOP and all the other bits and pieces would be the icing on the cake.
Qqwy
You might be referring to the game InVected we (me and a couple of other guys, some from our company, some from the university) built for the last Global Game Jam, using Unity for the front-end, and Elixir+Phoenix for the back-end, which synchronized a very simple browser application on the user’s phone with the large Unity screen, allowing them to use their phones as ‘joysticks’. It was a lot of fun, and supports 14+ players (that’s as much as we’ve tested it with at the end of the 48h game jam).
massimo
I think Scenic it’s the giant step forward we needed to talk about GameDev in Elixir
I wrote about it here
Last Post!
jupmorenor
So I could create an Elixir server to manage data distribution and syncronizing objects through clients and make clients with a GameDev specialised tool that simply authenticates to the server…
If Elixir is intended for servers, then use it to create servers ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









