Add-A-Thing: Alien Evolution - comments and discussion

I would like to have the blue alien teleport onto cubes.Then walk off them.Or he could push them out of the way when they are in his way.Which one is better?Do You like how the boxes and elevator spin?When the red alien grabs them and spins around.I like it.I think it is unique.

You could implement both: teleport on the box and grabbing it :). Sounds cool

Did you look at the last zip i posted?

not yet. but let me look…

These are the keyboard binding we currently have (the file would benefit from some meaningful sensor names ;)):


Keyboard Listeners (Sensors):
----------------------------------------------------------
purpose <keys> by scene.gameObject (purpose = sensor name)
----------------------------------------------------------
Keyboard                    <c>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.002                <w>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.001                <m>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.003                <t>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.004                <y>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.005                <y>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.006                <t>             by Showroom.LittleBlueAlien.hitBox.001
Keyboard.007                <m>             by Showroom.LittleBlueAlien.hitBox.001
Message.001                 <w>             by Showroom.LittleBlueAlien.armature.001
Keyboard                    <a>             by Showroom.LittleBlueAlien.armature.001
Keyboard.001                <s>             by Showroom.LittleBlueAlien.armature.001
Keyboard.002                <d>             by Showroom.LittleBlueAlien.armature.001
Keyboard                    <g>             by Showroom.Box.green.000
Keyboard.001                <r>             by Showroom.Box.green.000
Keyboard                    <g>             by Showroom.Box.green.001
Keyboard.001                <r>             by Showroom.Box.green.001
W                           <w>             by Showroom.Controller
A                           <a>             by Showroom.Controller
S                           <s>             by Showroom.Controller
D                           <d>             by Showroom.Controller
Space                       < >             by Showroom.Controller
CTRL                        <LEFTCTRLKEY>   by Showroom.Controller
Q                           <q>             by Showroom.Controller
Keyboard                    <l>             by Showroom.LittleRedAlien.hitBox
Keyboard.001                <m>             by Showroom.LittleRedAlien.hitBox
Keyboard.003                <y>             by Showroom.LittleRedAlien.hitBox
Keyboard                    <t>             by Showroom.trans
Keyboard                    <m>             by Showroom.Empty.001
Esc                         <ENDKEY>        by Showroom.display camera
Keyboard                    <g>             by Showroom.Box.violett.000
Keyboard.001                <r>             by Showroom.Box.violett.000
Keyboard                    <g>             by Showroom.Box.violett.001
Keyboard.001                <r>             by Showroom.Box.violett.001
Keyboard                    <g>             by Showroom.Box.violett.002
Keyboard.001                <r>             by Showroom.Box.violett.002
Keyboard                    <UPARROWKEY>    by Showroom.Elevator
Keyboard.001                <DOWNARROWKEY>  by Showroom.Elevator
Keyboard.002                <g>             by Showroom.Elevator
Keyboard.003                <r>             by Showroom.Elevator
close door                  <g>             by Showroom.Ufo.door.closer
open door                   <g>             by Showroom.Ufo.door.opener
close door                  <g>             by Showroom.Ufo.door.closer
open door                   <g>             by Showroom.Ufo.door.opener

These are the messages that can be send:


Message Senders (Sensors):
--------------------------------
scene.gameObject: subject [body]
--------------------------------
Showroom.start animating.001:     animate []
Showroom.stop animating.001:      unanimate []
Showroom.timer trigger:           activate timer []
Showroom.Wall.inner:              appear []
Showroom.Wall.outer:              destroy []
Showroom.winner platform:         it []
Showroom.winner platform2:        put []
Showroom.trans:                   come here []
Showroom.stop animating:          unanimate []
Showroom.start animating:         animate []
Showroom.Empty.001:               go home []
Showroom.LittleRedAlien.armature: go home []
Showroom.LittleRedAlien.armature: come here []
Showroom.LittleRedAlien.armature: come here []
Showroom.LittleRedAlien.armature: go home []
Showroom.LittleRedAlien.armature: stay here []

and these are the listeners to messages:


Message Listeners (Sensors):
----------------------------
scene.gameObject: subject
----------------------------
Showroom.LittleBlueAlien.armature.001: unanimate
Showroom.time limiterer.001:           put
Showroom.time limiterer.001:           it
Showroom.time limiterer.001:           activate timer
Showroom.Magnet.emitter:               appear
Showroom.go home:                      go home
Showroom.come:                         come here
Showroom.stay here:                    stay here

I’m confused what the go-home and Co logic is doing. My plan was to move the text to an HUD scene without breaking the behavior.

I can see there is an object called “Empty.001” that reacts on <m> to send a message “go home”. It sends a message directly to a “go home” object [I can’t track such messages]. The alien goes to the house as announced. If that is caused by the message … I can’t tell.

“LittleRedAlien.armature” sends “go home” too. This time to all and to “change tracking” (which is redundant). But this is activated on <L> and when the alien is in radar range. Interestingly the display “go home” comes up, but the alien stays with me.

Btw. I do not see why nearly everything has true pulse triggering enabled.

The confusing part:

What makes the alien go towards the house?
What is does property “switcher” mean (and the other properties)? Is it just for displaying the message?

What is the logic to make the blue alien go home <M> or <L> ?

I look at the LittleBlueAlien.hitBox.001 as I guess this makes the blue alien move to the house. There are a few states (nice) with just numbers (not so nice). Some names would help to see what each state represents. So I have to guess. As I’m interested in steering I analyze the steering actuators. There are a few of them:

  • 2x steering to LittleRedAlien.hitBox (1:State.001 alias State.006 alias State.009, 3:State.002)
  • 1x steering to waypoint1 (5:State.003)
  • 1x steering to waypoint2 (16:State.004)
  • 1x steering to waypoint3 (17:State.005)

What happens:
state 1: the alien comes to me until a certain range (after that it simply slides forward until crashing with red alien)
I press <M>
state 5: navigating to waypoint1 (16->waypoint2, 17-> waypoint3)

Why is the alien navigating to the waypoints? shouldn’t it navigate directly to the house?

Now the events:
Lots of radars (= lots of processing). It think a few of them are redundant.
Some keyboard sensors. This looks like a dangerous replication of the input from the other objects. Either the blue little alien accepts the keyboard input and triggers all other interested participants (display message), or another object accepts the keyboard input and triggers all others including the alien. Imagine you want to change the key … or combine it with more events. That would be nearly impossible.

That was just an analyzes. I’m know much more how that is working than before.
I still do not see why the steering from state 1 switches off without changing state.

I suggest following:

state “following”
the alien steers the player all the time

state “going home”
the alien steers to the house (waypoint3)

state “waiting”
the alien does nothing

This enables following transitions:
“following”
<m> -> “going home”
<w> -> “waiting”
“going home”
<c> -> “following”
<w> -> “waiting”
“waiting”
<c> -> “following”
<m> -> “going home”

The waypoints are used to avoid the building and other things.I did that because making holes in the navmesh did not work.Waypoints are going to be uesd so that the blue alien can bring the blue boxes from anywhere in the scene.Without bumping into the buildings and other things.
Here another thing i would like to do. Is to have the blue alien follow the waypoints according to where he is in the scene.If he is on the south side he would follow the waypoints from the south to where you are in the north.If he is on the west side he would follow the waypoints from west to where you are in the east. If he is on the north side he would follow the waypoints from north to where you are in the south.If he is on the east side he would follow the waypoints from east to where you are in the west.This is for obstacle avoidance.

I started the process of moving the text objects to its own HUD scene, which has left most of its logic broken. I have also added a simple splash screen and title card. I am planning to add scene transitions via the UFO, so I set up a Home scene as an alternate location you can visit with the UFO. There is no way to get there yet, which will be one of my next couple contributions.

I am think about not relying on waypoints at all but just pushing the alien to the side until he out is way out of the obstacle.This is how i am going doing it.Here is the blend.I don’t feel like explaining.

Attachments

waypoints follower and command.blend (748 KB)

While analyzing the file, I noticed why you asked for the navigation mesh generation in the other thread. So here is the answer: select the ground and the house before generation. I already established that in the alien file. It works pretty well.I do not think the alien will ever jump on the roof, but it seams not to disturb too :D.

I did that (twice) before. It looked pretty the same as you did. But I simplified the animation to display the text. Therefore I completely replaced your version. I hope you can forgive me on that.

The splash looks really nice and professional.

To all,

if you want to analyze what is going on you might want to link to the Analyzer from the game scene. Make sure to link the group and add an instance rather than to append. This ensures you do not include it in your distribution. There will be just an empty without further effects.

The analyzer prints you a lot of information at the console including keyboard sensors, message listeners etc… This can be really helpful.

The second tool (install as linked group again) is the message analyzer. It listens to the message traffic while the game is running. Make sure to leave the “To:” field empty. Otherwise it can’t hear anything.

Has anyone an idea what object “porp” is?
and what the properties “pep” and “ton” are good for?

Therefore I completely replaced your version. I hope you can forgive me on that.

No worries

Has anyone an idea what object “porp” is?
and what the properties “pep” and “ton” are good for?

I am not sure about those.

I thought there might be a way to use getVersion(), store the value as a variable, then use that variable with some dynamic text. In my head it looks something like this;


import bge
from aaa_history import history

def getVersion():
    return len(history)


def Dtext():
    cont = bge.logic.getCurrentController()
    own = cont.owner    
    scene = bge.logic.getCurrentScene()
    return len(history) = vnumber
      
    vnumber = scene.objects ["vtext"]
    vnumber.text = 'vnumber'


Dtext()  

Any thoughts?

history.py already has getVersion().

I just added that to the latest contribution. It makes your script pretty small :spin:.


import bge
import history

versionDisplay = bge.logic.getCurrentController().owner    
versionDisplay.text = 'v{}'.format(history.getVersion())

No kidding! I am all about simplicity so this makes me quite happy. The credits were awesome too.

I liked how you did the hud and the commands monster.I likes the platform in the ufo.Where is your script to parent to boxes?I need it so that i can make another command for the blue alien.The command is to pick up boxes and bring them to red alien.The words that show in the hud are Go pick up boxes and bring them to me please.

Red alien collision box accepts the keyboard commands (as before) and sends according messages into the world.
The blue alien collision box receives the commands via message and acts accordingly. I suggest to add one or more states to blue alien e.g. like grabbing box and releasing box.

This might need a more dynamic way to select the box the player means.

(I never parented boxes, so I can’t help right now)

I the blue alien picking up boxes.Then bringing them to the red alien in the last zip.But it still needs a little work.I am working on that in another blend.It is called waypoints follower and commands.

Please be aware, if you do not add yourself to the history your contribution will not be listed and you do not get a new version. You do not need to update older entries, just add a new one.

I am having trouble emplimenting the little blue alien picking up boxes and bringing them to the little red alien.Then droping them in front of him.I was going to use states to do it.But the state actuator is not working properly.So i am trying to find another solution.