Skip to content
Supreme Overlord edited this page Jul 27, 2021 · 30 revisions

Welcome to the HTML5-MOTAS wiki!

This is where I'll be charting my progress and posting updates on the project.

Any demos will be hosted here on the github page.

BTW, I am using JPEXS Decompiler, which has been the best Flash Decompiler out there for a long while now. Despite the fact that it's built on Java, it's still pretty fun to use. I got a lot of utility out of it back in the day. I remember using it with Scanmem to build an aim assist for a horribly unbalanced tanks game, much to the chagrin of the other players. And of course, there were the high scores on game sites. Good times.

27 July 2021

Finished level 6.

25 July 2021

Finished level 5.

16 July 2021

Finished level 4. Did some bug fixes. Starting work on level 5.

20 February 2021

Continuing to work on level 4. Have all scripts translated. Now begins the usual debugging.

08 February 2021

Started working on level 4. It looks like the new version of the decompiler hasn't given us any whammies so far. Did run into this interesting gem (paraphrased):

if (clip.visible ne 0)
{
  // ...
}

If you didn't know, visibility eventually became a boolean (true/false) in AS3 and carried over into EaselJS, so this is just:

if (clip.visible)
{
  // ...
}

I guess maybe the decompiler isn't very good at optimizing when it decompiles. This also happens in nested if statements that can be combined quite frequently. Oh, well. Maybe next version.

06 February 2021

I did it! The playable demo is now live! See link at top of page to get to the demo. The music player should also work as well as a level selector.

27 January 2021

Well, the repo has working code now. I've added some OGG renders of the midi tracks for future use. Also, I've added some "remastered" files using a custom soundfont using MuseScore3. It's noticeably missing a few things, though. Maybe I'll get back to it sometime.

21 January 2021

  • The rat is apparently saying "yes" and "no" when it moves. Cool. Anyway, I got it working.
    • Fun AS2 fact: Dynamic Text box values used to be bound to variables. Nowadays, you give the textbox an instance name and set the text property.
  • Next, I plan to stop being lazy and clone the repo locally in order to manage it, so the actual repo should get an update soon! Yay! Never mind, that was easy.

19 January 2021

  • Floor logic works, and the rat puzzle works!
  • Also, the JPEXS decompiler just got an update that seems to fix the issue with the variables getting dropped!
  • Last touch is that I have to get the rat to rotate and "talk". Once that's done, I'm off to work on the demo page.

17 January 2021

  • Floor logic recoded. To give some context to what I have to deal with, the floor actions were decompiled as:
if(name_3 eq "1")
{
	stop();
}
else if(name_3 eq "2")
{
	stop();
}
else if(name_10 eq "two")
{
	if(name_11 eq "three")
	{
		if(name_12 eq "three")
		{
			if(name_13 eq "two")
			{
				if(name_14 eq "four")
				{
					if(name_15 eq "one")
					{
						if(name_16 eq "one")
						{
							if(name_17 eq "four")
							{
								gotoAndStop("newroute");
								play();
							}
						}
					}
				}
			}
		}
	}
}

After translation and refactoring, this becomes:

if (exportRoot.floorSln.every(
	(tileState, i) => exportRoot['floor' + (i + 1)].pos === tileState
))
{
	this.gotoAndPlay('newRoute');
}
else
	this.stop();

Gotta love ES6. Will begin testing this next.

16 January 2021

  • I suspect a lot of the game's variables and symbols were borked by the decompiler. Also, using Strings where Booleans or Numbers should have gone is just such an antipattern, so I've decided to just re-code the game logic myself. I'm working on the diskbox trap logic then the floor puzzle next. Level 3 is much more complex than the two preceding ones...
  • Mild setback with losing some progress as I overwrote some initialization scripts on accident. (The Animate action editor makes it very easy to do that.) I'm just about caught back up though. Luckily, I'd published the original scripts before, so there was at least a non-zero checkpoint to return to. Still, very frustrating. Adobe doesn't seem to be interested in improving the UI/UX for the action editor, so I'll just have to keep a spare Sublime Text tab open and use it as a copy buffer. Seriously, the editor has not noticeably improved in any way for the past 5 years at least. I can't believe this dumb thing costs as much as it does.
  • Sorry about not updating. Once again, work has picked up a bit. Silver lining here is this stupid Adobe license is costing me 30 bucks a month, so I'm more motivated to get my money's worth from this.
  • I have published a GH page (link above). If all goes right, any demos will be hosted there. Nothing important is on there for now, though.

04 January 2021

  • Made significant progress on level 3.
  • Since repeated AS2 translation is tedious, I decided to make a transpiler for it. A bit of a WIP, but hopefully, this should make my future work more efficient.
  • Made some custom preloader animations. A preloader is needed because the game relies on the inventory being ready.
  • I'm really hoping Jan's coding and flash skills improved over the next few levels as reading the old code and guessing intentions without any comments to read is really quite a bear. (Sorry, Jan. Still love the game!) There are just so much code repetition and odd design choices all over the place.

03 January 2021

I worked out some kinks with the new inventory system, and I'm done with the new level 2. Began working on level 3.

No, I've not uploaded any of the re-done levels yet. I'll do that when I've caught up to where I was before. (Make a demo maybe?)

01 January 2021

Happy New Year! (Or Happy Holidays if you don't celebrate Gregorian new years.)

I got the new efficient inventory working with the re-done level 1! I'm a little too busy coding this to make a new demo. I'll try to make one once I'm back on level 3. Also, Firefox is now telling me that I shouldn't be making synchronous AJAX calls anymore, so that'll be fun...

I'll go ahead and release the library code I'm using just in case something happens.

PS- I have become aware of the Ruffle project. It looks super cool, but browsing around on Homestarrunner.com it still appears to be a bit glitchy. I hope it takes off someday, but right now, I don't think I'll be using it.