Destroy some asteroids while game loading.

Download

Download
Astro_Loading_Win.zip 10 MB
Download
Astro_Loading_MacOS.zip 21 MB
Download
Astro_Loading_Linux.zip 23 MB

Comments

Log in with itch.io to leave a comment.

hello! It's a nice game! And I am a Games Design student, could you tell me how to split a Sprite in two?

Sure. 

  1. Get all external edges of your mesh.
  2. Find all intersection points with the cutting line.
  3. Split vertices into two sets divided by the cutting line.
  4. Add intersection point to both sets.
  5. Use the gift wrapping algorithm to find new edges.
  6. Use any meshing algorithm to generate new geometry.
  7. Create new sprites with that geometry.

There is also an edge case where the cutting line directly hits a vertex. You need to handle that. Also it is a good idea to force minimum length of sprite edges otherwise it can produce nasty meshes. 

This algorithm only works for convex meshes and full cuts. For concave geometry it's a lot more complicated.

(+1)

Thanks a lot, I'll try to achieve it.