WIP Wednesday: May 17, 2023

WIP WednesdayWIP WednesdayWIP WednesdayMay 17, 2023May 17, 2023May 17, 2023

This post is also available on my Patreon. Join up and get pixel art for your game!

Hey everyone, I’m here for a Work-In-Progress Wednesday!

I’m back from my little vacation- I had a great birthday week and a lot of fun over the weekend playing the new Zelda game! Still a lot more exploring to do…

Here’s the latest developments on my end:

Sci-fi FX Pack 1

I started drawing animations for the next asset pack this week. I’m really enjoying drawing effects lately, so I’m keeping the ball rolling with a pack of science fiction style animations. That’ll include a lot of sparks and electric effects, of course!

I’m also thinking about some specialized animations with start / loop / stop segments, such as a scanning reticule and a wormhole/portal. I’ll let you know in the next WIP post how it goes!

SparkBolt Game Engine

I felt like doing a little programming over vacation, and I made some more progress on optimizing my game engine. When you last saw it, it could handle about 25k objects with a location tween and a color tween before dropping frames.

With more optimizations, now it can handle about 42k! (The intermittent dips are from screen recording and running Chrome, dunno why it does that but I don’t want to close it.)

Here’s how I got this far:

  • Use the float versions of functions where applicable (e.g. sinf instead of sin). This is actually pretty important for this little example, because the location tween is using trig functions to do its math.
  • Use SSE intrinsics to speed up matrix calculations and interpolation calculations.
  • Share one animation controller component between all objects. This results in a smaller class size, there’s only one to update now, and it’s a little cache-friendlier.
  • Share one mesh component between all objects. The mesh is the actual vertices of the object. The objects in the example are actually not rectangular, I’ve moved the vertices around a bit for fun. However, they all have the same vertices, so why not share this component too?

While sharing the components is what probably gave me the biggest boosts, it obviously isn’t always applicable in a real game dev scenario. It has its benefits though: Imagine using one animation controller for all the collectible coins in a level, where they always play the same animation and are always on the same frame as each other. Or imagine using one mesh for each type of particle in a particle system, which might spawn thousands of particle objects. Sharing definitely has its use cases!

That’s all for today! I’ll see you this weekend with a new video and next week with another WIP post and the next asset pack release. I’d also like to thank all the new patrons who joined last week! Looking forward to making more awesome art for you.

– Will