Mastodon Icon GitHub Icon LinkedIn Icon RSS Icon

Category GameDev

Choosing between Behavior Tree and GOAP (Planning)

Header image for Choosing between Behavior Tree and GOAP (Planning)

I would like to expand the answer I gave on /r/gamedesign some days ago. The main point of the question was: how can I decide if it “better” to implement the decision-making layer of our game AI with Behavior Trees (BTs) or with more advanced plan-based techniques such as Goal Oriented Action Planning (GOAP) or Simple Hierarchical Ordered Planner (SHOP).

First consideration: this is not a technical problem

The first thing to know is that writing game AI is not a race for the best technology. Instead, it is just about choosing the right tool for serving the gameplay as well as possible. So, there is no urgency to select the most advanced algorithm. You need to choose the simplest one that is good enough for your game. Remember Pac-Man. The AI of Pac-Man is still utterly challenging, and yet it is exceptionally straightforward.

GameDesign Math: RPG Level-based Progression

Header image for GameDesign Math: RPG Level-based Progression

Level-based progression is an extremely popular way of providing the player with the feeling of “getting stronger.” The system is born with Role-Playing Games (RPG), but it is nowadays embedded in practically every game; some more, some less. Even if it is entirely possible to provide progression feeling without levels and experience points, level-based progression is natural, direct, and linear, and it fits well in many (too many?) game genres.

However, not every experience-level progression is the same, and it is essential to design designing a fun system. Many games do that without much thinking: they just slap experience points and level, and that’s it. The general idea is that the more is your level, the more experience you need to advance to the next one. This is true, but it is just a small part of the design. In fact, you must keep in mind the effect of any gameplay element on the player, and you must be sure that what you do produces the emotion you want to convey.

Procedural Calendar Generation & Lunar Phases

Header image for Procedural Calendar Generation & Lunar Phases

Here we are again! This is Part 3 of a small series on how to randomly generate a physically accurate calendar starting from planet’s orbital parameters. You can find the general motivation here, part one here and part two here.

Said that, here we go with the next part: lunar phases.

Why lunar phases

Lunar phases are incredibly important in a calendar. So important, that many of the early humanity calendars are, in fact, lunar calendars or lunisolar calendars. Of course, this is true if and only if the planet is lucky enough to have a big moon like us.

Seasons Generation from Orbital Parameters

Header image for Seasons Generation from Orbital Parameters

Welcome back to part 3 of the Procedural Calendar Generation series. In the first part we looked on how to compute celestial body position in a simple two-body system. The second part, instead is crash course on ellipse geometry.

In this part, instead, we will tackle a fascinating consequence of the cosmic dance of our planet around its sun: seasons. Seasons are a strange beast because their behavior depends on a huge amount of factors. We are used to our four seasons with mild springs and autumns, hot summers and cold winters. But these four season are just the consequence of our planet ecosystem, atmosphere, the peculiar axial tilt, if the orbit is particularly eccentric, distance from the sun in different period of the year can be a strong modifier too! In multi-star system, we can have more than 4 seasons, in planets with strange mechanics we can not have seasons at all (or better, the “season” depends on where are you on the planet).

Cuphead is not "hard"

Header image for Cuphead is not "hard"

During the last few weeks, I’ve seen over and over people saying that Cuphead is hard. That it is brutal. That is the “dark souls of the side shooter”. For this reason, before this trend goes too far, it is time to make things clear: Cuphead is not hard.

Can a game that can easily beaten in a couple of hours be hard? No. It is challenging", yes. It requires multiple tries, for sure. But it is not hard and definitely not “brutal”. There are several reasons why Cuphead can be considered a very forgiving game.

Playerunknown's Battlegrounds did everything wrong. And doing so, it won.

Header image for Playerunknown's Battlegrounds did everything wrong. And doing so, it won.

This small article is born from a discussion I had with a friend of mine this week. He was writing a review on Playersunknown’s Battlegrounds (from now on, PUBG) and he ended up talking about the evolution of the genre and its triumph over every other competitor. The article was good but it did not enter in detail about, what I think, it is a greatly important and interesting question: Why PUBG? Why not any of the other dozens of battle royal games we were plagued in the last years?

PUBG is clearly a winner in this competition. It sold more than 8 million copies on Steam only, and I can see the trend going with the future release on consoles. The problem, in my opinion, is that, on paper, there is nothing in PUBG implementation that seems “right”. Nevertheless, it won.

Machiavelli once said that success is 50% luck. That’s definitely true for PUBG. But the other 50% must be researched in the PUBG qualities. Analyzing them, despite the massive “errors”, it is very important for any game designer.

Against Addiction and Gambling-like Mechanic in Free to Play Games

Header image for Against Addiction and Gambling-like Mechanic in Free to Play Games

I want to take the cue from a last week massive Reddit thread on micro-transaction in Free2Play (F2P) games to give my opinion of the topic. I think it is important. We need to increase awareness that predatory practices in F2P games are incredibly close to gambling and share with it the same self-destructive and harmful addictive behavior. This is wrong in so many way: it is dangerous for the victims, it is dangerous for the game itself, and it is dangerous for the entire F2P model.

Improve Inventory-Aware Pathfinding with Map Preprocessing

Header image for Improve Inventory-Aware Pathfinding with Map Preprocessing

This article has been originally published on Gamasutra.

In the last article we introduced a basic approach for Inventory-Aware Pathfinding (IAP), a pathfinding algorithm capable of interacting with obstacles and not just avoiding them. If you have not read it, I encourage you to go back and read it to understand the basic challenges and the main ideas behind the proposed solution.

For instance, we can have a pathfinding algorithm that can solve small plans and “puzzles” involving reasoning like “before passing this door, I need to get that key”. This is definitely planning territory. However, if we focus on a small subset of the problem, we may squeeze the algorithm into the pathfinding search itself.

Randomness in PCG is about the result, not the parameters

Header image for Randomness in PCG is about the result, not the parameters

I feel the urge of stating the obvious: randomness in Procedural Generation refers to the perceived randomness of the outcome; not the randomness of the input parameters.

In some sense this is “obvious” but, at the same time, is one of the most common mistake I see when developers tackle procedural content generation in their games. It is an understandable mistake, though. There are two assumptions we subconsciously make when we approach randomness: 1) we think that uniformly random parameters produce uniformly random outputs (that’s blatantly false), and 2) we think that uniformly random outputs yield to uniformly random perception in the human (even more false).

Random calendar generation from planet orbital parameters

Header image for Random calendar generation from planet orbital parameters

In this article I want to show you a small proof of concept where we generate from scratch an alien calendar. The difference from other random calendar generators that just put random days and random month is that, in this tool, we can specify as input the orbital parameters of the planet and satellite and generate a calendar that makes sense. How could be the calendar for that planet orbiting a super-massive star? How could be the calendar for Mars or Venus? Every time I try to sketch a Sci-Fi world, I want to try thinking to a calendar that make sense for that particular planet. Because the calculations are long and boring, I built for myself this little tool. However, before going to the tool, I want to provide a small introduction to the problem.