**TLDR:**Unreal engine threw a hissy fit, bugged out and ate my game. This is my attempt to entertain others while talking about my journey.
Hello all! A little bit of a disclaimer here before I rant away:
- Everything in this post is in no way to be taken aggressively. Although this story is 100% true, I am not angry about the events that occurred. I still love Epic and everyone involved, this is all awesome, in my opinion.
- I am a c++/visual basic/c# programmer of many years. Eight, to be exact. I am only saying this so you can somewhat gauge my expertise.
- Just to get a feel for blueprints, I decided to do this entirely in blueprint if possible. I have coded entire game engines in C++, and it would be nice to have a break from C++ for a change.
- Before the 10th of march this year, I have had no experience at all with unreal engine. However, I picked it up somewhat quickly, as it’s not too different from anything else.
- I started on unreal engine version 4.9, and ended on 4.11.
- This is just what I feel is an entertaining way of blowing off steam. I do not want to report a bug/etc. I just want to express how unreal has made me feel.
That said, Please allow me to spin you my tale of woe. I decided to post this here, because the things I faced were not really things that could be fixed by the answer hub really, and some of these problems were just lightly documented.
I am a small indie game dev, who will perhaps become noted one day. I work with others on and off, contract, no contract and with help of friends. Often, I am just coding/ designing / working alone. I find it fun to create. (don’t we all?)
as of 2 weeks ago, I started to make a simple, but hopefully fun, multiplayer shooter in unreal engine 4. (I will hope to share it with the world one day soon!) It revolves around a simple shootout between 1-12 people on two teams, with modifiers changing the entire play style. Anyone familiar with unreal tournament modifiers will have an idea what I’m talking about as far as game play goes. This is a short log of how it went on each day that development took place (7 total):
**Day one:**I launched the multiplayer shootout example, just out of curiosity as how someone would go about multiplayer. Studied it, dissected it, learned the ins and outs of the blueprint system.
**Day two:**Basing my game project off of multiplayer shootout, more for the models/content than the blueprints, I figured I’d gut it and rebuild my game from it. I crudely add the first two modifiers in, laser sights on the guns, and drunken random aim, although they work, they have no menu or way to apply them in game yet. I also modify the base shootout map, as it has too much bloom/lens flare for my liking. Does not look western enough.
**Day three:**I decide to give the modifier list a proper home. I hard code every modifier into the list (the hard way), and add a modifier selection list when hosting, to allow you to add modifiers to your game, along with a map selection, even though there is only one map so far.
**Day four:**I enable movement, as the multiplayer shootout does not have any by default (unless we count that halfway left in thing?) And tweak the speed to be functional. I then notice lots of things broken about the multiplayer shootout game, such as transitiontostate being used improperly or sometimes not at all (you can notice this if you use the in game menu to return to the main menu). I google this and it seems to be a known issue that the multiplayer shootout is…well…broken, although no one has fixed it yet, So I fix ALL the errors with it, all the bugs and odd behavior, polish it up, and then begin continuing on my game now that the multiplayer shootout is working. I did not post the working game because ideally, I’d like the fixed multiplayer shootout to be where the broken one is, for others to learn from and not have to do as much work as I have done.
**Day five:**I finish several modifiers (12, to be exact) and add them all to the modifier list by hand. I then implement a save system to save and reload the modifiers, so that you can play matches with “presets”. I start doing online testing with my beloved fiance. Turns out, the modifiers don’t work because I did all the code for them in the gamemode construction script, which seems to not exist when the game is packaged. Would have been nice to know that. Time to move all the blueprints! I also add plugins to beef up blueprints, but one of them forces me to upgrade unreal engine to 4.11 (I’m looking at you, Rama.)
**Day six:**I move all the blueprint server loading to the game instance, where it (should) work, package the game and play a match by myself. EVERYTHING is working as intended! Woo! I add jumping, and team start points, and game play is solid from here, with modifiers to boot!
**Day seven (the day I made this post):**I begin to imagine an easier way to add modifiers to the game without hand writing them in everywhere they show up. Each modifier has a custom tool tip, name, etc, and I eventually want them showing in game during matches (so other players know what to expect online), so I would need an easier way to move them around and add them/show them. I use an array of structs and pull my information from that everywhere. This new system makes it 100% faster to add modifiers in the future! so, I test the game, its working perfectly! I then package the game since this is monumental in development, and:Ambigous Error! I cannot package my game because of an error I’ve never seen before! So I say I’ll fix it later. I go to my map, and…It’s black. The floor of the map is messed up!, So I playtest the game and I can no longer move. So I playtest from the beginning and the main menu no longer opens. I check it, and…there is nothing on the blueprint event graph! I also walked away from my computer for 30 minutes, and returned to a message that Unreal engine 4 was using “too much memory in windows” and it needed to be closed. I checked and its using almost 16 gb of my RAM. Now, I’m aware of some kind of memory leak, because as soon as I upgraded to unreal engine 4.11, I sometimes have to restart the engine to have the game tests in viewport run smoothly. That seems like a leak sort of problem to me. It seems 4.9 didn’t have this issue, I’d leave it running for hours while watching movies and it was good to go.
At this point, I have to rebuild my game. Luckily, I have a backup stored on my fiance’s computer, but…Why so much heartache, unreal engine?
I have questions/feedback, but I feel some of them are not fitting for the answer hub (and I may as well add the others here), such as:
- Why isn’t there a disclaimer that construction scripts are useless in gamemodes for packaged games?
- Would anyone be interested in the fixed, properly setup multiplayer shootout? Is it possible to get a fixed version uploaded in place of the current? Have hammer, will fix!
- Why did adding a list system (that works in editor) break packaging my game?
If this is the wrong place to post this kind of thing, please forgive me, I am new-ish to the forums!
Finally, Thank you for reading! Hope I’ve entertained someone!
**Update:**I’ve repaired my game and am full steam ahead. I’ve solved a lot of the problems, there was a combination of them. I will detail them all to save others the trouble. First, there was a blueprint error in the default multiplayer shootout when you opened game instance in blueprint editor whilst the main menu map was open. I think that caused the “memory leak” It’s not a leak, but rather a ridiculous pile up of errors. I replaced the main menu and that fixed the problem. The deleting my main menu came from the editor autosaving whilst I was in between working on it, but me myself not wanting to save the work.
The error I got with packaging was actually an “unknown cook error” and it was because my savegame file had somehow become corrupted. I deleted all the variables in my savegame, and switched them to an array, and it works perfectly now, there are no errors in this game, after fixing 3-5+ errors that came with multiplayer shootout.
I’ve also started a thread for the game mentioned here.