Yesterday I dashed off a quick, flippant tweet about developing mobile-accessible web apps and ultimately how folks in past managed so much with so little:
sometimes I catch myself thinking URGH making this RPG work on mobile is so painful, maybe I won’t bother. Then I remember what folks managed with a 320×200 display and less processing power than a hairdryer
It’s true, though. Sometimes I struggle working out how to fit everything I want onto the screen, even in full desktop mode, and then I’m shamed by what was accomplished with just a display measuring just 320×200 pixels back in the day; a screen that makes even the most conservative of viewport settings seem positively generous.
This evening I got pathfinding working around a larger, scrolling map. I thought this would be best demonstrated in motion, so here’s a little YouTube video of it in action:
I had to turn the sprites down to 32×32 from 64×64, as the view seemed too claustrophobic that zoomed in. This has some unfortunate knock-on effects for the mobile client — I think at 32×32 the tiles will be too small to accurately tap on — but I’ll tackle that another day.
You know what it all boils down to? It’s this handy formula:
Price = Base Cost × Multiplier(#Owned)
It works particularly well, psychologically, if the multiplier is set between 1.07 and 1.15. Less than that and you progress too quickly to enjoy each new upgrade, and much larger than that and the game bogs down and feels like a tedious grind. Somewhere between 1.07 and 1.15 is the sweet spot, used by many, many idle/incremental games.
Just in case the name didn’t give it away, Bones of the Idle has a strong idle/clicker component. When you’re gathering materials
There’s a few points raised that I want to briefly talk about in the context of Bones‘ design:
I kind of have a system in mind for “ascension”, whereby players will be able to retire characters in exchange for a regular offline income. You get to start over with a new character, and every day you’ll receive some income and items based on all your retired character’s skills. Potentially these retirees will appear in the game as NPCs.
Autoclickers and scripting
Bones of the Idle is free to play, and there’s no adverts. It’s also not going to be nagging you to spend money. However, my time has value, and I’m not adverse to money. I set up a Ko-fi page here, where people can chip in with donations if they feel the game is worth it.
If I ever add anything resembling micro transactions — in general I have no issues with them, when done well — I’d have them be ethical, not lootboxes, and definitely not pay-to-win.
Last night was the inaugural meeting of my new after school study club, and it was a very cosy, pleasant experience. We went around the table and talked about our various works-in-progress, discussed the merits of various database/model frameworks, and eventually settled down to work on our individual projects.
I spent the time getting field-of-view and fog-of-war working in Bones of the Idle. I already had some code from an earlier JS roguelike project to hand, so with a bit of refactoring I was able to slot that into place:
The darker areas around the edges represent tiles the player has seen before, but currently cannot see (fog of war), with brighter tiles they can currently see surrounding them. As you can see, their field of view isn’t a perfect circle, as it’s being obscured by the nearby trees.
Now that the player can be placed on the map (which in turn can be larger than the view port, a new feature over the previous code base), the next obvious step is to re-implement pathfinding and get them moving around and scrolling. I still want that to be verified server-side, so again I’m hoping to take the existing code I already have, give it a polish, and drop it in place.
Today is the first of August, and that marks two new things starting for me. Firstly, it’s the beginning of the 2019 Blaugust blogging challenge, which sees bloggers of all kinds banding together to create content for their sites throughout August. The greatest goal a Blaugust participant aims for is one new post per day, but any amount of activity is rightly celebrated by the incredibly friendly community. All of my Blaugust posts here can be found under the tag #blaugust2019.
Perhaps more excitingly, this evening will be the first meeting of new club I’ve set up. One of the hardest parts of working on Bones of the Idle is actually finding the time to do so. By the time I’ve spent the day at work coding, then commuted home and settled down, often I find my energy and enthusiasm waning.
In wondering how to combat this, I struck upon the idea of carving out a few hours regularly for working on projects like this in a different environment. And so, after consulting with my manager, the After School Study Club was born. I’ve arranged for some interested colleagues and I to stay behind after work for a couple of hours every other week, to work on, share, and get feedback on whatever personal or professional projects they have in progress.
I’m hoping that some people will also volunteer to give little informal talks or workshops on new technologies and things they’ve learnt, but mainly I want a relaxed, supportive environment to geek out and work on passion projects, if only for a few hours at a time. If nothing else, it’s a bit of progress and a spotlight to show off every two weeks, and that can’t be bad.
I spent a bit of time last night working on the new look for Bones of the Idle. I’ve been on a bit of a lo-fi vaporwave kick at the moment, and seeing how much of the game is supposed to evoke a kind of wistful nostalgia for late 80s/early 90s BBS door games like Legend of the Red Dragon(1989) and classic ASCII roguelikes (Rogue, 1980), as well as early pixel art gems from the 8-bit eras of the Spectrum and Commodore 64, vaporwave seemed like a good fit.
I prototyped some UI elements like simple buttons, basic form elements, overlays and popup boxes, and ended up implementing them on the main home screen, which I think looks pretty good now:
It’s aggressively neon, the green glows in a totally tacky way, and I’m mixing green and pink in a way that shouldn’t exist in nature. In short, I’m pretty pleased with it.
I’ll be sticking mainly with this colour palette (top row), which I think most would consider to be canonically vaporwave, but I’ll also be experimenting with the colours on the bottom row, which are the 180° hue-rotated compliments. In theory they should compliment each other well (if used sparingly), but I’m no designer or colour theorist. I’m pretty confident in my skills for the more technical aspects of getting this game built, but the look and feel of it is something I’m really going to have to work at and pay close attention to.
Here we are in the middle of July, and there’s a conspicuous lack of changelog notes for June. So what happened?
Most of June was spent in an existential funk as the project floundered a bit and I found it hard to keep working on it. Some of code was getting a bit smelly, particularly on the client-side, and I found as I was working on new content (skill-driven combat, specifically) a lot of the structural assumptions I had made early on were proving to be incorrect.
So it’s time for drastic measures to get things moving again. Co-incidentally, the folks at Debian released buster, the new version of their distribution recently. I took this as a bit of an omen and upgraded my server. It went pretty smoothly, and it gives me access to the latest version of PHP, and so the latest version of Laravel, too.
I created a new project, and I’ve been slowly porting over the decent code and rewriting the bad, paying particular attention to the client, where I’ve completely re-written the network handling, and made some pretty massive changes to the display canvas.
The upshot of all this is that the game is looking… different. Better, I think, but certainly different. The colour palette is a lot more high-contrast (and dare I say it? vaporwave aesthetic) and the visible map area is much larger. I realised that what I really want to be implementing is a more roguelike experience, with larger, scrolling maps to explore. So that’s where I’m heading.
May was a huge month for Bones of the Idle. For one thing, it got named and stopped being “that browser game project”. But it also got pixel art sprites, maps you can wander around (with A* pathfinding), crafting, and skill-based combat. It really went from being a proof-of-concept to being an actual game.
The player is now visible on the map and will move to a location when the map is clicked. Pathfinding is calculated entirely server-side and starting an action is now co-ordinate based and validated by the server.
The forests are now (potentially) infinite, with new maps generated by the server on demand. A small town consisting of pre-generated maps has been started.
Combat, monsters and NPCs
Monsters (and players) have a selection of stats that influence combat. Both now also have combat skills that have individual effects, strengths and weaknesses.
New monster: giant forest rat
Initial work on NPCs you can converse with.
Items and crafting
Crafting is now implemented with two skills: woodworking and cooking. Interacting with a crafting workbench opens up a new UI that shows all the recipes available to you, and allows you to specify how many products you want to start crafting.
New recipe: process oak wood
New recipe: wooden skewers
New recipe: rat on a stick
Player health and energy are displayed as a pair of progress bars above the map. Players now slowly recover health while performing any action other than combat, and can quickly recover both health and energy by eating food, or resting at specific locations.
New popup overlay windows for player stats, inventory and item details.
Clicking an item now pops up a small window describing it, and allows you to use certain items. Items with a use effect show a small yellow star next to their name.
Many, many visual updates and tweaks, including full mobile browser support.