Source Code Access

Discussion in 'Trials in Tainted Space' started by Gedan, Dec 1, 2016.

  1. SeriousBlueJewel

    SeriousBlueJewel Well-Known Member

    Joined:
    Nov 5, 2018
    This time the source code update was delayed like an entire day and this is the most appropriate place to post it.
     
    Droxzyn and dragontamer8740 like this.
  2. Gedan

    Gedan BUTTS BUTTS BUTTS
    Staff Member

    Joined:
    Aug 26, 2015
    Because I had to rebuild the tasks on the buildserver for reasons and haven't set up the part that handles the automatic push to the public github origin. I've had far more important things to fix up, namely, handling a bunch of issues with the CoC2 build process.
     
  3. SeriousBlueJewel

    SeriousBlueJewel Well-Known Member

    Joined:
    Nov 5, 2018
    Perfectly reasonable
     
  4. SynthRider

    SynthRider New Member

    Joined:
    Jun 18, 2019
    Hi, I'm looking to re download an old swf of TiTs. To be specific 0.7.231, would there be a way all old versions are available to download on github?
    Or if anyone still holds that copy and send it my way?
    Thank you for readin ^-^ <3
     
  5. Savin

    Savin Master Analmander
    Staff Member

    Joined:
    Aug 26, 2015
    There's a whole thread dedicated to begging for that build. Post there.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    You can build it from sources on github…
    Code:
    git clone <URL>
    cd <repo directory>
    git checkout c01fce892006ed007360c8017232837b346b4744
    …then build.
    I just looked it up, and while the commit message didn't mention it, that is the commit that it got bumped to 0.7.231 in.
    …Or do what savin said. Probably simpler.
    Speaking of sources, could we please have those for this latest public build? Seems that's still not automatically getting pushed so I just wanted to draw attention to it's absence.
    Happy 'Murica Day.
     
    #36 dragontamer8740, Jul 4, 2019
    Last edited: Jul 4, 2019
  7. SeriousBlueJewel

    SeriousBlueJewel Well-Known Member

    Joined:
    Nov 5, 2018
    When can we expect the public source code to drop
     
  8. Dorkulon

    Dorkulon Well-Known Member

    Joined:
    Sep 10, 2015
    Welp, code got pushed... but it's all on branch "public" instead of "master". Not sure if this should get mentioned in the bugs thread, and/or if this is the branch we should be using in the future.
     
    Hanzo and Droxzyn like this.
  9. SeriousBlueJewel

    SeriousBlueJewel Well-Known Member

    Joined:
    Nov 5, 2018
    Without your help I would probably taken way to long to figure that out, so thank you.
     
  10. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    Hey, it's been a couple days so I'd like to ask about sources again.
    I'm trying to work on improving a java-based TiTS save editor ( https://github.com/Chase-san/JTiTsEd ), and even if it's still mostly doable with old code it bothers me to not be closer to up-to-date.

    Additionally, last month's source drop didn't directly correspond to the imagepack build ( spam filter detected my github issue link as spam, so I'll just say it's issue #220 ), so it's actually closer to two months old now. Essentially there were no provisions for a couple of in-line images from the pack that could be seen as lines of code in the decompiled game that could not be seen in the sources provided.

    Before anyone advises me using the decompiled game, the TiTS.as class has tons of includes in it that are merged together in the decompiled game. Takes a TON of RAM to decompile and is much harder to navigate through than the normal source tree.
     
    #40 dragontamer8740, Oct 5, 2019
    Last edited: Oct 5, 2019
  11. SeriousBlueJewel

    SeriousBlueJewel Well-Known Member

    Joined:
    Nov 5, 2018
    @Gedan Could you please update the source code
     
    Krynh, Specter and valkyr42 like this.
  12. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    Would you be able to provide me with some assistance as to how to actually build it.
    I have looked into it but so far I haven't succeeded.
    It'd be great if I got it working so I can test bugs/bugfixes locally.
     
  13. Dorkulon

    Dorkulon Well-Known Member

    Joined:
    Sep 10, 2015
    The "easiest" way is probably to install FlashDevelop, have it install flex etc, grab fl.swc from one of the projects that redistributes it, comment out the "import fl.motion.Color" directives, and then build. Once FlashDevelop generates the .xml file from the as3proj file, you can manually invoke mxmlc.jar yourself (e.g.
    mxmlc -load-config+='obj\TiTSFDConfig.xml' -incremental=true -swf-version=22 -o 'obj\TiTSFD.swf') instead of having to fart around with FlashDevelop all the time.
     
  14. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    Thank you for your reply, however I need some clarification.
    Are you talking about commenting out the "import fl.motion.Color" from the source files located in classes/UIComponents or am I misunderstanding something here.
     
  15. Dorkulon

    Dorkulon Well-Known Member

    Joined:
    Sep 10, 2015
    Yeah, like 5 of classes/UIComponents/ButtonTray.as or thereabouts; I think there might be a mention in the save editor, too.
     
  16. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    The only other one that is not uncommented showed up with a search in classes/UIComponents/SideBarComponents/StatBar.as
    Anyway at the moment I'm failing to build at all with "Error: Java heap space" which might be an issue with the installation FlashDevelop, so I'm not getting anywhere yet..
     
  17. gena138

    gena138 Well-Known Member

    Joined:
    Feb 2, 2017
    This is the thread you're looking for: https://forum.fenoxo.com/threads/guide-to-using-tits-source-code.10155/
     
    LoriJ likes this.
  18. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    Aye, that was exactly what I was looking for, thank you very much!
    I had the 32-bit JRE installed since FlashDevelop asks for it when installing, but appearantly the 64-bit version will allow it to compile succesfully.
     
  19. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    I would, but I'm not a Windows user and I had to hack together a different and rather convoluted build system for it due to both carelessness (wrong casing in some file names, which is hard to fix later on in Git if you have people using it under Windows) and general difficulties figuring out how to invoke the flex compiler directly. If you're still interested let me know.
    Ah, good. Never mind then. Yeah, building it (especially the image pack) takes loads of RAM these days.
     
    #49 dragontamer8740, Feb 6, 2020
    Last edited: Feb 6, 2020
  20. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    I usually develop using Linux too, so I have ran in to some of them as well, I think I noticed an issues on github from you mentioning it.
    Currently I'm using Wine to run stuff... Though I think the biggest problem was the RAM, but after way to much troubleshouting already I haven't found the energy to try and setup the build without it..
     
  21. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    Is it working for you now? If not I can give some pointers. Of course, they'll be a month or so out of date because they forgot to push the code for the public build again this month.
    It is possible to compile it without wine, but you likely need wine to make mobile AIR builds.

    To compile an SWF without wine, you need Flex. I use the last Adobe Flex version primarily because I vaguely remember having some strange issue with Apache's Flex. This was years ago, but "if it isn't broken, don't fix it" has stopped me from trying to use Apache Flex again. I took the lazy approach and just let FlashDevelop download it in wine, but you don't need to use wine/FD for this step.

    You basically need to create an XML file that describes some basic properties of the SWF you're trying to build. There's an example from Adobe someone linked here. You can 'cheat' by using FlashDevelop to build the game once and checking the CLI args it passes to 'mxmlc.jar' when it invokes it (mxmlc is the flex xml compiler thing). It will include a path to a temporary XML file that FlashDevelop generated.
    You can just copy that file from its temporary location and modify it for your own purposes (i.e., changing the paths to unix style paths).

    Then you can invoke mxmlc from native java using something like (borrowed from the command line that flashdevelop was using, and edited for unix/linux shells, using more RAM (I used 6GB because image packs take a ton of RAM to make, but you can probably get away with a lot less otherwise), and splitting into multiple lines of text):
    Code:
    java -Xmx6072M -Dsun.io.useCanonCaches=false \
    -Duser.language=en \
    -Duser.region=US \
    -Djava.util.Arrays.useLegacyMergeSort=true \
    -jar "/path/to/flexairsdk/whatever/lib/mxmlc.jar" \
    +flexlib="/path/to/flexairsdk/whatever/frameworks" \
    -load-config+=yourbuildconfig.xml \
    -debug=true \
    -swf-version=22 \
    -o "bin/TiTS.swf"
    /path/to/flexairsdk is whatever path flashdevelop in wine had saved your SDK's to. You can move it around, you won't likely ever need to use flashdevelop again barring major changes to the build system (this has worked for about six years now for me).

    Of course, you'll still need to fix about a bazillion filenames that use the wrong casing (upper vs. lower-case) in the source code, or symlink the files to their incorrectly-named versions that the code looks for, or you'll get errors while building.

    Also, if anyone who can do it is listening, would you please consider pushing the latest public source code to the github?
     
    #51 dragontamer8740, Mar 6, 2020
    Last edited: Mar 6, 2020
  22. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    I had it working by building using FlashDevelop run on wine, not yet with native java. Thanks for your pointers though, as I seems to be working natively now!

    Actually I've only updated two things: I changed a reference to "assets/images/npcs/shou_puppy/warlion.png" to use the actual filename "warLion.png" and a reference to "includes/zhengShiStation/forgehound.as" to use "forgeHound.as".

    I've listed some addtional information, maybe someone else might be interested too.

    I actually copied the TiTSFDConfig.xml and updated the paths from windows paths to linux paths and used a symlink to circumvent the "Program Files (x86)" folder (at least I think that one was the problem).
     
    #52 LoriJ, Mar 10, 2020
    Last edited: Mar 10, 2020
  23. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    Glad to hear it. Good job.

    Ah, yeah. I forgot those were the only problems with the non-imagepack versions. If you try to build an image pack (CONFIG::IMAGEPACK in the .xml file), you'll encounter a lot more errors related to file name casing.[/quote]
    Yep, that's one of the issues, but primarily because it uses drive letters and backslashes instead of forward slashes. Spaces and stuff in path names are fine so long as the paths actually exist. Symlinking is a relatively good solution.

    --
    Going to ask again if anyone can bump the public source code version.
     
  24. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    So I actually went back to it and figured out what the issue was, it turns out I used '\' to escape the spaces and stuff in the XML file (like you would on the command line), which just messes it up instead..

    Concluding, no symlink needed, it was just me that was the actual issue. :p
     
  25. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    Good.
    So it's building fine for you without wine now by running the 'mxmlc' program directly?

    If you want, I have a build system I've been working on to hopefully simplify things for Linux users. PM me if you'd like to try it. It's basically a bunch of scripts to automate configuring builds and making them for different targets.

    I try to keep it up to date with whatever the latest source drop is (still waiting on the latest).
     
    #55 dragontamer8740, Mar 12, 2020
    Last edited: Mar 12, 2020
  26. LoriJ

    LoriJ Well-Known Member

    Joined:
    Jan 10, 2020
    It's working great (it feels way faster too, though I might just be imagining that), your snippet with the code for the java command gave me the information I was missing with my previous tries!
     
  27. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    Glad to help.
    I found that command by looking in either "process explorer" while building in windows or "ps" while building in wine (can't remember which I was using at the moment).

    It likely is faster, for a number of reasons, including possibly the startup time of wine apps and the unavailability of `fork()` in Windows apps. The second thing is pure conjecture of course.
     
  28. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    So, uh, sorry about double-posting (and repeating myself), but we haven't had a source drop in just shy of three months now (a quarter of a year).

    Would you guys mind throwing us a bone?
     
  29. SlamAzz

    SlamAzz Active Member

    Joined:
    Dec 24, 2017
    With the new update, it would be REALLY nice if we were to get a public source code update.

    As cheap and dumb as it sounds, I legitimately can't play TiTS without the save editor. And the save editor can't be updated unless the source code is. I don't want this to be the end of this wonderful game for me...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  30. dragontamer8740

    dragontamer8740 Well-Known Member

    Joined:
    Nov 9, 2015
    I hate to beat a dead horse because at this point I'm pretty sure it's just not gonna happen, but it's now been about 1/3 of a year since we had a source drop. Just throwing it out there in the hope someone decides to help us out and rectify that since there could be a public build in the next couple days.

    Barring that, if there's some reason (other than not finding the time or not noticing/caring enough) why it has been four months since last push, I'd be interested to hear the reason(s) behind the decision not to update it. Obviously I'm not actually in a position to feel entitled to anything as some random person on the internet, but it'd still be a good gesture that I would appreciate.
     
    Semeicardia and Paradox01 like this.