Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into supporting Tiled Map Editor .World Files #1439

Open
HeadClot opened this issue Jul 9, 2024 · 1 comment
Open

Look into supporting Tiled Map Editor .World Files #1439

HeadClot opened this issue Jul 9, 2024 · 1 comment
Labels
huge This issue may take many days or even weeks of work.

Comments

@HeadClot
Copy link

HeadClot commented Jul 9, 2024

The Tiled Map Editor Manual should explain what it is better than what I can.

https://doc.mapeditor.org/en/stable/manual/worlds/

@vchelaru
Copy link
Owner

Practical Discussion

What exactly does supporting world maps mean? Of course, we could recognize the .world extension and load it at runtime, but how should it behave in game? Any specific implementation would require flexibility to support multiple game types. For example, do we want world maps to be similar to sections of the map in a game like Link to the Past and Super Metroid? If so, how should transitions work?

If we do create one large map, then we will likely run into floating point accuracy issues. How do we deal with this?

  • Make objects in games support doubles (very hard to implement)
  • Allow for offsetting of the game world at certain intervals, such as when transitioning maps?
  • Other solution?

How does the user interact with the World runtime object? Do the enable and disable chunks? Do they set the camera controlling entity's Map to certain areas to result in transitions?

Technical Discussion

This is a very big issue. Actually reading in .world files is not too complicated because it's a .json file, but there are additional considerations here.

First, should all of the files result in the maps sitting in the world next to each other? Or should this result in some kind of level setup.

If they sit next to each other, should the map scroll freely? Or should we have the CameraControllingEntity set its "Map" bounds to the current map.

If we do have all maps loaded, do we want to have the MapDrawableBatches in memory? If so, we need to support culling an entire map drawable batch when it is off screen so it doesn't cost anything during rendering. If not, does it get loaded and unloaded dynamically? What level of load/unload is acceptable? Removal of the vertex buffer? Removal of the IDRawableBatch?

@vchelaru vchelaru added the huge This issue may take many days or even weeks of work. label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
huge This issue may take many days or even weeks of work.
Projects
None yet
Development

No branches or pull requests

2 participants