Page 1 of 2 |
[ 28 posts ] |
My logic bricks are undeniable
Author | Message |
---|---|
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
Enjoy my newest AI, Zero-Hard Coded behavior, no animation keys, dynamic force controlled motions, I win!
http://www.youtube.com/watch?v=H3lEgMqm1eg it can hunt and follow waypoints, using only geometry and a few logic nodes, again IWIN!!!! _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Moon Mission Member ![]() ![]()
Joined: Mon Dec 18, 2006 11:15 pm
Posts: 1050 Location: Columbus, GA USA ![]() |
Can't really see what you've built in the video other than what the "critter" does. But doesn't the Blender physics engine include some of the behaviors and "reactions" for objects and characters?
|
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
Nope, that is all done with pre-included logic bricks
this is a loop code in node I use a set of vision cones on the lizard to initiate movements of the feat, head and center of mass, I use something like the Loop code to control the animations and motions _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Space Station Commander ![]() ![]()
Joined: Thu Oct 27, 2005 7:44 am
Posts: 707 Location: Haarlem, The Netherlands ![]() |
Looking at the screen shot, I think the point is that it's stateless. The creature's behaviour is entirely reactive, it doesn't have a memory or any complicated logic, just sensors wired to actuators. Reminds me of Mark Tilden's BEAM robots. It's interesting how you can get complicated behaviours from such simple systems.
_________________ Say, can you feel the thunder in the air? Just like the moment ’fore it hits – then it’s everywhere What is this spell we’re under, do you care? The might to rise above it is now within your sphere Machinae Supremacy – Sid Icarus |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
Exactly,
![]() almost no Cpu compared to traveling salesman, or ray casting, or a navmesh _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Space Station Commander ![]() ![]()
Joined: Thu Oct 27, 2005 7:44 am
Posts: 707 Location: Haarlem, The Netherlands ![]() |
But of course that also means that it's a greedy algorithm, and that it's not going to find anything globally optimal except in trivial situations.
_________________ Say, can you feel the thunder in the air? Just like the moment ’fore it hits – then it’s everywhere What is this spell we’re under, do you care? The might to rise above it is now within your sphere Machinae Supremacy – Sid Icarus |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
This uses almost no CPU, the collision triggers the behavior,so, the logic nodes are dynamic, I can have 50 lizards on screen at 50 fps, if I can hunt a cube, then I can hunt waypoints, if I get close and the waypoint goes away, and another four turns on, and he looks left/right on collision with the old waypoint, so he can use a random number to choose a path, so it could hunt, find player and attack all with this code....
_________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Space Station Commander ![]() ![]()
Joined: Thu Oct 27, 2005 7:44 am
Posts: 707 Location: Haarlem, The Netherlands ![]() |
But where do the waypoints come from? And is performance really a problem here? Don't forget that on a modern computer, you have several billion operations per second to play with, and that's just the CPU. Also, would a random walk hunt really make for challenging game play?
_________________ Say, can you feel the thunder in the air? Just like the moment ’fore it hits – then it’s everywhere What is this spell we’re under, do you care? The might to rise above it is now within your sphere Machinae Supremacy – Sid Icarus |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
A animal, hunting by following a path, yes, this is how it happens in the real world..... are you afraid of a stalking panther?
I already have the waypoint code, it's simple if near lizard then occlude self, I want it to act alive, challenging is just another subset of that, _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Moon Mission Member ![]() ![]()
Joined: Mon Dec 18, 2006 11:15 pm
Posts: 1050 Location: Columbus, GA USA ![]() |
Your creature is more like a cockroach or a spider than a lizard from a logic/behavior model.
![]() When you start to introduce terrain and obstacles you are going to run into (haha) the same problem early game developers did, that of things getting "stuck", piling up together, and otherwise being "dumb" (which I think is what Lourens was referring to) because this simple reactive behavior model can't predict or plan paths around them by itself. |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
Not one game in assistance does, it takes to much cpu, the decide which sets of way points that the map maker planned as safe, of use a navigation mesh a very cpu greedy way to use tography to plan a path,
why trim the Cpu calculations per second? why make a stronger engine? why make a lighter metal, anything you build is only as good as the sum of its components, I have done with a few cpu ticks per second what bogs out most game engines, I am not thinking I am awesome, I just think it is nifty, _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Space Station Commander ![]() ![]()
Joined: Thu Oct 27, 2005 7:44 am
Posts: 707 Location: Haarlem, The Netherlands ![]() |
By all means keep working on it, there is no better way to learn. I agree with James though, that you haven't really tested it well enough yet. Give it some more obstacles and see what happens.
There are some interesting algorithms for searching for the shortest path in a graph. Dijkstra's algorithm is the canonical solution, A* an optimised version most commonly used in computer games. _________________ Say, can you feel the thunder in the air? Just like the moment ’fore it hits – then it’s everywhere What is this spell we’re under, do you care? The might to rise above it is now within your sphere Machinae Supremacy – Sid Icarus |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
He does not hunt that way..... he hunts by following pre defined waypoints, unless the player is closer then the next waypoint, I could add some stuff for if he see's you from a distance to try to get to you, but it would be easier to have him "Seeing" you trigger the spawning of a waypoint path.... these lizards will wonder some paths, ambush from others, but they don't think.... that is my job
![]() _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
Moon Mission Member ![]() ![]()
Joined: Mon Dec 18, 2006 11:15 pm
Posts: 1050 Location: Columbus, GA USA ![]() |
Then what is the point of giving them the visual range or any logic at all? Might as well just code: if lizard closer some range to whatever, point to that bearing and move towards it.
You can actually get more sophisticated behaviors that way by building in other conditionals. |
Back to top |
![]() |
Space Station Member ![]() ![]()
Joined: Mon Dec 12, 2011 6:40 am
Posts: 476 Location: California and Michigan ![]() |
I have ideas for the lizard, the player will drop invisible weightless cubes that gradually move in the direction of the wind, in effect.... waypoints.... same system for vision operates smell...... I will also have sighting things initiate story-line elements/craziness
and I was thinking a sort of "organisation" ai , that was in effect only a plotter/thinker that leaves routing, or orders other units when sighting the player could also be interesting, I have made complex A.I before, that used A* or a navmesh or a bunch of others, but a real person does not know where safe is, they use sensors to "feel" where safe is, and try and approximate a path to you, not always the shortest path, usually the safest path...... Avoid player vision cone once player is sighted 75% Avoid Player front axis when "sneaking" If I use sneak+hide, wait...... sneak-hide---wait and ambush..... that is a real lizard..... Smell+Vision+ ability to navigate terrain, I can't give the lizard a memory..... I can however have it use "paths" that are pre defined, and then apply variations to those paths based on adjusting behaviors, like for X itterations walk in an arc, etc..... these can all be defined and triggered in a single state..... we only have on and off....... alive and dead or sleeping..... If collide "Smell" ------------And-----------"Memory = Memory +300" if memory >1 ------------------and------------memory = memory -1; if motion = X-------------------\-------------motions tree if damage taken motion =retreat if near sound bullet collision run away from impact etc these individual trigger can be mixed together, and not effect each other negatively, like arc+crawl or hide plus smell etc these add up to very complex looking behaviors, I have dogs in secondlife based on a weighted hierarchy of needs , so Food=Food-RandomNumber(size range) Water=Water-RandomNumber(size range) fun=fun-RandomNumber if Food <50 and vector FoodPos != Null start arc motion to "Food" I know how to do memories and all that as well, like what a Ai has seen or not, and how to randomly choose based on that with weights on higher priority choices..... I am just trying to make a decent low cpu baddie it's not a devious boss.... I just made one of those yesterday.... _________________ Let not the bindings of society hold you back from improving it.... the masses follow where the bold explore. |
Back to top |
![]() |
![]() ![]() |
Page 1 of 2 |
[ 28 posts ] |
Who is online
Users browsing this forum: No registered users and 65 guests |