VIRUS GAME IN UPBGE

UPBGE is the spin-off of the Blender Game Engine that no longer exists in the 2.8 version and over. That’s sad, it was a nice tool. Hopefully it is still possible to have fun with it with the UPBGE project. Based on the 2.79 version of Blender, it offers the tools we’re missing.

UpBGE can be found here: https://upbge.org/

This project is inspired by

https://youtu.be/I-FqYnqQYlw

The idea is to put a villager chased by zombies in a labyrinth. At that step, it is just running away, no scores or what so ever…it’ll be for the next time.

In this project, the villager will try to avoid zombies in a maze.

Select the ground and create the NavMesh

Deploy the NavMesh panel

Build the Navigation Mesh

In solid mode it is possible to visualize the navigation sectors created.

Import a Villager

Import a Zombie (update at the end of the post, replace the Zombie by a Corona Virus !!

In the Physics tab, choose Dynamics and check collision bound

Do the same for the villager

Note that the radius has to fit the geometry’s size. Our villager is 1.5m high, the pivot is set at the barycentre, the Radius is set to 0.75

Select the Zombie and go to the Logic Editor

Choose Always

For actuator choose Steering

Target Object -> Villager

Navigation Mesh -> Navmesh

Connect

Choose the villager

Go to Logic Editor

Add 4 keyboard entries. Affect a key for each direction, if you are a gamer it can be Z, Q, D, S ! But it also work with arrow keys.

Add 4 motion actuators

Set the speed

Connect all Actuators

Test by pressing P

(there I’ve got two Villagers, but it’s just for the test.

It’s possible to have a more fluid animation by setting rotations for Left and Right directions.

Left would be +5° and right -5°

For a more stressful experience, duplicate Zombies, try to escape

How scary!!

Update, lets replace Zombies by Virus, same principle, more fun !

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.