GithubHelp home page GithubHelp logo

Handling large tilemap about entt HOT 7 CLOSED

pawelKapl avatar pawelKapl commented on July 22, 2024
Handling large tilemap

from entt.

Comments (7)

pawelKapl avatar pawelKapl commented on July 22, 2024 2

Yeah, thanks a LOT, apparently needed someone to just confirm that my ideas are not out of this planet! ;)

from entt.

skypjack avatar skypjack commented on July 22, 2024 1

Another possibility, yeah. I think your question was answered. 🙂

from entt.

skypjack avatar skypjack commented on July 22, 2024 1

You're welcome. The discord server is another good place for that in case. 👍

from entt.

skypjack avatar skypjack commented on July 22, 2024

Do you plan to run all systems on all chunks no matter what or, for example, you want to run full power on central and surrounding chunks while you run less systems as you get far from the player position?

from entt.

pawelKapl avatar pawelKapl commented on July 22, 2024

Yeah so second option, chunk with player and surrounding chunks - most probably all the calculations like physics, ai, rendering etc. Other chunks - most probably no operations at all, or almost no operations. Thanks for such quick response!

from entt.

skypjack avatar skypjack commented on July 22, 2024

You can also have a local registry and a global one for things like the player, an inventory and so on.
There isn't the right answer, just a bunch of approaches that work fine. Your use case should guide you then. 🙂

from entt.

pawelKapl avatar pawelKapl commented on July 22, 2024

Yeah, good point. I could create one global scene registry, for handling stuff like player, craft, inventory, this registry would also probably keep references to chunks being part of a particular scene. So in systems i would most probably do smth like:

for (auto chunk : globalRegistry.view<Chunk>())
       if (chunk.loaded) chunk.registry.get<Tile/Decoration/Item>().doStuff();

from entt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.