Register for your free account! | Forgot your password?

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

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

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.

Reply
 
Old   #1
 
shadowman123's Avatar
 
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
shadowman123 is offline  
Old 07/09/2012, 19:33   #2
 
_DreadNought_'s Avatar
 
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?
_DreadNought_ is offline  
Thanks
1 User
Old 07/09/2012, 20:38   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by _DreadNought_ View Post
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
shadowman123 is offline  
Old 07/09/2012, 20:53   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Quote:
Originally Posted by shadowman123 View Post
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.
_DreadNought_ is offline  
Thanks
1 User
Old 07/09/2012, 21:01   #5
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by _DreadNought_ View Post
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
shadowman123 is offline  
Old 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.
I don't have a username is offline  
Old 07/11/2012, 17:28   #7
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by I don't have a username View Post
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 ..
shadowman123 is offline  
Old 07/11/2012, 21:34   #8
 
_DreadNought_'s Avatar
 
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.
_DreadNought_ is offline  
Old 07/11/2012, 23:42   #9
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by _DreadNought_ View Post
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();
shadowman123 is offline  
Old 07/12/2012, 00:11   #10
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Quote:
Originally Posted by shadowman123 View Post
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.
_DreadNought_ is offline  
Thanks
1 User
Old 07/12/2012, 01:27   #11
 
Zeroxelli's Avatar
 
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.
Zeroxelli is offline  
Reply


Similar Threads 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.


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.