Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 07:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[5165] Making events question

Discussion on [5165] Making events question within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
[5165] Making events question

Hey guys. I was just thinking, if I make my own events would it be better to make a new thread for the event or just stick stuff into character.cs? Because I've been thinking, if I stick it into character.cs and there are x people online, wouldn't that just lag the whole server? Or it wouldn't matter that much? Just looking for some feedback.

Currently I have most of my events in character.cs which I think is causing some lag. I just cant pinpoint whether its my client or the server.
dragon89928 is offline  
Old 05/21/2010, 03:01   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
If you are doing anything time related (other than starting/stopping) I'd do a thread just for that event.

If you are using a client and use any sort of thread.sleep it will cause the server to essentially stop for that amount of time. I had that with my olldd dueling count down. out of lazyness I didn't do a new thread and just used thread.sleep and it of course would cause that client to not be able to do anything during that time.

For starting/stopping events I'd do an event thread type system checking datetimes and such, looping every lets say 25 ms or so. Most sources already have something similar (they usually have like a character tools thread that runs through clients doing checks on them and then a similar thing for guards/mobs/server systems)

If you have something like that specifically for events then you can mess around with it without worrying about messing up clients through the server or other game systems if you are using thread.sleep or other checks that (if running on all connected clients) could cause alot of unneeded cpu usage.

That being said I'm not very good with threading and I'm sure others around here can offer much better advice than me.
pro4never is offline  
Thanks
1 User
Old 05/21/2010, 04:11   #3
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
Yeah. I was thinking exactly the same thing. Since if it checks # of players amount of times every so often it would cause unnecessary usage. Thanks a lot! Now I need to go recode my events >.>
dragon89928 is offline  
Old 05/21/2010, 17:05   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
When I used Newestcoserver

I would make a new .cs but define stuff in character.cs and world.cs and in the .cs I just delegated a new thread to it...I had no problems to be honest I atually had less lag then when I didnt use a new.cs for events.
MonstersAbroad is offline  
Old 05/27/2010, 22:56   #5
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
Yeah.. I made two quests, one using character.cs and one using threads. It seems as though the thread lagged quite a bit at 500ms sleep. It was about 150-200 ping for character.cs and 300 for the thread, normally 80. (I'm comparing the events using the ping for lack of a better way to measure responsiveness). Then again the computer I'm running the server on is pretty crappy, might be the computer that's causing the lag.
dragon89928 is offline  
Reply


Similar Threads Similar Threads
ConquerSx Sql Server 5165 ( Fixed All Error - Saved All Events )
06/08/2010 - CO2 PServer Guides & Releases - 27 Replies
removed by me no more release here
[Huge Question] Events Triggered by Time [5165]
03/06/2010 - CO2 Private Server - 17 Replies
Ok, I've been wanting to create events that happen at a certain time on the server. What I mean is, at an "x" time, i want something that will trigger an event that does "y". For example: ------------ - I would like a "/c" command message to be sent to everyone at 5:00 pm saying "Event Test". (That's basicly what I've been trying to do) My big question is, does the client support it? If it does, where do I put the even code? If it doesn't then can someone help me out? I've been working...
United-CO V3.0 5165 new items new events join now 24/7
02/13/2010 - CO2 PServer Archive - 2 Replies
Removed.



All times are GMT +1. The time now is 07:50.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.