Log In  


Cart #spoiderboi-0 | 2021-09-14 | Code ▽ | Embed ▽ | No License
11


Controls: Tap Z to grapple, or release from swing

This is my submission to the #Pico1k jam, a jam challenging people to make something in PICO-8 using no graphical or sound memory, and only 1024 characters of code! I had to cut back a lot of my original expectations to get it under the size limit, but I'm glad that I was still able to submit something playable!

11


2

This is pretty fun, you actually managed to capture a bit of the feeling of swinging in Spider-Man 2/ Spider-Man PS4.😊

One addition that would be nice is a time and/or distance readout so you can go for a personal best. If you removed the spaces between the variables defined as numbers at the beginning of your code, there would probably be room for that. Also, you could remove the _init() loop from around your definitions.


@JadeLombax

Thanks for the kind words and thoughtful critique! I didn't know that about removing the space between variable declarations, I'll definitely keep that in mind! I actually tried to save a few characters with labels and goto statements instead of an update loop, but they were causing a bug that I couldn't fix, and still can't quite figure out, so I had to take the hit and leave the functions in😅 I'll definitely need to get on top of that for the next one of these jams!


You're welcome.

I did a bit of hunting through the code, and the only problem I found with removing the init() function was an error due to it needing to be called to reset values. You can replace that by calling run(), though, which resets everything like the cartridge just restarted. Just by doing that and putting the variables on one line, it goes down to 985 chars, enought to put in a timer or such if you'd like.;)

a=0.18l=28p=64q=64f=0t=1s=0d=1j=0k=0g=0.09x=40y=70
r=rectfill
m=camera
n=sin
b=cos
e=btnp
o={}
for i=1,19 do
o[i]=flr(rnd(104))+8
end
function _update()
cls()
m(x-30,0)
for i=0,7 do
?"ˇvˇˇv\+0w\f1░\+0w░\+fw░\+0w░\+fw░\+0w░\+fw░",(i*32)+128*(flr((x-30)/128)),0,13
?"∧∧∧∧",(i*32)+128*(flr((x-30)/128)),124,13
end
for i=2,19 do
r(i*64,o[i],(i*64)+19,o[i]+7,9)
if s<2 or s>3 then
if (x-1>=i*64 and x-5<=i*64+19 and y<=o[i]+7 and y+4>=o[i]) or y+1<=1 or y+3>=126 then
s=2
j=0
k=0
f=0
?"\a",0,0
end
if x>1282 then
s=3
?"\asccegc4",0,0
end
end
end
fillp(0xa5a5)
r(1282,0,1286,127,10)
fillp()
if s==0 then
c=d*(a*(b(0.5-((f/40)*0.5))))
u=x
v=y
x=p+(l*(-n(c)))
y=q+(l*(b(c)))
line(p,q,x,y,6)
if e(4) then
s=4
j=x-u
k=y-v
end
f+=1
if f>=40 then
f=0
d=d*-1
end
elseif s==2 then
f+=1
if (f>=30 and e(4))run()
y+=k
k+=g
elseif s==3 then
if (e(4))run()
else
x+=j
y+=k
k+=g
if e(4) then
s=0
f=13
d=1
?"\ai6v1g",0,0
c=d*(a*(b(0.5-((f/40)*0.5))))
p=x-(l*(-n(c)))
q=y-(l*(b(c)))
end
end
?"オ",x-7,y,8
end

1

@JadeLombax
Ah, brilliant! Cheers for that! :)


1

Get rid of that update function and remove a few whitespace characters and you've got 930chars! Almost 100 extra chars to work with! I also think a timer would be a great addition. This is ripe for a speedrun challenge.

a=0.18l=28p=64q=64f=0t=1s=0d=1j=0k=0g=0.09x=40y=70r=rectfill
n=sin
b=cos
e=btnp
o={}for i=1,19do
o[i]=flr(rnd(104))+8end::_::camera(x-30,0)for i=0,7 do?"ˇvˇˇv\+0w\f1░\+0w░\+fw░\+0w░\+fw░\+0w░\+fw░",(i*32)+128*(flr((x-30)/128)),0,13
?"∧∧∧∧",(i*32)+128*(flr((x-30)/128)),124,13
end
for i=2,19do
r(i*64,o[i],(i*64)+19,o[i]+7,9)
if s<2or s>3then
if (x-1>=i*64 and x-5<=i*64+19 and y<=o[i]+7 and y+4>=o[i]) or y+1<=1 or y+3>=126 then
s=2j=0k=0f=0?"\a",0,0
end
if x>1282then
s=3?"\asccegc4",0,0
end
end
end
fillp(0xa5a5)r(1282,0,1286,127,10)fillp()if s==0then
c=d*(a*(b(0.5-((f/40)*0.5))))u=x
v=y
x=p+(l*(-n(c)))y=q+(l*(b(c)))line(p,q,x,y,6)if e(4)then
s=4j=x-u
k=y-v
end
f+=1if f>=40then
f=0d=d*-1end
elseif s==2then
f+=1if (f>=30 and e(4))run()y+=k
k+=g
elseif s==3then
if (e(4))run()
else
x+=j
y+=k
k+=g
if e(4)then
s=0f=13d=1?"\ai6v1g",0,0
c=d*(a*(b(0.5-((f/40)*0.5))))p=x-(l*(-n(c)))q=y-(l*(b(c)))end
end
?"オ\^1\^c",x-7,y,8
goto _

1

This is great, @Soundole. Gold star work. And yes as mentioned earlier this is reminiscent of Spider-Man. Certainly better than the Atari 2600 release. Good curve in swinging action.

You might make it more challenging by requiring the person to swing on the block above them. Meaning when you press (O), then the length of your swing is determined entirely by the distance of the block just above you and it will use that as a connecting point.

If there is no block, then you cannot swing.

That should definitely make it more challenging. :)


Thanks @dw817! I'm glad you think it works :) I definitely thought about doing that kind of attaching to obstacles, but I think it would have probably blown out the 1k code limit. At least, it would if I was writing it - I would bet that it's definitely possible to do that in 1k!


Thanks @Troypicol! I've definitely found some new ways of squeezing code in Pico-8 from this jam - I didn't know so many spaces could be done away with!


1

I absolutely adore simple, well-executed ideas like this! There's a surprising amount of depth to Spoiderboi's movement and it's so very replayable.

Also, I like to think that the orange rectangles are bug-poison-tape that kills on touch. Spoiderboi is tiny.


1

@Soundole, I'm definitely seeing a full-fielded game that may very well go beyond 1k.

To have great sprites, sound, animations, maybe even Spider-Man as the main sprite, many levels-deep to cover the possible frames, start, jump, catch, fall.

I don't think there are a lot of Pico-8 web-type games outside of, "8 Legs To Love."


@Toybox_Omega Thank you! That sounds like appropriate canonical lore :)

@dw817 Cheers, I definitely wouldn't mind building that up properly eventually!



[Please log in to post a comment]