Meguido's Report #11
Added 2018-03-06 16:43:26 +0000 UTCHello everyone,
gotta pass the part of the joke about anybody missing me or my posts. Maybe you're wondering about the report number? or maybe not, anyway the last numbered report was #8 but then came the one with "crimson flames" in the title which made the #9 and lastly we made the chit-chat where I made the equivalent to the report #10; hence this is the #11.
Useless part done, let's talk about Bioasshard and the latest progress.
A lot has been recently (well, since the chit-chat 'til now) made in Bioasshard. All kinds of interactions are now done. You can examine, jump up, jump down, jump over, open doors, grab items, grab key items,... And I think that's all?
Sometime ago I ran into a weird problem and I blamed the engine (dunno if I talked about this in the chit-chat). The error was basically making the examination UI to instantly disappears as soon as it appeared... The normal behavior was to examine, read a text composed of X number of lines and pressing a button to make it advance through the different lines until the last one where the UI disappeared and control was gained back by the player. With this weird problem you wasn't able to even take a glimpse at the very first line of text. Everything was ignored yet the rest of the process was made like for example inserting an item in a puzzle or whatever. Only thing that didn't work was the UMG UI showing up the necessary text.
After so much testing, the error went away just the same way it came, so there was no explanation nor I did any change to make me think it was because of me, that's why I blamed the engine... but then a couple days ago it arose again. A fucking full day of testing and nowhere near to find a solution... was about to send everything to hell :( And then I decided to make one last test before crushing everything off...
(Gonna explain the test I did and why it was failing but assuming you know a little about unreal engine; so pay attention if you're a developer too using ue4)
So basically the same key/button is used to examine and to pass to the next text / stop examining.
But in order to make it a bit cleaner I decided to create different "Inputs" for the same key but with different code. This said, it was my fault but still the engine can be blamed for this too because it shouldn't have to work since the beginning but no, the engine decided to work randomly.
Maybe some of you already spotted the problem... yeah both inputs were executing at the same time even tho the one to pass to next line/stop examining had a check for a variable that was only true when the other input was pressed and it started examining (I guess this is confusing :P). To try and put it a bit simpler:
Input1 - "Can examine?" (true) && "!isExamining" -> "Show Text UI", "isExaminging = true"
Input2 - "isExamining" (true) -> skip to nest text line or close the UI / stop examining, "isExamining = false" (<- this one only when there's no more text lines to show)
And because these are inputs Actions and not input Axis they only work (supposedly) when the key is pressed (or released depending on where you plug your code) not when maintained.
So in my brain this had to work like this: You press the key and only input1 works when is not examining (ie isExamining == false) so it turns isExamining to true but because they happen at the same time, Input2 already tried to run its code but because isExamining was false it couldn't so it has to wait until the next key press.
For UE4 this was like: "let's make it run randomly, so instead of running both at the same time, I first run Input1's code and just like 0,0000001 secs after that, let's run Input2's code too".
So this is how I found the error: went to the branch (if statement) in the beginning of the Input2's code and added a breakpoint so as soon as I was testing and I examined something this breakpoint happened and I managed to see that the branch was already returning true instead of false until the next key press.
What I did? Got rid of the whole Input and set all the code in the Input1 but this time added a new branch to check if isExamining is true or not. Now it works as intended. When is false it starts examining and turns isExamining to true and when is true it goes through the text and when done it closes the UI and turns isExamining back to false.
That's it! Conclusion? Well, never think you're a good programmer because the moment you do, is the moment you start making wrong assumptions with the tool you're using lol.
Well enough of logic classes xD.
With that fixed, right now I'm making lots of testing, tweaking and balancing stuff. Trying to make the AI not-so-stupid, because yeah they're too stupid even to be zombies lol. Apart from that I'm also making some important stuff necessary in the Arena (which is really taking A LOT longer than what I expected).
I'd like to know if you want me to include a config menu in the Arena with the first release or maybe it's not that important and can wait for a later one? A config menu is a menu to configure graphic aspects, controls' stuff and also sound options. And as I said I'd like to know but I'm aware people is not willing to comment lol so unless you want to prove me wrong, that will be a last-sec add-on meaning that will only be added if I have enough time and patience :P
And now a couple of screenshots, both from "important" moments in the Arena:


So with all that said I think that's all for this report.
I have to apologize for the lack of posts recently but I've been working on Bioasshard as much as life allows me. And Versus X is being attacked again by a flu so that's why he's been so silent lately (yet he keeps working no matter what).
See ya in the next report!