Troubleshooting - earok/scorpion-editor-demos GitHub Wiki
All platforms
Actors
Why does my actor go through a wall when I change actor type?
This is typically because the two actor types have different collision boxes. Collision detection in Scorpion only prevents walls from being entered, it doesn't prevent moving inside them if a wider collision volume overlaps the inner tile.
The safest way to handle it is to use identically sized and positioned collision boxes for both actors. You can check the position data in the lower left of the actor tab.
I have wall collisions turned off in every direction, but the actor still cannot move outside of the level.
Broadly speaking there are two solutions for this:
- Set the "Ghost Thru Walls" flag which will remove all restrictions on movement, as well as provide a slight performance boost.
- If that isn't possible for your movement type, increase the empty space around the map on the map tab.
I have more than 256 actors and I need more!
The 256 actor limitation is only for actors spawned from the tileset. For actors that are only spawned in code (or spawned from Tiled templates), simply delete the Tile ID in the actor tab to make more room.
Blocks
I have more than 256 blocks and I need more!
Unfortunately that is a hard limit for blocks, as blocks are stored in a big byte array for levels. This may be resolved in one way or another in future.
Code
When compiling, Scorpion complains that I have too many variables
Currently, Scorpion has a 4KB space that it uses for codeblock variables.
This is going to go up over time as more and more of Scorpion's internal logic is replaced with codeblocks, but you can use the "Look Up Table" feature for data that is read-only and will not count towards that limit.
Why does the result of a calculation seem wrong?
Check the Expressions page for details about the quirks of the expressions engine
Crashes and glitches
When the game crashes, what does memoryoffset mean?
This number you can cross reference with the debug.json file in the output folder to work out what codeblock logic was running just prior to or just after the crash.
What is Extra Bugs?
Extra Bugs (formerly the same as disabling Safety Rails in 2024.2 and earlier) allows for finer tuning of a Scorpion Engine game that is normally disallowed due to the risk of causing visual glitches or even crashes.
You can enable this mode for extra power if you need, but please do not report any bugs that only happen with this tickbox turned on.
What is a watchdog error?
Typically, this is caused by an infinite loop, or a loop missing a "Wait" or "Yield" command to allow the engine to update. It happens when about 5 seconds pass without any regular refreshes.
It can also be caused by internal engine errors, so please do report this if it doesn't appear to be caused by the above.
What is an address error?
This should never happen - if it does, it indicates a problem within Scorpion's core code base. Please report this if it happens.
Graphics
Why is the color on my actor or block or tile completely different to the source image?
Typically, this is because, if a source PNG is indexed (256 or 16 color mode), the indexes are enforced strictly.
Say, for example, color #5 on your PNG is red. If color #5 on your source palette (the project palette, or the palette of the linked level or asset bundle) is green, then the color will be rendered as green in game.
The two solutions are:
- Change your PNG to 16 million color mode. If you do this, Scorpion will automatically take care of matching colors to the source palette.
- If you still want to maintain absolute control over indexing, make sure the indexes of the image perfectly match the source palette. Simply using your art program to import the palette from the project/level/asset bundle palette PNG may be enough.
Similar to above, but the color is only a slightly different tint to expected.
Excluding AGA 24 bit color, all supported platforms will have slightly off colors unless you use exact values corresponding to the hardware. For example, Mega Drive has 9 bit color, OCS Amiga has 12 bit color, and NeoGeo has 15 bit color.
Amiga
Crashes and glitches
Why did my game Guru?
This shouldn't happen and may indicate a bug within Scorpion itself. Please report if this happens.
Floppy disk
I can't fit my game on one floppy disk
Multiple disk support will come in future, but for now:
- Consider using the extremely tight ZX0 compression algorithm, which has the slowest crunch times but the best ratio available in Scorpion.
- By default, each level has its own tileset dynamically generated out of the tiles that the level actually uses in order to keep memory usage as low as possible, including "flattening" each combination of tile on every layer down to a single tile. Thus, in order to save memory and disk space on a given level, you can simply reduce the number of tiles used and the variety combined across multiple layers.
- However, keeping memory usage low in this manner can use up additional disk space since every level will have copies of repeatedly used tiles. In fact, games with very simple graphics like Mario can use an enormous amount of disk space just for tiles if there are many, many levels. As such, I recommend parenting levels with a similar look and feel together - if you have three Desert levels for example, make the parent of Desert2 and Desert3 to be Desert1 so they all share the same generated tileset (or, if you have the memory space for it, consider making level1 the parent of every single level). This will also reduce disk loading.
- The size of mod files can sometimes be slightly reduced by using the Sample trimming features of OpenMPT.
Graphics
Is it possible to use the AGA sprite wrap mode on only some sprites?
No, it's an all or nothing feature enforced at the hardware level.
Some of my four color sprites seem to be missing
Unfortunately Scorpion is constrained by the hard-coded sprite order of the Amiga, which is
- 7-8 (bottom, farthest in the background)
- 5-6
- 3-4
- 1-2 (top, closest in the foreground)
You may need to adjust your Z order so, for example, your four color sprites that use channels 7-8 have the lowest Z value.
Panels
How do I reduce the black bar between panels and the main game area?
- Switching off "Override Game Palette" is the easiest way to do this, though it comes at the cost that the panel cannot have it's own palette and must share with the game display.
- If the above isn't an option, reducing the color depth of the panel will reduce the number of palette operations needed, reducing the minimum size of the bar.
- If neither of the above are applicable, you could always turn on Extra Bugs mode and set it to whatever size you want - though as the name implies, this could cause major issues.
It's possible that Scorpion's calculation of the minimum panel gap is overly conservative, so Extra Bugs mode could possibly be used safely in some cases, but I wouldn't rely on that.
Mega Drive
Maps
Scorpion is telling me my map has too many tiles.
The Mega Drive only has 64kb of Video RAM, and Scorpion reserves 48kb of that for tile patterns. That only equates to about 384 tiles, excluding flips and such, and is shared with the area for streamed sprites.
You can try switching your map into dynamic mode so the map tiles are streamed into the VDP as needed, but you'll want to reduce the buffer size on the project tab as small as you can get away with (for example, a buffer size of 32x16 requires 512 tiles, too many to fit into memory). Simply reduce the buffers on both axes until you notice glitches, and then increase until you don't see the glitches anymore.
Panels
Why can't I have a simultaneous top and bottom panel?
Unlike on Amiga and NeoGeo, there's no simple way to do this. But there is a couple of workarounds:
- You can simply draw the top, bottom or both bars on a parallax panel.
- You could also have a top panel or a bottom panel that's the size of the screen with a large transparent area for the gameplay, though this will consume the whole of Layer A making it impossible to use simultaneously with a parallax layer.