|
You last visited: Today at 18:24
Advertisement
Mobs
Discussion on Mobs within the CO2 Private Server forum part of the Conquer Online 2 category.
11/08/2010, 16:34
|
#1
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Mobs
So I'm gonna go about asking you higher ups how you would go about coding mob movement and mob AI altogether. I'm gonna code this for my 5017, (hybrids) and I just wanna get some tips from y'all first.
btw
[brag]
[/brag]
|
|
|
11/08/2010, 16:42
|
#2
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 81
|
mobs won't need to be moved when nobody is in the area (and even in conquer they don't move unless your close to them right?) when you want them to move, its usually just chasing the player isn't it, you could make it walk random directions, just make sure it cant walk through boundaries.
|
|
|
11/08/2010, 16:44
|
#3
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Its quite tricky to be honest, every time a monster needs to move something needs to fire a trigger or inform the monster, its unrealistic to give every monster cpu time, because most of them wont need it, so your wasting time on them, so its better to have it so that when players move around they trigger events which cause the monsters to move.
So depending on how many players you have in a map, and how many monsters you would probably want a thread per map with players on it minimum, with the ability to expand that if the map is very busy, then have the players trigger events for monsters on that thread and have that thread perform the necessary actions, or delegate to other threads.
It is definitely not a simple task, and there are of course many ways of doing this. Other options include giving CPU time to all monsters on all maps on one thread and performing actions depending on the circumstance of the individual monster. You could have a spawn object which detects when players move into the spawn and then have that delegate actions, however you would still need a way to give the relevant spawns CPU time.
Just a few thoughts for you. Im also about to start work on spawns myself in the open source project, so im sure i'll probably experiment with a few, most likely ill be trying my first suggestion to begin with (player triggered monsters).
|
|
|
11/08/2010, 16:55
|
#4
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Personally I haven't done much work with AI/Spawns as I'm a bit too busy atm but my thinking has been along the same idea as Korv's.
When I move a player I assign objects in range to a player dict of local objects. My thinking is then using this to iterate through mobs actually relevant to the server in my Mob handling thread.
IE: Pull players on a map, pull mobs on their screen and perform checks/actions only on those mobs and leave all other mobs alone (not on anyone's screen, who cares what they do?... maybe very low chance to trigger random movement for them but that's about as far as I'd ever wanna go with them)
I'm sure there are more efficient ways such as korv is suggesting but imo if you're only running through objects already on screen then I don't see any huge issue with the system. Can always be improved though.
|
|
|
11/08/2010, 19:23
|
#5
|
elite*gold: 0
Join Date: Nov 2010
Posts: 237
Received Thanks: 99
|
A* Pathfinding algo for Mobs please + for my "bots" implementation in process...
|
|
|
11/08/2010, 20:18
|
#6
|
elite*gold: 20
Join Date: Mar 2006
Posts: 1,491
Received Thanks: 536
|
Old game I worked on had global timers. Basically every about 200ms the server would run through a list of NPCs and do a check on their last attack/movement time and see if they needed to do so again (they had a target, are walking somewhere, etc). Granted for CO, the timer would be far less than 200ms, but it'd be a similar situation. For pathfinding, that wouldn't be too difficult to emulate official CO. For mobs on official, it's just a 3x3 area check around them if they can move and if that tile is closer to you than they currenly are, move, if not but is the closest possible while not moving in the opposite direction entirely, move. Some mobs in CO move quite fast though (tombbats anyone?) so the timer would probably be it's own thread running every I'd guess 50-100msish checking the NPC list.
|
|
|
 |
Similar Threads
|
[TUT] Vacking w/o loosing mobs + mobs speed hack [WINHEX]
01/25/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 208 Replies
You will need Win Hex to edit thouse numbers.
I used Styx as the mob to edit.
PART OF VACK + SPPED HACK FOR MOBS.
Original:
2251,Styx,1,19,82,35749,0,486,695,10,50,2,6,0,0,0 ,0,0,0,55,0,0,0,02.5,4.8,1,1,styx,ÀÛ¼ºÁß,0,0,0,526 0,441,595,30800,1,1,3,90,90
|
[FRAGE] Wie platziere ich mobs in Maps ohne Mobs?
04/05/2010 - Metin2 Private Server - 0 Replies
Löschen PLS
|
[SUCHE]Einen Client mit den 13 neuen Mobs und Zombie Mobs
03/13/2010 - Metin2 Private Server - 23 Replies
Also Leute,
ich suche jemanden der so nett ist und mir
einen Client zu verfügung stellt bzw. macht auf dem
die neuen Mobs sichtbar sind .
THX
|
welche mobs ersezten die zombi mobs und wo tauchen sie im spiel auf?
01/17/2010 - Metin2 Private Server - 9 Replies
Überschirft
|
[Help]Guards attack Mobs & Mobs Drop for CoemuV2
07/04/2009 - CO2 Private Server - 0 Replies
Can any help me to make that guards attacks mobs
and how can i change the drop rate in CoemuV2
|
All times are GMT +1. The time now is 18:24.
|
|