mcgivrer / mcgivrer/monoclass2
Feat(Animations): In TileMapLoader implements animations loading for Entity
Open
@mcgivrer is already working on this.
Since Oct 19, 2022.
documentation
enhancement
- Dominant language
- Java
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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:
level.objects.9=name:player;\
//...
animations:{\
idle:{x:0,y:0,tw:32,th:32,time:[450, 60, 60, 250, 60, 60, 60, 450, 60, 60, 60, 250, 60],resource:3},\
walk:{x:0,y:32,tw:32,th:32,time:[60, 60, 60, 150, 60, 60, 60, 150],resource:3},\
jump:{x:0,y:160,tw:32,th:32,time:[60, 60, 250, 250, 60, 60],resource:3},\
dead:{x:0,y:224,tw:32,th:32,time:[160, 160, 160, 160, 160, 160, 500],resource:3}\
};\
defaultAnimation:idle
Animations attribute will be a JSON formatted list of tuples name: {x,y,tw,th,time,resource} where
nameis 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 oftimeframes 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.