This is a general purpose geometry/vector library.
It's based on Geometric Algebra (GA) but you don't need to know what that is to use it as most of the standard vector operations you're probably familiar with are here.
I'd be happy to add additional demos (with credit obviously) so if you make something interesting that you want to include let me know.
Updates
2024-04-21
- Added 3D triple pendulum demo (based on the 2D version here: https://matthias-research.github.io/pages/tenMinutePhysics/index.html)
Hat tip to @shanecelis for this post (https://www.lexaloffle.com/bbs/?tid=54905) which made me aware of PBD and Matthias Müller.
I'm just getting into PICO-8, so this post is largely just me saying Hello World :)
Here's what I have to show (in the best way) for the past few days of learning how to develop in PICO-8 - tutorials have been super useful and I love what I've seen of the community so far!
x
to yap with a star effect
arrow keys
to walk
hold o + arrow
to zoom with rainbow effect
This cart uses snippets from @shy's blog post on animating sprites and @atzlochtlan's Particle Effects cart (thank you!)
💜
____ SPACE ROGUE! ____
Embark on a mission to destroy the enemy aliens!!!!!
Upgrade your ships weapons as you power up in this Space Invader/Roguelite mash-up!
How many enemies can you defeat before re-upgrading your ship?
UPDATE 1.3:
The new update for Space Rogue! adds more core mechanics to make the game be the roguelite that it is! This update adds replay value and provides a foundation for future upgrades & enemies!!!
-- NEW post run shop upgrades!!! Continue your run after your death with an upgraded ship!
- Triple shot!: Fire three bullets at once!
- Upgrade your maximum shield capacity!
- Unlock a power-up that will re-fill your shields to max level. Handy for long runs!
-- Balanced enemy spawns and added a NEW enemy type!!! (this one shoots back!)
-- New sprite for the ships bullets. Adds little more imagination than a yellow brick :)
-- New soundtrack!!! (This one has a bass line! :O)
Also changed up the coding for the way the game handles enemy collision, weapon collision, upgrade logic etc... This will make adding more upgrades & enemies in the future less of a task!
Have fun!
Pico-8 A-Z: A Pretty API Browser for You and Me
> A Tool by ★ iiviigames
Follow on Twitch!
∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧
How to Use the Api Browser 1.0
∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧
> Save this bad boy to the local unit for optimum effectiveness...
Simply 𝘵𝘢𝘬𝘦 𝘺𝘰𝘶𝘳 𝘵𝘪𝘮𝘦 𝘢𝘯𝘥 𝘩𝘪𝘵 𝘵𝘩𝘰𝘴𝘦 𝘢𝘳𝘳𝘰𝘸 𝘬𝘦𝘺𝘴, 𝘢𝘯𝘥 𝘭𝘰𝘰𝘬 𝘪𝘯𝘵𝘰 t𝘩𝘦 𝘢𝘱𝘪.
- ➡️ / ⬇️ to move forward
- ⬅️ / ⬆️ moves backwards
> NOTE: This cart saves a log to the desktop for your ♥
Featurez
T𝘩𝘪𝘴 𝘱𝘳𝘰𝘨𝘳𝘢𝘮 𝘸𝘪𝘭𝘭 𝘢𝘶𝘵𝘰𝘮𝘢𝘵𝘪𝘤𝘢𝘭𝘭𝘺 𝘸𝘳𝘪𝘵𝘦 𝘢𝘯 𝘢𝘭𝘱𝘩𝘢𝘣𝘦𝘵𝘪𝘤𝘢𝘭 𝘪𝘯𝘥𝘦𝘹 𝘰𝘧 𝘵𝘩𝘦 𝘧𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴 𝘢𝘴 𝘵𝘩𝘦𝘺 𝘸𝘦𝘳𝘦 𝘢𝘵 𝘵𝘩𝘦 𝘳𝘶𝘯𝘵𝘪𝘮𝘦, saving directly to the desktop for easy access!
T𝘰 𝘥𝘪𝘴𝘢𝘣𝘭𝘦 𝘵𝘩𝘪𝘴 𝘣𝘦𝘩𝘢𝘷𝘪𝘰𝘳, 𝘨𝘰 𝘵𝘰 𝘵𝘩𝘦 𝘭𝘢𝘴𝘵 𝘵𝘢𝘣, 𝘢𝘯𝘥 𝘴𝘦𝘵 writeapi
𝘵𝘰 false.
A𝘴 𝘧𝘰𝘳 𝘵𝘩𝘦 𝘱𝘳𝘰𝘨𝘳𝘢𝘮'𝘴 𝘧𝘦𝘢𝘵𝘶𝘳𝘦𝘴...
- I'𝘷𝘦 𝘪𝘮𝘱𝘭𝘦𝘮𝘦𝘯𝘵𝘦𝘥 𝘢 𝘯𝘪𝘤𝘦 𝘱𝘢𝘥𝘥𝘪𝘯𝘨 𝘧𝘦𝘢𝘵𝘶𝘳𝘦, 𝘢𝘴 𝘸𝘦𝘭𝘭 𝘢𝘴 𝘵𝘩𝘦 𝘰𝘱𝘵𝘪𝘰𝘯 𝘵𝘰 𝘭𝘪𝘮𝘪𝘵 𝘵𝘩𝘦 𝘯𝘶𝘮𝘣𝘦𝘳 𝘰𝘧 𝘪𝘵𝘦𝘮𝘴 𝘱𝘦𝘳 𝘱𝘢𝘨𝘦.
- B𝘺 𝘴𝘦𝘵𝘵𝘪𝘯𝘨
itemsperpage
𝘵𝘰1
, 𝘧𝘰𝘳 𝘦𝘹𝘢𝘮𝘱𝘭𝘦, 𝘺𝘰𝘶 𝘸𝘪𝘭𝘭 𝘴𝘪𝘮𝘱𝘭𝘺 𝘴𝘦𝘦 𝘰𝘯𝘦 𝘧𝘶𝘯𝘤𝘵𝘪𝘰𝘯 𝘢𝘵 𝘢 𝘵𝘪𝘮𝘦, 𝘢𝘯𝘥 𝘵𝘩𝘦 𝘱𝘢𝘨𝘪𝘯𝘢𝘵𝘪𝘰𝘯 𝘪𝘯𝘧𝘰 𝘸𝘪𝘭𝘭 𝘳𝘦𝘧𝘭𝘦𝘤𝘵 𝘵𝘩𝘦 𝘵𝘰𝘵𝘢𝘭 𝘯𝘶𝘮𝘣𝘦𝘳 𝘰𝘧 𝘧𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴 𝘸𝘪𝘵𝘩𝘪𝘯 𝘵𝘩𝘦 P𝘪𝘤𝘰-8 API as a whole.
Why I Made This
This tool was created to quickly scan through the pico-8 api, & has many use cases for myself, as I'm the fella' who maintains the stylish though unofficial API site at:
cast:
- change dimension of userdata buffer for 2d operations
buffer=userdata("u8",4096) -- get a 8x8 sprite out of it sprite=cast(buffer,"u8",8,8,1040) |
note: not sure how GC can track these chunks - ok to have that as weak references only.
-
matmul with stride
align with other userdata operations - all ops to allow for source index
use case: array of vectors referenced by index
big_array=userdata(‘f64’,4,500) …. indices = userdata(‘i32’, 4) indices:set(0, 3,89,0,75) out=big_array:matmul(m, indices) |
-
min/max
note: can be done with sort (but overkill) - dot:
cannot operate on partial userdata
🄿🄸🄲🄾🄿🄷🄾🄽🄴
PicoPhone is a lightweight open-source multi tool widget designed to run in Picotron's desktop2 and to use as less CPU as possible. https://github.com/369px/PicoPhone
It aims to completely replace your smartphone and give you back the focus you need while completing your gems. Just load #phone
in the Picotron terminal to get started!
Latest version: 0.5.35
NEW: Automatic updates at boot-up!
PicoPhone now checks the BBS for updates!
So you never miss the latest features.
I've made a video on how I auto-update here:
https://www.youtube.com/watch?v=88nRTLXdAGs
NEW MiniApp: Control Panel!
Do the boring stuff with a click!
A simple animated wallpaper or screensaver. Two sides locked in an eternal battle.
The two colors are taken from your current desktop theme.
Inspired by the web version by Koen van Gilst, with some code snippets being adapted from it.
Save as wallpaper
If you haven't already, create a user wallpaper directory in /appdata/system
. Changes to the system wallpapers won't persist across a reboot.
cp /system/wallpapers /appdata/system/wallpapers |
Load and save the cart.
load #pong_wars save /appdata/system/wallpapers/ |
Save as screensaver
If you haven't already, create a user screensaver directory in /appdata/system
. Changes to the system screensavers won't persist across a reboot.
(Access it from BBS with load #miditron-0
)
Miditron!
The first midi-to-picotron conversion tool!
This tool allows you to convert .mid or .midi files into .sfx files used by the Picotron synth tracker.
Just drag and drop the desired midi onto the window, and voila! Your midi is transformed into a .sfx file, conveniently placed onto your sfx folder in your current cart~
Beware!! The tool is pretty barebones though! And far, far from perfect. So you might encounter glitched tracks and have to manually adjust patterns and tracks to fit the desired results.
Some handy tips for adjusting your midi files for an optimal result would be:
- Use only 2/4, 3/4 and 4/4 meters; These meters are the most optimally supported by the tool
- Avoid odd-numbered sections of the song (sections are separated by time signature change or tempo change)
- Avoid using .midi with too many simultaneous notes/instruments (Picotron only supports 8 a time)
Want to get seasick while coding in Picotron? I got you covered! I made a Picotron wallpaper based on my latest PICO-8 game Jaw.
Make sure you have already created your personal system folder inside Picotron and copy jawpaper.p64.png to appdata/system/wallpapers/ and/or appdata/system/screensavers/
Go to the system settings inside Picotron and select "jawpaper" as wallpaper or screensaver.
Enjoy.
Update 2024-04-09: Added Icon and metadata.
this game has a nice peel..
controls:
- Up and Down = move the knife/stick
- hold c = move faster vertically
Lore:
After years of practice this now is the final exam, bob has to make it. After failing school, work and college, his only choice was clear. To eat potatoes, that would make him grow bigger and stronger, or so he thought. Life is hard, it was a constant pressure on him, he could not rest a minute. that's how busy he was, peeling potatoes. The problem was there, bob didn't have a proper peeler, or a knife. He had to use a stick (don't ask how its possible). The potatoes were weird as well, there were only huge ones. In fact, he was standing on the potatoes. But after years of training and hard work, it finally came to him. He knew the perfect job for him. So he applied for a job at peelstation, you know, the place where they make potato games. But here comes the twist. His parents were actually giraffes. But to him, it didn't matter, his goal is clear. He needs to get a 100% on this test, otherwise he isn't the potato master. Just imagine the consecutive, it would be eternal shame. This here is the moment, can YOU make it ?
BE ADVISED:
Pursuant to recent directives, all able-bodied citizens over the age of seven are strongly encouraged to engage in our government-sanctioned directional input training simulation. Here, with dedication and diligence, you will undertake rigorous exercises designed to sharpen your combat abilities to their utmost potential. Mastering precise weapon deployment isn't just a task; It's a solemn vow to safeguard our nation's sovereignty and ensure victory. Your unwavering commitment to this endeavor is the embodiment of our collective devotion to defense, security, and the long reach of democracy.
ATTENTION : If your device lacks Pico-8 compatibility, it is your duty to promptly report to the 'Super Earth Treason Tribunal' for further assessment and potential rectification. Your compliance is appreciated.
I think all Retina screens are affected.
The image is a little bit blurry. The smaller the window is, the more blurriness is visible. But it's blurry even in the full screen mode, just much harder to notice.
In order to compare images you may need to download them and open them in a non-blurring-when-zooming-in image viewer. I think the old good MS Paint zooms image with integer scaling.
Picotron on my MacBook is not pixel-perfect:
PICO-8 on my friend's MacBook is also not pixel-perfect:
Pixel perfect image for comparison, made using a different retro game engine called Pyxel https://github.com/kitao/pyxel
Thinking about putting together a collection of free instruments for the community - simple stuff with one or two nodes and one or two envelopes, like this:
...so as to leave a lot of room for modification by users.
What instruments would y'all want in a free patch collection? Right now we have crude versions of:
- violin
- piano
- pipe
- organ
- kick
- snare
- hat
- crash
but a single .sfx file can hold up to 24 instruments, so it feels like we should offer more than eight.
I'm trying to learn myself about bitmap rotation algorithms. I've been documenting my exploration in the attached cart. If you run it in your browser, what you're seeing is the same sprite from the spritesheet being rendered in four different ways:
1) rotating each pixel location via standard sin/cos rotation matrix
2) rotating each pixel location via the 3 shears method
3) rotating each pixel location via 3 shears + a fix for Picotron's rounding during tan() calculations
4) rotation each texture endpoint via standard sin/cos rotation matrix, then drawing with tline3d
Each method is labeled with a title and the approximate CPU usage each one uses when being drawn alone. You'll note that the tline3d implementation is the fastest, but also has the most "holes" along non-orthogonal rotations.
classic screensaver
V0.3 UPDATE: now contains a settings window
running the p64 from filenav will open a window where you can change the settings to this screensaver
the same p64 can be called as a screensaver from the system settings and will use the settings saved on it
main.lua contains screensaver settings program
screensaver.lua contains screensaver code and all info the settings program uses to build itself
you can reuse main.lua and write your own screensaver.lua to make your own screensavers with settings screens
note: to quit screensaver test you need to press esc. this does not seem to work on the embed at the moment.
have fun