January 2019 Dev Entry
This last month all focus was on getting the Alpha Server launched and the Alpha Build playable. And guess what, spoiler alert! We made it! It just took all month...
December Work Hours
- Total work hours: 121
- Total work hours streamed: 6
Not a lot of time was streamed this month, but plenty of work was put into the game. Sadly most of the server deployment work had to occur off stream because passwords and configurations were being thrown around carelessly and I couldn't risk leaking anything.
This next month though will have a lot more streams. In fact my New Years resolution is to stream every day- even if it just a gaming stream. You will be seeing a lot more of me! So be sure to head on over to the Twitch stream, and Happy New Year!
Linux and Node.js
One of the many steps needed to get the Alpha ready was to deploy a Linux server that can run the Node.js game server. Our game server is programmed using TypeScript but that compiles into JavaScript which Node.js excels at running as a server-side process.
Before we talk about running the software, we need to talk about the hardware. Or at least in this case the Virutal hardware. In other words, obtaining the server hosting. I started hosting this very website on DigitalOcean last summer, and it has been an amazing and affordable server provider. It was a no brainer that the Alpha server should be deployed on DigitalOcean as well. The cheapest server option, the $5/month one, will be the perfect fit for our game server hosting while we have a couple of dozen players checking it out at any given time.
Now with the server ordered, it is time to talk running the server application itself. The server application is a Node.js program that runs as a command in a terminal window by default. But for us we needed it to be a bit more robust. We need the server to self-recovery if it crashes, and we need it to auto-start on a server restart. To solve this I decided to try out the process manager known as PM2.
Shows the PM2 process manager running the AetherStory game server known as "phanxserver".
The PM2 process manager has turned out to be amazing, not only does it auto restart a crashed server but it also keeps track of the server's performance, such as the event loop latency (basically the FPS of the server), how much RAM and CPU the server is using, and how long the server has been online.
Oh and if you were wondering, we are running Ubuntu as our Linux distro.
Game Patching and Deployers
Now with a server online its time to populate it with game data. To simplify this process I created a series of tools that assist in deploying the game and patches. There are so many different tasks and processes that were needed to get the game up and running. I will list out some of them below.
- Deploy Game Database - copies the database from the dev server to the alpha server
- Deploy Game Server - compiles the typescript and transfers it to the alpha server, plus restarts the pm2 process
- Deploy Game Patch - packages a game patch and uploads it to the file server, then informs the patch version database of a new patch is available
To assist with the deployer processes I created a new NPM module to help connect to remote linux servers and execute remote SSH commands, but I also wanted it to support SFTP file transfers and have a shell session so each command could build on the previous command's context. While I found each of these goals in various packages on NPM, I didn't find one that did it all on one connection. And I also didnt find one that was TypeScript compatiable with promises and async/await. So this is what my NPM module solves. And I decided to make it open source so you all can use it as well! Check it out!
Alpha Server is Launched
And with all that said, I am pleased to announce the Alpha Server and the Alpha Test has now officially launched. If you have unlocked an Alpha License you will be able to log into your Phanxgames Account on this very website and find a download link.
If you have not unlocked an Alpha License there are a few ways you can do so!
- Donate a total of $20 (lifetime total) and gain not only the Alpha License but also Beta and the full version of the game.
- Enter the live stream Alpha Key monthly giveaway. Join me on twitch and enter the [!enter] chatbot command.
- Make sure you opt-into the Phanxgames Alpha testing profile and you may get selected via email.
If you find any issues while exploring the Alpha be sure to report them on the Github issues page here. Thank you for your help finding all the bugs!
Conclusion
This month we actually made the Alpha release goal! Even though it didn't happen until the very last days of the month. And what better timing! Just in time as a late holiday gift and what a great way to celebrate the new year!
If you want to help support the game there are so many things you can do. But the simplest thing you can do is hit that "Like" button below and leave me a comment so I know you read this and even that bit of moral support goes a long way to keep me going.
If you want to do more here are some things you can also do:
- Join our discord: https://discord.gg/phanxgames
- Support me on Patreon or Donate: https://www.phanxgames.com/donate
- Follow and Subscribe to the Twitch Dev Stream: https://www.twitch.tv/phanxgames
- Follow me on Twitter: https://www.twitter.com/phanxgames
- Buy Special Offers and support us indirectly: https://www.phanxgames.com/offers
Thank you so much to my patrons and Twitch subscribers! Without you I wouldn't be able to keep doing this. Your support makes this all possible.
A special thank you to my Patreon supporters: Parker, Grant, Alessandro, Alexander, Mark, and Shield! And an extra special thanks to CaptainStupid for helping me fund the Alpha server!