I've been taking bit of time off lately while my partner was off work for her summer break. But halfway through I got a bit antsy to code something and decided to make this wee web app thing.
I want to do more to keep fit while I'm working at my desk all day, and I came up with this little page that gives me a random workout to do, either on a button press or on a timer that alerts me to do something once an hour. Kind of inspired by those 4chan threads that are like "roll and if your post id ends in X then do Y" (usually for choosing a genre of porn, it's always porn right?).
It's pretty simple but I've been using it a little now that my partner is back at work and found that it's been a good way to make doing a little bit to keep in shape exciting, but maybe I'm just a gambling addict lol. I've also found that it works really well to do in the idle time between rounds when playing games online, it's been keeping me company today doing Fishing Trawler for the Angler outfit in OSRS.
There are a couple of changes I could make: an alert sound effect for the timer - especially since there doesn't seem to be a great way for a tab to grab focus (rightfully so); changing 20 push ups to 10 - it can be a bit much when you roll two in a row lol; oh and maybe a way to set custom exercises, but let's face it I'm probably the only one using this so it would be more for my convenience I guess, not that I expect to be changing things too often.
Check it out here: captkuso's home gym
This last week or so I’ve been working on bringing over some procedural world generation code to Godot that I’d experimented with in Unity a little while back. The ultimate goal being to make a kind of procedurally generated Oblivion type open world RPG, with an art style somewhere between A Link to the Past and the DS era Pokémon games. Oh, and with the Minecraft drop-in multiplayer server structure, but let’s not get ahead of ourselves.
I had some worries over how mesh generation and multi-step world gen would perform in GDScript, and had considered implementing it in C++, but I decided to just do the easy thing for now, and if I run into performance issues down the line then take another look at it.
Fortunately though it seems to run pretty nicely for now, and to be honest if I’m only doing the world gen once when a new world is started and not making an infinite world, sitting to wait for a minute while the world is created shouldn’t be too huge a deal.
So for now I have a 64 by 64 tile chunk getting generated on each thread in a 16 by 16 chunk world, which is likely to be way bigger than the game will need, especially early on when the content isn’t all there yet, but it’s nice to know that it’s running nicely with all that there.
Biome generation is (as far as I can tell) handled in a similar way to Minecraft, with three OpenSimplexNoise maps (will be changed to FastNoiseLite in Godot 4) giving me height, temperature, and humidity for a given tile, which I then use to determine a biome.
The biomes are probably a little small right now, but it’s kinda hard to tell until I can walk around the world with a character and experience it for myself. That’s a simple numbers tweak anyway so no worries there.
It’s been a little bit of a fight, with me still lacking a lot of Godot experience, and to be honest never really having to deal with vertices and uvs and normals before, but I’m learning and I’m happy with how I’m progressing.
One thing I can’t deal with is the heat here right now. It’s getting pretty sweaty and some days I’m having trouble focussing, so maybe it’s time to get the AC ready. I’ve been resisting using it as long as I can, I know it’s only going to make dealing with the August heat more difficult the earlier I start relying on it.
My next step is to pretty the tiles up a bit and get more of that ALttP feel to it.
For now though, I’ll leave you with a cool bug I ran into. Here I was iterating through the heightmap, and accidentally set tiles on the Z axis to read heights on the X axis!
A little while back I decided to give learning Godot a shot. I like the open-source ethos, it seemed like it had a cool community, and frankly, after a little while of wrangling Unity to do some mobile stuff for a while it was starting to grate on me.
While trying to figure out what a good project to familiarise myself would be, all of the stuff with a shithead billionaire trying to buy twitter happened. Now I kinda hate twitter anyway, it’s only remotely usable if you keep a blocklist of tens of thousands of accounts, its moderation leaves a lot to be desired, the way your feed is ordered only seems to push stuff that depresses me. Not to mention other issues that are inherent to social media in general: the ubiquitous like button that I feel like only really serves to stifle conversation and make me feel more distant from the people I follow, the fucking ads every five posts, the ever-present threat of things going the way of Tumblr and just banning any content that some credit card company didn’t like.
So I started thinking about alternatives. I’ve tried blogging before, but even with content management systems like WordPress, or static site generators like Hugo, there’s always just enough friction to stop me from regularly posting. What I wanted was something that I could use on my phone or tablet, my laptop, to just write a post, press send, and have all the work done for me. Twitter without the Twitter part lol. Something where I own all the content, could make tweaks to the site whenever I want, and jump ship to another host if needed and without having to set a bunch of stuff up. Maybe something a little more Web 1.0?
I like static sites for a few reasons, mostly just how simple and easy they are. I don’t need to set up a database or have a whole LAMP stack to keep the lights on. Not that I think that highly of myself that all of this stuff needs to be preserved for future generations or anything, but it being easy to archive in its complete form is kind of appealing too. I’m a big fan of the Internet Archive Wayback Machine haha.
With that in mind, it seemed like a static site generator would be a pretty good learning project for Godot. So I got to work.
When I started by writing my little Trello board I really went over the top with it. I was putting in features like an RSS reader so that I could make my own pseudo feed, and an analogue to retweeting by embedding and linking a section of the shared post. But at some point I managed to remind myself that I was doing this for myself, as a little learning project, and if I really wanted I could always come back to it later to add stuff.
So here we have KusoPost (still so proud of the name lol). As you can see it’s pretty fucking simple.
The way it works is by having two html files as templates. One for an individual post, which contains only what you can see from the title of this post to the end of it, and most importantly two tags: ‘&title’ and ‘&postcontent’. When you type something in and hit the post button, it simply does a find and replace on those terms and slots in what I’ve written in the two boxes (or if there’s no title just inputs the current date and time on its own).
From there I take the other template, which has the code for the rest of this page, and do the same thing again, first iterating through the sites post folder containing all previous posts, then replacing a ‘&maincontent’ tag with the ten most recent posts, put into the individual post template from the last step.
From there it’s just a few things to make the site feel more complete. I make another permalink page for the new post, which is pretty much just the same as the main page, only containing just the one post instead of a bunch of them.
I also make an archive page once there are more than ten posts, listing the titles of every post and linking directly to their permalink pages. I decided on this over pagination for now, mostly because I saw it on the Zonelets static site generator and kinda liked it. Incidentally that’s the reason why posts have titles at all, just so it’s easy to get an idea of what the post is on the archive page, otherwise I probably wouldn’t have bothered.
The only other thing I put into KusoPost for now is a button to insert images. This inserts an img tag linking to the file locally, which when I hit post is copied to the right folder on the website, and the img tag is updated to reflect the correct location.
There’s quite a lot I left out of this first version. The biggest feature being automatic uploading to the server.
I decided to host the site on Neocities, partly because it felt like the kind of place this site belonged with the web 1.0 ethos, and partly because Neocities does have some level of site discovery, and I really do appreciate some sense of community.
The issue with Neocities however, is that from what I can tell (mind I’m not an expert and was gonna kind of just hack this together) the API isn’t really flexible enough for me to upload files from what is supposed to be a game engine ha. If I used AWS instead say I’d probably encode as base64 and then just send all that, Neocities wants a direct link to the file, and it doesn’t really seem like something that Godot would support, or at the very least not something that I wanted to take the time to figure out right now when I was already struggling to get my head around Godot as it is.
This means that I can’t have it be a mobile app for now, but like I said, learning project, I did the important thing and can come back to this later if I feel like it.
For now when you hit posts it just opens up a directory in Windows that contains all of the website files, and I can just drag that over, no biggie. (thought: could I code something outside of Godot that would support the upload better, and have Godot just run that at the end instead of trying to do it in engine? Might be one to look at down the line)
The other big things I’m missing for now are the ability to edit and delete posts, and also if I decide to change the site templates in any way (outside of just css that is) I’ll need to have a button in there somewhere to reformat all posts to match up with the redesign. Worst comes to worst I can do most of these manually for now, but they’ll likely be the next features I add in.
I’m also still weighing up comments systems (they’re mostly all terrible unless you self-host and then that’s a whole thing), otherwise I’d offer to answer any questions lol. That said, there are a whole bunch of ways to contact me on the about page, so feel free to hit me up!
Welcome to my new site. It's made using a static site generator (I'm calling it KusoPost lol) that I built in the Godot game engine, but I'll go into that in detail in a future post.
For now though, this post is just here to act like one of those under contruction gifs while I set up all the other non-blog pages.
I'll have more to say soon, but given that until now I've just had a super basic web page with my name and a few links on it, I'm really excited to have my own lil web 1.0 corner of the internet!
Lots of love,