Log In  
Follow
pck404
[ :: Read More :: ]

Cart #pck404_xor-0 | 2022-12-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is a visualisation of a 3-layer perceptron learning to approximate the XOR function.

At some point I would like to make an educational cart like this one to explain what's happening under the hood.

P#121825 2022-12-04 21:04

[ :: Read More :: ]

Cart #ml101_perceptron-1 | 2022-12-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
27

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

Cart #pck404_perceptron_lr-0 | 2022-12-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
27

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


V2 :

  • add rewind (go back to previous text/screen)
  • add interactive cart with adjustable learning rate
P#121810 2022-12-04 17:34 ( Edited 2022-12-05 23:57)

[ :: Read More :: ]

Cart #pck404_wfc_stm-0 | 2022-10-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13

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

P#119553 2022-10-25 20:12 ( Edited 2022-10-26 15:34)

[ :: Read More :: ]

Cart #pck404_campfire-3 | 2022-10-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

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)
P#118338 2022-10-01 23:56 ( Edited 2022-10-02 22:14)

[ :: Read More :: ]

Cart #pck404_fulmosago_1rc1-0 | 2022-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

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.

P#117615 2022-09-18 17:25

[ :: Read More :: ]

Cart #pck404_512px_under-1 | 2022-12-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
30

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.

Changelog


v1 :

  • Update rooms (easier rooms on first floor)
  • Added room names
  • Added SFX for hidden carts
  • Louder background music
  • Sync lasers on BGM upbeat
  • Animations in lab
  • Update NPC texts
  • Vertigo animation when player is close to platform edges
  • Smaller player hitbox
  • Button hints in backgrounds
  • Move hidden carts
  • Higher mid-air speed

v1-beta :

  • Update rooms (adjust difficulty on the main path)
  • Fix seconds and frame counters not being properly saved and restored
  • Auto-save state when close to a spawner tile instead of saving when changing room
  • Show which button to press to teleport and decrease button hold duration
  • Increase jump buffer duration and coyote jump duration (grace frames)
  • Decrease walk acceleration to make it easier to move by 1 pixel
  • Increase lamp range
  • Red cube won't spawn if there's no saved data
P#102471 2021-12-12 15:21 ( Edited 2022-12-07 23:22)

Follow Lexaloffle:          
Generated 2024-04-16 18:59:12 | 0.113s | Q:33