This small Java project with only one (master) class is a proof-of-concept of an over simplified java program to deliver maximum feature in a minimum number lines of code, and WITHOUT dependencies out of the JDK itself (but only for test purpose, using JUnit and Cucumber). (Note: subclasses were dispatch into package since july 2022)
MIT License
1
stars
0
forks
source link
Feat(Animations): In TileMapLoader implements animations loading for Entity #76
Animations attribute will be a JSON formatted list of tuplesname: {x,y,tw,th,time,resource} where
name is the animation id used in code to activate specific animation (standardization must be provided),
{x,y,tw,th,time,resource} is a position (x,y) in a resource, a frame size (tw,th), and a list of time frames defining the number of concerned frames indirectly for that animation. The constraint is that all frames must be on the same row in the resource image.
TileMapLoader
The existing TileMapLoader is already loading entities with a fixed image.
Animations definition
We need to implement animation loading to get a fully implemented level loading.
Here is the awaiting attributes format:
Animations attribute will be a JSON formatted list of tuples
name: {x,y,tw,th,time,resource}
wherename
is the animation id used in code to activate specific animation (standardization must be provided),{x,y,tw,th,time,resource}
is a position (x,y
) in aresource
, a frame size (tw,th
), and a list oftime
frames defining the number of concerned frames indirectly for that animation. The constraint is that all frames must be on the same row in the resource image.