Community Report of December 2023!

blog-image

Howdy, adventurers! I’m finally releasing the community report of this month!

IndieDB’s Indie Awards

First thing first, the vote for the best Indie is still going on! My goal is to reach the top 100 (which is an achievable goal). Therefore, if you didn’t vote yet, it’s not too late! Click on this picture and vote for AIdventure (No account needed)!

Refactoring, refactoring and REFACTORING!

My work on the UI-Rework™ release started like this:

I only need to improve the interface.

Said an innocent dev.

However, I have great plans to make the whole experience more enjoyable. And the code behind the interface was not ready for all these COOL PLANS.

To keep it simple, here is an example.

I wanted each AI to have different settings (because you might want a big AI to generate less text, while a small one to generate more).

But the code managing the settings was managing EVERY setting (full-screen, language, font size, AI options, etc). So I had to rewrite how the config works at all and to split it into smaller parts (each small part has a specific task). The same happened with the AIs (By the way, I’m removing the term “Model” which is not explitic to everyone. Model is now replaced by “AI”, “Generator” and “Translator”). I had two files for the AIs, one for the translators and one for the generators. And while custom AIs are technically generators, they aren’t exactly the same!

So I had to rewrite the behaviour of the AIs too!

But images are often more helpful than words, so here you are.

On this picture, you can see three important files. They are all different and don’t inherit from each others.

And now, you can see on the second picture, how I reorganized/rewrote everything to work differently.

To explain what changed:

  1. Model is no more. It is now split into multiple files.
  2. At the base of every file representing the implementation of the AIs, there is the AI file.
  3. What used to be “Model” (or most of it) is now in a file named Generator
  4. There is now a new file Custom AI which is (obviously) handling the custom AIs only.
  5. The Translator, now, shares a common base with the Generator (They are both AIs)
  6. Config still exists, but everything related to the game settings (display, fonts, language) has been moved to a new file named Game Settings.
  7. Same than the previous point, but the code related to the AI settings is now in Generator Settings.

Alright, all of this might be abstract but to summarize, this allows me much more modularity and simplicity.

Though, you might ask yourself “Why did he not do that in the first place? Why rewriting, now?”.

Many features I’m implementing now were not planned when I first started AIdventure. Moreover, when you start, you sometimes have to do quick and simple. But this quick and a simple solution isn’t efficient if you need to grow the project in complexity. That’s when you have to refactor. This is very important. Otherwise, you might end up having a disgusting spaghetti code or blobs.

To conclude, all of this takes time, but it’s worth the trouble.

AI Options

The next release will feature a huge improvement about the settings.

You will now be able to have specific settings for every AI (custom AI too). However, in a single click you will be able to apply one set of settings to every AIs or to reset them.

Another cool thing about the AI settings, is the preset system.

I believe it’s important to leave to the users a lot of options to experiment and customize as they want. BUT, it can quickly become overwhelming. That’s why I added a simple system of presets.

For now, there are 2 presets with 2 variants.

  • Memory Saving
  • Performance (Get the best experience at the cost of the memory)

Both presets have a variant for people who can’t run the game with the GPU.

AI manager

To stay in the theme of the AIs, I have another cool info!

Because of how the code handling the AI was written, AIdventure couldn’t download an AI in the background. You had to wait for the end of the download to do anything.

Now, it’s over. In the next release, you will be able to download as many AIs as you want in the background while still playing the game.

Notifications

To conclude with cool information, the game now has a notification system. This system is simple, but it was missing. Now, the game will use notification to inform you about things like

Gpt2-xl is now installed

or

Lore book entry Batman sent to the AI.

What next?

Until now, I ended up working more under the hood than on the interface itself!

But the next days should be more about the interface itself (with some exceptions, the Translators for example).

I still have no idea about a possible date of pre-release (an experimental version for those who opt-in only).

Thank you for reading this long blog. I ended up talking a bit more about the technique than usual. Feel free to tell me in the comment ↓ if you want more blogs like this.

Bye.