creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Agent Locomotion?   
Malkin

Malkin
Australia  
Manager


 visit Malkin's website: Malkin's page at CWiki
  11/20/2013

What are the basics of creating an agent that moves by itself, using the timer script? (not simply in reaction to in-game physics.)

For swimming agents, you'd often check the room type to make sure they're still in water, and then make them dive using accg 5 or something, but how do you get them mobile in the first place? What do you need to consider before 'the turtle' can move?


My TCR Norns
 
Moe

Moe


 visit Moe's website: Creatures 2 to Docking Station
  11/20/2013

You'll need to have it decide what direction it needs to go, whether that's by CA values or a random generation. Sometimes simple agents can just pick a random series of numbers and decide on a direction from that. More complex agents will check CA values and decide where they should go from there. Or, they may follow other agents such as when hunting or mating.

If it's an agent with gravity and friction, you need to give it a slight "bump" to get it off the ground, otherwise friction will often nullify any movement. Usually a force equal or slightly more than it's accg value will suffice. That's why a lot of agents "hop" when they move, because it's easy, it works, and it gets them over hills in metaroom maps.

If it's a flying or swimming critter, you need to account for it's "drift" and air resistance. And it'll probably have a very light accg value...until it needs to land.

So basically,
1. Pick a Direction or a Target
2. Modify your X and Y velocities accordingly

 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki