<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by César Przybyla on Medium]]></title>
        <description><![CDATA[Stories by César Przybyla on Medium]]></description>
        <link>https://medium.com/@cece9200?source=rss-bbbc8a498647------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9Bm7yg4VqiAcZjJS.</url>
            <title>Stories by César Przybyla on Medium</title>
            <link>https://medium.com/@cece9200?source=rss-bbbc8a498647------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:58:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cece9200/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Godot 4 (C#) : Generating terrain with Simplex Noise]]></title>
            <link>https://medium.com/@cece9200/godot-4-c-generating-terrain-with-simplex-noise-a3150a6e393f?source=rss-bbbc8a498647------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3150a6e393f</guid>
            <category><![CDATA[procedural-generation]]></category>
            <category><![CDATA[godot-engine]]></category>
            <category><![CDATA[godot-4]]></category>
            <category><![CDATA[godot]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[César Przybyla]]></dc:creator>
            <pubDate>Fri, 28 Oct 2022 19:37:16 GMT</pubDate>
            <atom:updated>2022-10-28T19:45:36.622Z</atom:updated>
            <content:encoded><![CDATA[<h3>Godot 4 (C#) : Generating terrain with Simplex Noise</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7p36doV4TJME04mQOk1fg.png" /></figure><p>Hi there — Do you want to generate effortlessly terrain for your Godot game ? How about using noises to achieve it ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*xQ3ksAt_Iw8sE_hk.png" /><figcaption>Simplex Noise</figcaption></figure><p>A quick recap : These noises are procedurally generated, and can be easily manipulated to create different patterns.</p><p>They can be used to generate maps, textures, ect…</p><h3><strong>The Theory</strong></h3><p>When generating a noise, you specify how many gradients of colors you want. Each gradient will be refered to as a layer; to which you want to bind a specific tile.</p><p>In this example, we will work with these layers :</p><ul><li>Water</li><li>Sand</li><li>Grass</li><li>Greener grass</li><li>Rock</li><li>Darker Rock</li></ul><h3>Actually Doing It</h3><p>First of all, create a Node2D. Add a TileMap and a Camera2D, both as child of Node2D.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/163/1*BftmbEcRol22QXc0grAdRQ.png" /></figure><p>Create a new Tileset (Clic on TileMap node, in the inspector select Tile Set then New), select it , then add to “Tiles” this picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*1_AP_chklCtNdMHQlWGEUw.png" /></figure><p>Add the following tiles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/83/1*G-nVw-UPJ-8YkiRGDx14_w.png" /></figure><p>I created some static variables to list all of the tile coordinates in the Atlas.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7c06a781d3a90c598ff87cb2f2ea90c/href">https://medium.com/media/d7c06a781d3a90c598ff87cb2f2ea90c/href</a></iframe><p>Add to your TileMap a CSharp script, called MapGenerator.</p><p>It will contain two export variables (variables that can be modified in the editor) for the width and height of our map, and the Godot API for generating noises, FastNoiseLite.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b45bdf6c518ebaac3202dda8ce7624e3/href">https://medium.com/media/b45bdf6c518ebaac3202dda8ce7624e3/href</a></iframe><p>Now, let’s set up our algorithm, in a function called generate_world . We add all the tiles to a List, to later associate them with a noise layer.</p><p>We give our seed to FastNoiseLite, then we set up the noise parameters :</p><ul><li>Noise type (Perlin, Simplex,ect..)</li><li>Fractal octaves: The number of layers we want to generate, which is equal to our list of tiles.</li><li>Fractal gain: A value to mess with to generate varied landscapes.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4712fecdff93d03c6be4c5b69f0dbbdc/href">https://medium.com/media/4712fecdff93d03c6be4c5b69f0dbbdc/href</a></iframe><p>We then iterate along the width and height of our map.</p><p>For each tile, we determine which noise layer is on current coordinates, then place the corresponding tile.</p><p>(to add at the bottom of generate_world)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3fc63e48b6f3bfcaac25a7b70b567c7/href">https://medium.com/media/e3fc63e48b6f3bfcaac25a7b70b567c7/href</a></iframe><p>Call generate_world() in your start function, and Voila ! You have generated a world using noises !</p><p>Link to the repository: <a href="https://github.com/CesarPrz/godot4-noise-terrain-generation">https://github.com/CesarPrz/godot4-noise-terrain-generation</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jLJLLk4dTzTPvkXdcNLAfw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3150a6e393f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>