Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Realistic Wildlife

Wildlife is what adds, well, life, to a forest, field or other rural map. It can easily be what makes a blank plain seem so empty and barren, and boring. It can be easy to add, to small maps that don't have too much processing going on, but really pays off when the player just sees small moments of movement in the corner of their eye, combined with other effects such as water flows, fire and smoke, or leaves blowing.

The RPG Maker RTP comes with various creatures. It can be tempting to set the move route to random and be done with it, but this isn't particularly good: it's random, but the movement patterns are kinda the same for all of them if you switch it to this: every n nanoseconds they all move in unison, although in random directions.

If you're going to have multiple pieces of wildlife in one map, the solution is to tweak the movement patterns slightly.

1. Always set the "frequency" to six, so that the animal doesn't pause between movements
2. Tweak the speed depending on the type of animal. A butterfly might be slower than a rat but faster than a pidgeon

Their move routes then are "custom" not "random", and we add the randomness factor in the custom bit.

Firstly, if you have more than one of the same animal, they need to have different movement patterns. Something like this can work:

$> Turn at random
$> Move forward
$> Move forward
$> Wait 4 frames
[ repeat action, ignore if can't move ]

Then in your second of the same creature:

$> Move forward
$> Turn at random
$> Move forward
$> Move forward
$> Move forward
$> Wait 6 frames
[ repeat action, ignore if can't move ]

This gives us lots of differences in the movement pattern. The slight changes in walking distances and wait times mean that nothing syncronises, which is a good thing. To create realistic animals they all need to show a kind of free will.

We can go a little further by adding some behavioural traits to our animals. Perhaps every now and then they notice the player:

$> Turn at random
$> Move forward
$> Move forward
$> Move forward
$> Wait 6 frames
$> Move forward
$> Move forward
$> Wait 6 frames
$> Move forward
$> Move forward
$> Wait 6 frames
$> Move forward
$> Move forward
$> Move forward
$> Wait 6 frames
$> Move toward player
$> Move toward player
$> Move toward player
$> Move toward player
$> Move toward player
[ repeat action, ignore if can't move ]

Then have them continue as normal for a bit before getting interested in the player again.

An alternative to randomness is to have them on the screen for a short period of time. This can add a sense of fear to the player ever so slightly, such as having an eagle that is on screen for such a short period of time, before heading north and disappearing, that the player only notices them out of the corner of their eye and then they are gone - just like might happen in the wild. To do this:

$> Move up
$> Move up
$> Move up
$> Change opacity: 0
[ no repeat, ignore if can't move ]

Remember to set any flying animals to [ through, always on top ].

As with anything less can sometimes be more. Don't have more than say three animals on one 20x15 map, they can get annoying, seem repetitive even if not, and can physically obstruct the player.

You can use REFMAP as a source of new small animals if the RTP doesn't do it for you. As they are 16x16 not 32x32 they are small enough to add that tiny bit of detail to a map that is often lacking.

Further projects you can work on:

- Use conditional branches and switches to create animals that follow the player around the map once they are within a certain distance
- Make animals do something when interacted with (walked into, or interacted with)
- Make animals interact with each other, perhaps herd together
- Tie animals into battles
 
Cheers. Although I could probably elaborate on it a bit more, since there's more to an active wildlife than a few rats walking at random. Could do with rewriting it at some point.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top