4 ms·
Did they use a transpiler or something for the mobile version? Lot of magic numbers and odd code like this if (t == 0) t = 0; if (t == 1) t = 20; i
by CodeArtisan 7y ago
Did they use a transpiler or something for the mobile version? Lot of magic numbers and odd code like this
if (t == 0) t = 0;
if (t == 1) t = 20;
if (t == 2) t = 14;
if (t == 3) t = 15;
if (t == 4) t = 13;
if (t == 5) t = 16;
or
case 17:
blocks[k].prompt = "Press ENTER to activate terminal";
if(mobilemenus) blocks[k].prompt = "Activate terminal";
blocks[k].script = "terminal_warp_1";
setblockcolour(k, "orange");
trig=0;
break;
case 18:
blocks[k].prompt = "Press ENTER to activate terminal";
if(mobilemenus) blocks[k].prompt = "Activate terminal";
blocks[k].script = "terminal_warp_2";
setblockcolour(k, "orange");
trig=0;
break;
case 19:
blocks[k].prompt = "Press ENTER to activate terminal";
if(mobilemenus) blocks[k].prompt = "Activate terminal";
blocks[k].script = "terminal_lab_1";
setblockcolour(k, "orange");
trig=0;
break;
from https://github.com/TerryCavanagh/VVVVVV/blob/master/mobile_version/src/entityclass.as https://github.com/TerryCavanagh/VVVVVV/blob/master/mobile_v...
- spiralganglion 7y agoThis just looks like typical game dev code to me. You treat the code like a scratchpad, exploring the space and looking for things that work well. Lots of things written once and never touched again, lots of things written with magic numbers because that makes it easier to delete.
- kevingadd 7y agoIt was hand-ported from Flash. I can imagine it being harder to do better than that in ActionScript especially if it was an older version.