Published on

Devlog #1 - Servers, Data, & Inventory

And here we go!

Every version of FO has used https://www.smartfoxserver.com/ for the server side of things, so I setup one of these in the cloud for development. Then I needed some kind of database storage to store all the datas so I decided to go with https://www.mysql.com/ once again. With those up and running I was off to the races with server side coding!

The MySQL server will store our most prized possession, player data. I've stored player data as plain text, binary, and now it will be stored as https://www.json.org/. So I setup the https://github.com/FasterXML/jackson json library and away I went serializing and deserializing player data. Once I had JSON to work with I worked on getting it saved and loaded from the new MySQL database. And then boom, there was all that was needed to save and load player data on the server!

While designing the player data I had to decide how long/short player names should be. In all previous iterations of FO the length of names was between 3-12 characters. This time around we're going hog wild and changing it to 2-12 characters. Get ready for names with 2 characters!

And then on to creating and sending the inventory data to the client. The client is being written in https://www.typescriptlang.org/ and voila I've got the inventory receiving and deserializing into class objects in the web browser. Now we need to start drawing things.

Drawing things on the web has come a long long way in the last 10 years. Let's take a short trip through history.

Web Game History:

2006-2014ish Flash was really the only viable way to make games in a web browser. It was easy to use and had great tools for 2D but it was very very slow and could not do 3D at all.

2014-Present Unity exporting to HTML5/WebGL became a thing and suddenly much more complex games were possible in the web browser. Unfortunately Unity makes it very easy to start making a game but very hard to finish a game. Maybe I'll make a huge post about Unity someday but today is not that day.

2022-Present HTML5 is finally a viable option! There are many HTML5 game engines available now that are quite good.

And so for now I have chosen to use https://www.babylonjs.com/ as the drawing engine.

So then I setup a bunch of classes to represent the inventory system and voila we have a basic UI window. Then came the first item bag. Now we need to fill that bag with items.

Do those graphics look familiar? Yes, they are the original sprites from FO. They didn't need much cleaning up! Ok, must focus, back to items.

Items will be the subject of the next devlog on Tuesday. See you then!