Suppose you have craeated, rigged and animated character in blender.
Render character animation from all 8 sides (up, down, left, right, upper left, upper right, down right, down left).
(you can use script automation for that)
Create sprite sheet for each side (so you will have 8 sprite sheets).
You can use program spritesheetManager.exe to automate that.
That will also create animation JSON file and calculate
Upload sheets + JSON on server directory:
animation JSONS: nodeJsDol/animCharacters/monster/[NAME OF MONSTER]
animation textures: nodeJsDol/animCharacters/monster/[NAME OF MONSTER]
In MonsterResourceDatabase.ts, add line to load the particular texture(s). Note: This will also automatically load the .JSON files for the animations
Then, when monster with matching string tag is spawned,
the animations will be drawn automatically, and also
changed automatically with respect to what is the montser currently doing
2 Adding a new decoration
In order to add a decoration to a map (non-animated decoration),
Create the model in blender, and render an image of that model.
Cut off the transparent pixels of the image.
You can use program spritesheetManager.exe to do it
You need to determine the origin point for the texture.
Open Photoshop, and add there the image.
Add new layer, and fill it with any color (this is because we need to select a square of non-transparent pixels).
Use quare select tool and drag a square so that it will end
exactly where you want the image to have an origin point
Hit CTRL + N with the selection, and you will see the size of
the selection. These numbers can be used as a origin point
Upload the .png image to server directory:
nodeJsDol/src/app/view/assets/img/game/map/decoration/[NAME OF FILE].png
In DecorationTextureDatabaseNEW.ts, add line to load the texture.
Also add a line to define the origin point for that texture Note: make sure you assign the new texture a new ID (increase the number in code)
You can now use this decoration in map editor
3 Adding a new animated decoration
The process is exactly the same, as in
non-animated decoration, but you create a spritesheet
with a .JSON animation data.
Upload the .png image, and define loading along with origin, as stated above
In AnimationDatabase.loadMapItemsAnimation(), define loading the
JSON file with animation data. The system will link that automatically, and
the decoration will be animated
If you want to change the animation mode, do it in onAnimLoaded()