EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

add support `MovieClip` format #708

Closed ilyar closed 4 years ago

ilyar commented 4 years ago

Add support MovieClip format for detail see demo and readme

Still unresolved issues:

I will be glad to review, test and recommendations.

ilyar commented 4 years ago

Video Egret Preview vs Demo Egret Preview vs Demo

Noofbiz commented 4 years ago

Awesome! Looks fantastic so far. Is there any reason you can’t just put the stuff in engo/formats/mcin `engo/common’?

ilyar commented 4 years ago

Is there any reason you can’t just put the stuff in engo/formats/mcin `engo/common’?

I began to do so, I realized that because of the common space, all types must be called with a prefix.

package common

func UnmarshalMovieClip(data []byte) (MovieClip, error) {}
type MovieClip struct {}
type ActionMovieClip struct {}
...
package mc

func Unmarshal(data []byte) (MovieClip, error) {}
type MovieClip struct {}
type Action struct {}
...

There are no other reasons if you want, I do everything in common

ilyar commented 4 years ago

attempt to fix animation center problem Egret Preview vs Demo

ilyar commented 4 years ago

marked this pull request as ready for review 5 hours ago

@Noofbiz it's not ready see the checklist in the description

Noofbiz commented 4 years ago

Sorry! Must have mis clicked something when I was looking at it somewhere. Disregard that, it was an accident lol

ilyar commented 4 years ago

Egret Preview vs Demo Sorry but this is not possible.

After an additional experiment, I made sure that the editor does not correctly calculate the coordinates in the export format and it is simply impossible to complete the format implementation correctly without reliable data.

In addition, support to support the format of sprite animation is unpromising since the larger and more complex the animation, the larger the final texture file.

It is more promising to implement support for other formats, such as Spine, DragonBones Json or perhaps there are others that I do not know about.

I will continue my research.

Tell us about other free animation editors if you know.

Noofbiz commented 4 years ago

No worries. I'm not sure about sprite animation, but motion tweening using general shapes should be possible. It's quite a ways to go, but the plan is to add more shapes to the shapes in common, then you could add those to a mention tweening library that can move them around the screen.

ilyar commented 4 years ago

I'm sorry, I did not understand your comment.

ilyar commented 4 years ago

No worries.

I'm ok, thanks.

I'm not sure about sprite animation, but motion tweening using general shapes should be possible.

I too, the only problem is the editor (DragonBones) that creates the wrong format.

There is no other editor, maybe I will return to implementation when there is a reliable way to create this format.

I also have doubts that the format MovieClip is relevant, as far as I can see it is an obsolete format that no one uses. Correct me if I am wrong.

I thought it would be easy to do without counting on a trap.

It's quite a ways to go, but the plan is to add more shapes to the shapes in common, then you could add those to a mention tweening library that can move them around the screen.

I did not understand your comment.

Noofbiz commented 4 years ago

Oh, as of now engo can draw lines, triangles, rectangles, and ellipses directly to the screen using OpenGL. If I can add arcs and beizer curves I believe that will cover all the basic operations in the SVG spec. Once that's done, we could draw svgs directly to the screen, and use a tweening system to animate them ^_^ That was my idea, anyway :P

ilyar commented 4 years ago

Clear it's great.

ilyar commented 4 years ago

Am I interested in the current capabilities of the engo enough to implement format Spine or DragonBones JSON support ? This requires mesh-based texture transformation tools. As far as I figured out for this in the current animation system there is not enough component space this is at least.