Screeps: The Programming Game That Will Challenge Your Mind and Skills.

Merlin Stemmer
3 min readMar 15, 2023

First of all, what is Screeps? Screeps stands for Scripting Creeps. Screeps is an open-world sandbox programming game. I have fallen quite deeply in love with this game for a variety of reasons.

What pulled me into the game was the promise of it helping me learn Javascript. Since I was enrolled in a web development course, I thought what a great opportunity it would be to touch up on my Javascript skills.

This game requires deep problem-solving. You must think critically about resource management, unit control, base expansion, combat, survival, diplomacy, and much more.

For example, for my construction plans, I needed to build a link structure so that I could send energy back to my base. This link would ideally be placed next to a source, however, sometimes the source location was in a tunnel where it only had a 1x1 area to get to the source, this meant I needed an algorithm to detect this, how I actually went about this was using recursion. So I start off by checking how many positions around the source are walkable, if it’s greater than 1 then I can build my link whilst allowing my miner creep to access the source, if it only had one walkable position around the source, then I would call the function again at the position of the one walkable position until it finally found the first position with at least two walkable neighbors and then build the link at one of those. Screeps is really fun when you get something like this working!

--

--

Responses (1)