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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>New release <a href="https://github.com/iacobson/ecspanse/releases/tag/v0.7.0" rel="noopener nofollow ugc">v0.7.0</a></p>
<p>For state consistency reasons, Projections are now updated at the end of the frame, after all systems have run. In v0.6.0, the projection updates were executed in parallel with the systems. This ensured better performance, but possibly inconsistent state.</p>
<p>The new release introduces also a small breaking change. The Projection <code>on_update/2</code> callback, became <code>on_update/3</code> and takes both the new projection state as well as the previous projection as second and third arguments. This is useful for checking diff.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="303184" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-303184" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="303184"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="306998" data-post-id="306998">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great library, thanks! It got me to start on a long pending project. I’m trying to emulate tabletop like war game and it’s going pretty well. There are a few issues/questions I have run into…</p>
<p>The biggest issue I have is that the game engine raises an UndefinedFunctionError when t (I think) elixir recompiles and I have to restart the app. I can open a GitHub issue if you’d like.</p>
<p>Also since my game moves slowly, LiveView instance that join don’t see anything until a projection updates. I know I can get the data right after I create the projection, but would it make the coding cleaner if projections always treated the first run as an update. Since they never got called any state is technically different…</p>
<p>Also none of the tutorials mention a server running multiple concurrent games, but I guess you can just handle that in code, like create a session entity and make all of the units in that game children? I wonder if that kind of scoping could be built in idk if there’s a more efficient way than the way I’m doing it.</p>
<p>Sorry that was a lot. Thanks again for the cool library! I love using elixir for the backend work and I’m using LiveView and BabylonJS for the front end.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="306998" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-306998" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="306998"
                     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 #32"></div>
  </section>
</div>
    <div class="postbit" id="307005" data-post-id="307005">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>First of all thanks for using the library and all the feedback. Please do share the status updates for your project. As said above, I’m very curious about what people are building with the library. You could share screenshots, or really anything.</p>
<p>Now, let me try to answer your questions.</p>
<blockquote>
<p>The biggest issue I have is that the game engine raises an UndefinedFunctionError when t (I think) elixir recompiles and I have to restart the app. I can open a GitHub issue if you’d like.</p>
</blockquote>
<p>Yes, please, if you can open an issue and document as much as possible. I’m not aware of the issue. But just as a potential cause, you may have to restart your server if you change the code in your components or systems. The loop runs in a GenServer and that server needs to be restarted to pick up the changes.</p>
<blockquote>
<p>Also since my game moves slowly, LiveView instance that join don’t see anything until a projection updates. I know I can get the data right after I create the projection, but would it make the coding cleaner if projections always treated the first run as an update. Since they never got called any state is technically different…</p>
</blockquote>
<p>Good idea! I will make this update.</p>
<blockquote>
<p>Also none of the tutorials mention a server running multiple concurrent games, but I guess you can just handle that in code, like create a session entity and make all of the units in that game children? I wonder if that kind of scoping could be built in idk if there’s a more efficient way than the way I’m doing it.</p>
</blockquote>
<p>I totally understand that. It was a tradeoff I had to do at some point during the library development process.<br>
Allowing multiple Ecspanse servers to run in parallel wouldn’t have been that hard. However, all the external communications with the Ecspanse would have to provide at least the name of the server they refer to. My initial approach was to issue a token with encoded server data when starting the server.<br>
But then you would have to provide that token for every query, event, or projection, basically for all external interactions.<br>
So I decided on a simpler API to the detriment of this functionality.</p>
<p>That being said, I think your session entity parent is the way to go.</p>
<p>Thanks again, and looking forward to your game updates.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="307005" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-307005" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="307005"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="307019" data-post-id="307019">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>New release <a href="https://github.com/iacobson/ecspanse/releases/tag/v0.7.2" rel="noopener nofollow ugc">v0.7.2</a></p>
<ul>
<li><code>c:Ecspanse.Projection.on_change/3</code> is called on Projection server initialization.</li>
</ul>
<p>Thanks <a class="mention" href="/u/stwf" rel="nofollow">@stwf</a> for the suggestion.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="307019" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-307019" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="307019"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="307543" data-post-id="307543">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>For whoever is interested, I’m invited to this Elixir Wizards podcast episode discussing ECS and Ecspanse: <a href="https://smartlogic.io/podcast/elixir-wizards/s11-e04-ecs-game-dev-elixir-python-react/" class="inline-onebox" rel="noopener nofollow ugc">ECS / Game Development with Elixir vs. Python, JavaScript, React with Dorian Iacobescu &amp; Daniel Luu | SmartLogic</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="307543" data-batch-url="/posts/batch_likers">
                        6
                      </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/ecspanse-an-entity-component-system-framework-for-elixir/57650/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-307543" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="307543"
                     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 #35"></div>
  </section>
</div>
    <div class="postbit" id="307955" data-post-id="307955">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>New release <a href="https://github.com/iacobson/ecspanse/releases/tag/v0.8.0" rel="noopener nofollow ugc">v0.8.0</a></p>
<p>Refactors projections. There are breaking changes. Please see the <a href="https://hexdocs.pm/ecspanse/0.8.0/changelog.html#v0-8-0-2023-11-14" rel="noopener nofollow ugc">changelog</a>.</p>
<p>The main change is about introducing the <code>Ecspanse.Projection</code> struct</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  @type t :: %Ecspanse.Projection{
          state: projection_state(),
          result: projection_result(),
          loading?: boolean(),
          ok?: boolean(),
          error?: boolean(),
          halted?: boolean()
        }

  defstruct state: :loading,
            result: nil,
            loading?: true,
            ok?: false,
            error?: false,
            halted?: false
</code></pre>
<p>This is somehow inspired by the Phoenix Liveview <a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.AsyncResult.html#loading/0-examples" rel="noopener nofollow ugc">AsyncResult struct</a>.</p>
<p>The struct is wrapping the implemented projections structs and manages their state.</p>
<p>During last week I found myself embedding state fields in the projections structs, so I can then decide, in the client, if the projection is ready to be used or not.</p>
<p>This can now be achieved with code like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;div :if={@enemy_projection.loading?}&gt;&lt;.spinner /&gt;&lt;/div&gt;
&lt;div :if={@enemy_projection.ok?}&gt;
  &lt;.enemy enemy={@enemy_projection.result} /&gt;
&lt;/div&gt;
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="307955" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-307955" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="307955"
                     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 #36"></div>
  </section>
</div>
    <div class="postbit" id="310792" data-post-id="310792">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>OK. Finally got something I’m ready to show.</p>
<p>My game is an attempt at a Kriegsspiel. A 19th century wargame that emphasized realistic issues that came up in battle. Mine at least will try to take into account proper size scales, lines of supply and communication, how long orders take to arrive, and be executed, etc</p>
<p>I’ve got the hex map editor working and have basic movement and some commands working. Next up will be line of sight for identifying enemy units, and Scouts bringing back delayed observations of enemy units. That sort of thing. Then battle!</p>
<p>So it’s been fun and a good learning experience if nothing else! I’ll be happy to open up the code if there someone other than me interested in this sort of thing…</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/2/c/2c26199d261b8e539bce9d252cac1ea7ea9e1c0e.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/2c26199d261b8e539bce9d252cac1ea7ea9e1c0e" title="Screenshot 2023-12-09 at 8.13.45 AM" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/2/c/2c26199d261b8e539bce9d252cac1ea7ea9e1c0e.jpeg" alt="Screenshot 2023-12-09 at 8.13.45 AM" data-base62-sha1="6iyDxhducmqt4xmfaj8Lb9yHZpA" width="690" height="385" data-dominant-color="A4C1A9"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2023-12-09 at 8.13.45 AM</span><span class="informations">1200×671 38.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/b/b/bbcca93f46c363c6792f5767f1eee0e2496a0b57.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/bbcca93f46c363c6792f5767f1eee0e2496a0b57" title="Screenshot 2023-12-09 at 8.12.32 AM" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/b/b/bbcca93f46c363c6792f5767f1eee0e2496a0b57.jpeg" alt="Screenshot 2023-12-09 at 8.12.32 AM" data-base62-sha1="qNlLPhqWMx2YiXBWWWgIvihznmL" width="690" height="405" data-dominant-color="A6B4A5"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2023-12-09 at 8.12.32 AM</span><span class="informations">1200×706 40 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Steve</p>
<aside class="onebox wikipedia" data-onebox-src="https://en.wikipedia.org/wiki/Kriegsspiel">
  <header class="source">

      <a href="https://en.wikipedia.org/wiki/Kriegsspiel" target="_blank" rel="noopener nofollow ugc">en.wikipedia.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://en.wikipedia.org/wiki/Kriegsspiel" target="_blank" rel="noopener nofollow ugc">Kriegsspiel</a></h3>

<p>
 Kriegsspiel[a] is a genre of wargaming developed by the Prussian Army in the 19th century to teach battlefield tactics to officers. The word Kriegsspiel literally means "wargame" in German, but in the context of the English language it refers specifically to the wargames developed by the Prussian army in the 19th century. Kriegsspiel was the first wargaming system to have been adopted by a military organization as a serious tool for training and research.
 It is characterized by high realism, a...</p>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310792" data-batch-url="/posts/batch_likers">
                        14
                      </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/ecspanse-an-entity-component-system-framework-for-elixir/57650/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-310792" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310792"
                     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 #37"></div>
  </section>
</div>
    <div class="postbit" id="310965" data-post-id="310965">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="iacobson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/iacobson/120/2974_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  iacobson
                    <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>This is REALLY amazing!</p>
<p>So, is the state of the hex map map “persisted” in the backend with Ecspanse?</p>
<p>I don’t even know where to start. I have so many questions <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>I suppose the map itself is BabylonJS. The UI around Liveview? And then from Babylon to the server, you communicate something like:</p>
<p>BabylonJS → LiveviewJSHooks &gt; Liveview &gt; Ecspanse Events &gt; Ecspanse Systems logic?</p>
<p>Or do you use some different architecture?</p>
<p>I am looking forward to seeing your next updates. And if you have anything deployed and need some play test, I would be happy to give it a try.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310965" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-310965" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310965"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="311036" data-post-id="311036">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks!<br>
So yes. The map editor part stores the maps in Postgres. But I export them to JSON files to load in the game. They are loaded into Ecspanse and stored globally so multiple games can use them and not require separate copies.</p>
<p>And yes the map is BablylonJS and LiveView for the rest. I’m trying to keep the BabylonJs stuff as simple as possible for the game. It just renders the maps,  knows how to draw units, and reports on what items get clicked on.</p>
<p>LiveView handles the UI state, and sends orders into Ecspanse, and when I get  notifications from the Projections I just push the unit data into BabylonJS through a LiveView hook.</p>
<p>I will keep you in the loop for sure. Just  couple of more features and I will work on getting it deployed… same old story lol. Thanks for the library and support!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="311036" data-batch-url="/posts/batch_likers">
                        4
                      </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/ecspanse-an-entity-component-system-framework-for-elixir/57650/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-311036" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="311036"
                     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 #39"></div>
  </section>
</div>
    <div class="postbit" id="311779" data-post-id="311779">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>What is the purpose for only allowing on Server per otp app? I’m trying to figure out the best way to have a room based game system, where you can join a virtual room to play with others. I’d like to be able to start one server per “room” (Room “ABCD” and Room “ZYXW”) like so:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">DynamicSupervisor.start_child(
  MyApp.DynamicSupervisor,
  {MyApp.EcsServer, name: {:via, Registry, {MyApp.Registry, "ABCD"}}}
)

DynamicSupervisor.start_child(
  MyApp.DynamicSupervisor,
  {MyApp.EcsServer, name: {:via, Registry, {MyApp.Registry, "ZYXW"}}}
)
</code></pre>
<p>But trying to start a second server gives an error.  Am I thinking about this wrong?  Is there a better way to accomplish what I’m going for?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="311779" 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/ecspanse-an-entity-component-system-framework-for-elixir/57650/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-311779" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="311779"
                     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 #40"></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/57650/load_more?page=5">Load more posts (12 remaining)</a>
</div></template></turbo-stream>