Replies: 3 comments
-
I don't know if using spine technology can solve the above problems |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for these ideas, I've linked them against #870 so they can be considered as a whole |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Anivie thanks, for referring me to this discussion. Whilst this is not on my radar at the moment, I can take a brief look if you can provide an example, including:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ~
Very happy, the new version of FXGL supports AnimatedTexture reverse play ; I still have some immature ideas
1.
Many times, I think AnimatedTexture has a state, the code will be more concise, such as knowing whether it is currently playing;
AnimatedTexture.getStatus()
I have to add a variable stopFlag to store the current state
2.
For example, bucket zombies have multiple walking states;
a. Bucket complete img1
b. The bucket is damaged img2
c. The bucket is seriously damaged img3
d. The bucket is shot down img4
Suppose when the bucket zombie (img1) plays to the 12th frame, the bucket is damaged, I need to start playing from the 13th frame of img2,
When playing the 18th frame, the bucket is seriously damaged, then I need to start from the 19th frame of img3 to play;
To start playing from the specified frame, we can create a new AnimationChannel specifying the start and end frames;
Now there is no way to get the index of the currently playing frame;
3.
Such as the combination of buckets and zombies to form bucket zombies;
But every frame, the bucket will rotate at a certain angle, and the coordinate position will be different.
The following two solutions I can think of at the moment;
1). Process it in Photoshop; if I do this, the number of image files will become a lot, and the scalability seems to be bad, for example, the traffic cone zombie is formed by adding traffic cones to zombies;
2). Write a JSON file, which defines each frame, the image of the zombie, the rotation angle and coordinate position of the bucket. Of course, this requires some methods provided by FXGL (AnmaitonChannel) to support.
4
The position of the weapon in each frame is different, that is, the Hitbox of each frame of the picture is also different, and it seems that json is also needed to describe.
I saw on github that in the json files of some games, dozens of properties such as "ScaleX", "ScaleY", "Position", "opacity", "visiable", etc. are defined;
The above things seem to be a lot of work;
Although I can do it by parsing JSON and using javafx's ImageView and animation, I am studying economics and have no rich game development experience, so I can't seem to design a general, high-performance, high-quality API;
If FXGL can support the above functions, then it is more perfect in 2D games;
FXGL is very interesting~
Thank you~
Beta Was this translation helpful? Give feedback.
All reactions