• Breaking News

    Tuesday, July 7, 2020

    Faster Than Light | Trying to get the crystal vengeance achievment. After 29 shots, I've concluded god is dead

    Faster Than Light | Trying to get the crystal vengeance achievment. After 29 shots, I've concluded god is dead


    Trying to get the crystal vengeance achievment. After 29 shots, I've concluded god is dead

    Posted: 06 Jul 2020 02:55 PM PDT

    This is no joke!

    Posted: 06 Jul 2020 04:37 AM PDT

    Better put on your swimwear guys its DIVING time

    Posted: 06 Jul 2020 11:52 AM PDT

    ...Algae?! [Previously undiscovered FTL cut entity findings & analysis]

    Posted: 06 Jul 2020 06:53 AM PDT

    -Wall of text incoming - see bottom of the post for tl;dr!-

    ___

    So, a while ago I decided to snoop around FTL's executable for a project of mine (which may or may not see the light of day, but this is not the main focus of this post anyway) and I found something I didn't quite expect: unlike the Windows release, FTL's Linux executable includes debug symbols in its symbol table. If you don't know what they are or how they could be helpful while reverse engineering, the tl;dr is that debug symbols can be used to find out the original function/variable names (as well as other info) when decompiling code (whereas they would normally be stripped at compile-time, thus leaving you with loads placeholder names in their place).

    That alone was a surprising discovery, but something even weirder caught my eye after I loaded up the executable in Ghidra. There were a few references to Algae in the function names & symbols and, well... no algae ever pop up in the game as far as I know. Keep in mind that this was on a completely fresh, unmodded installation of the game and what I was seeing were indeed function names as given by the developers themselves (thanks again to the debug symbols!). At first, I didn't think much of it, FTL actually has kind of a habit of naming things internally in a different way, so I thought it could've been just that. But then I noticed that the code I found was completely unused and there were basically no references to algae being in FTL online, not even in TCRF, FTL's Wiki(s) or Subset's own forums - except for this small paragraph here from a Q&A session with Justin Ma (point #10), so I decided to take a deep dive in the rabbit hole I just found and see what I could discover...

    As it turns out, yes, Algae was indeed a previously undiscovered cut entity in FTL that is still partially present in the game's code! Taking that into account, I decided to make this post to detail my findings to the community (and of course, knowing the internet's "proof or it didn't happen" rule, I'll also explain the steps I took so you can verify everything I say on your own to check I'm not making any of this up).

    So, what exactly was this scrapped feature like anyway? Algae was a so-called "spreadable" entity, aka something that appears on a ship and propagates to nearby tiles (like fire, for example). Sadly no clue remains in the game's code about how it would affect the crew, systems, or other environmental variables (like oxygen levels) as its concept was likely scrapped early in development, but several functions describing its general behaviour are still there, as well as other related interesting bits of info:

    • In many ways, Algae act similarly to Fire, but with some key differences. If we take both entities' data structure and initializer code, they're almost directly comparable - with the main differences being that Algae does not have any associated animation as well as missing a few fire-specific variables.
    • There are no graphics left for Algae in the game's files but, instead of the aforementioned animation, Algae were supposed to have a 35x35px static sprite with damage variants according to its OnRender function.
    • Several of Algae's functions are identical to fire's own, namely: ResetStartTimer, Repair, SetOxygenLevel, Spread and Present (if you're unsure what these functions do, check out the comments I've added in the pastebin). Note that these are not direct references, but rather copy-pastes meant to be used specifically by their respective parent entity.
    • And this is where the differences (and fun!) begin. In a polar opposite fashion to fire, Algae start decaying if the room's oxygen level is higher than 90% - related code.
    • Algae also decay at a much slower rate than fire: that is by a factor of 0.003 for Algae vs 0.01 for Fire (a whopping 70% slower!) - related code: same as above.
    • Algae will never spread through closed doors. Instead of taking into account the door subsystem's level when spreading, the game will just check whether a door is present between two tiles and, if there is one, the timer that controls whenever Algae should spread to a new tile will be reset (thus preventing it from spreading there). This also applies to ships that physically contain doors but don't have any door subsystem installed (eg. Rock B). They will, however, spread through open doors - related code.
    • When there are no doors, Algae spread much slower than Fire. The time it takes before Algae spreads to a new tile is calculated in a slightly different way (Algae: rnd# mod 70 + 10 / Fire: rnd# mod 40 + 10) and the timer decreases at a slower rate as well (Algae = 0.05 / Fire = 0.05714286, so around 14.3% slower for each step) - related code: same as above.
    • There is a boolean function associated with Algae called "Infected" found in the debug symbols. Sadly, there is no code for it to be found anywhere in the executable, so it was likely stubbed/scrapped before compiling. The Q&A mentioned a type of "corrosive" Algae, but how that would actually play out is a mystery unless we get some direct answers from the devs themselves.
    • Instead of being localized, Algae have their entity name string hardcoded in the executable, meaning they have been in the game for a while (at the very least before v1.6.1). As the Q&A is also from 2012 it would seem that Algae were present in the game way before Advanced Edition, but, as I don't have a pre-AE Linux build to examine, I cannot confirm that myself (and notice how the Q&A also mentioned hacking systems which got later introduced in AE, so maybe they tried to bring Algae back too and failed?). If you happen to have a pre-AE Linux build, let me know!

    Like mentioned before, aside from these functions, there's nothing else to be found about algae in the game, so there's no way to know what they were actually supposed to do other than spread around following these rules. Not just that, but all of this code goes completely unused, so even if we somehow force the game to spawn an algae entity to see how it would behave, it will likely do nothing at all as the game isn't going to update it at each engine loop.

    So... is there anything we can do to see how Algae would look like in action? Well, yes! As fire and algae have a lot in common, I've been able to repoint some of fire's functions to algae's relevant ones so the former would spread around and decay exactly like the latter ingame. The results can be seen in this video - and you can also download my patch here! (NOTE: the patch is meant for FTL's Linux Steam release, v1.6.13 64 bit only. It will likely not work for earlier versions/other releases, like GOG's, due to different function addresses.)

    If you want to verify this stuff yourself, you need to have a Linux FTL binary (both x86 and amd64 are fine) + Ghidra and its dependencies installed on your machine. Open up Ghidra, create a new project and import the game's binary, then open it using CodeBrowser. When it asks you to analyze the file, click yes but don't start the analysis yet! In the analyzer list, select DWARF and set the debug item count limit to a high enough value (12000000 worked for me) - if you don't do this step, Ghidra won't be able to pick up all the debug symbols! Start the analysis and let Ghidra do its thing (it will take a while, check the process in the bottom right corner of the window), if some warning pops up about not being unable to demangle a couple of symbols, just ignore it. You can find Algae's functions in the Program Trees window (click the DWARF tab, look for Algae.cpp and Algae.h) and more info about its symbols in Data Type Manager (FTL.x86/FTL.amd64 -> DWARF -> Algae.cpp/Algae.h, you'll find the Infected function symbol there).

    As to why Algae got scrapped... Justin Ma said "we could have worked on the game forever, adding feature after feature but in the end we prioritized completing the game instead of letting it get out of hand", so it looks like it didn't make the cut due to time constraints. But if you ask me, it's cool to see there are at least a few remnants of a feature that got cut so early in FTL's development able to give us an idea of what it could've been!

    ___

    tl;dr - Algae is a previously unknown cut entity in FTL with partial remnants still in the game's code. There's no way to know what exactly it would do as the relevant code is missing, but it was supposed to spread around the ship (similarly to fire), survive at low oxygen levels while decaying at 90%+ O2, die much slower than fire while also spreading at a slower rate, get completely blocked by doors unless open and somehow be/get "Infected" (devs talked about "corrosive" algae, but there's no code to indicate what that would mean as a game mechanic).

    submitted by /u/RattletraPM
    [link] [comments]

    New race in Arsenal+

    Posted: 06 Jul 2020 08:07 AM PDT

    Beat the Flagship for the first time!!!

    Posted: 06 Jul 2020 12:36 PM PDT

    I got this game from the steam sale and after like 10 attempts I beat the rebel flagship with the Torus on easy! Not the biggest achievement, but it was sooooo satisfying! This game is one of the best games I have ever played, can't wait to keep unlocking ships and play on harder difficulty levels

    submitted by /u/aaron-not-erin
    [link] [comments]

    Bug: Hack RFS Missiles, Quit, Come Back to Ion Blast Hacked

    Posted: 06 Jul 2020 10:07 AM PDT

    No comments:

    Post a Comment