Move mouse to move fluid source position.
Spacebar to toggle debug mode.
Using the Nape Physics Engine to model particle
collisions, blurring the particles and thresholding the result you can put together
a half-decent fluid simulation. It won't score any points for realism, but for an
extremely easy gimmick to implement it works quite well. The effect feels similar
to the Flash game Spewer.
Simple implementation of maze generation use depth-first search and backtracking. Added an isometric grid and
delay so you can see how the maze is generated. Maze always start on an edge but currently does not necessarily end on one.
Commented source code below (minus visuals code), very verbose and highly ineffecient, but quite easy to follow.
A: Move left
D Move right
S: Dash towards ground
Spacebar + A/D: Dash left/right
You get two jumps every time you set foot on the ground. If you use up both jumps, but then touch
a wall, you get an additional jump.
Dashing towards the ground using S uses up all your extra jumps.
Click and drag on any tile to change its height.
Isometric tiles are formed by drawing a rhombus whereby the sides form a 30 degree angle with the x-axis.
This means that the height of the tile will be half its width. In order to give the tile depth, offset the
y value of the rhombus by a depth value, then just fill in sides by drawing between the original rhombus
and the offset rhombus.
Converting to and from isometric/cartesian co-ordinates is fairly simple. In Haxe:
SAT allows for the testing of a collision between convex polygons by projecting each vertex of both shapes onto
the normal of each axis of both shapes. If all the projections overlap, there is a collision.
This demo does not handle any collision physics but rather just checks for the collisions, the initial step
in resolving collisions.
Amazing post on implementing this algorithm.