Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, monk12), 1,413 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 6 1 2 3 4 5 6
Advanced AI for FPS with A4 templates #5196
07/05/01 05:13
07/05/01 05:13

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



The goal of this topic is to create a much better AI for A4 with the help of the templates.
And I'm not just going to ask for some code, because I'm having a good start yet and I hope other guys will help me to make an even better AI. At first I shall tell you guys what you have to change to fix the bugs in the newest A4 war.wdl:

- In state_attack, change
"MY._COUNTER = 16 + RANDOM(32);" in
"MY._COUNTER = -8 + RANDOM(-16);"
and change
"while(MY._COUNTER > 0) { wait(1); }" in
"while(MY._COUNTER < 0) { wait(1); }"
- In attack_approach change
"while((MY._STATE == _STATE_ATTACK) && (MY._COUNTER > 0))" in
"while((MY._STATE == _STATE_ATTACK) && (MY._COUNTER < 0))" and change
"MY._TARGET_PAN = MY_ANGLE.PAN - 15 + RANDOM(30);" in
"MY._TARGET_PAN = MY_ANGLE.PAN;" and change
"MY._COUNTER -= TIME;" in
"MY._COUNTER += TIME;"
- Put "my._counter = 0;" in state_hunt, before the while loop

Jokester999 said there were more bugs, I hope he wants to tell us which and how we can solve them.

Next time I will tell you about my advanced state_hunt.


Re: Advanced AI for FPS with A4 templates #5197
07/05/01 05:20
07/05/01 05:20

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



i believe in that advanced AI depends on good path finding. if your chars moves smarter, this means they behave smarter.
now, i am working on a special path routine in templates .but u know how it is hard to implement this with a5 Function definations.
when i finished it, people whom triyng to make diablo style game like me. i do not know when it finishes ,but about one or two months it will finish .

Re: Advanced AI for FPS with A4 templates #5198
07/05/01 05:25
07/05/01 05:25

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Skater's next project is a path finding workshop. Look in his topic "Anybody want a gun reloading script?", in User Contributions.

Stranded : I will look again at your code you have done so far and try and find all the bugs in it. Then we can analise them and work out how to fix them.


Re: Advanced AI for FPS with A4 templates #5199
07/05/01 20:00
07/05/01 20:00

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hi guys,

probably a bit of topic, but i am working on implementing A* just with wdl. I started two days ago and now i am convinced it can be done and it will probably be pretty fast too. It all comes down to the question on how much data (nodes/states) A* has to search to find the shortest path. I startet implementing it with the Points of Visibility concept. The code so far finds all PoV's in a level and for each PoV constructs a datastructure containing the handles of all other PoV's this one can see .. I might make a tutorial but i am not sure yet cause my time is very limited. Of course, cause the goal was to implement it completely with wdl, the code reserveses around 200K of memory .... This can be improved much by using the SDK and C and dynamic memory allocation however this can be implemented later.

i will post on the progress i made but as i said it all depends on the time my regular job and my family gives me to do this ...

greetings Ronny


Re: Advanced AI for FPS with A4 templates #5200
07/05/01 23:57
07/05/01 23:57
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Ronny,

I'm really excited to see your version of A*. I've heard of it, but don't know how it works, and I need a good path finding system. Let us know when it's ready!

-WildCat



Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: Advanced AI for FPS with A4 templates #5201
07/06/01 02:57
07/06/01 02:57

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Can't wait for the pathfinding! Is it going to be like a UT one. That is, you can post nodes on the map in WED, then you tell the actor a point on the map to go to, and it goes to that position along the nodes using the shortest possible route. Is it like that?

Re: Advanced AI for FPS with A4 templates #5202
07/06/01 20:51
07/06/01 20:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hey Ronny, I work on a Pathfiding-Tutorial, too!
A Script to "walk around" entities (for example a Labyrinth with WMB-Entities) works fine.
At the moment I work for a Pathfinding on Terrain.
But what's your Method to get ALL PoV's in a Level?

Re: Advanced AI for FPS with A4 templates #5203
07/07/01 02:19
07/07/01 02:19

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



HI guys,

Jokester999: Yes that is what A* is all about

Iblis and Jokester : here is how it will work. (i.e what the level designers would have to do).

okay, because you asked i will tell ya ...
The PoV's are just entities, can be map entities, sprites (as a matter of fact i am testing with arrow.pcx). Level designer needs to place an entity at each convex part of the level and would have to attach an action i wrote to those entities. This action just sets some SKILLS and then goes into a while loop with a waitt (big number). It's just that the entities stay there until all intialization is done. Now you have to invoke an initilization function (once per level). It will use the new ent_next instruction to loop thru all entities and find out which ones are PoVs. It will store them and then invoke another function which builds a new data structure for every PoV which (among other data) hold the handles of all other PoV's it can see, this is my quick representation of a connectivity graph . But as i said in my first post, i just want to prove that it can be done .....

hope that helped

Ronny


Re: Advanced AI for FPS with A4 templates #5204
07/07/01 02:35
07/07/01 02:35

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I agree that a good AI needs a good pathfinding system. Else they walk against walls etc.
I'm following Skaters topic a long time yet and I read about his path finding workshop.
Cyberkid, I hope you want to share your pathfinding with us if it is finished.
And Ronny, I'm really excited to see what you are going to make. It must be almost the same as Half-Life.
And if we can make something like that, we can create a much better AI.

But now about my advanced(?) state_hunt. It is not really difficult. You just change state_hunt into this:

code:

function state_hunt()
{
MY._STATE = _STATE_HUNT;
create(<arrow.pcx>, PLAYER.POS, _last_know_target_loc);
ent_marker = MY.ENTITY1;
// calculate a direction to walk into
temp.X = ent_marker.X - MY.X;
temp.Y = ent_marker.Y - MY.Y;
temp.Z = ent_marker.Z - MY.Z;
vec_to_angle(MY_ANGLE,temp);
MY._TARGET_PAN = MY_ANGLE.PAN;
// turn towards target
MY_ANGLE.PAN = MY._TARGET_PAN;
MY_ANGLE.TILT = 0;
MY_ANGLE.ROLL = 0;
force = MY._FORCE * 2;
actor_turn();

hunt_transitions();
patrol();
}


Now change
"scan_sector.PAN = 360;" in
"scan_sector.PAN = 180;"
(actors.wdl, actor_patrol).

Also remove all
"IF(MY._HEALTH <= 20) { EXCLUSIVE_ENTITY; wait(1); BRANCH state_escape; }"
(war.wdl).

This is not necessary, but escape looks horrible, they just walk away until they hit a wall and then they do nothing.

I shall explain what these changes do:

If an enemy now loses the player, he starts patrolling over a path from positions until he finds the player.
He first turns towards the player to move into the right direction. He only scans in front of him, so he doesn't make big turns, this looks bad. This is a lot better than the standard state_hunt that just approaches the player until it gets stuck in a wall. But with the new state_hunt you have to add a path of positions in your level, this is rather difficult and costs a lot of time. But then you're having a better AI. Of course there are better solutions with other ways of pathfinding, but this is a good start, especially for A4 users like me. Hope everyone wants to help improving this code or thinking of better ways of pathfinding in A4.

Also check out http://www.conitec.net/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=1&t=002434 for more pathfinding.


Re: Advanced AI for FPS with A4 templates #5205
07/07/01 02:51
07/07/01 02:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I really really like the quake & quake II AI... can anyone here be able to try something like, implimenting quake AI into wdl? i like it because they aim very well, shoot at only necessary times, and if another monster hits them, they forget you and attack whoever starts attacking them.. they have anger towards each other too. i like all their ai.

Page 1 of 6 1 2 3 4 5 6

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1