Wind beam spell
The wind beam spell is now done! Check it out in the video! Make sure to see the failure compilation at the end!
It took surprisingly loooong to make. I additionally track my time outside Hackatime, in my task manager (which includes all time spent, not just coding). It clocked 8 hours, 15 minutes of my work just to implement such simple spell.
Much of it was spent on fighting with math and the particles vfx, which were not cooperating. The spell’s area of affect is a 3d rectangle, that rotates with the player. I had to set up math, that could find entities in it, first by calculating an axis-aligned bounding box, and the filtering entites that overlap with it with an another check of whether they are touching the shape. The worst part with math is that a single wrong minus sign can break everything, and it’s quite hard to track down where it went wrong.
After I managed to make it work, I noticed the VFX is wrong, rendering in every possible direction, except the right one. After another battle the particles were in place, but now the collisions were wrong again! Finally I got both right.
Other things
I also did a bunch of other smaller things:
- I added tracking of whether the spell was started, to fix it running more then once on the client sometimes.
- I refactored the spell serialization code to use normal
Codecs instead ofStreamCodecs, so that spell data can be persisted. - I added client side spell ticking, which I needed for debugging, and which might come useful later.
- I set up a bunch of mod’s metadata - github url, set version to 0.1.0, ensured it has depencencies declared properly.
- I set up bundling of some java dependencies of the mod in the jar, so that it can be ran outside of development environment.
- I made an icon for the mod.
- I submitted the mod for a review on modrinth, so that it can be published.
As you can see, as the end of Stardance approaches I’m preparing to polish and publish the mod for you to try out!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.