Hi fellow Nightmistians!
It's been a hot minute since I've played but I've always been a forum-lurker. It's pretty quiet around here, but I thought I'd share information about a project I'm working on.
A little background . . .
I'm sure most of us are in our 30s at this point, decades removed from the heyday of falling in love with and playing this game at its peak. I've been working professionally in the cybersecurity field for several years, and a big chunk of of that time has been in engineering roles. To be clear, I am by no means a professional software engineer, but I know enough to be dangerous (in my field I equate "engineering" to scripting, automating tasks, performing log analysis, etc.)
Python is very popular in security and I've recently been working on building up my chops. I got the crazy idea that it may be fun to practice Python by attempting to build a text-based RPG game, like of course, our beloved Nightmist. I started to think things like, "How is a game light Nightmist built?" "How does the client-server architecture work?" "What modern technologies would I use to build the basics of a game?"
I recently started building the foundations of a project that I thought would be fun to share with you -- especially if any of you are like me -- and have been even remotely curious as to what goes into building a game like this.
A little bit of housekeeping . . .
to staffers (whoever you are now-a-days): I don't recall the rules re: advertising other games, but rest assured, my passion project is extremely non-playable and there's a good chance it will never be playable, so I hope you don't take this as advertising another game. I simply want to share my adventures in learning how to build a full-stack app/game that exhibits fun mechanics that are inspired by Nightmist. It may be fun to engage in a bit of conversation around design choice, tech stack, game mechanics, etc.
Introducing Whispering Winds: Chronicles of the Ethereal:
I just started the project last week and wanted to see if I could even get to the point of building out the simple mechanic of allowing players to log in and move around a basic world. Before jumping into the code, I contemplated which language/tooling would best suit my needs. Inspired by Python, I decided that writing the core game logic in Python was a no-brainer. Shortly thereafter, I thought it would make sense build the web app in Flask, a micro web framework written in Python.
Here is diagram that represents the full current tech stack that I am using:
As you can imagine, I've quickly learned that there's so many details that go into building even the most basic systems: understanding web sockets, how to handle constant bi-directional communication between the client and server, and how to persist game data using a database.
I've probably put in ~10-15 hours within the last 5 days building the very basics. I've been keeping a progress log/screenshots and thought it'd be fun to chronicle them here:
After that basic client-server connection was handled, I started thinking about a simple grid system to handle the various areas that may exist. I built a simple x,y grid system and the foundation of movement:
Then I wanted to cleanup the UX and make it more clean and starting building placeholders for things like character info, inventory, etc.
In this final screenshot, you'll notice that the movement system is starting to evolve and its process has been the most profound for me so far. For example, after building the basics of movement I realized, "Oh, crap. How do I handle telling Player A that Player B left the grid?" This got me into a rabbit hole of understanding how webs sockets work, and in particular, how functionality within Flask's SocketIO library operates. It took me a few hours to understand the concept of connected clients (players) being in a various "rooms", which represent how a player can receive communication. I learned that each grid/room in the game needs to have its own socket "room" for sending messages to specific areas.
As of today, a player can create an account, create various characters, log in, chat, and move around a basic area called "Town Square". There's a ton I want to add and I'm certain I'll make a million more mistakes. I am working on adding items/inventory system and finessing the movement.
If I happen to make further progress - and if anyone is interested in more of behind-the-scenes game building a logic - I may post again!
Edited by PureMourning, 25 September 2023 - 10:47 PM.