Stabyourself.net Wiki
Advertisement
D1STd

 'No Mario's Sky',  -Parallax scrolling, because it makes everything sexy.

Custom Backgrounds are a Level Flag in Mari0. They show up behind the level, with parallax scrolling if there are multiple layers.

Usage[]

Simply place any .png image in the "backgrounds" folder in your mappack. To add multiple layers, add incrementing numbers starting with 1 to the end of each image name. The higher the number, the lower the layer, and the further away it is from the level. If there are any places where the background is transparent, the background color will show through it.

Backgrounds can be any size, but the normal screen size is 400x224.

Some older versions require numbers at the end of the title, even if it's only one layer.

Foregrounds[]

Foregrounds are exactly the same as backgrounds, even using the same pool in the same directory. As the name suggests, they are not only rendered above the level, but HUD text as well, meaning they can block vital information if not used carefully.

Pre-SE[]

Adding backgrounds worked very differently in previous versions. To add one, the image name must be the same as the level (including the sublevel) with background added to the end (i.e. For 1-1, you would name it "1-1background1.png"). To add multiple layers, increase the number at the end.

Additionally, you can omit the level (i.e. "background1.png") to replace the default background. Note that aside from the default background, you cannot use the same background more than once; instead, you have to make a copy.

Backgrounds should be placed in the same directory as the levels themselves.

AE V12 (Animated backgrounds)[]

In Alesan's Entities a new feature was added that allowed for animated backgrounds, they work like regular backgrounds (with extra frames if they need them). but you also need a .json of the same name. They work like custom enemies but with their own commands.

Properties are formatted in the manner below, though note that the values given are only examples, and not meant to be used in earnest.

"integer": 2 (Can be any whole number)
"decimal": 0.2 (Can be any number with a decimal point)
"array": [value, value] (Will be labelled integer/decimal/boolean)
"boolean": true/false

Although the properties are listed in camel-case, they are case insensitive when used in-game. (MeAnInG tHey CaN Be TyPeD liKe ThiS aS loNg as THeY aRE tyPed CorReCtlY)

V12[]

  • "quadCountX": Integer - How many frames are across the X-axis.
  • "quadCountY": Integer - How many frames are across the Y-axis
  • "frames": array[Integer] - The sequence of frames for example [1,2,3,4,3,2,1]
  • "delay": Decimal - The delay between frames.
  • "speedX": Decimal - The speed of the background across the X-axis.
  • "speedY": Decimal - The speed of the background across the Y-axis.

V12.1[]

  • "staticX": Boolean - The background will not scroll on the X-axis.
  • "staticY": Boolean - The background will not scroll on the Y-axis.
  • "static": Boolean - The background will not scroll at all.

V13b[]

  • "clampToLevelWidth": Boolean - Scroll factor will be ignored, the background scrolls from one end to the other automatically
  • "clampToLevelHeight": Boolean - Scroll factor will be ignored, the background scrolls from one end to the other automatically

If you are still struggling check out Alesan's examples

Version History[]

  • Mari0 1.5: Introduced.
  • Mari0: SE Beta 1: Changed to use a folder, foregrounds added.
  • Mari0: AE V12: Added animated backgrounds and a few properties.
  • Mari0: AE V12.1: Added a few more properties.

Further Reading[]

Advertisement