Log In  

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

I've spent two hours fixing a nasty bug. The image above is essentially the bug I was trying to fix, except all the steps were spread in three functions, and took a good minute of playing on average before everything aligned just right (or just wrong depending on how you look at it) for it to seemingly randomly occur.
Can you figure out why t[2] is not 8 in the end ?

Hint : Lua arrays and # operator are cursed.

Ideally, I'd like the game to crash at t[i]=8 if possible. Anyone knows if you can add some sanity checks to all array accesses ?

1
6 comments


The Picotron palette was quite chaotic and the numbering wasn't very intuitive to me (probably due to being backwards compatible with PICO-8). I thought it might be nice to have an easy reference within reach so I don't need to open a forum post or wiki page whenever I need to work with colors. If you'd like to add this widget yourself, here are the steps:

  1. create a file named "colors.lua" and place it somewhere that makes sense to you (mine is in /appdata/local/tooltray/colors.lua)
    -- colors.lua
    local GRID_SIZE=20
    local palette={0,20,4,31,15,8,24,2,21,5,22,6,7,23,14,30,1,16,17,12,28,29,13,18,19,3,27,11,26,10,9,25}
    function _draw()
        cls(0)
        for i=1,32 do
            local x = ((i-1)%8)*GRID_SIZE
            local y = ((i-1)//8)*GRID_SIZE
            rectfill(x,y,x+GRID_SIZE,y+GRID_SIZE,palette[i])
            print(palette[i],x+3,y+3,7)
            if palette

[ Continue Reading.. ]

22
4 comments


Cart #goat-2 | 2024-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
37

Goat is a curious, little goat (shocking) who lives peacefully in the mountains. One day, she had an accident and ended up landing on the top of a haunted tower. A tower that would try to kill her with all its means...

Help Goat to survive by charging rocks and trees and dodging dangerous spiky trees and fire balls. Watch out for Goat's stamina level (pink top bar) as she runs out of energy quickly. Recharge her batteries by picking up stamina balls. Use super power when you're in trouble or running out of energy.

Can you get to the end and save Goat?

Controls

  • Arrow keys: move & charge objects

[ Continue Reading.. ]

37
7 comments


Hi all,

I've been working on a release of a paid pico-8 cart, but I will be releasing a demo version as well. This may be out of the ordinary, I know, but lets pretend it's a good idea for a moment.

So, with the demo being playable in the browser once it's public on itch.io and here, it feels awkward to not have a straight-forward way to provide a mobile full-version as well.

I'm worried this would be a bit complicated for most users, but... my best idea is to suggest the use of a 'Simple HTTP Server' app to host the index.html and js file locally. I found this app worked great and was relatively simple to use: https://play.google.com/store/apps/details?id=com.phlox.simpleserver

With this app (and its default settings) you copy the index.html and JS file into the directory specified in the app, hit the start button, and then use you web browser to navigate to 127.0.0.1:8080.

I have no idea if there's something similar available for an iPhone.

I hear there are PICO-8 cart player apps available too, but I didn't spot one after a brief search on the play store. Is there something simple available out there I can suggest as well?

[ Continue Reading.. ]

0 comments


Here's a couple of tweetcarts I've made. Nothing too crazy (compared to the other insane tweetcarts I've seen here).

Cart #spiraltweet-0 | 2024-03-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8


I was messing around with spirals and found some interesting patterns. Every once in a while, the arms of the spiral align and they even count down (6 arms, then 5 arms, then 4...). If you enable line mode, it creates shapes with the corresponding amount of sides (hexagon, pentagon...)

X to toggle line mode
C to stop spinning
Up/Down to speed up and slow down
Right/Left to step forward or back (most useful when it's fully stopped)

Cart #flappytweet-0 | 2024-03-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

[ Continue Reading.. ]

8
1 comment


Cart #picotron_angles-0 | 2024-03-22 | Embed ▽ | License: CC4-BY-NC-SA
9

Hello! I'm pretty new to Picotron and haven't used Pico8 or similar things before and was pretty
confused with how the sin and cos functions worked. After finally figuring it out I made a
little program to demonstrate their use. Posting it here in case anyone else finds it helpful!

Sidenote, this is the first time I'm uploading a cartridge and I can't seem to figure out how to add text to the label image. Is there a guide for that?

9
3 comments


Cart #pomodoro-1 | 2024-03-24 | Embed ▽ | License: CC4-BY-NC-SA
26

This is pomodoro.p64! A helpful tooltray widget for Picotron that will allow you to follow the Pomodoro system.

Installation

In a terminal:

  1. load #pomodoro
  2. save pomodoro.p64 (save anywhere you like, I personally have mine at /appdata/local/tooltray/pomodoro.p64)

Then, open up /appdata/system/startup.lua (or create the file if you haven't yet).
Add the following line:

create_process("/path/to/your/pomodoro.p64", {window_attribs = {workspace = "tooltray", x=2, y=2, width=91, height=32}})

You can edit the x= and y= coordinates to be whatever you like, but be sure that width and height is 91x32.

[ Continue Reading.. ]

26
2 comments


Cart #util_crc32-0 | 2024-03-21 | Embed ▽ | License: CC4-BY-NC-SA
3

This cartridge is an installer and uninstaller for a new globally-available command: 'crc32'.

Installation

Install with yotta:

  • yotta util install #util_crc32

Install without yotta:

  • load #util_crc32 in your Picotron terminal
  • Ctrl+R to run installer cartridge
  • Press X to install/uninstall as prompted
    (You can also manually copy the relevant files from the loaded cartridge from /ram/cart/exports to your system if you'd prefer.)

Description

This command will generate CRC32 checksums for the input parameter you provide, which can be either a file path, a folder path, or a bare text string.

[ Continue Reading.. ]

3
0 comments


Rationale:

  • sfx buttons would make more sense with a hidden mouse
  • a couple of projects of mine :)
11
6 comments


Hey there! I wrote a small library to make drawing numbers using sprites quick and easy using the output from string.format.
It can technically be used for non-integer values but any symbol that can't be drawn as a number will just be skipped over and a digit-wide space will be left. I wrote it this way so that you can draw a number with either leading zeroes or leading spaces.

There's also a version that allows you to have leading zeroes displayed as sprites too.

--sprite_num.lua
--[[
Description: Implements a function for drawing numbers out of sprites.
	Useful for non-text numbers, like scores for arcade games.
	Best used with numbers formatted with 'string.format'
Requirements:
	Number sprites need to be stored in contiguous order from 0-9 (0123456789)
Optional:
	A 'const' table containing the following:
	const.sprite_0 : Integer value holding the sprite ID of the 0 digit.
	const.number_width : Integer value holding the width of each number sprite.
	const.lz_sprite : Integer value holding the "Leading Zero" sprite for
		sprite_number_lz
	If the const table isn't used, this function call requires its optional arguments.
Usage: sprite_number(input,x,y,[sprite_0,sprite_w])

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


Cart #sploders-0 | 2024-03-21 | Embed ▽ | License: CC4-BY-NC-SA
5

My first Picotron project. It's a clone of a game called Chain Reaction I used to play on my C64 back in the day.

It's a two player game where you take turns in placing orbs on a tile grid. The object is to be the only player with orbs left on the board. Orbs can be placed on empty tiles and tiles where the player already has orbs. When there are one fewer orbs on one tile than there are neighbouring tiles the tile is said to be critical. Adding another orb to a critical tile will make the orbs splode. The orbs will be added to the neighbouring tiles. If they are occupied by the opponents orbs these change color.

Just try it, you'll understand despite my poor explanation.

TODO:

[ Continue Reading.. ]

5
0 comments


Cart #pico8gol-0 | 2024-03-21 | Code ▽ | Embed ▽ | No License
1

It's Conway's Game of Life in PICO-8! The game board is randomized (you cannot set pixels for now) but you can try different tile sizes and speeds (the "speed" is the number of frames before refreshes...). There are some performance issues at full scale. Enjoy!

1
2 comments


it gives syntax error near function
syntax error
attemt to call a string value

Cart #diheyekh-0 | 2024-03-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

1 comment


In Picotron, le shortcut to exit is Ctrl+Q.
But on a french keyboard (AZERTY layout), le "A" is at the place of the "Q" key on a QWERTY keyboard.
So, when I want to do Ctrl+A for "select all" in the code editor, Picotron is exiting.

For Zep: I think you must use KEYCODE instead of SCANCODE in SDL programming (or the inverse). ;)

(Sorry for my bad english)

6
7 comments


I'm working on a desktop app for Picotron and I need to detect when the AltGr key is being pressed. I tried

if keyp("altgr") then

but it doesn't work. I've also tried

if key("alt") and key("ctrl") then

and its variants (like "lctrl" or "rctrl") but it also doesn't detect when I press altgr on my keyboard.

Thanks for any help!

4 comments


Cart #piconet_explorer-14 | 2024-03-31 | Embed ▽ | License: CC4-BY-NC-SA
47

HI! I thought it would be neat to have a little isolated version of the internet for the Picotron! This is a very rough start of what I think that might look like (I have no idea how web protocols or any of that stuff works). This is also serving as kind of a test, because I wrote a program to scan a BBS page for a certain word and add it to the browsing catalogue, and I haven't tested that just yet.

There's a few bugs here and there tho; I'm not sure how you're meant to sort the draw order in a GUI so things may float on top of the tabs when scrolling. Also I've noticed that the homepage of one of my demo pages occasionally causes the program to run out of memory. I'm pretty sure it has to do with the gif imitation thing, but I have no idea why that would cause that.
Edit: it may be that this memory issue is actually a picotron problem! I suppose I'll just wait for future versions. But if it's not and anyone has a way to fix, let me know!

Anyway (IT WORKS NOW!), to add a page to the browsing catalogue, you need to type a comment in this format, replacing the plus symbols with caret symbols:

+PICOSITE+ link + title + about +

Notice where the spaces are placed! this is actually important lol
an example:

^PICOSITE^ https://raw.githubusercontent.com/May0san/piconetdemo/main/home.lua ^ PicoNet Homepage ^ The homepage of the PicoNet! ^

Try to not make your "about" too long. I apologize in advance for the messy disorganized code lmao, I'll probably be working on it. If you want to download files, add a "downloads" folder to your system at the root level. If anyone wants to propose a better standard for this, feel free :)

As for writing the actual page, you can view my examples on this github repo:
https://github.com/May0san/piconetdemo/tree/main

EDIT: looks like it crashes on the webplayer so you may have to download the cart

Update: downloads will now create the downloads directory if it doesn't exist.

Features:
✅ visit and display hosted file with gui data (a "picosite")
✅ catalogue all the sites posted on this forum page into a browser list
✅ allows use of a "gif" which is really just an image with multiple sprites in one and is indexed with sspr to advance the animation. (subject to modification when sitebuilder is complete, will mostly still work the same though.)
☑️ create a "sitebuilder" site (and also corresponding cart) to graphically design and export websites as code
❌ sort the catalogue by newest by default
❌ allow tags on the listed sites
❌ extract from the forum page how many stars a reply has and use that to gauge and display that on the catalogue
❌ sort by popular, search by tags

47
49 comments


Hello,
Im very new to Pico8 and wanted to get into it and learn how to make games for it. I purchased Picotron today and I keep getting this error message whenever I try to start the application. Has anyone else had this problem before?
If anyone can provide any help on this problem it would be most appreciated. I did some searching online for the error and nothing has worked for me. I'm not sure if I installed anything wrong or something along those lines.
Thank you and have a wonderful day

1 comment


Cart #palman-2 | 2024-03-21 | Embed ▽ | License: CC4-BY-NC-SA
6

So, this is some really simple code to use in your carts to easily load .hex palette
files on the cart. Check out palman.lua on the cart to see how it works.

v1.01 Changed a value to allow reading from .hex files created in Picotron.

v1.1 Added a notify message that the file was not found if the file was not found,
without crashing the cart.

6
2 comments


Cart #particle_editor-0 | 2024-03-20 | Embed ▽ | No License
10

A small particle editor that I made while learning the Picotron API. It allows you to save particles with the .prt extension. It works like the map, gfx and sfx editors, creating the /ram/cart/particles folder and the /ram/cart/particles/0.prt default file in the current cartridge. The editor does not save the particle logic, so you must copy the particles.lua to your project and call create_emitter by passing the unpoded prt file.

How to install?

To install in the toolbar, create the file /appdata/system/startup.lua and copy the following lines.

create_process("/appdata/system/apps/particles.p64", {argv={"/ram/cart/particles/0.prt"}})

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=143962#p)
10
0 comments


Cart #tohanejoja-0 | 2024-03-20 | Code ▽ | Embed ▽ | No License

0 comments




Top    Load More Posts ->