Snakeloop

Snakeloop

Not enough ratings
Official Modding Guide
By Vlad
Official Modding Guide for Snakeloop, explaining how to play mods, create mods & upload them to the Workshop.
   
Award
Favorite
Favorited
Unfavorite
Downloading / Importing Levels - Steam Workshop
  • Step 1: Browse the workshop & press Subscribe on the mod you want to try.
  • Step 2: Wait for the workshop content to be downloaded on your Steam client.
  • Step 3: Launch the game & the mod should now appear in the Extra Levels menu. If your game was already launched, you'll have to restart it, as mods are currently only checked at game launch.
Downloading / Importing Levels - Non-Steam Workshop
  • Step 1: Either download a mod through whatever means online or make your own (more info below).
  • Step 2: Put the mod's folder inside the "Levels" folder within the game's files. You can go to the game's files through right-clicking on the game in your Steam library, Manage -> Browse Local Files.
  • Step 3: Launch the game & the mod should now appear in the Extra Levels menu. If your game was already launched, you'll have to restart it, as mods are currently only checked at game launch.
Creating Levels - The Basics
So, to make it simple, Snakeloop's levels are simple pictures with the game then reading each pixel & converted them into the game's different objects (Wall, Floor, Snake, Fruits). The level files are shown within the game in the Level Selection menu.

Levels are simple .png pictures. .jpg files are also supported although don't include any transparency.

The only tool required is any software that can be used to create images with pixels. Pick whichever you want whether that be Aseprite, Gimp, PaintNET, Photoshop, etc... or even just plain old MS Paint (although not recommended due to the lack of transparency support, it still works).
Creating Levels - Folder Structure
A mod is simply a number of level files (could be 1 or 50) in a folder.

When creating your own levels, this folder should be located in the Levels folder within the game's files. (see the Importing non-workshop mods section above)

The name of the Folder will be the name displayed in game for your Mod and Levels files have to be put directly into them.

When the game is launched, it will check all of the mods folders within Levels/ as well as the levels within them.
If files are modified/added/removed/renamed while the game is running, you'll have to relaunch it to see the updated files.
Creating Levels - Naming, Ordering & Optimal Solutions
Levels within a mod are ordered alphabetically (A->Z). To ensure proper order of your levels, they should be named properly and use IDs (see below).

The number of moves of the Optimal Solution are also written directly in the Levels' file names.
If no Optimal is given to a level, a neutral ✯ will be shown on completion instead of the empty ☆ for completed & full ★ for optimal.

A normal level's file names are structured in 3 parts, each separated by an underscore: ID, Name & Optimal Solution. However, it isn't mandatory to have all those parts.

Here are some examples:
File Name
Format/Structure
Displayed Name
Optimal
Explanation
My Level.png
NAME
My Level
N/A
File name has a single part => It's a simple name with no extra infos.
My Level_10.png
NAME_OPTI
My Level
10
File name has two part => 1st part is still the Name while 2nd is the Optimal.
A01_My Level_10.png
ID_NAME_OPTI
[A01] My Level
10
File name has three part => 1st is an ID (in brackets), 2nd is the actual name and 3rd the Optimal.
A01_My_Level_10.png
ID_NAMEPT1_NAMEPT2_OPTI
[A01] My Level
10
File name has more than three parts => 1st is always the ID, middle ones are the different parts of the Name (with underscores being replaced by spaces) and last one remains the Optimal.
A01_My_Level.png
ID_NAME_OPTI
[A01] My
N/A
File name has three parts, however the last one is expected to be the Optimal but ends up N/A as it can't be parsed as a number.
Also, the name parts go through the game's localization system and so can display differently if given a proper key. Ie. putting "titleLevelsA" (key for the game's first chapter) will show up as Acquirement in English and Acquisition in French. All localization keys start with lowercase characters, if you want to avoid any conflicts.
Creating Levels - Color Guide
The game uses White, Black, primary colors (Red/Green/Blue) and secondary colors (Yellow/Cyan, excepted Purple which is unused).

Color
Object
White
Wall
Black
Floor grid
Red
Snake
+ floor
Green
Basic Plus Fruit
+ floor
Blue
Basic Minus Fruit
+ floor
Yellow
Infinite Plus Fruit
+ floor
Cyan
Infinite Minus Fruit
+ floor
Purple
Nothing/Not Used
Transparent/Void
Nothing
Note: Colors used don't have to be pure ie. a color with RGB values of (200,150,100) for instance will be read as (255,255,0) with each value being rounded to either 255 or 0. Same with transparency.

'Closed' Level vs 'Open' Level
Whether a level is 'Closed' (infinite walls outside the level) or 'Open' (infinite ground outside the level) is done automatically. If any Floor touches is on the image/level's edges then the Level is considered open, otherwise it is closed.
Creating Levels - Designing your Level
The creative part of making your own levels, although not one that can be really helped with in a guide as it'll be unique to each level.

The advices I can give are:
  • Play the game a lot to understand the game's mechanics and how levels can be crafted around them, also feel free to get inspiration from the game's existing levels
  • There's kinda two ways I designed the levels for the game. First is to think of individual mechanics & tricks, then how a level can be built around those (works well for compact levels focused on specific tricks). Second is to start from a general layout & rough level "type" (works well for complex looking levels and/or interesting layouts).
  • Test your levels a lot, try various ways to finish your levels, even if they're not the way you intended them (especially to find optimal solutions or ways a level could be cheesed).
  • Iterate on level, analyze how they can be finished (or why they can't). Now, what if you moved a snake's starting position, or some fruits or a wall, etc... Simple changes can sometimes make huge differences on a level's solutions.
  • I recommend to note down somewhere the optimal solutions you find so you don't forget them
  • While in theory there's no maximum dimensions for level and performance-wise the game can handle levels up to 100x100 pretty fine, making huge levels might not be the best.

Best practices that you might want follow when making levels
Here are some design 'rules' that could be considered best practice when designing levels to avoid any weird or unclear behaviors.
Even if all of the levels included within the game strictly follow those rules, they're not exactly mandatory and levels can be created without following them.
Design 'Rule'
Behavior when broken
No Fusion should be possible with a Snake still in its "Init" state
(Two Snakes shouldn't be able to join each other without both of them having moved)
(also, Two Snakes shouldn't start adjacent to each other)
Two things here, depending on which of the Fusing & the Fused is in "Init" state..
  • If the Fused Snake was in Init state, then the head of the resulting Snake will remain in Init state (unless it also moved at the same time), meaning the new Snake will grow on its next move, regardless of its length.
  • If the Fusing Snake was in Init state, then its initial growth will be skipped.
Snakes shouldn't be able to eat a Fruit from their "Init" state
(Snakes shouldn't start adjacent to a fruit)
  • Plus fruit: Snake will eat the fruit and grow but also exit the init state. (basically losing the free growth from the Init state)
  • Minus fruit: Snake will eat the fruit and remain at the same size while no longer being in its init state.
If a level isn't enclosed by Walls then it should always have a Floor touching the edges.
(Crop your levels & place floors 'properly')
Open/Closed level detection will fail with the level being identified as Closed yet with thee Snake being able to go outside.
This means that the whole background will be colored as walls and walls being invisible unless they're adjacent to a floor and so have visible edges (also there'll be a couple issues with the walls edges being off).
Uploading Levels - Uploading your mod to the workshop
  1. Solve perfectly your Mod within the game (including optimal solutions if you've put any).
  2. Select your Mod by launching one of its levels.
  3. Open the Pause Menu & go to Settings (without going back to the main menu)
  4. An "Upload Mod" button should be there, once you press it, it will become greyed out until the upload has finished.
If the "Upload Mod" button isn't visible, then there's an issue with the previous steps.

To update an existing mod, it's the same process.
Uploading Mods - Publishing on the Workshop
After the upload, you still have to finish the process within the Steam Workshop directly to make your mod visible to the public.
  1. Open the game's Workshop on Steam (can be done from the Steam Library or from the game's Communtiy Hub.
  2. On the right side of the screen, hover on Your Files -> Files you've posted. This will open the page listing all of your uploads.
  3. Open the page of your mod.
  4. Feel free to edit the info of your mod (ie. description, image, etc...). Note that modifying the Title there won't change the displayed title in game. The preview image won't be displayed within the game either.
  5. Once you're ready, click on Change Visibility on the right side and switch your mod to Public.
  6. Other players will now see your mod and be able to test the levels you've created.
Bonus - Video Levels
The game can serve as a (pretty bad) video player and render them as if they were levels, with the music playing.
Ie. Here is an example render of Bad Apple!! within the game: https://www.youtube.com/watch?v=nJWniATU0Mk

The game will play the audio of the video and render the video's frames just as if they were levels.

Video will be automatically resized to a maximum of 64x64 (16:9 will be 64x36, 4:3 64x48) with frames being read & rendered 30 times per seconds.
Those maximum resolution of 64 and framerate of 30 can be changed through editing the game's settings file manually, just that it isn't shown within the game's settings menu. Although going to higher resolutions might result in lags

Video files will have to be put in a mod's folder the same way as levels (and it will always be listed in the game after the levels), following the same rules as normal levels basically.
Pretty much the only thing that is different is that the optimal solution part will be ignored, with a video level always showing the 'neutral' ✯ completion star once completed.
Also, there's no preview of Video Levels within the Level Selection menu.

VP8 format & codec is recommended for cross-platform support as supported formats depend on platform (lots on Windows, few on Linux).
You can find the full details on supported formats & codecs per platform in Unity's documentation[docs.unity3d.com]
If the video format can't be read, a kind of "No Signal" picture with bands of colors will show up instead.