Log In  

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

@zep

Hey! Remember when I suggested putting next in the globals, since we could get to it anyway by doing next=pairs{}? You did! And that's been great!

Would it be okay to get inext the same way? It seems to be present, since I can get it by (similarly) doing inext=ipairs{}, and it seems to work the same way, just limited to index,value instead of key,value.

It's just not officially exposed.

I'm asking because there's a token saved when you switch from the first to the second implementation here:

for k,v in pairs(t) do ... end
for i,v in ipairs(t) do ... end

-- these are a little less clear to the reader but they work the same and save a token
for k,v in next,t do ... end
for i,v in inext,t do ... end

Technically it also shaves a couple of cycles off of the loop setup by inlining the return tuple from pairs()/ipairs(), but it's really the token savings that would be handy in some cases.

1
5 comments


Cart #mandelbrot_splorer-0 | 2022-04-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Just bought pico-8 and worked on this as my project for the week.

6
2 comments


hi so i am making a game, and i got unclosed function runtime error attempt to call a string function

i literally just learned lua and im brand new to pico 8 can someone help explain how to fix it?

2 comments


Cart #dcraft-2 | 2022-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

D. Craft is a P. Craft and DeFacto mashup, build a spaceship to escape the planet!

5
0 comments


Cart #clubpenguin-1 | 2022-04-07 | Code ▽ | Embed ▽ | No License
22

I made this in PICO-8 Education Edition during class and finished it afterwards lol
Original penguin sprite by Meep

22
2 comments


Cart #frombeyondtheoortcloud-0 | 2022-04-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

A space exploration adventure in the Solar System

Features:

  • The Solar System with planets, moons, space stations and asteroids
  • Simulation of gravity and orbital mechanics
  • Landing, docking and interplanetary travel
  • A space adventure with secrets to discover

How to play:

  • Please refer to the Astronaut Handbook for controls, UI info and a guide to space manoeuvres:

Download handbook in PDF format

Quickstart:


Controls:

  • up: open control panel
  • down: toggle time warp
  • left/right: adjust zoom

  • X+left/right/up/down: pan view
  • X double tap: recenter view

  • O+left/right: rotate spaceship
  • O+up/down: main and reverse engines

Open the control panel. Use left/right/up/down to navigate. Move to the ORBIT tab. Hold O and press right until TASK tab is visible. Read the message. Go and explore!

19
7 comments


Cart #numegibas-0 | 2022-04-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

2 comments


Cart #rahagebihe-2 | 2022-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

This is my first game on Pico-8. I find that Pico-8 can be a useful training before starting the real retro gamedev.

Red vs Blue Tic-Tac-Toe. A simple crosses-noughts game between two players: Red and Blue. In this first version you always play as Red and you always start first.

Update 2022-04-10:
AI no longer plays randomly

1
3 comments


After modifying the code I got rid of the error message however now the problem is that its not printing

Code:
h=7
t=64
if h < 23 then
print("to much food",t,t,0)
end

Info:
h=7 it can be upped by 1 when x is pressed and lowered when z is pressed
if h reaches 23 or 7 it will say at that sprite

1
9 comments


I need to print some text but it say that Syntax error and Print(to much food,64,64,7) ')' expected near much
Please help me
Code:

print(to much food,64,64,7)
end

2 comments


v1.1.2 update: added loop jump hotkeys (v1.1.1) and fixed a crash bug.

RP-8 is a synthesizer and groovebox inspired by Propellerhead Software's classic soft synth, ReBirth RB-338. It has everything you need to make entire tracks: two paraphonic synthesizers, a drum machine, a pile of effects to process your sound, and an integrated song mode sequencer to pull everything together. The audio is lo-fi, 8 bits at 5.5kHz, giving the output a distinctively crunchy sound.

If you're nostalgic for the early era of soft synths, a fan of minimalist computing, an acid squelch connoisseur, or just someone who likes to discover new sounds: I made RP-8 for you.

You can find this cart, including native builds, at https://luchak.itch.io/rp8, or try it out below. Note that this cart works much better natively than on the web - see the Web section under Compatibility Notes below for more info.

Cart #rp8-23 | 2023-11-04 | Code ▽ | Embed ▽ | No License
70

[ Continue Reading.. ]

70
37 comments


Ever since 0.2.4c came to the BBS, copy/paste seems to cause a crash/hang:

  • stat(4) when there is something in the clipboard hangs
  • printh(<..>, "@clip") hangs
1
3 comments


\o/

Say hi to the newest member of the PICO-8 family! A free, web-based, account-less version of the console making it a more accessible way to learn how to program, push pixels and write chip tunes. It comes with a fully functional set of cartridge editing tools, and can load and save .p8 and .p8.png files to and from your local drive (as well as storing them to a temporary filesystem in the browser's cache).


Just run it from any browser that has a keyboard + mouse attached:

www.pico-8-edu.com


If you are new to PICO-8 you can find a manual and tutorials on the main site, or click on the blue bunny for some tips. Here's a 2-minute GIF showing the creaton of a simple PICO-8 cartridge from scatch:

[ Continue Reading.. ]

108
56 comments


Hi,

This is my first PICO-8 game!

Cart #running_out_of_time-6 | 2022-04-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

I made it as a submission for Ludem Dare. It's a 48 hour game jam, but I only had a few hours to put in to that submission. This is the more refined version where I had time to add sound, particles, new sprites, a map, and a little easter egg.

I had a bunch of fun making it and I've had a bunch of fun playing it. The gravity is surprisingly entertaining to mess around with.

Credits:
Particle effects from this thread: https://www.lexaloffle.com/bbs/?tid=32096
Drum beat tutorial: https://www.youtube.com/watch?v=Pzt0h0ErNAM
Runge Kutta implementation: https://pjb.com.au/comp/lua/RungeKutta.html

[ Continue Reading.. ]

5
7 comments


There used to be an issue where coroutines would yield unexpectedly if they took to long to execute.
This was fixed a while back, but I see that for coroutines that themselves run inside coroutines - this still happens.

In the below code, in the 'coroincoro' case, nil is yielded instead of 1, showing that the yield happened sometimes before the "real" yield call.

sleep=function() for i=0,100,0.00002 do end yield(1) end

function test(name, func, ...)
    local coro=cocreate(func, ...)
    local ok,result=coresume(coro)
    print(name..": "..tostr(ok)..", "..tostr(result))
end

test("coroutine", sleep)

local cc = cocreate(function()
    test("coroincoro", sleep)
end)
coresume(cc)
1
2 comments


Cart #juheyedapo-8 | 2022-05-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Flappy UFO (flappy bird clone)

How do I play?

  • Up Arrow to jump.
  • Down Arrow to drop.
    Don't touch the green pipes.

  • Hold C or Z and click Up Arrow or Down Arrow in the menu to change your location.
  • Left Arrow or Right Arrow in the menu to switch character.
  • X in the menu to start the game with the selected character.

Enjoy!

4
1 comment


Cart #snak-11 | 2022-04-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

CONTAINS FLASHING IMAGES!!!

Snak

I spent way too much time making this.
It's a clone of snake, and I'm sure you already know the rules.
However, the background reacts in time with the music, and the snake also moves in time with the music.

There are 4 playable "stages", each with a different song and color scheme. After completing all 4, you have the option to restart in endless mode. You reach the next stage after the snake (known as "Snek") consumes 50 food (known as "Snak"). If Snek collides with the wall or their body, they revert to the beginning of the current stage.

[ Continue Reading.. ]

8
9 comments


Cart #toyboxtroopers-1 | 2022-08-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
14

Take command of a regiment of 18th Century line infantry in this short action strategy game.

•Train and manage your soldiers and then march them into battle.
•Fight in ten battles against Emperor Camembert and his cronies.
•Seven different tactics to use from co-ordinated volley fire, to a fierce bayonet charge, or a cowardly tactical retreat!
•Strike a balance between training your soldiers and giving them enough rest so they are fresh for the next battle.
Extremely historically accurate retelling of the Duke of Wensleydale's Parmesan Campaign against Emperor Camembert during the War of the 8 and Two-Thirds Coalition.
•Originally made for ToyBoxJam 3 2022 2nd - 22nd February 2022

[ Continue Reading.. ]

14
4 comments


Cart #picotrek-1 | 2022-04-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15


Two-player coop game on the bridge of a space battleship. Work together to loot and destroy all the alien ships in each level.

Each player operates their own screen - Player 1 on top in red, Player 2 on bottom in blue.

Best with 2 players. Feel free to try this out without a partner, but it is extremely difficult to play both screens at once!! Get a friend and try it out. Communication is key!

HOW TO PLAY

This is your status bar - From left to right it shows the state of your 4 directional shields, your hull health, how much loot you've collected, and the most recent signal that you've intercepted from an enemy ship.

SCREENS

From any screen, press Z to go to screen select:

[ Continue Reading.. ]

15
2 comments


Cart #les_aventures_de_de_lay-0 | 2022-04-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

A small, silly game made for LD50.

2
2 comments




Top    Load More Posts ->