Day -5
Hi,
This is my blog for my #devember2k18 project Screep Studio.
The plan is to develop (or at least make a start on developing) a stand-alone client / IDE for the Screeps MMO. For those not familiar with the game it’s a sand-boxed PVP battle MMO aimed at either programmers or people who are interested in learning to program while having fun gaming. The idea is to gain control of rooms within the world by populating empty rooms or taking them form your opponents. However in order to do this you need to program your own little army of A.I “Creeps” using JavaScript (there are “cross compilers” for other languages too)
This is what the website says about it:-
What is Screeps?
“Screeps means “scripting creeps.” It’s an open-source sandbox MMO RTS game for programmers, wherein the core mechanic is programming your units’ AI. You control your colony by writing JavaScript which operate 24/7 in the single persistent real-time world filled by other players on par with you.”
It’s a pretty cool game but I haven’t played it for a while and wanted to get back into it. I also wanted to play around with the private server they released so I could develop my A.I without having to worry about being wiped out by all the top players on the live site.
On the live server you can play using your web browser or a custom client that runs as part of the Steam client. But, if you want to play on your own private server you have to use the Steam client as the web server part of the game was not open sourced with the private server.
And to make a long story even longer … the Steam client is “pants!” (YMMV but at least in my case I just can get it to run well on Linux) … so I’ve decided to have a go at writing a stand alone client that will at least be usable with the private server.
The Current Plan
-
Find out as much as I can about the Screeps API as it’s not officially documented. As far as I know there are two APIs required to build a client. The first is a REST API that seems to be used to query the state of objects in the game (e.g getting information about the world, the player, the rooms they control and their structure etc) and the second is a Websocket pub/sub API for real time game object updates. I’ve done bit of research and found some open source clients written in various languages with partial information on these API and since the private server is open source I should be able to get any missing info from the source.
-
In the long term I would like to develop a reasonably usable game client / IDE at least something that can be used as an alternate to the Steam client for private servers but for #devember2k18 I aim to just make a start and build the network and UI components to render a live view of a single game room with all the game components (spawns, creeps, walls, roads, towers, storage etc). If that goes well I would like to add support for a read-only console to view script output. Long term I would like to add a built in JavaScript editor and room object creation UI.
-
The client will be written in C/C++ using the Qt framework because I’d like to be able to build it for Linux and Windows.
I actually started playing around with the idea on Friday 23rd so I put together a basic proof of concept just to figure out if I could render the terrain using data from the server.
Since it’s not December yet, I’m calling that a prototype hopefully it will look more like the following when it’s done (if I can find some free graphics because I can’t draw)
Contract
I, Shecks, will participate in the next Devember. My Devember will be a game client / IDE for the Screeps MMO. I promise I will program for my Devember for at least an hour, every day of the next December. I will also write a daily public devlog and will make the produced code publicly available on the internet. No matter what, I will keep my promise.
Right, I’m off to do some more “prototyping”
Shecks