Hello 2023! Here's your first blog post of the year!

Hey there! Can you believe it’s 2023 already? Can you believe we’re already in the second month of 2023? Good lord.

We’ll be going over what we’ve been working on during December and January this month, I’ve decided to combine those blog posts into one each year so that none of us have to worry about writing a blogpost over the holidays. So I apologize if that gave anyone a little confusion.

We’ve got quite a bit of cool stuff to talk about! Most if it is going to revolve around Entities and AI. We’ll also discuss the foundations of combat and how we’ve programmed in a lot of the combat calculations. So now, we’re getting close to having everything finally come together into something that you can play. Anyway, let’s get to it!

New Year’s Art

First of all, let me present to you 2022-2023’s New Year’s Image! This one is a bit different than what we usually do.

This is depicting a scene that will actually be in Robot Farm. It marks the humble beginnings of the player’s journey, but as the game goes on, they will gain many allies and companions that will make them stronger in the end. I believe that this too represents our determination: that we too started small, and now, we hope to finally release a fully playable version of Robot Farm this year.

The idea is to build enough of the game’s sandbox up to put it into Early Access, and from there, build it up alongside the community. Because a community that plays together, sticks together, right? Your input would be invaluable as we continue beefing up the content.

Anyway - I ask that you please believe in us! The gears are in motion and a lot of the game engine is finally starting round out. Just a bit more pushing now!

Entities, NPCs, and Lua

So these past couple of months have been heavily focused on expanding Entities. These are objects that start out as “Constructs” in the World Editor, for those of you who have tried it out. When you place an object onto the world - let’s say a flower, it’s just a static lifeless object. To bring it to life, you have to begin adding onto it, which is primarily done by attaching Lua code to it.

Inside the Lua, you can define rules for animating the flowers. So now the flowers will animate themselves as if the wind is blowing them. Of course, this is just us showcasing a basic flower SpriteSheet animation, but the cool part is that you can use the Lua to automatically animate every flower on the field:

So that’s what Entities are: They’re Constructs placed on the world, and then given life via the components you add to them, whether it’s through the World Editor itself or the Lua code you can attach to them. This is exactly how we’ll go even further and create Entities such as NPCs, monsters, events, etc.

For example, we’ve created Bawbul here on a test map, and assigned various components to him with Lua. Particularly, he has two “AI Cores,” one is called “Staring AI” and one is called “Hostile AI.” Staring AI will cause him to look around at random like you’d see in many old jRPGs, and then Hostile AI will cause him to start a fight with you if he sees you, based on the direction Staring AI has him looking.

Combining AI components like this give a lot of power to use as developers to do cool stuff, and mix and match behaviors. It’s all pretty simple, but cool to finally have working.

Pathfinding

Speaking of AI Cores, we’ve also finally succeeded in getting a pathfinding solution working as well. We can generate a node-graph on the map pretty fast, and manually edit it just as fast. As you can see here in the screenshot below, I’ve flood-filled a small area of the map with nodes. You can use the World Editor to preview what a path will look like, by selecting a node and then another (the purple nodes are showing a path between the ones I selected).

Now that we have the pathfinding ready, we can begin doing fun stuff like having NPCs walk around. This will be very important because we’re starting combat now. Plus, once we finish combat, we can get to farming and town interactions and get a lot of cool stuff in faster.

Adding it all up:

Using Staring/Hostile AI that I mentioned above, Entities can now start fights with the player. This triggers the battle code I’ve ported forward from the original 2D version of Robot Farm, meaning all of the important calculations are functioning. From here, I’ll begin porting more code and tying it into the new HUD, and I’ll continue to build it up until I can show it off.

So as you can see, everything I’ve written about in this month’s blog is contributing toward the foundations of combat and essentially all other core gameplay systems: Entities and AI. From here, world interactions can begin taking shape, and become more customizable.

And once again, another crossroad!

That’s it for now! We have a bunch of other stuff going on as well, but if I wrote about everything, I’d be working on this post all night. We’ll back next month with another update, and hopefully even cooler stuff to show off.

Until then,

♥ NOKORIWARE

Brayden McKinney