ovidiubadita

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

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

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

Qqwy

TypeCheck Core Team

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

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

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 :wink:

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement