Crop and ClawDev

Dev Log 5 – Crop and Claw

Buy Somethin’ Will Ya

Shops were one of the biggest features still missing last week to make the core of the game fully playable. The first thing added was a simple option list that could be in-line awaited by the dialogue system, primarily for yes/no input. After, shop menus were added as prior menus typically were. While it’s built with bubble gum and toothpicks, it was surprisingly quick to get working within a day. Afterwards, an extra menu was tacked onto the buy/sell process so the player could view the item’s info without having to purchase it first. We have successfully overcome one of the worst things of a handful of NES RPGs.

Always Have a Second PC

I just so happened to install a second Debian Linux and left the free Nvidia Drivers on earlier this week. This saved me from a total showstopper. At some point, for some reason, the Debian repositories had updates for Nvidia drivers and the Linux kernel which were incompatible. My main laptop, which most Crop and Claw work was done on before the past week, had a kernel panic on boot and no clear way to open the Grub menu (quick searching online did not reveal CAPS LOCK was the trigger to force it on my setup, leaving me to do a lot of really obtuse stuff to get my laptop back up.) By this point, I had only been using the formal company PC for work for a few days, but that was just enough to keep progress going in spite of the laptop’s state. All projects are hosted on an internal git server running on a mini-PC, which both the laptop and desktop could communicate with. So no data loss or recreation had to be done.

Two pieces of advice for aspiring professional software developers:

First, have a business exclusive PC with defensive settings and updates: A second, dev exclusive PC doesn’t even need to be expensive, depending on your projects. If your project is a simple 2D or 3D game, you can probably get by with cheap hardware and embedded graphics. Once you reach more complicated 3D, or you use this for streaming, video editing, or complex art production, then you may want to invest more in it. I’d also be defensive about updates, to preserve stability of development. This is easy on Linux systems by just choosing to not update, unless a specific program is forcing updates and telemetry. As of writing, Microsoft is infamous for forcing updates that cause arbitrary breaking changes, so the only way you can likely ensure you can preserve a Windows machine’s functionality is to block it from public internet entirely, and only whitelist traffic to certain websites from the router level rather than the OS level (it has been thrown around Windows will ignore hosts blocking for updates.)

Second, learn how to run a dedicated server to host backups, version control repositories, etc. Arguably, you could host on a public git host, but Dinoleaf projects are generally kept on a combination of internal infrastructure and VPS hosting, depending if it is private or public facing. If you get very good at this, you can run a lot of services that your work PC and general-use PC. In the event of your internet is slow or offline, you can always access your repositories and continue work across multiple platforms. Also, while a second PC ensures you can always work while one machine is down, an internal server ensures you can always access your data on storage. I may write an article or two on Dinoleaf’s infrastructure for those who may want to massively improve their networking infrastructure and security when I get a chance.

Documentation and Refactoring Begins

The core game loop works now. Dungeons, towns, and combat can all flow from one to another in theory. Much of the codebase is a mess, because that’s typically how code starts out when you just need things to work. I’ve started taking time to shove recycled copy-paste code into separate subroutines that are called, as well as rearranging and structuring common calls to make content more data-driven.

One such interesting refactor was the separation of combat script behaviors from the damage formulas they called. Prior to this, skills needed to hard-code which formula it needed for physical damage, defense, magic, technique (and any combo of this), etc. But now, through some overly-clever and likely terrible trickery, we can dynamically fetch a function call to a specific formula and run the math based on a drop-down in the Godot inspector. This is achieved by using an enumerator for which skill formula to use, and using the enumerator’s internal integer value as an index to a table of function references. They all use the same parameters, though some don’t factor critical hit modifiers. But it is irrelevant as the formulas, which were already stateless functions that returned simple integers, know and handle what they need and disregard the rest. This change, along with reworking skill animations to be referenced by files and not by built-in strings, allowed for some massive flexibility improvements and streamlining of the standard offensive skill, as well as reusing chunks of code quickly for other scripts such as heal behaviors. Additionally, the ability to split offense and defense formula calls allows us to make strange specialized formulas such as physical offense vs magical defense without a separate skill behavior script.

Approaching the End of Alpha

As of writing, it is February 17, 2024. The majority of main game features has been implemented and we’re near beta phase, in which content creation becomes the main focus, with bugfixes and edge-case features being less involved. Considering the projected release date is Japan’s Greenery Day, May 4, that leaves about two and a half months to design, balance, write, and polish an entire NES JRPG. No pressure.

As part of this, we’ll be releasing a small demo for folks to try and feel out if it’s a game they would like, should they not immediately know from first glance. Exactly when is not certain, but clearly it must be soon since the target release date is not far off. If you are interested, you can subscribe to the mailing list on this page’s footer, following this blog’s RSS feed, or following the company Fediverse profile at @[email protected]. Additionally, wishlist on Steam with the widget below for immediate notification when the game is launched.

Hi, I’m pyral

Pyral hates videogames and doing things.

Leave a Reply

Your email address will not be published. Required fields are marked *