I want to generate room layouts in my game by using a sprite sheet, because I am not normal, so I started creating my tilemap project. It can be found on this link: Tilemap
The result of this is a simple, floor, map on a single plane mesh that is created dynamically from 64x40 smaller planes and UV has been stretched (size depends on the size of the PNG and size of the single cell tile). Here is the result of the tilemap:
It is harder to see but it’s 1 draw call to apply everything. I am kind off stuck at how I would be able to make a plugin to draw in editor since I have never created any plugins but I would like to learn that if anyone can point me in any direction.
For now, this only works for this exact PNG since there are a lot of magic numbers (manually written UV scale, rows/cols, tile position, etc.). Will be changed in due time.
Use the Editor API to load the script onto the entity and call the functions needed to render/add the tilemap (not tried this myself so actually a little interested in this one)
That all sounds so complicated, especially since I don’t understand how it works. Probably since I have never done any of it before. Will mess around with first option to understand what is happening and how some of the things work.
This is what I would like to make to be able to use in editor! This would be useful for me…might as well try to make with userscripting (and…almost 0 knowledge).
This is now in JS just to see how it could work. Basically, I want to make a single plane from a PNG spritesheet by drawing it in the editor.
Hey, it has been a very long time since I did something on PlayCanvas. Got extremly busy with three jobs so had no time to develop anything I started. Luckily, got some free time and thought to myself ‘Why have fun in real life when I can enjoy working more’. I can tell you that my girlfriend didn’t like that statement.
So, I started messing with editor tools a bit, to remember how things work, and I am so happy that I came back to do more fun things. There are currently two things I am doing, Spritesheet Editor and CameraSystem, but I am doing them very slowly since I am very busy.
Here are my PlayCanvas editor changes. My OCD made me make it look how I like!