|
You last visited: Today at 22:17
Advertisement
Conquer Raids
Discussion on Conquer Raids within the CO2 Private Server forum part of the Conquer Online 2 category.
06/04/2013, 22:13
|
#16
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Let me argue for why I am doing it and since I don't know of any other ways to be doing it better (Perhaps parallel-programming? Not familiar with it really, so I don't know.)
The BaseThread is a multithreading wrapper actually, however normal mobs does not have a thread for themself. Only the bosses, but there would only be a single boss in the map spawned at once. Normal mobs uses the thread the map has, since each map with mobs has a thread, rather than a global thread for the whole server.
The reason why the boss uses multiple threads is because each thread simply does different actions and if I was to use a single thread then one action may delay another action. It's not really a problem when it comes to deadlocks though, since there is not multiple threads accessing the same data they do. No locks is needed either since they just take care of the concurrent collections which already takes care of concurrency between threads.
If you know a better way to do it, I'd be more than interested in it, but as of now I do not know a better way.
Perhaps instead of giving each boss the threads then shared threads for the bosses, like with the mobs?
|
|
|
06/04/2013, 22:13
|
#17
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
The naming would heavily imply (to me anyways) that they are their own thread loops. I'd expect if they were something being called by a master thread it would be something like
Boss_Move_Tick
Boss_Attack_Tick
etc
Quote:
Originally Posted by Super Aids
Let me argue for why I am doing it and since I don't know of any other ways to be doing it better (Perhaps parallel-programming? Not familiar with it really, so I don't know.)
The BaseThread is a multithreading wrapper actually, however normal mobs does not have a thread for themself. Only the bosses, but there would only be a single boss in the map spawned at once. Normal mobs uses the thread the map has, since each map with mobs has a thread, rather than a global thread for the whole server.
The reason why the boss uses multiple threads is because each thread simply does different actions and if I was to use a single thread then one action may delay another action. It's not really a problem when it comes to deadlocks though, since there is not multiple threads accessing the same data they do. No datalocks is needed either since they just take care of the concurrent collections which already takes care of concurrency between threads.
If you know a better way to do it, I'd be more than interested in it, but as of now I do not know a better way.
Perhaps instead of giving each boss the threads then shared threads for the bosses, like with the mobs?
|
... There's no reason (that I'm aware of anyways) to use more than a couple threads for your entire server. The amount of threads you are using creates more problems than it solves (what exactly do you need that many for to start with?)
I'd recommend a task system. The best way to explain it to those familiar with conquer online would be something like how TQ binaries handle NPCS.
Each task has parameters as well as an optional next task. This way your task collection only contains the currently relevant tasks. You can then process these tasks as they elapse and if there is a next task associated with them then you simply add that new task to the tasks collection.
This allows you to have a potentially unlimited chain of tasks being processed by the server. You can make the system as complicated as you would like.
Another possibility would be how TQ handles threading. There's a 'base thread' for the server which then triggers child threads, each of which have an interval which determines how often they are called. These child threads can then call any actions they need to (some of which may have their own internal tick intervals)
|
|
|
06/04/2013, 22:32
|
#18
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Quote:
Originally Posted by pro4never
The naming would heavily imply (to me anyways) that they are their own thread loops. I'd expect if they were something being called by a master thread it would be something like
Boss_Move_Tick
Boss_Attack_Tick
etc
... There's no reason (that I'm aware of anyways) to use more than a couple threads for your entire server. The amount of threads you are using creates more problems than it solves (what exactly do you need that many for to start with?)
I'd recommend a task system. The best way to explain it to those familiar with conquer online would be something like how TQ binaries handle NPCS.
Each task has parameters as well as an optional next task. This way your task collection only contains the currently relevant tasks. You can then process these tasks as they elapse and if there is a next task associated with them then you simply add that new task to the tasks collection.
This allows you to have a potentially unlimited chain of tasks being processed by the server. You can make the system as complicated as you would like.
Another possibility would be how TQ handles threading. There's a 'base thread' for the server which then triggers child threads, each of which have an interval which determines how often they are called. These child threads can then call any actions they need to (some of which may have their own internal tick intervals)
|
AcidCOv3 had a similar system, where you could tell the GenericThread to execute a method and when, like a child - but not in its own loop.
(I'd have to look to remember exactly how it was done, but I remember it being pretty cool)
|
|
|
06/04/2013, 22:53
|
#19
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Well I have a sort of task thing, but I will figure something out. Thanks pro.
|
|
|
06/05/2013, 01:05
|
#20
|
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
|
Quote:
Originally Posted by _DreadNought_
AcidCOv3 had a similar system, where you could tell the GenericThread to execute a method and when, like a child - but not in its own loop.
(I'd have to look to remember exactly how it was done, but I remember it being pretty cool)
|
You never taught me anything about threads you *****, now all of this seems like Chinese to me >.<
|
|
|
06/05/2013, 08:09
|
#21
|
elite*gold: 0
Join Date: Jun 2013
Posts: 5
Received Thanks: 5
|
I personally think the idea is pretty neat. My favorite game at this time is Star Wars: The Old Republic where I play both DPS and Healer.
I very much look forward to carrying over the role to ProjectX.
|
|
|
06/05/2013, 14:41
|
#22
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Want to thank pro4never and Hybrid for the threading thing and I have narrowed it down now and the naming convention has been changed to be similar for it all, as well some other optimization, not sure why I did this stupid stuff in the start *****
|
|
|
06/05/2013, 14:51
|
#23
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Probably for the same reason you decided to call yourself 'Super Aids'....
|
|
|
06/05/2013, 15:38
|
#24
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Quote:
Originally Posted by Korvacs
Probably for the same reason you decided to call yourself 'Super Aids'....
|
Only a few people would understand. It was a command in a previous server.
|
|
|
 |
|
Similar Threads
|
PvE-Verkaufsruns (CMs & HC-Raids)
02/14/2013 - World of Warcraft Trading - 3 Replies
Hallo zusammen.
Nun auch von uns ein Thread zu Verkaufsruns im PvE.
Das Prinzip kennt ihr: Wir, die bettelarmen Nerds, bieten euch, den Gutbetuchten und Bequemen, die Möglichkeit, gegen einen kleinen Obolus von uns durch aktuellen PvE-Content gezogen zu werden, wobei euer Char Gear, Erfolge und Ähnliches von Wert bekommt.
Wer wir sind:
Wir sind ein bunter Haufen von Spielern, zum Teil aus einigen der besten PvE-Gilden Deutschlands (World Top 15-25), zum Teil aus dem High-Rated...
|
Oldschool Raids
01/01/2013 - World of Warcraft - 5 Replies
Hallo ich habe da mal eine Frage,
gibt es wohl noch auf irgendwelchen Servern Oldschool Gilden?
Die den 60er, 70er und/oder 80er Raids machen oder zusammen PvP?
Danke schonmal im voraus
|
DK in raids
06/26/2010 - World of Warcraft - 14 Replies
I want to know whether a dk can be good for raids.
I am leveling a dk. how should i spec it to be any good in pve? Can it be good at all?
|
What character for PvP and raids ?
10/27/2009 - Lineage 2 - 0 Replies
Hey guys,
What character can be best used for PvP and raids ? And if possible tell me how to play it well.
|
Solo raids with 2 ppl
04/05/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 9 Replies
also ganz einfach:
man braucht:
Einen Blade Dancer mit dance of medusa
Einen level 1 char
Einen Spell singer oder sorcerer fuer freezing skin oder blazing skin
einen pp (aber nicht nötig, aber gut zum rb buffen)
Jetzt mal zum thema:
|
All times are GMT +1. The time now is 22:17.
|
|