Log In  


All the other sprites seem fine but 000 always places for me like its blank.

Here's a gif of the bug in action:

1


Sprite 000 is a special case and is always blank/transparent. I usually draw an x in it to remind myself not to use it.


Haha, I did not know that. That explains it. Thanks.

There's a lot of half-documented stuff out there like this, I would pay handsomely for a richly designed beautiful full colour manual that detailed all of this while just oozing with pixel art and style.


Cute sprites!


Haha I didn't know that either, I just learnt to avoid using it because it never worked, thanks for clearing that up :D


"exception: sprite 0 is always taken to mean empty."

There's also some situations in which pico-8 will put an x there for you, but I'm not quite sure what they are.


It is tile 0 not sprite 0 which have a special meaning.

When making a map tile0 is alway a full transparent tile, but you can still use it as a sprite!


As has been said, it's in the manual but easy to miss


Why it is so anyway? I mean, if I want to clear some part of map, I can just use any other unused (and therefore transparent) tile.

Seriously, it always came to me as an artificial limitation.


In computer design it's a common thing to have whatever is at 0 to be a null/blank/zero value. You need one such special case (because reasons) and zero is the easiest value to remember.


As far as I can remember every tile editor since Mappy (1998) has used this method.


I find it weird that it refers to it as "tile 0", yet Lua is 1-based for indexing. It always throws me off, since I can never seem to recall which is 0-based and which is 1-based, it's rather strange sometimes.

Another weird thing is trying to figure out when it displays the token count versus the character count in the code editor. I think it's supposed to show the char count whenever you're working with an unterminated string, but if I fill the first two or three lines of my code with comments (eg author/date comments) it'll "break" and default to char count for the entire code (unless the first 8-12 characters of the file are actual, usable tokens)


Danjen: Clicking the count bar will toggle between char count and token count; you probably clicked it by mistake and didn't notice. (It took me ages to notice this too.)


Ahaha, sure enough that was the problem. I feel like a dummy now. Thanks


@darkhog:

I can illustrate why it's good to have map tile 0 be forced transparent by the system.

To simplify, let's pretend that the system only provides 4 tiles, shared between map and sprites.

Given that, let's make a simple co-op platforming game with a simple background. We'll call it RGB Infinity.

RGB Infinity has simple solid white blocks for its ground and platforms. Maps need only the solid white tile and a transparent tile.

RGB Infinity has two simple players: a red open parenthesis and a blue close parenthesis.

RGB Infinity has one manic AI the two players have to cooperate to capture between them: a green X.

If we set up our tileset like this:

0 - green X
1 - solid white
2 - red (
3 - blue )

We can then draw the map with this effective tileset:

0 - forced transparent
1 - solid white

And the sprites with this:

0 - green X
2 - red (
3 - blue )

If we didn't have tile 0 forced transparent when used for the map, we'd need this tileset instead:

0 - transparent
1 - solid white
2 - red (
3 - blue )
4 - green X

And, oops, we couldn't fit the game in 4 tiles anymore.

So effectively we get one more usable sprite tile by having the system force map tile 0 to transparent.


1

As an aside to zep, I think the map editor ought to show tile 0 as transparent in the tileset, regardless of its actual contents, so that the editor will be more wysiwyg.



[Please log in to post a comment]