A Year’s Progress

I was looking through some old builds of Ladon and realized that it has been about one year since we officially started. The image above [click here for full image] shows how it looked then versus now. I had just started dusting off my knowledge of OpenGL and experimenting with different game engines. I bounced from Irrlicht to Ogre3D to Unity and then back to Irrlicht. The June 2014 screenshot is from the very first build that I sent to Ansel and Garrett to show them my dinky little project and ask if they were interested in helping out. It had one light source and a grand total of about 1000 triangles being drawn. For comparison, currently, every spark on the screen is a light source and each individual tile on the ship has about 3000 triangles.

Running Into Stuff

Last week was a busy one.  We’re putting together a series of “Meet the Team” videos, so stay tuned for that.  We’re also very close to working out a deal with some amazing musical talent.  Hopefully, there will be an announcement this week.  I find that music is a big part of shoot-em-ups, more so than other genres, because shoot-em-ups have a very rhythmic gameplay.  I feel like I rarely even notice music in FPS games.  The artist we’re hoping to work with has a style that couldn’t be more perfect for Ladon.

Programming hit a big snag last week, but I finally solved it over the weekend.  I discovered that Unreal Engine has a problem with collisions.  While searching for a fix, I found that lots of UE4 users had run into the same issue: [1] [2] [3] [4] [5]

Collision shapes

What’s happening in that image is that the ship is passing right through the background tile, which shouldn’t happen.  The blue outlines are the “collision shapes” for the objects.  Long story short, in a game, you create “collision shapes” so that when things run into each other, you can make something happen.  You could make the objects bounce off of each other, or you could make them take damage and possibly be destroyed, and so on.  You generally use simplified shapes because calculating whether or not they are touching takes a lot of math.  In other words, you don’t want to test whether or not every single little detail of the ship is touching something.  So, you create a kind of boxy shape that wraps around your objects and test that.

Well, the problem with UE4’s collision detection is that it doesn’t work for “attached” objects.  Attachment means that when you move or rotate one object (usually called the “root” or “parent”), the attached objects (usually called “children”) come along for the ride.  It’s not much different from attaching a wing to a fuselage in the real world.  But in UE4, those wings would magically pass right through everything without taking any damage.  This was a huge problem because Ladon is built entirely on the idea of attaching one thing to another.

The image at the top of this post shows collision working, finally.  I had to dig into the code for the engine itself, which I really didn’t want to do.  Sometimes, there’s no way around it, and this was one of those times.  The gory details aren’t exciting, but the gist of it was finding the code that handled collision for the parent object and copying it to the children.  I shared the fix on Epic’s forums to maybe help the other guys running into this same problem.