nunuStudio icon indicating copy to clipboard operation
nunuStudio copied to clipboard

Support Tilemap

Open Gurigraphics opened this issue 7 years ago • 10 comments

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.

Gurigraphics avatar Sep 08 '17 12:09 Gurigraphics

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

tentone avatar Sep 08 '17 12:09 tentone

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.

Gurigraphics avatar Sep 08 '17 13:09 Gurigraphics

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

tentone avatar Sep 08 '17 13:09 tentone

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:

  • select tile/object by ID, for delete and replace tile, etc.
  • get positions to collide physics.
  • set tile/grid size (16x16, 32x32, I do not know how it goes in 3D)
  • also think about layers

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.

Gurigraphics avatar Sep 08 '17 13:09 Gurigraphics

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

tentone avatar Sep 08 '17 14:09 tentone

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

Gurigraphics avatar Sep 08 '17 14:09 Gurigraphics

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

tentone avatar Sep 09 '17 10:09 tentone

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

j2l avatar Mar 09 '21 17:03 j2l

Hello

Still havent done any work regarding this feature.

Thanks!

tentone avatar Mar 11 '21 13:03 tentone

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

j2l avatar Mar 11 '21 14:03 j2l