<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Neveux</title>
    <description>The latest articles on DEV Community by Daniel Neveux (@dagatsoin).</description>
    <link>https://dev.to/dagatsoin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F218513%2F9d7e684e-74ce-4f22-b82a-48aa82fce7f5.jpeg</url>
      <title>DEV Community: Daniel Neveux</title>
      <link>https://dev.to/dagatsoin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dagatsoin"/>
    <language>en</language>
    <item>
      <title>Wizar devlog 22 - Full map generation</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Sun, 28 Nov 2021 11:17:39 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-22-full-map-generation-3332</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-22-full-map-generation-3332</guid>
      <description>&lt;p&gt;Here is a little evolution for my map level editor but maybe a bigger for the user.&lt;br&gt;
&lt;a href="https://hik1y.csb.app/"&gt;https://hik1y.csb.app/&lt;/a&gt;&lt;br&gt;
You can now generate the whole map without painting it, and then dig/elevate the terrain.&lt;br&gt;
Controls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"f": generate the map&lt;/li&gt;
&lt;li&gt;"click": elevate terrain, you can hold the button to paint&lt;/li&gt;
&lt;li&gt;"shift+click": dig terrain&lt;/li&gt;
&lt;li&gt;"space+mouse move": pan the map&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This prove me again that thanks to a good decoupled code, you can deliver big value with little code update. Thanks you (SAM pattern)[&lt;a href="https://sam.js.org/"&gt;https://sam.js.org/&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Facebook vision of the metaverse is broken. Here is why.</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Fri, 12 Nov 2021 17:54:32 +0000</pubDate>
      <link>https://dev.to/dagatsoin/facebook-vision-of-the-metaverse-is-broken-here-is-why-2jb5</link>
      <guid>https://dev.to/dagatsoin/facebook-vision-of-the-metaverse-is-broken-here-is-why-2jb5</guid>
      <description>&lt;p&gt;TL;DR&lt;br&gt;
Decentralization could prevent the metaverse of Meta to be another data black hole.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reminder: the metaverse is not about VR/AR
&lt;/h2&gt;

&lt;p&gt;The metaverse is a set of data and rules that we, creators, have defined as a whole, living universe.&lt;/p&gt;

&lt;p&gt;The VR/AR hardware is just a medium to get into this new universe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mixing the realities
&lt;/h2&gt;

&lt;p&gt;From the &lt;a href="https://www.youtube.com/watch?v=Uvufun6xer8"&gt;presentation video&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;« The next platform and medium will be even more immersive »&lt;br&gt;
« you will be able [to do] new categories [of activities] that don’t really fit how we think about  computers or phones today »&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Meta wants to mix the two realities at a point that we win't distinguish anymore the boundaries. This sounds cool at first, but it would also get down our psychological barriers and our behaviors could be the same between our two worlds. And that is the point of non return.&lt;/p&gt;

&lt;p&gt;Our behaviors are dependent of the context. You don't act at school, job as you act as home. You don't act behind your screen on social network like you do in real life.&lt;br&gt;
You can choose how to behave because you are aware of where you are. If you think I am wrong, I would suggest to remember the last time you though if you were dreaming or not. Also, for those who have done some Live Action Role Playing on a long period, do you see what I mean? This sentiment where you foam sword in made of real steal?&lt;br&gt;
One of the most amazing human capacity is to adapt to context. And this could be a great opportunity for a mad king of the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who owns the metaverse?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---rIkxD9K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqf5qmyu7l1m39gpbo5h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---rIkxD9K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqf5qmyu7l1m39gpbo5h.png" alt="Image description" width="880" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I don't want to live a world where someone else makes the world a better place better than we do.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My point is the sanity of the metaverse will depend on who will own it. Do you think Meta will do a decentralized metaverse ? As they said they are building the "next internet". Except the internet, at least at start, is owned by all of us.&lt;br&gt;
Who will prevent them to gather data one more time to "connect people"? It will be their world which will runs their rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  The biggest opportunity for Meta is your data
&lt;/h2&gt;

&lt;p&gt;Think Facebook as a metaverse. After all, you have already your identity in the Facebook world, work, learn chat, and buy things.&lt;br&gt;
Their goal is too own the maximum data on user to fuel their business model. Now, they can only collect raw data from your keyboard/mouse/touchscreen when you interact on their site.&lt;br&gt;
With just those data, remember all &lt;a href="https://www.businessinsider.com/mark-zuckerberg-scandals-last-decade-while-running-facebook-2019-12?IR=T#3-the-company-faced-heavy-criticisms-for-misinformation-surrounding-the-2016-us-presidential-election-especially-after-a-buzzfeed-report-showed-that-false-news-stories-outperformed-real-news-mark-zuckerberg-posted-to-facebook-an-apology-and-said-the-company-plans-to-improve-3"&gt;the scandals&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On the opposite, think of a decentralized metaverse with basic rules about privacy and ownership which will prevent any one to take the control. Yes, a bit what decentralized blockchain bring to us.&lt;br&gt;
You will own your data. You will keep your rights. No one will watch your data without your direct permission. Because the code, the rules, the data is owned by all of us.&lt;br&gt;
In a world like this, I think even the fortune of Meta would not but a day of this available data. They won't have any power anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mark please, fix it.
&lt;/h2&gt;

&lt;p&gt;On the other hand, I agree with a lot with Zuckerberg.&lt;br&gt;
I strongly believe that it will continue to be a new hub to connect people across the world.&lt;br&gt;
I strongly believe that it will continue to be a game changer for the vision of the humanity.&lt;/p&gt;

&lt;p&gt;We can test thing that is impossible IRL, a new world economic, new ressource sharing, new education...&lt;/p&gt;

&lt;p&gt;We can build a new world, without redo the mistakes of the old and real one.&lt;br&gt;
If someone as Mark can pave the way to an open metaverse by helping on the tech and infrastructure, it will really be, a new world.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Wizar devlog 21 - Panning 
 the map</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Tue, 26 Oct 2021 18:27:12 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-21-panning-the-map-4hi3</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-21-panning-the-map-4hi3</guid>
      <description>&lt;p&gt;I added recently a new feature to the map: panning. It is an abvious and small step for the player but it was a complete refactor of the threejs map renderer with an endless queue of issues.&lt;br&gt;
Finally I am quite happy with the result !&lt;br&gt;
Press space and move mouse to pan.&lt;br&gt;
Press mouse and drag to draw.&lt;br&gt;
Press mouse + shift and drag to dig.&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/dxtdx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Next steps are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;optimize tiles loading to get a smoother map translation&lt;/li&gt;
&lt;li&gt;implement panning on mobile&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>metaverse</category>
      <category>react</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Mapbox Cordova plugin for offline maps in hybrid apps</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Tue, 22 Dec 2020 12:35:30 +0000</pubDate>
      <link>https://dev.to/dagatsoin/mapbox-cordova-plugin-for-offline-maps-in-hybrid-apps-5dpl</link>
      <guid>https://dev.to/dagatsoin/mapbox-cordova-plugin-for-offline-maps-in-hybrid-apps-5dpl</guid>
      <description>&lt;p&gt;cleaned up my #cordova plugin for #Mapbox. Android only for now.&lt;br&gt;
Mainly done to get offline maps in hybrid apps.&lt;br&gt;
Supports overlapping UI HTML elements.&lt;br&gt;
Written in #typescript. Try it here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dagatsoin/cordova-plugin-mapbox"&gt;https://github.com/dagatsoin/cordova-plugin-mapbox&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ionic</category>
      <category>typescript</category>
      <category>mapbox</category>
      <category>cordova</category>
    </item>
    <item>
      <title>Wizar devlog 20 - Cross plateform dungeon with Three.js for React</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Sun, 21 Jun 2020 20:02:07 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-20-cross-plateform-dungeon-with-three-js-for-react-nc4</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-20-cross-plateform-dungeon-with-three-js-for-react-nc4</guid>
      <description>&lt;p&gt;This week I worked on a boilerplate to have a three.js app running both on RN and Web.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Edit: I screwed up the sandbox (no versioning on CSB at the moment :( ) in a way I can't return to a working state easily. I will update this link as soon as I get my next working version. But it will take some times!&lt;/em&gt; :(&lt;br&gt;
&lt;del&gt;&lt;a href="https://codesandbox.io/s/wizar-dungeon-r3f-onulw"&gt;https://codesandbox.io/s/wizar-dungeon-r3f-onulw&lt;/a&gt;&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;I use &lt;a href="https://github.com/react-spring/react-three-fiber"&gt;React Three Fiber&lt;/a&gt; and it was mostly a matter of dealing with resources loading to have both code running on Web and RN.&lt;/p&gt;

&lt;p&gt;Once you get the minimal comon way to load asset on both platefom the code is straight forward, and you get exact same result on both plateform.&lt;/p&gt;

&lt;p&gt;assets credits: &lt;a href="https://0x72.itch.io/"&gt;https://0x72.itch.io/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>threejs</category>
      <category>typescript</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Wizar devlog 19 - light theme preview</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Fri, 12 Jun 2020 14:16:18 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-19-light-theme-preview-4l8a</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-19-light-theme-preview-4l8a</guid>
      <description>&lt;p&gt;Did a light theme for a better confort while playing under the sun!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---nfPK5L---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iw771wf40ldqf1f82t8n.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---nfPK5L---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iw771wf40ldqf1f82t8n.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Get the closest point on a polygon</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Fri, 05 Jun 2020 21:19:33 +0000</pubDate>
      <link>https://dev.to/dagatsoin/get-the-closest-point-on-a-polygon-5075</link>
      <guid>https://dev.to/dagatsoin/get-the-closest-point-on-a-polygon-5075</guid>
      <description>&lt;p&gt;For the technical challenge of an interview, I had to write a function to get the closest point of a polygon from a given point.&lt;/p&gt;

&lt;p&gt;I wrote this &lt;a href="https://codesandbox.io/s/elated-liskov-3v65c"&gt;https://codesandbox.io/s/elated-liskov-3v65c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My solution will handle four cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Case I the target is inside the polygon ( the result is the point itself)&lt;/li&gt;
&lt;li&gt;Case II the target is ON the polygon edge/vetext (the result is the point itself)&lt;/li&gt;
&lt;li&gt;Case III - A the target is outside the polygon and faces an edge&lt;/li&gt;
&lt;li&gt;Case III - B the target is outside the polygon and does not face an edge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does not support hole or multi shapes&lt;/li&gt;
&lt;li&gt;Return always one point (in case of equidistant points)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Case I
&lt;/h2&gt;

&lt;p&gt;Use the winding Number algorithm to determin if the point is inside&lt;br&gt;
If so, return the given point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case II
&lt;/h2&gt;

&lt;p&gt;Check if the point P is on a edge AB of the polygon by comparing distances&lt;br&gt;
&lt;code&gt;AP + PB === AB&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Case III
&lt;/h2&gt;

&lt;p&gt;The point is outside the polygon.&lt;/p&gt;

&lt;h3&gt;
  
  
  A - The point projection is on a edge:
&lt;/h3&gt;

&lt;p&gt;1- For each segment I will check if the perpendicular projection of the point is on the segment. (by using a vector projection)&lt;br&gt;
  2- I will take the segment which has the shortest projection distance.&lt;br&gt;
The result will be the projection coordinates. (the resulting of the vector operation)&lt;/p&gt;

&lt;h3&gt;
  
  
  B - The point projection is not on a edge:
&lt;/h3&gt;

&lt;p&gt;I will select the vertex which has the shortest distance with the point. (by getting the euclidian distance)&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>math</category>
    </item>
    <item>
      <title>Wizar devlog 18 - a little update of the dungeon edition</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Sun, 31 May 2020 21:18:30 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-18-a-little-update-of-the-dungeon-edition-4c4a</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-18-a-little-update-of-the-dungeon-edition-4c4a</guid>
      <description>&lt;p&gt;I updated my R&amp;amp;D sandbox on dungeon "painting". I can now revert pattern back to their previous state and the WFCish function will ensure that all rules keeps respected.&lt;/p&gt;

&lt;p&gt;Left click: void -&amp;gt; water -&amp;gt; sand -&amp;gt; land -&amp;gt; forest -&amp;gt; moutain&lt;br&gt;
Shift + left click: the inverse (but stopo to water, won't go to void again)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/s/relaxed-moon-jui9c"&gt;https://codesandbox.io/s/relaxed-moon-jui9c&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Wizar devlog 17 - first step with Wave Function Collapse</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Fri, 22 May 2020 14:20:06 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-17-first-step-with-wave-function-collapse-4h2d</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-17-first-step-with-wave-function-collapse-4h2d</guid>
      <description>&lt;p&gt;I spent the week on Gatsby and struggle around how to decouple my boilerplate into themes... 60% successful. Not very exciting stuff.&lt;/p&gt;

&lt;p&gt;I found joy into this little &lt;a href="https://codesandbox.io/s/relaxed-moon-jui9c?file=/src/index.ts"&gt;code sandbox&lt;/a&gt; to begin my procedural generation of Wizar maps. It will be first used for dungeon generation into our level editor.&lt;br&gt;
For now it just handle some ascii to render a map, but it already can to "guess" how arrange tiles arounds.&lt;br&gt;
If you click multiple time into the same cell it will get the next pattern available following this enumeration: water -&amp;gt; sand -&amp;gt; land -&amp;gt; forest -&amp;gt; mountain&lt;br&gt;
Internally it uses a wave function collapse solver algorithm to figure out what tiles need to be updated.&lt;br&gt;
In a reaction of a click, a function will propagate around the clicked cell, and update all the neighbors. The propagation acts like a "ripple". If the last ripple did not trigger any changes, it will stop. &lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Wizar devlog 16 - Some webiste updates</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Sat, 16 May 2020 13:38:45 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-16-some-webiste-updates-14bh</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-16-some-webiste-updates-14bh</guid>
      <description>&lt;p&gt;This week I dive into Gatsby to update our website &lt;a href="https://pro.wizar.world"&gt;https://pro.wizar.world&lt;/a&gt;  (targets the tourism offices)&lt;br&gt;
I made a (still empty) blog and page admin interface. We use Netlify cms which is terribly slow due to the github backend. But it works.&lt;br&gt;
Code source is available here if you want: &lt;a href="https://github.com/dagatsoin/wizar-pro-website"&gt;https://github.com/dagatsoin/wizar-pro-website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wonder what could be used as an admin interface for Gatsby which offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;instant update&lt;/li&gt;
&lt;li&gt;node.js backend&lt;/li&gt;
&lt;li&gt;configurable with a YAML/JSON file&lt;/li&gt;
&lt;li&gt;using React&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Though anyone?&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>serverless</category>
      <category>react</category>
    </item>
    <item>
      <title>Wizar devlog 15 - Adding cluster on Wizar</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Sat, 09 May 2020 10:31:10 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-15-adding-cluster-on-wizar-395k</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-15-adding-cluster-on-wizar-395k</guid>
      <description>&lt;p&gt;As Wizar is geolocalised game I needed a map. As I use Cordova I decided to develop &lt;a href="https://github.com/dagatsoin/cordova-plugin-mapbox"&gt;a Mapbox plugin&lt;/a&gt; years ago. It is only available for Android and it is not documented but a &lt;a href="https://github.com/dagatsoin/cordova-plugin-mapbox-demo"&gt;demo is available&lt;/a&gt;&lt;br&gt;
It implements :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;offline support&lt;/li&gt;
&lt;li&gt;map HTML overlay (you can put HTML on the native view)&lt;/li&gt;
&lt;li&gt;and now clustering&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gamedev</category>
    </item>
    <item>
      <title>Wizar devlog 14 - Begining a threejs library: Glitch</title>
      <dc:creator>Daniel Neveux</dc:creator>
      <pubDate>Fri, 01 May 2020 14:43:04 +0000</pubDate>
      <link>https://dev.to/dagatsoin/wizar-devlog-14-begining-a-threejs-library-glitch-lcg</link>
      <guid>https://dev.to/dagatsoin/wizar-devlog-14-begining-a-threejs-library-glitch-lcg</guid>
      <description>&lt;p&gt;As planned I spent the week on Ravioli looking around for a new way to improve the reaction system. To change my mind, I also started to write the Wizar graphic library based on threejs.&lt;br&gt;
It is called Glitch and it will be focus on dev xp by offering a high level API, inspired by Pixi to do 2D or 3D games on web and React Native.&lt;/p&gt;

&lt;p&gt;It is just the start and you can see a &lt;a href="https://codesandbox.io/s/boring-river-5u1kg"&gt;demo here&lt;/a&gt; (credit to 0x72 from &lt;a href="https://0x72.itch.io/"&gt;itch.io&lt;/a&gt; for the assets)&lt;br&gt;
I have already implemented:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a 2D app object which contains the common boilerplate&lt;/li&gt;
&lt;li&gt;support for spritesheet from TexturePacker&lt;/li&gt;
&lt;li&gt;texture&lt;/li&gt;
&lt;li&gt;sprite&lt;/li&gt;
&lt;li&gt;animated sprite&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next iteration will be the port on React Native.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>gamedev</category>
      <category>threejs</category>
    </item>
  </channel>
</rss>
