|
You last visited: Today at 23:03
Advertisement
Impulse Based Source Bugs / Problem
Discussion on Impulse Based Source Bugs / Problem within the CO2 Private Server forum part of the Conquer Online 2 category.
07/09/2012, 16:27
|
#1
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Impulse Based Source Bugs / Problem
Well I've Been working On this Source for 1 year or so Fixed alot of its bugs / added alot of thins but am looking for stability Right now .. making sure everything is well coded but Alot Told me that :-
1 - Thread system is Weakly Coded
2 - Monster Spawn is badly Coded
So what i was asking if sm1 tried Impulse based source ..Could Tell me :-
1 - How They r bad Coded ?
2 - What can be Done to improve them ?
3 - What do u see need to be Recoded ?
Regards
shadowman123
|
|
|
07/09/2012, 19:33
|
#2
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
If you're asking us what's wrong with it what makes you think you can fix it?
|
|
|
07/09/2012, 20:38
|
#3
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by _DreadNought_
If you're asking us what's wrong with it what makes you think you can fix it?
|
ill Depend on My Experience in Source beside my C# knowlage then give it a try .. And i think i can handle it ..but my problem is that i dont know whats wrong with Threading system !! thats y am asking
|
|
|
07/09/2012, 20:53
|
#4
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by shadowman123
ill Depend on My Experience in Source beside my C# knowlage then give it a try .. And i think i can handle it ..but my problem is that i dont know whats wrong with Threading system !! thats y am asking
|
Do some searching, It's been pointed out by InfamousNoone in a DuelistAI thread.
It uses GC.KeepAlive, which really shouldn't be used.
|
|
|
07/09/2012, 21:01
|
#5
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by _DreadNought_
Do some searching, It's been pointed out by InfamousNoone in a DuelistAI thread.
It uses GC.KeepAlive, which really shouldn't be used.
|
ThanQ Dread
|
|
|
07/11/2012, 00:09
|
#6
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Well it uses a lot of bad coding habits.
|
|
|
07/11/2012, 17:28
|
#7
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by I don't have a username
Well it uses a lot of bad coding habits.
|
What do u think need to be Recoded ? Honestly Only Things i Recoded Are Reincarnation and Floor Item / Flower system / Lottery system .. Nothing else i went thought Threads But Havent Learned Much ..
|
|
|
07/11/2012, 21:34
|
#8
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Threads do need recoding.
I'd also recode the Screen class, infact, I'd recode everything... iashdfai;sd, idunno, I can't use public sources anymore, own sources ftw.
|
|
|
07/11/2012, 23:42
|
#9
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by _DreadNought_
Threads do need recoding.
I'd also recode the Screen class, infact, I'd recode everything... iashdfai;sd, idunno, I can't use public sources anymore, own sources ftw.
|
Well Im Abit DisAppointed but i Can Handle it At last But Please When you Say smthing is Bad Tell me Y it is for Screen System idk whats Wrong with it..Can u ? .. For Threads i Searched for it But All i got is Different Techniques of Making Thread For Example Using This Way
Code:
Thread MyThread = new Thread(new ThreadStarter(Target));
MyThread.Start();
MyThread.Join();
|
|
|
07/12/2012, 00:11
|
#10
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by shadowman123
Well Im Abit DisAppointed but i Can Handle it At last But Please When you Say smthing is Bad Tell me Y it is for Screen System idk whats Wrong with it..Can u ? .. For Threads i Searched for it But All i got is Different Techniques of Making Thread For Example Using This Way
Code:
Thread MyThread = new Thread(new ThreadStarter(Target));
MyThread.Start();
MyThread.Join();
|
Threading is so, so, so simple, Why do people over do it?
It's as simple as:
PHP Code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using ConquerSource.Game; using System.Diagnostics;
namespace ConquerSource.Core { public class Threading { static TIME _LastCheck; public static void Fireup() { _LastCheck = TIME.Now;
//Main thread new Thread(Core).Start(); Program.WriteLine("[Threading] Core threads has been created and started."); } public static void Core() { while (true) { TIME CurrentTime = TIME.Now; if (CurrentTime.Time >= _LastCheck.Time) { _LastCheck = TIME.Now;
Stamina_Check(); } Thread.Sleep(100); } } private static void Stamina_Check() { foreach (GameClient client in Kernel.GamePool.Values) { TIME CurrentTime = TIME.Now; double Time = 0; bool Quick = false; if (client.Char.Action == ConquerAction.Sit) { Time = 800; Quick = true; } else Time = 1200; if (client.Char.StaminaStamp.Time <= CurrentTime.Time) { client.Char.StaminaStamp = CurrentTime.AddMilliseconds((int)Time); if (client.Char.Stamina != 100) { switch (Quick) { case false: { if (client.Char.Stamina <= 96)//7? client.Char.Stamina += 3; else client.Char.Stamina = 100; break; } case true: { if (client.Char.Stamina <= 93)//10? client.Char.Stamina += 7; else client.Char.Stamina = 100; break; } } } } } } } }
I wrote that over a year ago, there's no need for a load of fancy threading shit, keep it simple, keep it good.
Note: Over a year ago, Yes I should be going through the dictionary as an array for faster speeds, and the stamina code is abit fucked up, ontop of the initial thread check, but it works, very well.
|
|
|
07/12/2012, 01:27
|
#11
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Never create a thread like that, it's a bad idea in servers. You always want to have a way to access it later on in case something happens. Create a variable and assign the thread to that, then call start. Thus why MSDN uses that method.
Also, why did that example call Join()? That's all fine and dandy in a desktop application, but in a server you never want to block the thread of the socket. That would mean that no other connections were accepted until that connection disconnected or the thread handle was terminated. Bad idea.
My $0.02 + tax.
|
|
|
 |
Similar Threads
|
Problem in my source updated to version 5620+ *Impulse Source*
08/15/2012 - CO2 Private Server - 11 Replies
I updated my source to version 5620+
1) I open my account with any password.
2) Can I log into an account without having a registered account.
3) I cannot see the monsters or other players
Any help or hint is welcome.....
|
i need help in source Conquer Online Source (impulse)
03/01/2011 - CO2 Private Server - 4 Replies
Originally Posted by FuriousFang
Don't double post...
We told you, you're not setting up the config and entities right. Look, copy mine:
Configuration Table:
EntityID: 1000001
ItemUID: 1000001
Server: TestServer (Make sure it matches what you have in the source)
Accounts Table:
|
i got a problem in 5165 impulse source
02/21/2011 - CO2 Private Server - 13 Replies
hi, i have a co pserver 5165 impulse " http://www.elitepvpers.com/forum/co2-pserver-guides -releases/741395-5165-source.html "
i followed the guide , but when i made server on i got an error, well i gone to C# and i debugged , and i got the same thing , look:
http://img713.imageshack.us/img713/3217/sdfsdft.p ng
and "coserver" is the name of database "coserver.sql"
there is "coserver" written in OldCODB
|
[HELP] Impulse Source
07/29/2010 - CO2 Private Server - 0 Replies
Hey guys I have been at this for the last two days, Someone told me to take the way the Portals are loaded and use that to Spawn Mobs.
First please don't flame I am trying and probably got it very very wrong.
Ok my problem is I have made the Sql Files and added all the mobs to it. I do not know how to make the source read the Sql files and make them appear on the client screen.
Like I said I have been at this for days and can't figure it out. Many guides have been read and alot of googling...
|
All times are GMT +1. The time now is 23:04.
|
|