1. BattleJuice Alchemist
  2. News

BattleJuice Alchemist News

DevLog: Don't Break that Window!

Hey folks,

many of you might be familiar with impostor syndrome, where people doubt their skills and have the (unjustified) fear of being exposed as a fraud. I don't suffer from it, but I am also not always completely confident that what I do is great.

I have a motion design background and don't consider myself a programmer first. Sometimes I fear that programmers might laugh at my blueprints and look down on me because of my lack of formal education in programming. So today I want to face that fear head on. I will tell you something that makes me feel stupid, but hopefully it will be entertaining and maybe even encouraging and educational.

Perhaps you have heard this quote from Michael A. Jackson before:

The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only): Don't do it yet - that is, not until you have a perfectly clear and unoptimized solution.

I always followed this principle quite closely ;) But I recently decided that in one specific part of BattleJuice Alchemist, I had to do some optimization. Let me give you a very brief introduction to those of you who are not familiar with optimization at all. So we have a game that we want to run at 60 fps in the end. This means we want a frame time of 16.66 ms, which is kind of a budget we can spend on calculations. I have recently spent a bit too much of my budget, so I decided to take a brief look at what I can do to reduce it. I quickly found out that my bottleneck was not the GPU, but the CPU. There is this fancy tool for Unreal Engine called Unreal Insight that allows you to find out where exactly your budget is spent. I took a closer look.



Turns out that the UI is what caused a quite considerable hit on performance of about 3 ms, so this is what I decided to tackle. I guess many of you who ever worked on a game can relate to what I am about to tell you. You are at the early stages of a prototype and all you want to have is e.g. this icon that shows that the player is low on health. Unreal has this nice drop-down menu that allows you to tie the visibility of your icon to a function that decides whether the player is low on health or not and then spits out "visible" or "invisible".



Unfortunately, this causes the icon's visibility to be set visible or invisible every single frame. No big deal, your prototype still runs perfectly. But fast forward 4 years of development and things start to add up when there are a bazillion UI elements and many are unnecessarily manipulated every frame. I was aware that I was doing something bad all the time, so why did I continue? It all comes down to this first icon...

Have you ever heard of the Broken Windows Theory? Let me quote Wikipedia:

In criminology, the broken windows theory states that visible signs of crime, anti-social behavior and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes. The theory suggests that policing methods that target minor crimes such as vandalism, loitering, public drinking, jaywalking, and fare evasion help to create an atmosphere of order and lawfulness.



So when I used Unreal's option to quickly bind the visibility of my icon, I broke the first window, which I should not have done. Or at least, when I implemented the second icon, I should have fixed the first and done it right for every following icon.

Jackson's Rules of Program Optimization are great and you should not optimize prematurely. But this does not mean you should spend your frame time budget on unnecessary things because of your laziness like I did. And especially you should not knowingly do something stupid, decide everything is fine, repeat it a hundred times and still expect everything to be fine ;)

I hope you liked reading this unusually text-heavy devlog as much as I did writing it. If you want to chat about gamedev or stay up to speed with BattleJuice Alchemist, you can join our Discord.

Thanks for reading and have great weekend!

Alain

DevLog: Navigating Complex Structures

Hey folks,

I hope you had a great start into the new year! After a few days off, I committed myself to some interesting problems that came up while working on the new base building system, which I'd like to share with you.

BattleJuice Alchemist is mainly played in top-down view, so it is more difficult to deal with buildings, especially multistory ones than let's say in an FPS game. Our game has to set elements invisible in a clever way, here is how we handle it:



Now that base building comes into play, I did not want a floor/story based system, but one that provides more freedom for players who want to create things like this:



The solution is quite simple: blocks that are at a certain height above the player and obstructing vision on the player are turned transparent. But there is another problem to tackle that is related to movement. The common way to move in BattleJuice Alchemist is "mouse click to move", no problem here. But you can also move with direct input keys such as WASD. All movement takes place on a navigation mesh, which can pose a problem.



So with the possibility for all kind of weird structures that players can come up with, we can't simply move right, when the player presses the key for moving right. I came up with a solution that takes into consideration the angle between the player's current and target location, but also the ratio between linear distance and navigation path length. When pressing right, it is desirable that your character automatically navigates around a pillar instead of bumping into it and stopping, but you would not want the character to walk the way as shown in the right image above.

I hope this small peek into the everyday challenges of development was interesting to you. I'm always open to suggestions of which direction to take with this devlog. If you have ideas or suggestions, you can message me on our Discord.

Thanks for reading and have great weekend!

Alain

DevLog: Basic Tower Building

Hey folks,

this week came with quite a surprise: BattleJuice Alchemist was (and still is) featured by Epic Games as the top Weekly Spotlight project. This means everybody who launched Unreal Engine this week through the Epic Launcher was greeted by one of our screenshots, which I think is very cool!



But let's get to what I worked on in the game. I already showed you a little teaser of our new base building mechanic in the past. The foundations of the system are now in place and you can design your own structures.



What you see here is just a quick foundation, but your tower can eventually be multiple stories high. I'll show you more in the future when there are new building elements to utilize. And to remind you: The unique thing in our game is that the alchemy tower you construct will aid you in battle and you are able to summon it to any open patch of land:



I have to head out for today, but before I forget: a warm welcome to the people who joined our Discord after seeing us at the Epic Spotlight!

Have great weekend everybody!

Alain

DevLog: Fighting Injustice for Our Players!

Hey everyone,

we need to talk about randomness, fairness and decision-making, but let me get started with some great news​. I did not want to make this the headline of this devlog, because I already shouted it all over social media: We won yet another award!



In the course of the DevGamm awards 2022 we were selected for the special nomination award "Versus Evil Victor" sponsored by Versus Evil. We are super proud and honored!

I had planned to talk more about tower crafting in this devlog, but then decided to cover one of our core mechanics and the recent slight, but important changes I made to it. Those of you who already played the game might spot something new in this gif:



That's right, I added a preview of the next four flasks you will draw. You can call it a "magazine". I added this to give players the chance to make more informed decisions, which means more fun in my eyes.



While working on the flask system, I thought about randomness quite a bit. I watched people play the game and get frustrated because they did not draw the flasks they wanted to draw. Such a frustration is okay for me, if the player built their deck of flasks in a "bad" way. But what if they are just crazy unlucky? Let me put it like this: Wouldn't you get frustrated or feel treated unfairly, if you had tossed a coin 9 times, it landed on heads 9 times, you toss it again and the 10th time is heads yet again? BattleJuice Alchemist is not a casino simulation, so I decided to accommodate for this unfairness. The change can be explained very simply: in the past you drew a card, put it back, then I shuffled your deck. Now you draw a card and don't put it back, so the remaining cards will be drawn first, before you can possibly draw your first card again. It feels a lot less frustrating to me and I'd love to hear what you think, once this change is patched into the game.

That's it for today. If you have not yet, make sure to join our Discord and have a great weekend!

Alain

DevLog: Preview on Alchemy Tower Construction

Hey everyone,

so this week I have something small and something big for you. Let's start with the smaller something.

I always wanted to keep UI elements attached to the 3D elements of BattleJuice Alchemist's world to a minimum. Years later I realized that I had already added quite a few interfaces and somehow missed the most important one: health bars for enemies. So, here they come:



I went for this "newer" style that I think was popularized by games like Dark Souls, where the red bar is instantly shortened, but a secondary yellow or in my case beige bar slowly follows and gives you a good idea how much damage you dealt, even if the bar was not full when you hit.

Now let's come the big deal, which is mainly a teaser. I wanted to add one big gameplay element that ties together a few underused mechanics and adds depth to combat as well as crafting. This is why I am adding crafting your own alchemy tower. And the best thing: You can relocate it and summon it to the battlefield!



Very roughly speaking, the plan is to make enemies tougher at night, so you yourself need more firepower to deal with them efficiently. This firepower is provided by your tower, which you construct yourself and equip with traps, canons and other elements.

I will talk about the tower in more detail in the next devlog, so stay tuned! Don't forget to join our Discord and enjoy your weekend!

Alain