I enjoy learning about games and procedural generation...
World Tree
My latest attempt at working with procedurally generated worlds, but
this time as an engine. I learnt quite a bit from noisey-world and
from Game Programming Patterns, so this project actually feels quite
well organised after having some design go into it! I also finally
took a look at TypeScript and I regret not doing so earlier!
It's by far the most feature rich project of mine, with the engine
supporting geometry, collision detection and a light-weight event system
that make it simple for users to quickly generate a world and plug
characters into it. It currently supports 2D graphics, in an isometric
perspective, but it's been designed so a different renderer can be used
instead if it implements a couple of abstract methods. One nice little
feature is that a user can provide the dimension ratios (WxDxH) of their
isometric sprites and the engine will automatically create a simple box
geometry for it. The engine also contains a simple world generator,
which will try to generate as complex
appearing world as possible with the given assets: it's possible to
generate a world using just a single sprite, but the worlds look much
better when having at least two so that walls and floors are better
defined.
I've put together some tutorials to cover the current features
here.
Noisey World
Noisey World is a 2D island generator, written in Go, that uses a
Perlin noise generator
to create a height map and as the starting point for placing
rocks and trees. Moisture is added via a simple simulation of clouds
moving across the island, from a given direction. Most variables are
command line options and a good part of the generator is multi-threaded.
I didn't port it to be a webapp, but pre-generated examples of the islands
can be found here.
Dungen
Dungen is an (abandoned) work in progress to create a 2D turn-based dungeon crawling
fantasy RPG, written in Javascript. The player selects a character
and then the area in which to play - with different areas that
contain different types of enemy.
There are multiple areas, with each area containing multiple levels
which increase in difficulty.
The player will build up a party of
characters to defeat the dungeon, collecting loot from chests on the
way. The equipment system is a bit of a mess though!
The game engine is reasonably complete, but it's visuals are lacking.
'stand out' features are procedurally generated maps, with local
storage to save progress between sessions.
The game has a basic battle and magic system, with different playable
characters; though the enemy and NPC details need to be filled out -
they're pretty stupid and it's rather boring... But it can be played
here!
I learnt a lot of playing with his project but ultimately couldn't be
bothered to do the big re-writes that it needs. I also learnt that
writing a, relatively, large program in Javascript is a bit of a pain.
Typescript certainly interests me, but adding tooling to perform the
transpiling does not... being unshackled from those types of tools
was what got me interested in interweb programming in the first place!
Space Shooter
Space Shooter A simple shoot-up 'em that started as a project to teach children
Javascript. A simple game which partitions the screen in columns and
injects enenmy spaceships into them, with only one ship per column.
The enemy ships travel from the top of the screen to the bottom and
randomly shoot lasers. The player controls a ship located at the
bottom of the screen and has to prevent the enemy ships from passing
it. All of the resources are by Kenney, linked below. It can be played
here.
Useful resources Books
Bob Nystrom wrote a great book, 'Game Programming Patterns', and, of
course, he has a
blog which often also covers game programming.
I really enjoy his writing style.
Daniel Sunday used to run a website geomalgorithms.com, but has now turned it into
a book 'Practical Geometry Algorithms' - an extensive, and understandable,
resource for implementing geometry algorithms.
Tutorials
Red Blob Games
A truly great resource for anyone wanting to learn some algorithms and
techniques useful in 2D game development. The site contains many
iteractive demos and example implementations - I can't recommend it
enough.
Graphics Programming
As someone who hated matrices (and math!) at school, I found the tutorial around 3D
rotations very approachable, and not specific to C/C++.
Tools Inkscape
An excellent (open source!) vector graphics program.
Content Kenney
Endless, high quality, game assets. Free to download, donate or buy.
The stuff oftens inspires me to make something.
By day, Samuel works as a compiler engineer at Arm. By night he's
a father and husband. In his free time he's generally lazy, playing
games, watching Netflix and drinking beer. But sometimes he does some
programming.
Any fruits of that labour is held here.
He likes travelling, hiking, camping as well as playing with knives and fire.
All opinions here are his own.