tentone / nunuStudio

Web powered cross-platform 3D, WebXR game engine.
https://nunustudio.org
MIT License
2.11k stars 316 forks source link

Support Tilemap #84

Open Gurigraphics opened 7 years ago

Gurigraphics commented 7 years ago

Import Tilemap/Tilesets

1- Some way to import tilemap exported from Tiled?

http://www.mapeditor.org/

2- There are plans to this feature?

I found this repos https://github.com/WebSeed/three.js-tilemap https://github.com/magnonellie/dtile-three-renderer


I tested this Engine today. http://nunu.bitballoon.com/ Ótima Engine.

tentone commented 7 years ago

Hi

Right now nunuStudio doesn't support tilemaps, but i think it would be a nice addition to the engine.

I will test the libraries you sent to see if i can integrate one of these in the editor.

I will try to add easy tile aligned object placement directly in the editor.

A parser for tiled files would be great but i have to check the specification of these files first.

Thanks a lot for the suggestion.

Cumps

Gurigraphics commented 7 years ago

I could not test these repos. One repo missing files and another appears error. Anyway ...

This other I found is also interesting: https://github.com/vonWolfehaus/von-grid

This about multiple textures: https://stackoverflow.com/questions/26087620/three-js-tile-which-has-multiple-textures-using-plane-geometry

Good luck with the Engine. Only 2 contributing to the project and this is already better than the vast majority Engines.

tentone commented 7 years ago

I was able to test only one of them (the one that is missing library). The other one i have to test with it a bit more later.

Im thinking about including a mechanism to store objects in the resource manager and after that placing objects with drag and drop and/or with a painting mechanism (like a tile editor), this associated with tile alignment should be enough to easily have a tilemap-like system.

Thanks a lot.

Cumps

Gurigraphics commented 7 years ago

Im thinking about including a mechanism to store objects in the resource manager and after that placing objects with drag and drop and/or with a painting mechanism (like a tile editor), this associated with tile alignment should be enough to easily have a tilemap-like system.

Yes. Something like this is already quite functional. https://phaser.io/examples/v2/tilemaps/blank-tilemap

To work this need for example:

Another interesting resource is paint a "regions/terrains" with blocks of a color. This stay invisible. When the player comes inside, this can be used to fires an event. It can also be used to mark collisions.

tentone commented 7 years ago

Yeah this example seems quite good, i think that i can create a basic similar mechanism for nunu in an evening. I will try to work a bit on this on the weekend.

Regions is something that i can probably add to cannonjs, and integrate in the physics engine.

Thanks

Gurigraphics commented 7 years ago

Cannonjs was also a good choice. Other good physics is of Turbulenz http://biz.turbulenz.com/samples#sample-modal/samplepage/sample_assets/physics2d.canvas.release.html/samplesrc/sample_assets/physics2d.js.html https://github.com/turbulenz/turbulenz_engine Abçs

tentone commented 7 years ago

I choose cannonjs mostly because it was the easiest one for me to edit later down the road if i needed to.

Im not planning for now to integrate a 2D soon, (first i want to finish a stable version with the current engine and i want to avoid the confusion of having 2 physics engines, working on diferent datatypes).

There is also p2.js (also developed by @schteppe https://schteppe.github.io/p2.js/) which seems for me a good and flexible option for 2D physics for now.

Thanks a lot.

Cumps

j2l commented 3 years ago

Is there any news about tiles? I might need them.

tentone commented 3 years ago

Hello

Still havent done any work regarding this feature.

Thanks!

j2l commented 3 years ago

Right now, I just discovered http://openseadragon.github.io and wonder if it could easily be added to nunuStudio to provide a tiling solution.