Why this educart?
The perceptron is a tiny computing unit that is a fondamental block of artificial neural networks.
Because machine learning is getting more important everyday, I thought I would share the little knowledge I have in the form of a chewable educart, hoping more people would get interested in the inner workings of machine learning algorithms.
Tell me if you found this useful and if I should make more. Also, I'm not a ML specialist and English is not my primary language so any suggestions to make this cart better will be appreciated!
♥pck404
Additional cart : interact with the perceptron in real-time
Sources and links
My main source for this cart is Daniel Shiffman's wonderful "Nature of Code" as well as the Coding Train video series on neural networks.
Changelog
This is my take on the wave function collapse algorithm in one of its simple variants : the simple tiled model.
Given a set of tiles and some adjancency rules, the algorithm tries to produce an image. It can be used for levels generation, pattern-like backgrounds and can also be used for non-visual data.
How does it work ?
This cart contains a few demo tilesets and rulesets that you can navigate between with the left and right arrows.
Sometimes the algorithm gets stuck (shown with red tiles). This happens when there is a contradiction : the rules won't allow any tile to be placed on a position. Press X or O to restart.
Yeah but, really, how does it work ?
I suggest you look at the links provided below for more information about the algorithm.
For this specific implementation, I used bitfields to encode adjacency rules : each tile has a list of 4 integers (for the four directions : up, right, down, left). Valid neighbors are determined by comparing (with a binary AND) the opposite bitfields of each tiles : 1 can connect with 1, 3 can connect with 2 and with 1,...
Links
- Original implementation by Maxim Gumin (@ExUtumno) : https://github.com/mxgmn/WaveFunctionCollapse
- The coding train's implementation which this cart is based on : https://youtu.be/rI_y2GAlQFM
- A nice explanatory video by Martin Donald : https://youtu.be/2SuvO4Gi7uY
- GDC Talk about wave function collapse in "Caves of Qud" : https://youtu.be/AdCgi9E90jw
Campfire
This is just me trying to simulate fire in Pico8 without shaders or fancy particle systems.
My approach is :
- At load time :
- Generate bursts of animated particles
- Each particle increments the brightness value for the pixels it sits on
- The burst animations are baked into the spritesheet
- At run time :
- Animate the baked sprites (moving them up)
- Again, add the brightness values together
The brightness value (which is just a color from 0 to 7) is mapped to a fire shade with pal().
There are other particle systems for bursts of sparkles and fireflies.
Any thought? What would be your approach?
v2 update
- use colors 0 to 7 for fire shades : no table needed to store brightness values
- bake animations into spritesheet for performance
- got rid of smoke
- add flickering
- nicer fireflies and flying ember
- add clouds
v3 update
- press a button to toggle scene on/off (monitor CPU usage of fire only)
Fulmosago
A bright yellow ship is launched at full speed across the universe.
Mission code is Fulmosago. The objective : a small and well-guarded planet.
Based on Basic Shmup Tutorial by Lazy Devs Academy.
Controls
In menus, press X or C to confirm.
In game, use arrow keys to move your ship.
The ship will shoot automatically when there are enemies. Hold C to force shoot. Hold X to prevent autoshooting.
Pickups
- pink pickup restores health (or add one extra heart if health is full)
- orange pickup activates double front canons
- blue pickup activates side canons (auto-guided orbs)
Soundtrack
Listen to the soundtrack on SoundCloud.
About
This is my second Pico-8 game. The Lazy Devs Academy tutorial series served as a basis. From there, my main goal was to tell a simple but impactful story within a limited play time.
512px under
Year 4096. A burried building with lasers and traps. How many lives will it take to leave this place ?
- Jump, wall jump and dodge lasers
- 18 memory cards to collect
- 32 rooms to explore (with lasers in them)
- Auto-save
- 1 red cube
- Lots of lasers !
Controls
- Arrows : move
- V (or X) : jump
- C (or Z) : grab/drop
Move and jump

Grab and drop

Wall jump

About
This game is my first Pico-8 game. It is also the first game I manage to finish after a few attempts with game engines such as Unity and Godot. It took me 1 month to complete the first published version. The Pico-8 restrictions allowed me to define a manageable scope for this game. In the end, I used the entire space available in the map editor and the spritesheet editor. The code uses every token allowed.