Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal Main Forum (English) (https://forums.graalonline.com/forums/forumdisplay.php?f=4)
-   -   lol (https://forums.graalonline.com/forums/showthread.php?t=69520)

Devil 10-21-2006 03:31 PM

Buh.. @ Maloria being redeveloped... sounds like every other server.

Maniaman 10-21-2006 03:51 PM

Quote:

Originally Posted by Draenin (Post 1233823)
I did so, and I've quite a bit to say already, but that can be saved for another time, I suppose. :]

might as well go ahead and say it.

xXziroXx 10-21-2006 05:49 PM

Quote:

Originally Posted by Maniaman (Post 1233816)
just maloria v2 :)

And that is why I said "Maloria" and not "Maloria Dev".

Yen 10-21-2006 06:13 PM

I haven't been feeling well, so I haven't been on Zodiac much lately.
And this is why I didn't want PRs to be more than FAQs. It's also why Moisdne doesn't have ban rights; he keeps people he would have banned if he could in his comments. Last I saw, he was up to ~40 people.

If it doesn't deal with the game itself, my scripts, I'm not very interested in your problems. I don't like touching other peoples' scripts. You'd probably be better off speaking to calani, since it's her NPC. However, I don't believe she updated it.. So it shouldn't be adding time instead of reducing it, unless another staff member added time manually.

Once again, Zodiac isn't laggy. I've put special emphasis on making the server <-> client communication as efficient as possible.
The only 'lag' on the server is due to client effects. I have absolutely no lag. Zodiac wasn't made for older computers, so you will experience lag if you aren't using a decent computer. I suggest cleaning your computer up (delete unused files, defrag, scan for spyware/viruses, ect.) if you find it laggy.
I've thought of adding options to reduce the cpu usage of effects and such, but I don't think it's worth the immense time it would take just to make Zodiac more playable for a few people.

Crono 10-21-2006 07:15 PM

Zodiac itself doesn't lag, it's just that the monsters have ****ty scripting. I mean they walk through walls, bounce around everywhere, and sometimes the server doesn't even detect you attacking them while they slash away at you.

Yen 10-21-2006 07:33 PM

Quote:

Originally Posted by Gerami (Post 1233912)
Zodiac itself doesn't lag, it's just that the monsters have ****ty scripting. I mean they walk through walls, bounce around everywhere, and sometimes the server doesn't even detect you attacking them while they slash away at you.

I could easily script a pathing AI.
Why don't I?
The server would die if more than four baddies are chasing at the same time.

The reason they jump past walls is to prevent people from glitching them, and reducing server lag at the same time.

Crono 10-21-2006 10:40 PM

Quote:

Originally Posted by Yen (Post 1233921)
The reason they jump past walls is to prevent people from glitching them, and reducing server lag at the same time.

jump? more like warp.

Bl0nkt 10-21-2006 11:49 PM

Quote:

Originally Posted by Yen (Post 1233921)
I could easily script a pathing AI.
Why don't I?
The server would die if more than four baddies are chasing at the same time.

The reason they jump past walls is to prevent people from glitching them, and reducing server lag at the same time.

I bet you couldn't.

Yen 10-22-2006 12:01 AM

Quote:

Originally Posted by Bl0nkt (Post 1234032)
I bet you couldn't.

Pff, I could script anything if I wasn't afraid of the server crashing.

We thought about setting 'nodes' for the NPC to use to find a smart path if they can't move directly to their target, but there was too much work involved to script the pathing into each level.

Tyhm 10-22-2006 12:06 AM

Reminds me of Hacker Catching on Classic, back in the day...the most efficient (then, the Only) way to handle something like that is clientside, but you can't trust the clients not to lie about how well they're doing. So then do you trust someone else's client to calculate how fast the baddy's moved? All terribly confusing.

Crono 10-22-2006 12:19 AM

Quote:

Originally Posted by Yen (Post 1234035)
Pff, I could script anything if I wasn't afraid of the server crashing.

We thought about setting 'nodes' for the NPC to use to find a smart path if they can't move directly to their target, but there was too much work involved to script the pathing into each level.

Yeah so let's have some butt ugly monsters walk through walls. How about you limit the amount that can chase a person + set restrictions to how long/far they chase?

Devil 10-22-2006 02:30 AM

That's right, they're absolutely horrible and annoy the hell out of everyone.

Admins 10-22-2006 04:16 AM

A simple way to avoid complex path finding algorithms is to remember where the player walked. The monster then only needs to go to the last known position and follow the path of the player.

konidias 10-22-2006 04:24 AM

Quote:

Originally Posted by Stefan (Post 1234148)
A simple way to avoid complex path finding algorithms is to remember where the player walked. The monster then only needs to go to the last known position and follow the path of the player.

Right, same method used for bomy pets when they follow you. :)

It's at least far better than having them appear to be lagging badly and teleporting around. I refused to even bother with Zodiac after I played for a few minutes trying to fight monsters and they were just teleporting in front of me and attacking and I'd swing and miss them.

Another thing you could do is just have it pathfind for short distances... Like if it runs into a wall and the player is on the opposite side of the wall, the enemy would search for an opening along the wall and then move that way.

It's not perfect but again, it's far better than having them teleport around.

Yen 10-22-2006 04:28 AM

Quote:

Originally Posted by konidias (Post 1234155)
Right, same method used for bomy pets when they follow you. :)

It's at least far better than having them appear to be lagging badly and teleporting around. I refused to even bother with Zodiac after I played for a few minutes trying to fight monsters and they were just teleporting in front of me and attacking and I'd swing and miss them.

Another thing you could do is just have it pathfind for short distances... Like if it runs into a wall and the player is on the opposite side of the wall, the enemy would search for an opening along the wall and then move that way.

It's not perfect but again, it's far better than having them teleport around.

Which would be the laggy way I'm talking about.
How will the baddy know which way it has to search for a way around the wall? It could have to circle the room and, go down a hall, and turn to reach the player. If this is the case, it's going to do an immense amount of onwall checks.

We have looked into following the path the player takes, but we don't think it would work very well.
There are spells that teleport the player and effects that speed the player up. If a player has a speed boost, they could move up to 10 tiles before the baddy begins it's next movement; it would be pretty much the same thing as letting it walk through walls. Also, it's possible for a player to aggro a baddy through a wall.

konidias 10-22-2006 04:45 AM

Quote:

Originally Posted by Yen (Post 1234157)
Which would be the laggy way I'm talking about.
How will the baddy know which way it has to search for a way around the wall? It could have to circle the room and, go down a hall, and turn to reach the player. If this is the case, it's going to do an immense amount of onwall checks.

We have looked into following the path the player takes, but we don't think it would work very well.
There are spells that teleport the player and effects that speed the player up. If a player has a speed boost, they could move up to 10 tiles before the baddy begins it's next movement; it would be pretty much the same thing as letting it walk through walls. Also, it's possible for a player to aggro a baddy through a wall.

It wouldn't be laggy... if there is a vertical wall like this with the baddy on top and the player running around to the bottom:

NPC Code:

| x
|------ ---
| o

The baddy would run against the wall trying to go down to
the player, and then when it hits a wall it would just check
along the X and see if there is an opening large enough for it
to go through...

| x
|+++--- ---
| o

(nope, can't go right)

| x
|++++++OO---
| o

(bingo! *goes left to that position and then continues to go down*)



Why would that make it check the entire level? It would only check the wall that it's run into.

If the monster is having to circle an entire room and go down halls and all of that... It's too slow to keep up with a player in the first place. Then all you'd have to do is make it "give up" chasing the player if there is too much distance between them.

_Z3phyr_ 10-22-2006 04:52 AM

PHP Code:

if (dir==2) {
  if (
onwall(down,coordinates)) {
    
//for loop here that goes left and right on X if dir in {0,2} and Y if its else
    
if (!onwall(i,y_coordinates_used_with_onwall)) {
      
move(x-i,y_coordinates_used_with_onwall_or_whatever_looks_better,time,20);
    }
  }


???

Yen 10-22-2006 04:53 AM

NPC Code:

| X
|---- --- ----
| | | | |
| | | | O|



The player is down the right tunnel, but the baddy is closer to the left tunnel.
The baddy will go down the left tunnel, but zomg, it can't reach the player that way.

Likewise, tunnels that twist or zigzag will cause similar problems.

It's really hard to find a pathing system that will work for any situation.

_Z3phyr_ 10-22-2006 05:17 AM

You can find which quadrant the player is in with a dir = getdir(player.x-x,player.y-y)... or is it the other way around... whatever... and then find the clearest path in that quadrant maybe?

I'm just throwing out stuff here though

Yen 10-22-2006 06:00 AM

Quote:

Originally Posted by _Z3phyr_ (Post 1234173)
You can find which quadrant the player is in with a dir = getdir(player.x-x,player.y-y)... or is it the other way around... whatever... and then find the clearest path in that quadrant maybe?

I'm just throwing out stuff here though

Yeah, that's where zig-zagging paths come in.
We have some levels that are maze-like. The player may be to the left of the NPC, but the proper path begins to the right; a path going somewhere else begins to the left.

The NPC would try to go down the wrong path, catch a wall and find no way to the player, then spazz and crash the server with a lot of loops.

Draenin 10-22-2006 07:59 AM

If the NPC is being blocked, have it return to its former position. If the returning takes more than, say, 5 seconds, make it instantly return to its place. Also, the enemy should return to its place after the player is out of its range of sight for a certain amount of time as well. Nothing on Zodiac really blocks except for players and scenery / NPCs, so checking for whether or not the NPC is being blocked for a certain amount of time should be fairly simple.

It's just like if you were running away from a monster and back into a castle town via a drawbridge. Once the Portcullis Gate closes, the monster wouldn't keep trying to pursue you through a grid gate made of iron.

Crono 10-22-2006 02:13 PM

How about the baddies dont magically follow players around complex corners? They should give up after a certain amount of time or implement a baddy chase bar, when it runs out they return to their original positions.

WanDaMan 10-22-2006 05:00 PM

I like'd the idea of working yourself out of jail - Mining etc.

zim5354 10-22-2006 07:14 PM

Quote:

Originally Posted by WanDaMan (Post 1234322)
I like'd the idea of working yourself out of jail - Mining etc.

didnt npulse have something like that where they warped you to a maze of bushes and you gotta throw them around to get out. your sword and all other npcs were disabled.

Infernix 10-23-2006 12:44 AM

Quote:

Originally Posted by zim5354 (Post 1234363)
didnt npulse have something like that where they warped you to a maze of bushes and you gotta throw them around to get out. your sword and all other npcs were disabled.

Babylon actually had that but Npulse might have stole the idea or the actual levels. Wouldnt be the first time somthin from bab ended up there in some shape or form.

WanDaMan 10-23-2006 08:08 AM

Oh, I remember that. They put you in there if you swore or some other minor offences - I hated it :p


All times are GMT +2. The time now is 03:31 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.