You are browsing as a guest. Sign up (or log in) to start making projects!

rayzchen

@rayzchen

Joined June 19th, 2026

  • 46Devlogs
  • 4Projects
  • 3Ships
  • 38Votes
Ship Pending review

AlGOL - Game of Life

NOTE: DOES NOT WORK ON MOBILE
https://rayzchen.github.io/algol/
Game of Life is a cellular automata that simulates patterns of cells changing over time. Each cell is either “dead” or “alive”.

  • If an alive cell has more than 3 alive neighbours it dies of crowding
  • If an alive cell has less than 2 alive neighbours it dies of loneliness
  • If a dead cell has exactly 3 alive neighbours it becomes alive

Each frame is then decided based on the state of the previous.

Have fun experimenting with the simulation controls!

  • 14 devlogs
  • 24h
Try project → See source code →
Open comments for this post

1h 42m 39s logged

Revert cursor

Unfortunately I could not get time to finish implementing the cursor functionality, so that has now been moved to a separate branch for anyone interested in running that demo.

The patterns can now be accessed via a link in the sidebar.

0
0
9
Ship Pending review

Snake written for the Nintendo GameBoy Advance

This was written entirely in C with no game engine! Even the sprites and tiles themselves are just numbers in lists!

TO PLAY: Go to https://rayzchen.github.io/snake-gba/. START button is mapped to Enter.

If the game feels slow, download the ROM and run in an emulator of your choice! (mGBA, NanoBoyAdvance or the linked online emulator etc.)

  • 10 devlogs
  • 14h
Try project → See source code →
Open comments for this post

1h 14m 33s logged

More text!

The game now displays PRESS START, GAME OVER and can be played as many times as you want!

Good luck beating the game… (let me know if you get the maximum score of 323!)

0
0
10
Open comments for this post

52m 29s logged

Apples!

The snake can now eat apples to grow longer.

Much time was spent debugging a very slow apple placement function.

0
0
12
Open comments for this post

2h 13m 1s logged

Controls!

After messing with interrupts and realising they won’t work with the basic functions I’ve written, I ended up scrapping that feature (lazy CPU waiting for vsync).

Instead, I implemented the snake as a list of positions and moved it around the screen!

0
0
16
Open comments for this post

2h 36m 2s logged

Basic setup

After not developing for GBA for a few years, I have had to read up on the memory mapping and general features. Here is a simple map comprised of an “apple” and three “snake bodies”.

0
0
12
Open comments for this post

4h 41m 18s logged

Cursor for placement

Much of this logged time was actually spent hunting for RLE files and testing them…

Rewrote a large portion of the loading code to render a ‘cursor’ which indicates where the placed cells will be. The actual placing hasn’t been implemented yet…

RLE bank can be found at https://rayzchen.github.io/algol/patterns/

0
0
73
Ship

MechSim

MechSim is a mechanical system simulator that uses Lagrangian mechanics and Runge-Kutta methods to simulate various constrained systems. From expressions of energy it is capable of deriving equations of motion using symbolic differentiation and then stepping through them in time to simulate the motion of the system.

How to use

The homepage has links to each of the system simulator pages. Each page has an energy label and diagram, playback buttons and sometimes system equations. The Rolling Disk Pendulum has equations of motion too complex to display on the screen. There is also a button to view the Python system file that creates the solver. The page runs best on a landscape desktop orientation.

Code structure

The project is written in both Python and JavaScript: the main Lagrangian system solver uses Python for its polymorphism and flexible OOP, while the renderer uses JS to efficiently draw the system and update the GUI. Minimal external dependencies are used, so almost all of the code has been written from scratch. Neither component uses nor requires the internals of the other: the system solver simply outputs a few numbers representing the phase state of the system, and the renderer uses those numbers to calculate the positions of objects to draw.

Challenges

One of the first major issues encountered was how to simplify expressions. Many of the basic rules in algebra are rather complicated to systematically apply, such as collecting like terms or using index laws. In fact, since the expressions obtained from the Euler-Lagrange equations are of a specific format, this symbolic differentiation engine is not fully-featured.

Another detail that required significant attention was how to embed Python into a JavaScript powered webpage. The library used for this, PyScript, has two different Python interpreters: Pyodide and MicroPython, the latter of which is 37x smaller in size. The symbolic differentiation engine does not require any external dependencies, but the RK4 time stepper does use NumPy, which is not available on MicroPython. This meant that much of the code needed to be rewritten using ulab, the MicroPython equivalent. In addition to this, many of the CPython-specific implementation details were different, such as dictionary key order and hash function limitations, had varying behaviour on MicroPython and had to be taken account of.

One of the techniques I used was dynamically creating each simulation webpage entirely using JavaScript without any frameworks such as jQuery. This meant that each simulation would have almost identical HTML and simply differing diagram drawing JS, which made adding new simulations a matter of copying the template code and editing the rendering script.

Merits

The system code is extremely intuitive to the point where even non-programmers should be capable of understanding how the system is set up. The most complex system, the Rolling Disk Pendulum, has no less than 7 components exerting classical forces on each other, but the Euler-Lagrange equations convert this simply to a set of simultaneous equations that can be solved instantly for individual accelerations. This results in fluid motion appearing on the screen, no matter how chaotic the system is.

  • 20 devlogs
  • 34h
  • 19.88x multiplier
  • 667 Stardust
Try project → See source code →
Open comments for this post

1h 16m 24s logged

Loading RLE strings

Added a modal to input any RLE string (many can be found at https://conwaylife.com/wiki/!). Spent a while trying to debug an extra generation simulated when loading, only to realise my RLE loading was too fast and outpaced the simulator…

The RLE can also be inputted through Ctrl+Enter. RLE banks to be created soon…

Temporary deployments can be found at https://rayzchen.github.io/algol/

0
0
5
Loading more…

Followers

Loading…