<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="125161" data-post-id="125161">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tty" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tty
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If you mean pure numerical computation then both JVM and BEAM are equally as bad. For this most people still reach for C/C++ or Fortran.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125161" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-125161" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125161"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="125164" data-post-id="125164">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Cochonours" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Cochonours/120/13516_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Cochonours
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>They follow completely different philosophy and architecture, but in short I would say the JVM will give you faster computation whereas the Beam will give you shorter latency. And for a server, the latency is key. I’m not a specialist but IMHO Elixir should do the job really well, and if you have some algorithm which take too much time you code them in C++ or Rust and put them in a NIF. It’s probable that it won’t be as fast as a full C++ server, but it also won’t be such a pain to dev and fine tune…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125164" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-125164" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125164"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="125201" data-post-id="125201">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="entone" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/entone/120/18061_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  entone
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>MachineZone made several billion dollars running their backend system on Erlang. I would imagine it’s quite possible.</p>
<p>I think they moved a significant amount to C eventually.</p>
<p>But they have been big backers of the Erlang community for a while.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125201" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-125201" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125201"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="125240" data-post-id="125240">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I made a Minecraft server (way way back in the Minecraft Alpha days) a long time ago.  Terrain generation was the slowest part (so much math on so much stuff!) but entities being each their own little actor process was so fun to work with.  It is mostly just a <em>see if I can do it</em> thing so I never ended up releasing it, but for something not twitch or math intensive it was perfectly fine (and those can be slaved out to NIF’s pretty easily, I think ‘NIF’ either didn’t exist or was brand new at the time though so I didn’t use it back then).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125240" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-125240" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125240"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="125272" data-post-id="125272">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Pondo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Pondo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello, thank you for your answers! If I summarize this means that Elixir is a very good choice for game servers except for tasks that require a lot of computation (like field generation in Minecraft) and for this kind of case we do a module in C/C+++/Rust and we use NFI?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125272" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-125272" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125272"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="125280" data-post-id="125280">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kokolegorille" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/120/4784_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kokolegorille
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, but it’s Native Implemented Functions (NIFs)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125280" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-125280" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125280"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="125285" data-post-id="125285">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="adrianrl" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/adrianrl/120/7182_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  adrianrl
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi, NIFs are a good way of empowering the BEAM (Erlang’s VM), I didn’t try NIFs for serious projects, but a game server should be a good use-case.</p>
<p>What kind of game server do you have in mind? did you started something or are you just evaluating technologies? I think we could guide you better if you provide more information. Like <a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a>  said, a “simple” Minecraft server is very complicated to implement, so you may want to start with something easier to achieve alone, e.g. A multiplayer tic-tac-toe with Phoenix, so you don’t need to manage 3D graphics, collisions, etc… otherwise you may get overwhelmed by the complexity of the project.</p>
<p>If you’re decided to give Elixir a go, you have multiples resources (books and videos) that implement mini-games via web with Phoenix, so this will introduce you to advanced topics like Supervisors, GenServers and more.</p>
<p>On the other hand if you’re interested in multiplayer game servers and how they work behind the scenes, you’ll have to read a lot of books (mostly C++ books), here’s a good starting point: <a href="https://github.com/miloyip/game-programmer" class="inline-onebox" rel="noopener nofollow ugc">GitHub - miloyip/game-programmer: A Study Path for Game Programmer · GitHub</a></p>
<p>Specifically you’ll need some books of the following sections: Mathematics for Game Programming (only if you struggle with maths), Game Physics and Animation (only the books related with Physics) and Multiplayer Game programming (most of them). Obviously there’s more (being a game developer even if it’s just a server is too hard!), but this will be more than enough to get you started.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125285" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-125285" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125285"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="125291" data-post-id="125291">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Pondo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Pondo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello,</p>
<p>The implementation of the world of warcraft server should be able to be done in Elixir via the Erlang Virtual Machine (BEAM) however heavy tasks such as field generation should be done in C/C++ via NFI</p>
<p>By private server, I mean a new implementation of the game mechanics and main quests at first</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125291" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-125291" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125291"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="143032" data-post-id="143032">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="thojanssens1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thojanssens1/120/17642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  thojanssens1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Don’t you have some gameboard server-side in many types of multiplayer games?</p>
<p>Imagine a multiplayer 2d RTS with fog of war. If you send the whole map to the client, and then only player movements and such, a player could hack the client and make the map all visible.</p>
<p>So let’s say the gameboard is stored in Elixir. Which data structure would you use? None is adequate. List: accessing an element requires traversal. Tuple: updating an element will lead to creation of a new tuple every time, due to immutability. Would have been nice to have a MutableTuple element for these very specific use cases.</p>
<p>It gets even worse when you think of open world games with dynamic map generation. I don’t see how you can manage the access and update of very large data structure without mutability.</p>
<p>I’m not experienced in this topic but I was thinking about creating a multiplayer game as a side project which led me to these concerns. So let me know if I’m wrong on some points.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="143032" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-143032" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="143032"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="143040" data-post-id="143040">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Rainer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Rainer/120/15469_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Rainer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I wrote a simple FPS online game over a decade ago, using Java &amp; OpenGL.<br>
For the gameserver Elixir had been a perfect fit, as most of its job was handling connections, player coordinates, fighting actions and chat.<br>
However, on level change, it did also some terrain generation, and there comes the weak spot of Elixir/Erlang/Beam: Computation on big data structures. This would not have been a problem in my case as the levels weren’t too big and the computation was only on levelchange, waiting a second longer wouldn’t harm anyone there. But things like that would be a nice job for a Rust NIF <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="143040" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-elixir-suited-for-a-performance-game-server/21809/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-143040" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="143040"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/21809/load_more?page=4">Load more posts (2 remaining)</a>
</div></template></turbo-stream>