Goutte / godot-addon-animated-shape-2d

Godot addon to animate a CollisionShape2D along with the frames of an AnimatedSprite2D. Useful for making changing hitboxes, hurtboxes and hardboxes. Comes with an Editor, making things easy.
MIT License
130 stars 1 forks source link

Rename `AnimatedShape2D` into something else #11

Open Goutte opened 10 months ago

Goutte commented 10 months ago

A object worthy of the name AnimatedShape2D should extend Shape2D. Preferably in C++. Doing its own thing, by the way, probably.

Let's not collide with that.


This addon provides a simple Node that couples an AnimatedSprite2D and a CollisionShape2D, using a database.

Ideas

Of note:


I'll let this sit for a while. (until v2)

Then we'll vote on the fedi. Probably using Majority Judgment.

Do chime in ; let's hear your name candidates !

AnushkaSharma04 commented 10 months ago

I want to work on this . Can you guide me ?

HanzCEO commented 9 months ago

AnimatedCollisionShape2D self-explanatory and expressive

HanzCEO commented 9 months ago

Of note:

  • The Node should probably not end in 2D, since it is not a Node2D.
  • Yet it should not collide with 3D either, in the best of cases.

I think, it is better if we focus on 2D. Let other addon take over the 3D stuff. This way, the addon can be specialized, making it the best in its space.

HanzCEO commented 9 months ago

image I have these arguments


And this is your statement:

Preferably in C++.

May I ask the reason behind migrating GDScript to C++?

Goutte commented 9 months ago

Thanks for the input, @HanzCEO !

I agree we should focus on 2D.

I guess we can perhaps get away with using 2D as suffix for our simple Node. It bothers me a little, but you're right ; expressiveness is more important.

About C++

I mentioned it for AnimatedShape2D, which could be its own thing (a Resource, extending Shape2D, overriding things), not unlike AnimatedTexture. (I don't plan on making that, i just don't want to collide with it)

I don't plan either on writing this plugin in C++ in the near future, if only because of HTML5 support of GdExtensions.

Besides, we don't do a lot of arithmetic yet in this plugin.

That's because interpolation is not yet supported for convex and concave shapes. When we'll want to support interpolation for these shapes, we'll have to do a lot more computation.

I'm not especially happy about how we interpolate right now, code-wise. It works for simple shapes, but the code is super verbose, does not work cross-shapes and neither for convex and concave shapes.

That's why C++ was not far away from my mind.


I use this addon for hitboxes (convex shapes, replaced), solidboxes (rects, interpolated), hurtboxes (rects, interpolated), and metaboxes (rect, replaced, no default) of multiple characters and projectiles and I've noticed no performance issues.