Ideas/Projects of Erlang-powered Game-like Applications

(Thanks Aston for the suggestion of creating a deriving thread, I was wondering whether it would not be a bit too off-topic for this forum)

Complementary to the more general discussion in the Erlang shall power the Metaverse thread, this current topic would focus more on (Erlang-related) actual game-like applications (rather than on the technical components on which they would rely), at any level of completeness (from mere ideas to possibly more finished works).

In this topic here is the first part that I would like to share (a second, more general one coming afterwards), following the idea that often, when starting a project, it is easier to imagine having unlimited time and resources, before - only in a second time - drastically scaling down the ambitions. Obviously I am still in the first, wildly futuristic pipe-dream stage :slight_smile:

This game (let’s name it Silvacane), whose server-side would be Erlang-based, would correspond to a virtual, persistent, multiplayer experience taking place in a SF setting, mostly in our galaxy, and hosting as many “active instances” (NPCs, player-controlled characters, possibly specific celestial bodies) that its popularity, its hardware, its network capabilities and Erlang would permit within reasonable efforts. A clarifying subtitle thereof could be: “Spacetime Tactical Warfare”.

The base story line would be that, in the context of a so-called “Nebu Gathering” program, its members (a group of rather advanced alien races) fund contactors in charge of exposing to Silvacane a selection of emerging civilizations in their sector, in compliance with a regulatory framework meant to protect these newcomers. Mankind would be among the local ones contacted, in an attempt to progressively raise its SAL (Silvacane Awareness Level) and, for better or for worse, enable deeper interactions with the program members.

You, a Commander among many others, will benefit from having a spacetime vantage point of interest (through a Silvacane hub, i.e. the game client) instrumental to best control at least one character, more probably a crew, at two tactical levels, that are relevant notably whenever hostilities happen (albeit it is not of course the sole type of interaction to consider):

  • space combat involving starships, a bit like Elite for example, yet trying to introduce a few (much simplified) relativistic effects
  • squad-level “ground” combats (confrontations on planet surfaces, spaceports, boarded starships, etc.); a bit like XCOM and many others

Both levels would happen, relativity-wise, in proper time for the parties involved, resulting in turn-based, bounded time tactical interactions, the duration of each turn depending on the local spacetime conditions (themselves depending notably on a coarse evaluation of the local density of energy and mass - and, well, of the load of the Erlang server resources of course). So: no frantic pace like in RTS or FPS games (hence the “latency might be a feature” that I hinted in the other thread), each local configuration ticking by default at some point between (bounds excluded) the faster pace of Doom and the one of a postal game of chess.

For characters, the game would feature aging and permadeath, and I am afraid that it would be quite unforgiving if not punishing, knowing that, notably due to their technological inferiority, humans hardly stand a chance against aliens under normal combat circumstances.

(end of the game-focused description)

I have already mentioned in the parent thread some of the too many software needs that such overly ambitious games would incur. Most technical topics would deserve to be detailed/discussed a lot more in-depth (of course any exchange here is very welcome).

Hopefully other Erlangers would feel free to share a few words about their game-related projects, possibly to detect any chance of cooperation on various elements - like already started regarding middleware such as Mirror, Gremlin, etc.?

3 Likes

Great idea! To be honest, I already thought about trying to create a framework for a game engine based on Erlang. But this is quite a laborious amount of work. So if you have a desire to work on your ideas an open source project and need extra hands - let me know :upside_down_face:. In other words I think it would be great to start developing a small game server that could eventually turn into some game framework :metal:. BTW the Wargaming.net games — the full list of games available for players on the official website is use Erlang/OTP(of course some other services in Java, Python) for game servers too :wink:.

3 Likes

I’ve always thought you could build a MUD on top of something like ejabberd.

4 Likes

I found a couple of articles about their tech stack. Please share any links for white papers, articles or interviews. (I could not find many…)

Looks like their core server is Big Engine which is written in C++, python. Erlang is used for communication (from their interview in the Hackmag article in 2020). Things might have changed over 2 years.

3 Likes

Nop, not only for communication the Erlang is used(World Of Tanks is not only one or main game/product in this company :wink:) - here is interview with Lead Software Engineer of Wargaming at 2021 Язык программирования ERLANG / Из врачей в программисты / Интервью с Lead Software Engineer - YouTube
Another topic 2016 Erlang в Wargaming / Хабр
Unfortunately Yuri Zhloba is not joined to our community yet, although I have already asked him several times to do so :man_shrugging:.

4 Likes

Thank you - most of their articles are in russian? (not sure, google translate says so - pardon my ignorance).

English version of the above article is below.

Tried to watch to youtube video - unfortunately could understand anything. Subtitles are auto-generated by google (most of autogen subtitles don’t convey meaning or miss context of source language). I wish there was some english version of it.

3 Likes

Yep :frowning:. But I will try ask Yuri Zhloba to provide some fresh topics. If I get or find some additional information in English, I will share it with you in this thread.

4 Likes

Great thread @Wondersye :023:

Not sure if you were aware but we know Square Enix is using Erlang/Elixir… tho I am not sure in what capacity:

3 Likes

I have worked on the following projects over years. All of them are in elixir.

  • Indy Server - game backend server which provides auth, economy, achievements, leaderboards, iap validation, etc .

  • Indy Game Server - turn based game server which has matchmaking, rooms, game servers, etc. Only WebSockets available as transport.

  • Unity SDK C# - for building games has prefabs, interface for communicating to server, debugging tools, cassettes and connection configs.

  • Cassette - like a blackbox for aeroplane - what happens on the client can be recorded including network communication and can be replayed on other client of compatible version. A Cassette Viewer is available in Unity editor and web page.

  • C# version of Phoenix Sockets library - it builds on phoenix.js and has more features like event recorder and replay sockets.

  • Mirror Relay - this is in development using elixir. Plan is to support only tcp (udp may be).

  • No Code Editor for building turn based games is in development.

An introduction/birds eye view to Indy Realtime. This is a non technical document.

If I can be of any help to anyone let me know. You can tag me or DM me.

3 Likes

Finally @yuri_zhloba is join to our community :partying_face:. So, @yuri_zhloba, please join to our discussion here :metal:(of course in also of other topis too :upside_down_face:).

4 Likes

Thanks vkatsuba; a next step could be to establish the functional coverage needed, and to map it to a technical architecture that could be devised for such kind of games. Then a line could be drawn between generic-enough elements and the ones that are more specific to a given game, or type of games. Then on either side of this line we could determine the parts that can be free software and the ones that possibly may not, and what already exists vs what should ideally be developed/contributed.

The software stack that I would see would be most predominantly free software, both on the server and on the client (supposing Godot there, rather than Unity). Of course everyone has one’s favorite technologies, yet at least partial consensus might be found. And I believe that there are already in the Erlang open source ecosystem quite a few elements that could/should be reused/“abused” (more on that maybe on later posts).

Of course a game does not limit to software, and domains like the mechanics of in-game rules and, at least currently, multimedia content do not seem to lend well to an open-source scheme; yet these as well are other topics.

4 Likes

Indeed, MUDs are fully on-topic (and at least one was implemented in Erlang+LFE). I find MUDs especially interesting as their bold dismissal of fancy graphics (in favor of a text-based UI) allows them to concentrate on the core of the game, its gameplay; this is why in my opinion this is the Erlang server side that matters the most (the models, in MVC terms) rather than the views (more disposable).

Nowadays, Dwarf Fortress and others showed that NetHack-like UIs can still meet their public, and intermediate solutions (like the blocky voxels used by Minecraft) exist. However, if the server-side logic was in full, mostly unconstrained, 3D, this would a bit of a shame - and probably even a source of additional complexity - if views were not.

As for ejabberd, this could be relevant indeed at multiple levels:

  • as one of the solutions to at least support inter-player messaging; otherwise they will use side-applications anyway; how to explain such instant communication in a relativist setting is another question :slight_smile:
  • Kartheek’s link regarding “Erlang at Wargaming” mentions their use of RabbitMQ, which may fall in a similar Erlang-based message queuing category; BTW, speaking this time of their (non-Erlang) “Big World” game engine, this source indicates that in November 2011, World of Tanks reached a concurrency level of 250,000 [simultaneous] players [on a single server]; impressive, I wonder how an Erlang implementation would have fared (and how powerful that server was)
  • if I am not mistaken, ejabberd has been released by Process One, which was founded by Mickaël Rémond, who, a long time ago (~2003?), presented (in Limoges) a framework named Rei, which was already back then… an Erlang-based game server (I recall a demo of a snowman wandering in a 3D world)
4 Likes

Hi @yuri_zhloba welcome to the forum. Please share about erlang usage at Wargaming or experience in scaling or anything you want to about gaming. You can post as a new topic as well. Very less information is available about erlang at Wargaming especially in english.

Thank you @vkatsuba .

3 Likes

I don’t want to disappoint you, but Wargaming doesn’t use Erlang for games. We use Erlang and Elixir for generic services like chat-server, keeping in-game currencies and inventory,
processing payments, sending email/sms/mobile notifications.

Although Erlang is certainly a good fit for a game server nobody in Wargaming uses it that way.

3 Likes

Many thanks for sharing.

3 Likes

Thank you @yuri_zhloba - i have few more questions (if you can answer or ignore if you wish - no pressure).

  • Big World Engine is used by any other companies other than War Gaming now (2021-22) ?

  • Erlang is used for game backend server - what do you use for database ?

  • What do you use for matchmaking server (erlang or big world)?

  • any framework you use for api or web pages? do you use json for api ?

3 Likes

As far as I know BigWorld was open source several years ago, but now it is closed. So it is not used by other companies. It is written in C++, game logic could be written in C++ or Python.

Erlang is not used for game backend server. We have serveral databases: PostgreSQL, MySQL, ClickHouse and others.

Machmaking is probably part of BigWorld, I don’t know for sure.

For web apis we use Erlang/Cowboy or Elixir/Plug (no Phoenix). JSON is the main serialization format, also we use other formats also, like message pack and avro.

4 Likes

Thank you for taking time to answer my questions.

Cloud companies use this terminology - game backend server meaning the infrastructure like auth, economy, messaging and storing data which are essential for running of game (not multiplayer game server). They call it as Game Backend as a Service GBaaS offerings by playfab, game sparks, etc. They refer to multiplayer game servers like Big World Engine as game servers.

I meant “erlang game backend” as in GBaaS sense which you are using.

3 Likes

In fact we have many games, and each game has it’s own game server. We also have a generic services which are the same for all games. We use Erlang/Elixir for those generic services.

6 Likes

I actually used to work in WarGaming back in 2014-2017, was working on this “keeping in-game currencies and inventory” system.

Not sure what am I allowed to say though. It used to be a distributed erlang cluster, was using PostgreSQL as database. Some libraries: cowboy, epgsql, jesse, RabbitMQs AMQP client.
I guess it evolved a lot since I left.

5 Likes