Log In  

BBS > Community Superblog
All | Following | GIFs | Off-site

I have a number of functions which, before doing any real work, need to do the exact same pre-processing routine of the passed parameters. As such, they all start like this...

local p1, p2, error = preprocess(param1, param2)
if (error) return error --early return

Is there a way to use metatables to inject this kind of default behavior into functions, without having to copy/paste that boilerplate code each time?

2 comments


Cart #cosmo_test-1 | 2024-07-20 | Code ▽ | Embed ▽ | No License


EDIT_2
lol nevermind I figured it out. I'm so happy about this

EDIT!

so I finally came back to this and got some of the fixes implemented, but now every time my character collides with a surface they teleport back to the top of the screen. Can someone point out what I'm doing wrong?

Thanks again


original post:

I'm stuck again, this time on why my movement isn't working correctly.

When I try to go left, all movement and physics stop. when I try to go right, I "jump" and then fall through the floor.
additionally, the jump "boost" only works when also moving right

i'm following along with the NerdyTeachers YouTube tutorial, but I've rewatched the vids I think would make sense for these issues at least 3x each and I'm still stuck

2 comments


how can i link a game i paid for to my account

0 comments


Cart #gio_collect-1 | 2021-02-08 | Code ▽ | Embed ▽ | No License
4

Can you find all the combinations?

Edit: Added a victory screen, speedrun clock

4
1 comment


Cart #ratatan-0 | 2021-02-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


Everyone loves Ratatan! Press/Hold/Let go of UP to help guide the ship into the planet.

1
0 comments


Just testing something... not sure what'll come of it yet.

1
0 comments


I have a raspberry pi with a cheap USB controller plugged in to it. I would like to fx press the select button and the green button which will then start up splore using the pico8 -splore command. The reason is that I now have to have a keyboard connected to the pi which would be nice to remove

But I have not been able to get it working. I have tried keyboard shortcuts and xbindkeys. But none of this helped. Anyone have any suggestions?

4 comments


Cart #celestecassic-0 | 2021-02-07 | Code ▽ | Embed ▽ | No License
17

A short hobby mod I messed with for a few days to check out the PICO-8

Features
-The wallbounce and superdash are added, with some adjustments made to the levels to accommodate them. Try finding new skips!
-Press down to fastfall
-The game is retextured to include me and my partners :3

17
5 comments


another one that i made before i knew how to upload

Cart #gesonubemu-0 | 2021-02-07 | Code ▽ | Embed ▽ | No License
1

1
0 comments


A punishing platformer about getting a gem

one of my first pico 8 games. it was rather easy, and it felt like scratch, as you have to make all the physics by yourself.

Cart #pemabimiwa-0 | 2021-02-07 | Code ▽ | Embed ▽ | No License
2

2
1 comment


Cart #hikapijuri-0 | 2021-02-07 | Code ▽ | Embed ▽ | No License

0 comments




I launch Voxatron, select Chaos Fortress, Run, the title screen appears. If I touch 'control' or 'command', voxatron crashes. I reproduced the crash with Hug Arena. Happy to provide the crash report if needed.

The cart selection screen doesn't have this problem.

macOS 10.15.7
Voxatron 0.3.5b

2 comments


Maybe this is me being stupid, but no matter how I look at it I feel like my code should be working.
Button presses are working in the title screen and dialogue sections, but for some reason it stops working in the main gameplay. The code looks sound to me and everything else behaves as it should, debugging has shown me that the functions are indeed being called. But inputs just don't work. Here is where the offending code could be:
[hidden]

function init_battle()
t=0 --keeps track of time for bullet timing
pl_shot ={}
boss_shot={}
actor={}
player = {
x=60,
y=100,
life=3,
speed=2, 
focus=0,
life =3,
box ={
xa=0,
xb=2,
ya=0,
yb=2
}
}
boss = {
x=60,
y= 40,
life=100,
spell=1,
box = {
xa=0,
xb=3,
ya=0,
yb=3
}
} 

music(22)
_update=update_battle()
_draw=draw_battle()

end

function update_battle()
player_movement()
end

function player_movement()
	if (btn(0))then
player.x-=player.speed
	end 
if (btn(1)) then
player.x+=player.speed 
end
	if (btn(2)) then
player.y-=player.speed 
	end
if (btn(3)) then
player.y+=player.speed
end

end

function draw_battle()
cls()
map(0,0)
spr(1,player.x,player.y)
draw_hud()
end

function draw_hud()
spr(14,100,0)
	for i =108,124,8 do
	spr(15,i,0)
	end
	for i = 8,112,8 do
	spr(30,100,i)
	end
	spr(25,100,120)
	rectfill(108,8,128,125,13)
end

[ Continue Reading.. ]

2 comments


Cart #candle_rain-3 | 2021-02-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

A game for the one hour game jam #302. The music, sprites, and code were all made by me in about an hour.

5
0 comments


Cart #lightson3310-0 | 2021-02-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

Here is a small game I made for a game jam that imposed the restriction of a Nokia 3310:

  • 84x48 resolution
  • 2 green colors
  • 15 fps
  • limited number of buttons
  • monophonic sound

I made a custom html5 viewer to let me have the exact colors, playable on itchio (game is the same otherwise): https://frozax.itch.io/lights-on-3310

10
2 comments


I've found a weird glitch with the sounds on web, it seems to happen at random. Reloading the page fixed it for whatever reason, but reseting the cart didn't.
Ignore the black flashes around halfway in the video, i'm not sure as to what caused those, but they weren't there when I first recorded it.
Video of the glitch: https://youtu.be/r_i2HjsvCP4

0 comments


Hey so I just noticed that one of the more recent PICO-8 updates (not sure which) appears to make palettes work inconsistently on text in certain cases.

How to Reproduce:
Play my game Night Fright Flight here on the forums: https://www.lexaloffle.com/bbs/?tid=30133.
Try to change the palette through the pause menu, and you'll notice that some of the text (specifically the score and the game over message) doesn't entirely change palette. Most strangely, it applies only partially to outlined text created by calling print repeatedly with different offsets (despite pal() not getting called in the text drawing function at all).
I get the same issue running the game with 0.2.1b on my computer.

Example 1: The partially-purple text outline here should be all green.

[i]Example 2: The orange text with an upper purple shadow here should be white with a red shadow.

[ Continue Reading.. ]

5
2 comments


Cart #loderunner08-1 | 2021-02-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
37

83 levels - featuring lemmings! - of classic platform puzzler.

Controls

[Z] and [X] dig
Hold [X] if you get stuck to restart level
[Q] to quit back to titles

Thanks To

Finn for testing
Doug Smith for creating the 1983 classic
Mike Dailly for creating the original lemmings sprites
Zep for the confetti tweetcart I used for the game complete scene
PICO-8 for creating an awesome "fantasy console"

Minified using the GEM Minifier:
https://pahammond.itch.io/gem-minify

Unminified code can be downloaded from:
https://pahammond.itch.io/lode-runner

37
3 comments


Cart #mot_f1-0 | 2021-02-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

This is very unfinished and I wasn't planning to release this just yet, but somebody asked to play it so here it is :-)

Z/X accel/brake
Left/right to steer

Eventually there will be consequences for leaving the road and crashing into things.

7
1 comment




Top    Load More Posts ->