HTML5 Port

I’ve recently begun a project to port Tainted Elysium from Flash to HTML5. The reason for this is that I decompiled Elysium, intent on modding it, only to find that the code is procedural and not very simple to mod. Long story short, I am making an unofficial, unsanctioned port of Elysium with the intention of making the code easier for Atticus to work on by using OOP practices, and teach him those practices. In addition, the change to HTML5 future-proofs the project, since there are rumblings at Adobe about just killing Flash. This project will be sent to Atticus at its completion with full source code, documentation, build system, and licensing rights, effectively making it his, allowing him to do whatever he pleases with it. I am making my own engine at the same time, but it’s being built around the needs of TE and may or may not be released.

To clarify, Atticus has not granted me permission to do this, and I fully expect him to be unhappy with me, despite the intent and direction of the project. If there are repercussions, I will accept them. By the same token, I am not intending to disrupt TE’s development and will update this port as Atticus adds to TE, making a weird sort of parallel development cycle. I will not be adding or removing features or scenes, in order to keep things simple. Should he request the code, it will be immediately provided, no matter the state of development.

Technical stuff:

[ul][] Engine: Custom (Venture)
[
] License: Game: Proprietary (for now), Engine: MIT, but unreleased (for now)
[] Language: Coffeescript, some Javascript
[
] Scenes: Markdown + Jinja templating + YAML header metadata
[] Authors: All credit goes to Atticus Arc, all blame goes to Herbert
[
] Status: Early development (no public release)[/ul]

Detailed status:

[ul][] UI: Mostly working, sans silhouette
[
] Scene Engine: Fully working
[] Templating Engine: Fully working
[
] Base Creature Structures: Stats somewhat working, organs/limbs/genitalia are stubs but working, everything else WIP
[*] World Navigation: Planned (engine will permit both TiTS and Tainted Elysium-style navigation)[/ul]

Example Scene:

title: Test Scene 1
author: Herbert
#bust:
location: Base Camp
flags:
  - no-saving
  - no-loading
  - slow-fade
buttons:
  0,1:
    label: Main Menu
    tooltip: This button will return you to the main menu.
    actions:
      - set-scene: Main Menu
  0,2:
    label: Next Scene
    tooltip: Takes you to the test scene.
    actions:
      - add-stat:
          stat: Lust
          amount: 5
      - set-scene: Test Scene 2
---
# Hangar

{# Pluralize is a non-standard filter added specifically for Venture. #}
You enter the hangar, blinking like an idiot as your {{ "eye" | pluralize(PC.Eyes.length) }} adjust to the blinding plasma-arc lamps illuminating the area.

{# Adding a "-" on one side of a Jinja/Nunjucks statement disables whitespace on that side.  We use this on the if-structure below to keep the output on one line. #}
Once your {% if PC.Eyes.length > 1 %}pupils finish{% else %}pupil finishes{% endif %} contracting, you do a quick survey of the hangar,
{% if Ship != null -%}
and quickly find {{ Ship.ProperName }} among
{% else -%}
and are immediately made jealous of
{% endif -%}
the motley collection of spacefarers parking their crafts in this structure.

… turns into the attached image (after adding some statbar test code to the .scene.coffee).

FAQ:

Q. Why?
A. Because.

Q. No, seriously, why?
A. I’m always tinkering with things, and TE is my latest tinkering session. I have this strange fascination with refactoring and design. I also like where TE is going and hope he keeps it up.

Q. The UI is different
A. I haven’t exported assets from TE yet and I want to have the layout working the way it does in TE before I start screwing with image assets. HTML handles positioning differently, so it is a gigantic pain in the ass to get things to line up on the image. The UI is designed to use screen positioning, so that shouldn’t be as much of a problem, but it’s still something I want to tackle later.

I am in IRC if there are questions. This is a throwaway account, so will disappear after Atticus takes over/bans me/whatever.

More pictures:

Main Menu, showing ability of templating engine to handle advanced stuff like SVGs and raw HTML.

Test Scene again.

WEBM: Old test of starbar animation and fade-in (set to slow, post-main-menu dramatic fade and animation)
https://my.mixtape.moe/rbkasp.webm

I have a couple of webms but none of the sites I can find that accept webms worked.

As a note to Atticus: I know the timing is absolute shit, and I don’t expect you to make any hard and fast decisions on this for quite some time due to what’s going on in your life. However, I figure it’s better to explain to you what’s going on here than for you to find out through other means. I apologize.

I hope the both of you can work together well, or if not at least work out an agreement. Though it has no weight to it I’ll just say for now that I certainly approve of this. I really think that this will improve of things even if it is at the cost of completely redoing the whole thing from scratch. But Atticus always wanted to make sure things work right before piling on top of them so again I really hope it works out.

HTML5 is a platform I can work with whereas I hated flash, so I’m lowkey enthusiastic about this LOL

Updated image post with a webm of the statbars animating and fading in.

The vector side could be done with SVG I guess, there are some JavaScript morphing systems for SVG.

I have to say I’m a bit uncomfortable with this all, as you expected, and I’m immensely embarrassed. I was content with Elysium being my private interest that was ultimately difficult for others to get involved in, it was blanket that helped keep me isolated as well as in the spot light. At the same time I knew this would happen eventually and I will say that I am at least glad it’s being done by someone who doesn’t have any obvious ill will towards me.

I won’t say I’m on board with the idea, as it’s something out of my area and not something I expect to have time to pick up soon. I’m not in the best place right now, so does this make me feel like crawling into a hole: yes. But obviously the negative feelings I get from this are a bit disproportionate due to my emotional state and my protectiveness over my project. I know this could be of help, but I just ask that you please be kind to Elysium and do right by me.

I’m not ready to engage yet and I’ll probably try to ignore this as much my sense of security needs me too for a time: but do what you will. The internet is a world without limits or rules.

(also: just for my own sake, I have to apologize to you for the crazy mess my annotations are in some areas, or the complete lack of them in others.)

[quote=“Atticus.Arc, post:7, topic:803”]I have to say I’m a bit uncomfortable with this all, as you expected, and I’m immensely embarrassed. I was content with Elysium being my private interest that was ultimately difficult for others to get involved in, it was blanket that helped keep me isolated as well as in the spot light. At the same time I knew this would happen eventually and I will say that I am at least glad it’s being done by someone who doesn’t have any obvious ill will towards me.

I won’t say I’m on board with the idea, as it’s something out of my area and not something I expect to have time to pick up soon. I’m not in the best place right now, so does this make me feel like crawling into a hole: yes. But obviously the negative feelings I get from this are a bit disproportionate due to my emotional state and my protectiveness over my project. I know this could be of help, but I just ask that you please be kind to Elysium and do right by me.

I’m not ready to engage yet and I’ll probably try to ignore this as much my sense of security needs me too for a time: but do what you will. The internet is a world without limits or rules.

(also: just for my own sake, I have to apologize to you for the crazy mess my annotations are in some areas, or the complete lack of them in others.)[/quote]I understand you’re going through a rough patch, and I started working on this about a week before your family emergency took place, so it ended up being really bad timing. Again, I’m sorry. I know what you’re going through, having lost several family members last year, and I hope things get better for you soon. I debated waiting for longer, to give you more time to recover, but I also know that the internet is an escape in such situations, and you would find out sooner or later, and without a direct explanation.

As for your vision, I’m not going to make any changes to the game, other than redoing the back end with the intent of making it easy for you to pick up and understand. The scenes I have ported thus far are exactly what you had entered, including any grammatical or spelling errors. I also don’t plan on releasing it except to you, because I do respect you and your vision for the game, and because it would be morally dubious to do otherwise. Obviously, there’s going to have to be many front-end changes due to the difference between Flash and HTML5, but I plan to minimize them as much as possible. I fully intend for this to be nearly identical to what you’ve produced when it’s complete, so you’ll be able to pick it up and pick up where you left off without fixing any “design decisions” I make: You already made those decisions, and I plan to respect them and follow them to the letter. This is your project. All I’m doing is basically a massive refactor.

Once again, I am sorry about the way I came about with this. The timing was bad, I should have asked for your permission, and I should have asked for your input. However, the damage is done, and I might as well finish it.

And don’t worry about the annotations; I can’t see them anyway due to having decompiled the game from the SWF. (Flash strips comments when it compiles things, like most programming languages.) I do malware analysis as a hobby, so this is sort of entertainment for me, and I also understand that the game was coded this way because you weren’t familiar with the language at the time. I’m actually impressed with it, even having undressed it. You perform advanced procedures in a way that most people wouldn’t have thought of; While it’s not exactly the most maintainable way, it’s still magnificent in its own sense, and despite the sheer scale of the code, I can still follow along fairly easily. You are FAR from the worst coders I have seen, and in fact, with the way you approached problems with the knowledge you had, you may be one of the better ones. While the structure is not really up to modern standards, much of the actual algorithms you use are still very usable.

Don’t be embarassed. You did a massive amount of work that most people would have given up on months ago. This project is something to be proud of, and I, and many others who have played and enjoyed your game, thank you for it.

I apologize for the late reply. I wasn’t sure how to reply at all. For the last couple days I’ve been feeling such a mix of things where sometimes I really want to just return to the scene, work on Elysium, joke with my people and just continue on like nothing has happened, but at the same time I just want to stay in this limbo away from everyone doing nothing. I’m in this limbo somewhere between. I’m working on Elysium, making some shitty body shape customizer and other oddities, at the same time I’ve been writing more for this lore glossary thing because it helps me solidify ideas for the game and eventually it means I have more for outside users to view and base their works off of. Something that ultimately contradicts with what I want as well. I don’t want others on the project just as much as I want people in on it and it’s a strange place to be at mentally. People probably think I’m an idiot, but it’s different when a lot of your sense of self-wroth and accomplishment comes from a shitty little project like this and to see such a thing could be stripped away so easily is an uncomfortable thing.

I truly appreciate the compliments you’ve given me and I appreciate that you’re doing this project of your own accord in a manor in which you wish to help me and not to just take the project from me, much as anyone really could. It’s a fear of mine, that something that’s been a focus of my free time and passions for years now can so easily be dissected and taken from me, merely because the way I program and the speed at which I produce content isn’t up to par. All it takes is someone disgruntled with who I am to come in, do what I do better than me and make what value I give myself through my project, into nothing that I can hold myself to. I could easily be forgotten just as much as anything on this spurious internet world.

It’s a juvenile fear, for sure. It’s a weakness. But it comes from a place of passion for my work and that which I am creating. I want you to do what you want to do, and I don’t want to, nor can I prevent you from doing this. If anything, I should be thanking you, but it’s just a weird place for me right now. Not that this timing was in your control, just unfortunate coincidence I suppose.

What I find funny, is I’d be comfortable with my fiance, Lilly, working with you on the port, but I myself would be too unsure of my circumstances to do it myself. At the same time this would be useless as, as well intentioned as she is, Lilly knows even less about code than I do. I don’t want to be just reduced to some idea guy, and I want Elysium to remain my learning experience. Learning HTML5 would be great I suppose, but I just don’t see myself having time to work on that as well as normal Elysium with my current schedule in life.

I don’t know what I’m doing, I expect to draw plenty of ire due to this fact. I’m emotionally raw and I’m rambling. Fuck, I don’t even have a point anymore. lol. I’m just drunk right now, and I want to give you a response. I owed you that much as least.

I’m writing this from my phone in bed so sorry if there’s any weird autocorrect mistakes. But I’d like to apologize for my initial reply. It seems a little insensitive since I didn’t know your circumstances or how this would guy’s thing would affect you. It’s different for me since I’m so w/e about my lore and stuff and am pretty much just winging it with my game but I understand with your passion something like this can be tough to swallow. I don’t think it’s really a bad thing though, html5 is suuuper easy to pick up and will ultimately safe you time (I don’t like flash if u haven’t realized yet haha).

It’s alright. I do understand that sentiment. I’m just in an odd place about the whole thing is all. I don’t feel like I have the time or attention span at this time to pick up a new language yet, not to mention the change in how many day to day habits and self-medication between gross OC game development. lol.

It’s in a realm of “the unknown is scary, and I’m making it far scarier at this time because of my current life circumstances”

With that said I don’t want anyone to think I’m going to be stopping my work on Elysium or anything. She’s the mutant baby I love and it always will be, if I bring it into HTML5 eventually, great, but I’m not and cannot commit to such an idea at this time.

It’s alright. I do understand that sentiment. I’m just in an odd place about the whole thing is all. I don’t feel like I have the time or attention span at this time to pick up a new language yet, not to mention the change in how many day to day habits and self-medication between gross OC game development. lol.

It’s in a realm of “the unknown is scary, and I’m making it far scarier at this time because of my current life circumstances”

With that said I don’t want anyone to think I’m going to be stopping my work on Elysium or anything. She’s the mutant baby I love and it always will be, if I bring it into HTML5 eventually, great, but I’m not and cannot commit to such an idea at this time.[/quote]

Your state of mind at the moment is something everyone understands, and we all hope you take it easy and give yourself time to heal. I’m not going to ask you to do anything until you are ready.

As for the coding stuff, I’m always here to answer questions and would be perfectly happy to tutor you. I started out in the same place you were, with one language and a lack of knowledge in OOP. I ended up writing a terrain generation and visualization system for a game in PHP, and it was such a horrible mess that I couldn’t maintain it. That is my worry: One day, you’ll wake up and decide to take a break from Elysium, and then come back in a few months and not remember how everything worked.

You’re doing a hell of a job for a new programmer. While there are some things to work on, the project is functional and works very well despite the back-end issues, and I am willing to help you learn how to use AS3 properly, or even Javascript (when you’re ready). However, I know your mind isn’t in the right place, so please, do take a break and try to give yourself some rest. I’ll still be here when you get back, and I’ll still be spending way too much time trying to write parsers to do the hard work for me, so the rewrite isn’t going to move too far while you’re gone. :stuck_out_tongue:

Thank you again for your hard work.

Thanks. I’m just going to take my time then and I’ll let you know when I’m ready for it, provided I develop the wear-withal to not need some sort of envoy. lol.

And I understand the worry of me dropping the project after boxing myself in. Luckily this stuff is a lot like my terrible handwritting, most people can’t really read it and even I get lost sometimes, but being my own jumble of junk I do tend to find my way back. I’ve always felt that if I ever did give up on the project or something were to happen to me, I did plan to release what I had to the public. Just, as you’ve seen I don’t feel like I’ll be going anywhere anytime soon and having to release this stuff that I feel so personal towards and so embarrassed of at the same time, I’d rather be out of the picture completely when everyone can scour my work without the politeness you’ve provided. But, in the right hands I guess this whole thing isn’t quite so bad. I don’t know.

Feel free to post progress here or where ever, and do your thing. I’m of two minds right now, so take that this all for what you will.

Thanks. I’m just going to take my time then and I’ll let you know when I’m ready for it, provided I develop the wear-withal to not need some sort of envoy. lol.

And I understand the worry of me dropping the project after boxing myself in. Luckily this stuff is a lot like my terrible handwritting, most people can’t really read it and even I get lost sometimes, but being my own jumble of junk I do tend to find my way back. I’ve always felt that if I ever did give up on the project or something were to happen to me, I did plan to release what I had to the public. Just, as you’ve seen I don’t feel like I’ll be going anywhere anytime soon and having to release this stuff that I feel so personal towards and so embarrassed of at the same time, I’d rather be out of the picture completely when everyone can scour my work without the politeness you’ve provided. But, in the right hands I guess this whole thing isn’t quite so bad. I don’t know.

Feel free to post progress here or where ever, and do your thing. I’m of two minds right now, so take that this all for what you will.[/quote]
Okay.

Word of advice, as a software developer who has been doing this for years: Always assume that people can see your work. (Un)fortunately, there’s very few programming languages that can’t be decompiled, and those that can’t can still be reverse-engineered with more effort. As in most endeavors, when humans see a need to screw with something, they will. A good example of this on the software development field is the often controversial DRM: Some guy slaps a lock on some code he doesn’t want to get out, some Russians take it as a challenge, down a few gallons of vodka and break the DRM in a week. There’s good reasons for either side, and I don’t want to get involved in the debate, but the take-away here is that if someone wants to look at your stuff, they will. I guess you learned that the hard way, in this instance, and for that, I’m sorry.

Again, if you’d like any assistance with coding, coding concepts, data storage concepts, etc., please highlight me on IRC (I’m on a VM for privacy reasons, so I may be delayed). I’ll go ahead and stop bugging you and get back to work.

Progress:

For everyone else, I intended to get more work done last night on perks but ended up spending time making a parser to read instructions from the Flash code and transmute it into coffeescript. This’ll make it easier to stay abreast of Atticus: Just run a python script and have it dump the code into the necessary files. Unfortunately, I made some assumptions about how he handles perks and will have to rework the code a bit on my side.

This is the output: (includes snippets of the original code at the top for debugging purposes)

# AUTOGENERATED.  **INCLUDE @NO AUTOGEN@ AND DELETE THIS LINE TO DISABLE OVERWRITE.**
 
class FastMetabolism extends BasePerk
    constructor: ->
        super()
        #TRAITgo():
        #   METAbt = METAbt + 25 * loc1;
        #   SPrt = SPrt + 2 * loc1;
        #CBOX_MEDICAL_go():
        #   CC_PANEL.MedicalPERKtext.htmlText = "<b>Base Metabolism +25%</b>\r\r<u>BONUS:</u>\rFood based Regen +10%\r\r?Your body extracts every ounce of power it can from its food; while it often makes you thirsty and crave electrolyte rich snacks, your metabolism keeps you in peak condition.?";
        #   TRAITlv = 0;
        #   TRAITnum = 2;
        #   TRAITsum();
        #   CC_PANEL.MedicalPERKtext.htmlText = TRAITread;
        #   Beep3.play();
        #   TEMP_START_PERK1 = "(T[2]:0)";
        #TRAITinfo():
        #   TRAITname = "Fast-Metabolism";
        #   TRAITdesc = "Your body extracts every ounce of power it can from its food; while it often makes you thirsty and crave electrolyte rich snacks, your metabolism keeps you in peak condition.";
        #   TRAITfxp = ["[Stamina Recovery Rate + " + 2 * loc1 + "]"];
        #   TRAITfxn = [];
        #   TRAITfx = ["[Starting Metabolism + " + 25 * loc1 + "%]"];
        #   TRAITtype = 1;
        #   TRAITtext[0] = "<FONT COLOR=\'#9933CC\'>   ☤   You\'ve acquired the <b>Fast-Metabolism</b> trait!</FONT>";
        #   TRAITtext[1] = "<FONT COLOR=\'#33CCFF\'>   ☤   Your <b>Fast-Metabolism</b> trait has increased in magnitude!</FONT>";
        #   TRAITtext[2] = "<FONT COLOR=\'#FF0040\'>   ☤   Your <b>Fast-Metabolism</b> trait has decreased in magnitude!</FONT>";
        #   TRAITtext[3] = "<FONT COLOR=\'#9933CC\'>   ☤   You no longer have the <b>Fast-Metabolism</b> trait!</FONT>";
        @Description = """
**Base Metabolism +25%**
 
_BONUS:_
Food based Regen +10%
 
?Your body extracts every ounce of power it can from its food; while it often makes you thirsty and crave electrolyte rich snacks, your metabolism keeps you in peak condition.?
"""
        @ID = 2
        @OldID = "(T[2]:0)"
        @Name =  "Fast-Metabolism"
        @SetupBlurb = "Your body extracts every ounce of power it can from its food; while it often makes you thirsty and crave electrolyte rich snacks, your metabolism keeps you in peak condition."
        @PositiveEffects =  ["[Stamina Recovery Rate + " + 2 * loc1 + "]"]
        @NegativeEffects =  []
        @OtherEffects =  ["[Starting Metabolism + " + 25 * loc1 + "%]"]
        @Type =  1
        @Text[0] =  "<FONT COLOR=\'#9933CC\'>   ☤   You\'ve acquired the <b>Fast-Metabolism</b> trait!</FONT>"
        @Text[1] =  "<FONT COLOR=\'#33CCFF\'>   ☤   Your <b>Fast-Metabolism</b> trait has increased in magnitude!</FONT>"
        @Text[2] =  "<FONT COLOR=\'#FF0040\'>   ☤   Your <b>Fast-Metabolism</b> trait has decreased in magnitude!</FONT>"
        @Text[3] =  "<FONT COLOR=\'#9933CC\'>   ☤   You no longer have the <b>Fast-Metabolism</b> trait!</FONT>"
    Apply: (creature,value) =>
        @MetabolismMod += 25 * value;
        @SPRechargeMod += 2 * value;
        super.Apply(creature,value)

You’ll notice that the constructor is trying to do things with “loc1” in the constructor, which is apparently the strength (I think that’s what it’s called) of the perk. I may have to make loc1 a property of the perk and add it to the Creature, rather than cheat and just leave a global list of the perks floating around that I make calls to. (PERKS[perkID].doThing()) It would be a little more memory-efficient to do it the latter way, but as implemented, it allows for more flexibility. It may end up working better this way.

It’s not so much that I thought people could see my code, it was more or less that no one would care too because of the obscurity of the game and the whole amateur coder aspect of it, but I guess there will always be interest in things.

Anyways, I should probably mention that if you find “loc1” “loc2” or “loc3” in the code, that’s referring to the location data. I wrote those in before I even knew about arrays forever ago, so that’s how primitive they are, but each holds the overworld, then the region and the given location in that region. Like, the campfire zone is loc1 = 3, loc2 =0, loc3 = 2

I don’t know why that would be showing up under the traits though, as it uses a temporary variable just called “lv” which in turn is that given traits “TRAITlv”; but yeah its a perk’s magnitude.

Also, there’s a whole chunk of “perk” code in there that isn’t actually used anymore. All of the perk systems have been converted to the slightly less terrible “trait” system but I just didn’t get around to stripping out the old stuff. I don’t know if that’ll mean anything.

It’s not so much that I thought people could see my code, it was more or less that no one would care too because of the obscurity of the game and the whole amateur coder aspect of it, but I guess there will always be interest in things.

Anyways, I should probably mention that if you find “loc1” “loc2” or “loc3” in the code, that’s referring to the location data. I wrote those in before I even knew about arrays forever ago, so that’s how primitive they are, but each holds the overworld, then the region and the given location in that region. Like, the campfire zone is loc1 = 3, loc2 =0, loc3 = 2

I don’t know why that would be showing up under the traits though, as it uses a temporary variable just called “lv” which in turn is that given traits “TRAITlv”; but yeah its a perk’s magnitude.

Also, there’s a whole chunk of “perk” code in there that isn’t actually used anymore. All of the perk systems have been converted to the slightly less terrible “trait” system but I just didn’t get around to stripping out the old stuff. I don’t know if that’ll mean anything.[/quote]
Actually, loc# is because flash strips the names of locals, which are abbreviated as “loc#” in this particular decompiler. Thanks for the info, though.

Did some more work on the character generation sequence. Most of the time spent was diddling around trying to get a nice, simple API for tooltips going. I finally got it done, and finished the first column of character setup. Tooltips are standard jQuery UI tooltips, but boiled down to a single function that can set raw HTML and won’t fuck up the title attribute.

The checkboxes update when the physical sex is changed, just as they do in Elysium. I’ve got a couple more organ stubs to do (Androgyn and seminal pouch), and then I can test live updates to the PC’s organs.

More work today, most time spent getting Elysium’s logo traced in as an SVG. SVGs permit the UI to be scaled to any size without pixellation. Plus, we can do cool stuff like CSS3, animations, and filters like the cyan glow I added around it (the original logo has a similar color glow). I’ve also added in a simple fade-in CSS animation. I’m aware the characters look wonky, which is because I don’t have the original font and ended up having to trace it by hand.

Currently back to work on the character setup screen. I’ve added some sliders, but they use arbitrary values since the original sliders aren’t in the code dump. There are some references to comboboxes, but I’m not sure if that’s some old, dead code that was floating around. I can probably find them in the .fla, but I don’t feel like fighting with CS6 today.

I’m also going to have to figure out how to export the character view morphs to SVG. I can see and export the morphs, but they’re only available as .fla or .swf. Currently looking at options.