Well friends, I thought I should update more often, and here I am. But this week's update is the update of pain. I started straight in this week on making the Cryolaser Tower functional, and it is straight up pretty awesome (will show in the future). A slicey icy beam of destruction, which currently doesn't freeze anybody but does seem to rake in the damage, probably faster than it should since freezing is its purpose.
Well friends, there was a little hiccup. On a level with a large number of enemies, suddenly the second the beam starts firing, the framerate drops. HARD. In fact, in the debug build, it reached the point where the game actually quit out, reporting an infinite loop. There was no infinite loop, it's just that it had gotten slowed down so badly that it assumed there must be one (as far as I can tell, anyway). Like 1 FPS. So obviously before I could do anything else, I had to root out this issue.
Well friends, the issue is still there, and I found more issues. The first thing I tried was to see if this is a debug-only problem, which is quite likely - dealing with lists of enemies (actually, the issue is the cubes the enemies are made of - each one is its own entity, and there are a lot of them) is inevitably going to be massively slower in a debug build than a final build where it may be effectively instant, if the optimization is good. So let's see how the final build runs. It'll be good to see how to even make a final build, which I haven't done yet.
Well friends, we do not have a working final build. After a few hours of getting through a bunch of errors that only showed up in the release build (UE4 bugs/limitations, really - you have to manually recompile every blueprint that uses a structure if you change anything about that structure. They work fine in debug, but somehow it requires that manual recompile to get the release version working), I got it running, only to find that the aliens are invisible in the release build. Not only invisible, but the towers won't fire at them (understandable, you can't shoot what you can't see!), although they do wind up their firing animations. That's where I currently sit because I do not know how to resolve this. Something quite strange is going on with these items that are only visible/functional in a debug build. I'm sure it's solvable, but I don't really know where to begin since the code clearly works fine, as long as it's a debug build. It's gonna be a long long string of rebuilds with slight changes until I can pinpoint the issue, and building for release takes a long time each time. This is my least favorite kind of bug, and it's a real issue when working with somebody else's engine where you can't know what's going on inside.
Well friends, I've had a few days off doing other important life projects, and I'm glad for the break! So yeah, that's the update. Sometimes you hit these brick walls, but I will bash my head against it until something breaks, and I'm hoping it's the wall.
Well friends