Can you manipulate with pixels to make for example 1x1 orange pixel as sprite?
Which platform? Pico-8? Tic-80? Something else?
I was searching for a similar thing for Tic-80 and found these, but I haven’t tried it yet:
https://github.com/nesbox/TIC-80/wiki/code-examples-and-snippets#setget-spritesheet-pixel
https://github.com/nesbox/TIC-80/wiki/spr (first code example starting with -- spr demo
You’re welcome!
But I don’t see an advantage to using a sprite for one pixel. I’m thinking you have x & y variables, so if you’re drawing the screen every TIC()
I think you’d clear the screen and redraw everything. So draw whatever the pixel might collide with first, then use pix to read the color of where the pixel will be, and if it’s the color of the colliding object then you have a collision. Otherwise, use pix again to write the pixel orange or whatever.
I haven’t programmed a line of Tic-80 code yet, though…I’m just getting this from reading Itch and the Tic-80 wiki.
The jam doesn’t allow sprites,
Oh? I thought it was external sprites. If you poke a sprite in from the 560 chars of code is it still not allowed?
I don’t even know yet if that’s plausible to do in 560 chars, but I was going to try it at least once. I was going to try OP’s 1-pixel sprite example then realized there’s no advantage to doing so for a single pixel in Tic-80.
Here is a poked 1-pixel sprite for TIC-80. I think it’s pointless, but poking in a more complex sprite might be doable.
I just wanted to try it out and provide a working example.
-- Fill a sprite with zeroes
for i = 0,31 do
poke(0x4000+i, 0)
end
-- Poke a palette 9 pixel in the sprite
poke4(0x8000, 9)
x=50
y=50
function TIC()
y=y+1
x=x+1
cls()
-- Sprite with 0 as transparent
spr(0,x%240,y%136,0)
print("Poked sprite")
end