Interesting Visualisation – like tixy.land
If you remember tixy.land that I mentioned back in November last year, here is another website that lets you control a visualisation. In this case, tileflip.xyz lets you create a single function and applies it to every square on a board. You can control how many squares the board has and how often they are updated through a pair of sliders. You can pause the animation and toggle squares by clicking on them in the mouse. One of the early examples runs Conway’s Life and has a really short function.
The functions can be quite complicated (it’s JavaScript) as this example shows which moves a ball around the screen while changing colours.
The ctx (short for context) object has various properties and functions that you can call on it. For example ctx.resolution is how many squares there are on the board and this page lists all the properties and functions.
function rule(ctx){
ctx.color = ctx.floatToColor(10/ctx.t)
let r = Math.min(ctx.t**2/10, ctx.resolution/4);
let cx = ctx.t*2%(2*ctx.resolution+1);
let cy = ctx.t*3%(2*ctx.resolution+1);
if(cx >= ctx.resolution+1){
cx = 2*ctx.resolution - cx;
}
if(cy >= ctx.resolution){
cy = 2*ctx.resolution - cy;
}
cx = cx/(ctx.resolution)*(ctx.resolution-2*r+1)
cx += r - 1;
cy = cy/(ctx.resolution)*(ctx.resolution-2*r+1)
cy += r - 1;
let toReturn = inCircle(cx, cy, ctx.x, ctx.y, r);
if(!toReturn){
ctx.color = 'black'
ctx.invert = true;
}
return toReturn;
}
function inCircle(cx, cy, x, y, r){
return (cx-x)**2 + (cy-y)**2 < r**2 ? 1 : 0
}
JavaScript is like C in many ways and while not the main purpose of LearnCGames.com, websites like this are an inspiration to games creators. My other interest is C# and I’m currently learning about Blazor a technology that lets you create webpages in C# using WebAssembly so it’s quite possible that things like this could be done in Blazor.
But it’s fun to look at the different example functions and you can also download the images as gifs via a link at the bottom of the page,
One of my favourite casual games is Slay by Sean O’Connor. I bought the full game which sells for $10 and it’s still selling well via his
I fixed the bug in the Atoms game and the third tutorial finishes it off. The source code (in this case atoms3.c) has been placed on
A university student by the pen name of Tronus has put a project from his 3rd year in his degree course on 

The first version of the program was 90 lines long but now it has grown to 275. This includes code to let the computer play and checking code plus I’ve refactored it a bit, simplifying the code. I haven’t extensively tested it and at least one bug has crept in. Occasionally the computer seems to claim ownership of a player cell. This stops you adding one to that cell so its not good.
ack in the mid 80s I was busy writing games for ZX Spectrum, MSX and CBM-64 and also porting games between 6502 and Z80. That was also when the original NES appeared. That had a 6502 CPU but a lot less RAM than the CBM-64.
WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 2D and 3D graphics in a compatible web browser without the use of plug-ins. A developer called Todd Fleming has created a