So I know the documentation is a bit spotty at the moment but I was curious if the btn() function is the same as in P8?
I set up a simple sprite to move around and used the usual btn() setup for up down left and right but am getting weird behavior. Sometimes when I press left or right it will go up, or go diagonally randomly.
Sometimes it will work perfectly normal.
Anyone else experience this?
I tried to adapt this classic tweetcart for picotron. when i couldn't make it work the way i wanted i decided to break it further :3
Okpal is a tool to create and edit color palettes. You can easily use those palettes in your programs, and even directly in Picotron's sprite and map editors.
Features
- Any change to the palette is propagated to Picotron's sprite and map editors.
- Use a perceptually uniform color space (oklab).
- Choose colors by hue, saturation and lightness.
- Reorder colors by drag-and-drop.
- Supports two file formats: ".hex" and ".pal"
- Multiple options for importing external palettes (keep default palette, overwrite it, or try to match it)
Usage
The tool shows you four different views of the 64 colors in the current palette:
- at the top-left of the screen, the colors are shown in palette order (same as in sprite editor first tab);
- below, on the left, the colors are shown inside a circle picker: the angle correspond to the hue, and the distance from the center correspond to the saturation;
- in the middle the colors are shown as inside a square picker: the X axis correspond to the saturation, and the Y axis correspond to the lightness;
- finally, on the right is a "test zone", where you can use 24 paintable cubes to test color combinations.
To modify a color, you must first select it. You can do that either by clicking in the palette overview at the top of the screen, or by clicking directly on one of the color dots in the circle picker or in the square picker.
Once selected, some information about the color are displayed on the right of the palette overview:
- the color number;
- the hex code corresponding to the RGB values of the color;
- a padlock icon: if the padlock is closed, the color is "locked" and cannot be edited; click on the icon to lock/unlock it;
- an eye icon: if the eye is closed, the color is only shown in the palette overview; it is hidden in the circle and square pickers.
- a paint bucket icon: you can click on it to change the color background to the current selected color; click again to go back to a black background.
You can copy the current color by using Ctrl-C, and paste a copied color onto the current one by using Ctrl-V. This also works outside OkPal: the color is stored in the clipboard as a hex code ("#ffacc5").
There is five different ways to adjust the selected color:
- a small colored circle outside the circle picker allows you to change the hue of the color;
- a small colored circle inside the circle picker allows you to change at the same time the hue and the saturation;
- a small colored triangle below the square picker allows you to change just the saturation;
- a small colored triangle at the right of the square picker allows you to change the lightness;
- finally, a small colored circle inside the square picker allows you to change at the same time the saturation and the lightness.
Any change you make can be reverted by hitting Ctrl-Z for undo. Use Ctrl-Y for redo.
Once you have several colors in you palettes, you can reorder them in the palette overview: just drag one color onto another, they will swap their positions. Note that both colors must be unlocked.
Using the palette in cartridges
By default, the palette you edit is saved in the cart you're working on, alongside your sprite sheets and maps.
The default path is "/ram/cart/pal/0.pal"
In order to use a palette in your programs, you just need to copy it in memory:
poke4(0x5000, get(fetch"/ram/cart/pal/0.pal")) |
Loading and saving
If you only need one palette for your cart, you don't need to do anything special to save it. It is saved alongside the rest of your assets each time you hit Ctrl-S.
In order to create a new palette, use the '+' button at the right of the tabs and choose the name of your new palette, for example "1.pal". If you need to start from scratch for this new palette, use "Empty Palette" or "Picotron Palette" from the menu.
You can load a previously created palette by using "Open File" in the menu.
Importing and exporting
You can import and export palettes for use with external tools. Currently the only supported format is ".hex" files, which are simple text files with one line per color, represented by their RGB code in hex format (without "#" or "0x", just the hexadecimal numbers).
To import a palette, choose "Open File" from the menu, and select the ".hex" file. If this is the first time you open this external palette in OkPal, a dialog will appear to let you choose how to arrange the colors in the palette. You can either:
- Keep default Picotron palette in the first 32 colors, and put the imported colors in the last 32 slots.
- Completely remove the Picotron palette and import the whole palette, but reorder the colors to try to match the default colors.
- Or simply import the palette as is. Note that this will affect the interface and probably make it difficult to use the menu, the sprite editor and the map editor.
Changelog
2024-08-23: version 1.0.3 (release #okpal-6)
- added: add file icon to saved palettes;
- changed: can load and import palettes by
double-clicking in the file dialog (no need
to drag-and-drop anymore); - fixed: bug in BBS;
2024-05-03: version 1.0.2 (release #okpal-5)
- fixed: bug while using "+" button in Picotron
0.1.0g; - changed: disabled tabs in BBS, as it prevents
the cart from running;
2024-04-27: version 1.0.1 (release #okpal-4)
- fixed: picotron's palette was not locked in the
default file on first opening; - fixed: saving a ".pal" file from an imported
".hex" file was not working; - explain how to export to .hex in the manual;
2024-04-06: version 1.0.0 (release #okpal-3)
- propagate palette to sprite and map editors;
- undo/redo;
- reorder colors by drag-and-drop;
- import dialog;
- reorder imported colors to match default colors;
- added a manual;
- menu entries to initialize the palette and open
the manual; - flash padlock icon when trying to edit a locked
color; - shift-click paint-bucket icon to change the "white"
color used in the interface, and ctrl-click the
icon to change the "black" (useful when importing
external palettes);
2024-04-02: version 0.0.3 (release #okpal-2)
- Added the ability to change the background color (by clicking on the small paint bucket icon), and switched the default background to black.
- Added the ability to import ".hex" files (using drag and drop from the "Open File" dialog); to actually create the ".pal" file, you need to save.
- Improved the color pickers.
- Added the ability to copy/paste colors (using a hex string starting with #).
- Added the ability to show/hide individual colors (right click on a color in the palette).
2024-04-01: v0.0.1 (release #okpal-1)
- Added the ability to lock colors, to avoid accidentally modifying them. By default the first 33 colors are locked (click on the padlock to unlock)
- Added the ability to hide specific rows of color from the two color pickers.
- Added sliders to change the individual components (hue, saturation and luminance).
- Added the ability to select a color by clicking on their dot in the color pickers.
- Added a test zone, with 24 paintable cubes (click on a cube face to change its color).
Import PNG images and generate optimal palette
Can import png to fit picotron default palette, custom palette imported through hex file, or custom palette generated for the png file.
For best results, reduce the png to 64 or fewer colors in an external program such as gimp. This isn't required, but will save you some time waiting for the palette to generate and will allow you to use dithering.
If the imported png has less than the "max colors" value and is set to generate palette, the generation step can be used and the image's colors can be used as-is.
The generated palette is also sorted to attempt to fit the current palette. Colors in the generated palette are moved to the location of similar colors on the loaded palette. For example, black will attempt to stay black, and white will attempt to stay white.
Ceil() function does not work correctly:
ceil(1) -->returns 1 ceil(1.0) -->returns 2 (Error) |
Same for any N.0 float. Seems to work correctly in other circumstances.
LUA math.ceil(1.0) correctly returns 1 and can therefore be used as an alternative in the meantime.
Tested with version 0.1.0e on Windows 10
(I already posted this in the 'Picotron bugs' thread, but including it here with a proper 'Bugs' tag as I couldn't work out how to add a tag to the other post)
Version 0.1.0e on Windows 10
Strings cannot be indexed using var[n]. This is different to Pico-8, where strings are indexable. However, for Picotron, it may be by design as strings are not indexable in Lua itself.
a = "string" print(a[2]) --> outputs nil (should be 't') |
A workaround for the time being is to use sub(a, 2, 2)
Hi! I am new here
I just barely bought Pico 8 and used some tutorials online to make this simple animated "GeK"
If anyone has any tips or just criticism for beginners like me, I'd very much appreciate it.
(I have had experience with html and JavaScript before)
0.3 finally released
Controls are simple: Arrows move GeK and X makes him "speak"
This is 0.2
Hi,
Currently toying around with Picotron basics after some (but not too much) prior experience with Pico8.
I'm trying to work with multiple layers and some degree of transparency between them but it's not quite working.
In the map screen, nearly all tiles are in the lowest layer; the top layer has only the single mushroom sprite on the far right. My assumption is that the default black in subsequent layers would act as transparency. I swear I had this working previously but am having trouble recreating it -- when I actually run the cart, the black of the upper layer acts as just solid black, only rendering the mushroom but nothing of the layer below (wizard character drawn at runtime).
Based on Pico8 docs, I've got a palt(0, true) in my _init() with the understanding it should turn black to alpha, but it seems to make no difference. I also see that black should certainly act as the transparent color by default anyway?
Anyone know what I'm doing wrong? Swapping layers renders that grassy layer as expected, with the lower layer (mushroom) totally hidden.
Very much an early work in progress. Wanted to make a super small arcade game, something you might see with vector graphics and a roller ball for controls.
I haven't made games in awhile, been trying to work on larger projects, and that has been pretty daunting. But then I went to Can Can Wonderland, a very cool arcade in St. Paul, Minnesota, USA. I played a bunch of super retro arcade games there, stuff like Atari Football and Anti-Aircraft. I was inspired to try to make a game like that, something with very simple controls and concepts.
Controls:
up/down/left/right - Move cursor
Z - switch cursor direction between left and right
X - turn closest plane in the direction of the cursor
This is very much a proof of concept. If I go further with this, I imagine that each color plane would have to be directed to a certain edge of the circle, and later levels would have storm areas you have to avoid, and UFOs that are worth bonus points.
load #solitaire_suite
no sound currently added
saves don't work on bbs right now
the mod manager isn't guaranteed on the bbs right now
Release 0.2.0
Version 0.2.0 brings a new solitaire game, a mod manager, and a bunch of smaller changes. Thanks to anyone whose been following the updates and joining the streams. Also thanks to Louie Chapman for his contributions (2 solitaire variants, a card back, and helping test that it actually works.), SoundDotZip for the aseprite to picotron image plugin, Fletch for an animated card back, and imjustkerb for testing out the example project.
The suite currently has 7 solitaire variations main
- Klondike Solitaire