Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

Not sure if this is actually a bug or expected behaviour. Seems like a bug to me. That said, don't know if it's a problem with PICO-8 or just with Lua in general.

Here's the problem. If I define a metatable using the __metatable property then the __tostring method doesn't get called automatically (by print for example) when expected.

m = {}
x = setmetatable(
   {},
   {
      __index=m,
      __metatable=m,
      __tostring=function(self)
	 return 'blah blah blah'
      end
   }
)

print(x)
print(tostring(x))

Output:

[table]
blah blah blah

So, I can call the tostring() function explicitly but it's not called automatically by print as I would expect. If I leave out the __metatable property though it works as expected:

m = {}
x = setmetatable(
   {},
   {
      __index=m,
      __tostring=function(self)
	 return 'blah blah blah'
      end
   }
)

print(x)
print(tostring(x))

Output:

blah blah blah
blah blah blah

Putting the __tostring function in m also doesn't work:

m = {
   __tostring=function(self)
      return 'blah blah blah'
   end
}
x = setmetatable(
   {},
   {
      __index=m,
      __metatable=m
   }
)

print(x)
print(tostring(x))

Output:

table: 0x30bb9cc
table: 0x30bb9cc

Nor does giving m its own metatable with a __tostring method:

m = setmetatable({}, {
   __tostring=function(self)
      return 'blah blah blah'
   end
})
x = setmetatable(
   {},
   {
      __index=m,
      __metatable=m
   }
)

print(x)
print(tostring(x))

Output:


[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=126465#p)
1
4 comments


Cart #tinyterrarium-0 | 2023-03-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

this is a falling sand game! it's essentially a remake of one i've posted before, but completely rewritten to be performant with the latest version of pico-8. it also has a lot more features. feel free to experiment! it's also posted on itch and you can find its source code, which is released to the public domain, on github.

controls

on the simulation screen:

  • ⬅️➡️⬆️⬇️: move
  • 🅾️: draw
  • ❎: erase
  • Pause: options

on the options screen:

  • ⬆️⬇️: move between options
  • ⬅️➡️: change option

[ Continue Reading.. ]

5
7 comments


Cart #sokoblox-0 | 2023-03-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
114


Sokoblox is a hybrid of two classic puzzle games: Sokoban (the push puzzle) and Bloxorz (the rolling block puzzle).

See if you can beat all 15 levels!

114
23 comments


Cart #cardboard_toad-0 | 2023-02-28 | Code ▽ | Embed ▽ | No License
4

My six year old and I made this game for her upcoming birthday. She was inspired by paper mario and the idea of a pinata that ran away.

4
0 comments


Whisper

Cart #whisperv1_0-1 | 2023-02-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7


Hope you like it!

If you find any bugs, please tell me

7
3 comments


Pico-View February

Hello Pico-View Reader, this February issue is the second in the series. We thank you all for your continued support and donations... Money? Cash? NO! We thrive off of the art, reviews, and comments you all give us. Thank you to the supporters, and that includes you reader! By simply reading this zine you're helping us. We thank you from the bottom of our hearts.

Without further ado... We hope you have fun adventuring through the pixels and paragraphs of this brand new Pico-View web-zine.

-Nerdy Teachers, Celesmeh, Fletch , Pickleschip, D3V?,and Marina

January Edition: https://www.lexaloffle.com/bbs/?tid=51335

Contents:

-A Look Into Tweet-Carts
-Lazy Devs Interview - Ft. Celesmeh
-How To Get Pico-8 On The Miyoo Mini!!!
-Pico Nico Easing Animations - Tutorial by Fletch
-One Bit- Pixel Art Style - Pickleschip
-Tabs vs Spaces Article - Nerdy Teachers
-Dinky Kong Demake - Interview W/ Trog & Heraclem

[ Continue Reading.. ]

38
4 comments


Cart #building_jumper-0 | 2023-02-27 | Code ▽ | Embed ▽ | No License
4

This prototype was made for Pico-View, a monthly web-zine hosted here on the BBS and also on NerdyTeachers.com.

You are challenged with taking on this visual effect of enlarging and shrinking your sprites as the main mechanic of your game! Practice using SSPR( ) function to have more control of your sprites this way.

You can:
1) Play this prototype as-is, and share your highscores below.
2) Take this cart, and edit it as much as you'd like to create your own spin-off!

Don't forget to share it here on the BBS with the tag "Prototype Party" so we can see what you were inspired to create. And keep your eyes out for more in the coming issues of Pico-View!

Read the full issue here:

[ Continue Reading.. ]

4
0 comments


[sfx]

Was listening to some old compositions of mine and realized that I had a nice little instrument that hadn't made it into the midi library!

For the demo, I used the same trick I used then, and split the melody across two separate SFX so the tails of each note could ring out while the next note played. Bit of a faff to do, but it produces a very good effect.

Cart #hifesosani-0 | 2023-02-27 | Code ▽ | Embed ▽ | No License
8

As noted in the cart, at least to me, it still sounds good and has a harp-ish vibe with various combinations of Buzz, Dampen, and Reverb; Detune doesn't work because the bulk of the SFX is the triangle wave.

8
1 comment


Cart #yfowomezi-0 | 2023-02-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

I don't understand how it took me so long to make this mod....

"It's been a while since someone last climbed the mountain, things seem to be different from the last time"

4
14 comments


Cart #diceroll-0 | 2023-02-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

It's been about a year since I've touched my platformer project, so I wrote this simple little dice roller to get back in the swing of things.

3
3 comments


Cart #remco_visje-0 | 2023-02-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

a small game about a fish, made in 9 hr for Alakajam #17

left and right to wiggle

the river-flow should very slowly get faster / get as far as you can (the number of screens traversed is counted)

red spikes hurt / yellow scales give a bit more life / watch out for the light-blue currents / plants can block you, but only horizontally

(also my first 'finished' cart)

11
5 comments


This is my first attempt at a Pico-8 Game. I made this for my wife to play with our cat Aesop. When he is hungry feed him eggs, burgers, steaks, and turkey. When he is full take a nap and then go eat again. Just like a real cat.

Cart #rojotapupo-4 | 2023-03-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

2
0 comments


Cart #frog_game-2 | 2023-02-26 | Code ▽ | Embed ▽ | No License
1

I'm new to PICO-8. This is a little game I've been putting together as I learn. Nothing special or exciting (the enemies don't even fight back yet), just something to get my feet wet with and expand on as I go.

Arrow keys move the frog left and right. X key to shoot.

1
1 comment


Cart #driftsnow-1 | 2023-02-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

(v01 02-26-23)
TO LOAD THIS PICO-8 CART, in immediate mode, type: load #driftsnow


Hello.

While some years back I did write a fairly complex cart to draw snowflakes on the screen, they were not incremental. That is they stayed the same number on the screen at all times.

I was noticing in the BSNES emulator they do this instead. They add one snowflake per second on the screen-saver. The effect I think is rather pretty - so here is my version of it for Pico-8.

The code is documented quite thoroughly.


Be aware of some numbers you can fiddle with that are defined at the top of the code:

[ Continue Reading.. ]

12
6 comments


Cart #river_survivors-3 | 2023-02-26 | Code ▽ | Embed ▽ | No License
3

EDIT1: Bugfix
EDIT2: Yet another bugfix, passives did not get applied correctly
EDIT3: (Hopefully) fixed the slowdown when lots of fish are on screen

3
6 comments


Cart #manic_miner_test2-0 | 2023-02-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

updated

left/right = move
up = jump

1
2 comments


Cart #xicarus-1 | 2023-02-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
14

Xicarus's Xtreme Xventure

You are Captain Xavier Xicarus (xe/xir), a thrill-seeking pilot in a doomed solar system.
In 22 seconds, the Xun will explode, taking all life and all planets you know with it.
In the meantime, though, it's a great chance to do some sick donuts around a dying star.

XXX is an addictive and deterministic score-em-up where you maneuver an agile ship across treacherous environment.

Features

  • Addictive 30-second game loop
  • Refined, skillful gameplay
  • ZERO randomness; deterministic physics
  • Beautiful low-resolution graphics
  • Learn about doomed planets
  • Reach the highest score you can!

Controls

  • Arrow Keys to steer your ship
  • Press X to activate your boost, once every 30 seconds.
  • Press Z to open your Solar Atlas, which lets you view planet orbits, and learn about their composition
  • Press "Enter" for options

Credits

  • Brook.p8 - that's me!
  • Elyon - Lore ideas and support
  • Playtesters, including Kartik, Morgan, Nova, Tamsyn, softmagic
  • Shoutout to trans folks and autistic people everywhere, and especially autistic trans peeps!
  • Made for LowRezJam 2022 (I forgot to post it here oops)
  • Inspired by Outer Wilds

Meet the System

  • Xun
    Remaining lifespan: 22 seconds
    A hot and burning ball of code and plasma, facing imminent collapse
    Our beloved sun at the center of our system
  • Xerth
    Orbital radius: 29,000 pixels
    Its neon sea, which neatly divides the planet in half, creates the perfect habitat for life as we know it
    We call it home <3
  • Devril
    Average temperature: 450°F
    Due to the high heat and an atmosphere rich in oxygen and carbon, this planet is constantly lit aflame
    Possibly supports marshmallow-related life??
  • Keple
    Planet radius: 1200 pixels
    This body's orbit is extremely off-center, passing both closer to and further from the xun than any other planet
    Due to the extreme fluctuations in temperature, and its mossy poles, it does not support life. And if it did, it'd probably be lame anyway. Like moss or something.
  • Bolong
    Orbital eccentricity: 0.42
    Tidally locked with the sun
    Due to its fast movement as it approaches the sun, Bolong's dark side is notable bigger and denser than its sunny side
  • The Cube
    Sides: 6
    ???? What???
    We don't know how it got here
  • Debris Belt
    Number of asteroids: 1.27 million
    That's a lot of rocks
    The ring appears to extend beyond our observable universe

Thanks for playing!

14
5 comments


Cart #pacman_in_hell-1 | 2023-02-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

2
3 comments


Cart #bejuyasero-0 | 2023-02-25 | Code ▽ | Embed ▽ | No License
2

Hello.

I have noticed this sample program I wrote does not play 2-notes blending, one after another. No, it cuts off the first one and then plays the new one - despite being on an entirely different channel.

@zep, I think this qualifies as an error. Could you fix it, please ?

2
6 comments


Cart #punapimiyu-0 | 2021-08-28 | Code ▽ | Embed ▽ | No License
1

A simple platformer. I built this from scratch (using some samples as reference), to get a feel for implementing a simple game design. I made all the tiles, sounds, levels and code myself, using Pico8's inbuilt designer

1
1 comment




Top    Load More Posts ->