Now that I have a working server and client paired up, it’s time to extend them. For now, I’ll mostly focus on the client, only extending the server where it makes sense.
To start, let’s get an image rendered. I’m using SDL for my rendering since it seems to be a solid enough library, with plenty of tutorials and documentation. I mean, Valve uses SDL. If it’s good enough for them, it’s good enough for me.
It’s a bit more complex than just this, but I can make a call to SDL_LoadBMP
, passing in the relative file path for the image I’d like to display, and it’ll add that into the renderer.
That’s all fine and dandy, but we need to have some way of communicating with the client. We can do this with key presses. The problem though is actually registering those key presses in an efficient manner, and.. ykno what? Fuck it. I’m going back to Godot.
Ah, Godot — the redheaded stepchild of game engines. I’ll practice my C++ on some other project, I suppose, despite the fact that GDScript is GDisgusting. I mean, come on, who tf sections off code with INDENTS?!
Shut up, Python.
Right so I don’t know a gosh darn thing about Godot, so we’re gonna go through some of the tutorial stuff in their docs and modify the heck out of it as we go. I figure that’s probably the best way I can pick up this shitshow of a scripting language. God I’m gonna be sick.
One of the first things the tut’s having me do is set up the player character. No biggie, I’ll just open up Pyxel Edit aaaaand
I kinda sorta based the design off the wizard from Noita. I’m TERRIBLE at art, even more so of the pixel variety, so I’ll take my inspiration where I can get it. Obviously this is just the first draft of the dude.
I’m also gonna need some animations.
I also tossed together an idle animation, but didn’t manage to get the screenshot for it.
Oh by the way, I should probably let you know we’re going in a slightly different direction here. Godot makes networking.. not intuitive. Their docs are ass and very conflicting, and I can’t be bothered trying to get their RPC stuff to work. Honestly I spent HOURS on their RPC trying to get communication between a client and a server, to no avail. I might in the future have some sort of authed direct DB connection instead, opting for a pseudo multiplayer a la Diablo 3’s auction house, but that remains to be seen.
Going back to that idle animation. Please enjoy my Unregistered HyperCam 6 watermark. It really takes me back to the golden age of YouTube.
In my defense, it was the most lightweight screen recorder I could think to download on short notice. OBS is bloated af and Loom is a thousand times worse. Honestly, whoever made Loom into a steaming pile of unoptimized horseshit needs to be taken out back behind the barn and fucking sho–
The very next thing on the list is creating a basic enemy. It looks like the Godot tutorials have only one enemy set up, but Aternumis is gonna need a lot of them. Fortunately, we really only need one to start. A little bit of Pyxel Edit later and we’ve got our first basic enemy.
He kinda gyrates when he walks. It’s funny. Also tossed together an idle animation. We’re going with some very basic animation logic here, I just need to be able to get the lil guy on the screen.
func _ready():
var mob_types = $AnimatedSprite2D.sprite_frames.get_animation_names()
$AnimatedSprite2D.play(mob_types[randi() % mob_types.size()])
Christ I hate indented code.
From there, I created a main scene and dropped everything in it, and added a little health tracker.
There’s a few bugs with this approach so far, both of which are documented in the GitHub. They’re both very easy fixes, and actually I’m not even sure I’d consider them to be bugs any more than they’re just unfinished implementations. Namely: the player character can double jump infinitely, and the health can drop below zero.
So yeah, not bugs. Unfinished implementations.