# Chunk loading possibility's

**URL:** <https://discourse.processing.org/t/chunk-loading-possibilitys/18146>\
**Category:** Coding Questions\
**Created:** [February 26, 2020, 4:02pm UTC](https://discourse.processing.org/t/chunk-loading-possibilitys/18146 "2020-02-26T16:02:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phaleron](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Phaleron](https://discourse.processing.org/u/Phaleron)\
**Post date:** [February 26, 2020, 4:02pm UTC](https://discourse.processing.org/t/chunk-loading-possibilitys/18146/1 "2020-02-26T16:02:17Z")

</div>

Hi all,

I am struggling a bit deciding what i should use with my chunk loading system.  
my initial idea was to cycle trough all possible locations around the player, check if the chunk already exist, if not, create a new chunk.  
later on, old chunks should be removed.

I already achieved this in unity. I could check if the gameobject named “chunk\_x\_y” exists, if not make one.

what do you guys think is the best option for me?  
I really appreciate your help!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 26, 2020, 6:56pm UTC](https://discourse.processing.org/t/chunk-loading-possibilitys/18146/2 "2020-02-26T18:56:14Z")

</div>

By “chunk loading system” do you mean for a 3D system xyz, or do you mean tile loading for a 2D system xy? You say “[chunk loading](https://technical-minecraft.fandom.com/wiki/Chunk_Loading)” but give x\_y as an example – those are tile maps.

I ask because if your sketch will use 2D tiles then you could use an existing tile library such as PTMX:

> **[linux-man/ptmx](https://github.com/linux-man/ptmx)**
>
> Use Tiled maps on your Processing sketch. Contribute to linux-man/ptmx development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Phaleron](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Phaleron](https://discourse.processing.org/u/Phaleron)\
**Post date:** [February 26, 2020, 10:13pm UTC](https://discourse.processing.org/t/chunk-loading-possibilitys/18146/3 "2020-02-26T22:13:57Z")

</div>

You are right. I am searching for a 2D tile map system. I think of it as a 2D top view.  
however I would like to code it myself and not use existing librarys. for practicing purposes.  
For now I can search the internet with with better terms, thank you very much!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 26, 2020, 10:16pm UTC](https://discourse.processing.org/t/chunk-loading-possibilitys/18146/4 "2020-02-26T22:16:35Z")

</div>

There are a number of great tutorials out there on writing a basic tile loading system. Some of the most in-depth on basic concepts are not necessarily in Processing – e.g. on gamedev.stackexchange – but it is worth looking over the concepts before moving to implementation.
