The little engine that could... aka Happy One Month Anniversary!
First, and most importantly. Happy One Month Anniversary! I started this little project exactly one month ago. While, you didn’t get to see squat during that time.. I am quite happy with my progress :)
Got a few questions as to why it takes me a long time to work on things compared to most (like.. 90%) developers. The answer is simple. I wrote my game engine from scratch. Most developers uses a pre-built engine. Unity, Unreal, Godot, and many others. Working with a pre-built engine provides -many- advantages. One of which, is a ramp up time to content building. They also provide disadvantages such as bloated file sizes, multiple dependencies slow workflow and the like (comparatively).
Since I am the sole developer, and this game is a simple 2D MMO, that runs on a single OS (Windows 10+), using any pre-built engine is simply overkill for this game. I want to be in complete control over size and speed. And since this game runs on a specific platform with specific criteria, a small game engine is good enough. Mind you, what I just said is specific for this game. My other projects uses a pre-built engine :)
So I’ve been working on the map viewer to flesh out a compartmentalized game engine. Meaning, I work on the engine with-in the map viewer that is plug-and-play into the game client with 3 lines of code. The sample map I am working on has the 12 layers of animated tiles and some special tiles in it (player blocking, npc blocking, etc). I use a simple ini format as a transient format between C# and Basic. While I could use JSON, basic is a bit clunky working with JSON files, ugh.
The .map file is the file the client reads, while a future .dat file will be spit out for the game server to read. The transient file is 10x bigger than the finished client map file. The .map it loads much faster… as binary files should compared to text files, and ini files at that.
On disk, space (binary + assets) is under 70 MB (so far) while RAM is under 100 MB. Even though this is a little game, it still uses less space on disk and ram/memory than other non-mmo 2d games (so far). My aim is to keep this small and fast, so I gotta stick to that..
Before I show off something, I can’t believe I never mention which Basic dialect I am using. It’s twinbasic.com … In short, this bad boy is the brainchild of a mastermind. Twin Basic will read and write Visual Basic 6 code as well has lots of QOL. To name a few… 64bit support, no runtime libraries needed, can cross the bits (32bit apps access 64bit controls), etc. Even though Microsoft abandoned Visual Basic.. twice!!!!! First time “classic” with VB6, and second time with VB.Net (with extremely minor upkeep). Twin Basic is basically the spiritual successor to Visual Basic 6.
With all the above said, I can finally show off the ugly starting/temp map below. Please note, each animated tiles can hold up to 60 frames since I am FPS locking to 60. I am only showing off 2 frame animation at the moment due to the tileset I am using consists of 2 frame animations.. errr..