Tips for golfing in MarioLANG

10

3

I recently saw this language in a challenge and it's awesome. Does anyone have some tips for ing in it?

Your tips should be at least somewhat specific to MarioLANG.

Please post one tip per answer.

atirit

Posted 2019-09-20T02:44:01.770

Reputation: 217

1I may post some later – HighlyRadioactive – 2019-10-04T03:37:22.147

Answers

3

Use the fall at the end for instructions

This is a pretty simple tip but many MarioLANG programs end something like this, ending with Mario falling down:

.....
=====

and this can be written instead as this:

....
===.

saving two bytes.

If your program has an elevator near an end like this you can often improve even further. This:

]!......
=#======


 <
="

goes to this:

]!.
=#.
  .
  .
 <.
=".

You do have to be careful with the last one though, since the added spaces to get to the final instructions can in many situations be more costly than just writing it largely on one line.

CoedRhyfelwr

Posted 2019-09-20T02:44:01.770

Reputation: 272

1

Duplicate input

Sometimes, you will need multiple copies of a given input - here is a 27 byte snippet that will do this.

>[!
"=#
- )
( +
( )
!+<
#="

Alternate 39 byte horizontal version:

>      [!
"=======#
!-((+)+)<
#======="

Before:

Memory Pointer: ˅
Cell          : n 0 0

After:

Memory Pointer: ˅
Cell          : 0 n n

CoedRhyfelwr

Posted 2019-09-20T02:44:01.770

Reputation: 272