[Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    @Update 2: http://www.mediafire.com/?of54d1n94g4557c

    Started on Packetfinder, coded some packets and made an incomingheaders and outgoingheaders class + some minor edits.

    __

    Hello RaGEZONE!

    I've had a little bit of free time the past months and made 300 bases for emulators in C#. I want to start a emulator once in my life and finish it, so I decided to relax and really look over every code 50x. I'm now working on the best sockets I could ever make before I'm going to start on something else. I want you to say what you think of these sockets (and maybe use them?). I want to do this same thing with my database handler too when I've finished it, but I don't have much time and no experience in MySQL in C#.

    DL: Starlight.rar

    Please comment on what you think about the sockets and tell me if you find any bugs?

    (I know it's not much but I want to make everything 100% perfect before I start the next step)
    Last edited by azaidi; 09-06-13 at 11:13 AM.


  2. #2
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Thanks for the release Azaidi, good work.

  3. #3
    Account Upgraded | Title Enabled! JustTime is offline
    MemberRank
    Aug 2012 Join Date
    GermanyLocation
    417Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    How Lasse said, good work. I like how you do your things. Step for step is better as one step with much bugs.

    Thanks, JustTime.

  4. #4
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    I'll not create a new thread this time, Starlight Emulator 0.2: Starlight 0.2.rar

    What do you think about this base? I'm going to continue with R63A because I don't want to go into the R63B bullshit with shuffling headers etc.

  5. #5
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Why keep releasing? No one has used it.

  6. #6
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Hi,
    I'd recommend you to put all handlers (Handler.SetIncomingHeader) to it's own classes (makes it easier to look through). And I'd recommend doing the same thing for packets (A new class per packet), it gives a more "smooth" overview. Rather than that, I think it's great :)

  7. #7
    Valued Member BatDev is offline
    MemberRank
    Nov 2006 Join Date
    115Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Why keep releasing? No one has used it.
    Still useful for those who are searching for this sort of thing and they come across this.

    OT: Looking sweet

  8. #8
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Why keep releasing? No one has used it.
    Because I'd like some good feedback on my coding and this might be useful for some people?

  9. #9
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Why keep releasing? No one has used it.
    Pretty awful for someone to say. Like your emu was finished. Sure Sulake forbid you but work under a Latino alias or something. They won't know the difference.

  10. #10
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by FullmetalPride View Post
    Pretty awful for someone to say. Like your emu was finished. Sure Sulake forbid you but work under a Latino alias or something. They won't know the difference.
    If Sulake finds out (and sure, they will) he will have even more troubles.

  11. #11
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Why keep releasing? No one has used it.
    You forget.. Not everyone has decided to go R63B.. It has alot of bugs unless you can fix them. So this 'could' help users.

    ~ Mikey

  12. #12
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Mister. M View Post
    You forget.. Not everyone has decided to go R63B.. It has alot of bugs unless you can fix them. So this 'could' help users.

    ~ Mikey
    Or you could just use a complete/near complete server instead.


  13. #13
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Or you could just use a complete/near complete server instead.

    People has lifes too, even people here @ RZ!! :o

  14. #14
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Aquel View Post
    Hi,
    I'd recommend you to put all handlers (Handler.SetIncomingHeader) to it's own classes (makes it easier to look through). And I'd recommend doing the same thing for packets (A new class per packet), it gives a more "smooth" overview. Rather than that, I think it's great :)
    Thanks, I've done this now and cleaned up some code. This is the kind of feedback I want.
    I will put all Incoming Headers in separate static functions in one class so people can easily find any incoming packet without having to go through 100+ files.
    I will also put the outgoing packet structures in a separate static class without any work going on, just changing parameters -> servermessage so the code will look a lot cleaner and it will be very easy to change it to R63B if I'm going to do that.

    Quote Originally Posted by Quackster View Post
    Or you could just use a complete/near complete server instead.

    What's up with discouraging other developers?
    I'm not doing this for making my own hotel, I'm doing it for the coding experience, what you should do it for anyway. If you want to run a succesful hotel use Phoenix Cracked, because this will never beat it. But I'm still going to work on this untill it becomes usefull and code CMS'es on this.

  15. #15
    Member TheNaked is offline
    MemberRank
    Sep 2011 Join Date
    /var/www/htmlLocation
    69Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Good work, looking forward to see some more from you. :)

  16. #16
    Lurking around Clawed is offline
    MemberRank
    Jun 2012 Join Date
    RaGEZONELocation
    785Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by azaidi View Post
    What's up with discouraging other developers?
    I'm not doing this for making my own hotel, I'm doing it for the coding experience, what you should do it for anyway. If you want to run a succesful hotel use Phoenix Cracked, because this will never beat it. But I'm still going to work on this untill it becomes usefull and code CMS'es on this.
    Because Sulake told him to aha :P
    OnTopic: Anyway nice, looked through this good stuff keep it up :P

  17. #17
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by FullmetalPride View Post
    Pretty awful for someone to say. Like your emu was finished. Sure Sulake forbid you but work under a Latino alias or something. They won't know the difference.
    Oh god, you just ruined his opportunity to do that.

  18. #18
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    Or you could just use a complete/near complete server instead.
    Haha haha like what near complete server?

    Butterfly is just crap to use as a base though it is stable its still crap.

    Quote Originally Posted by Aquel View Post
    Oh god, you just ruined his opportunity to do that.
    Quacky wont do that since he listens to people that tell him what to do / not to do.

  19. #19
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by tdid View Post
    Haha haha like what near complete server?

    Butterfly is just crap to use as a base though it is stable its still crap.



    Quacky wont do that since he listens to people that tell him what to do / not to do.
    Butterfly aint crap..

    Far from that, original uberEmu is crap! (the leaked released one.. sorry.)

  20. #20
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Update: Starlight 0.3.rar

    Can someone find out why the pathfinding is so bugged? (It works but you walk like an autistic dog) Also please give me some feedback about the coding, I can't do anything with the usual "not useful" or "nice".

  21. #21
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by tdid View Post
    Haha haha like what near complete server?

    Butterfly is just crap to use as a base though it is stable its still crap.



    Quacky wont do that since he listens to people that tell him what to do / not to do.
    I wasn't talking about Butterfly. I was talking about Holograph, Thor. They're pretty decent.

    Quote Originally Posted by azaidi View Post
    What's up with discouraging other developers?
    I'm not doing this for making my own hotel, I'm doing it for the coding experience.
    If you're doing it for your own coding experience, I don't see why it has to be released. It doesn't have sufficient features to run a hotel so therefore it's useless.

    Quote Originally Posted by azaidi View Post
    Update: Starlight 0.3.rar

    Can someone find out why the pathfinding is so bugged? (It works but you walk like an autistic dog) Also please give me some feedback about the coding, I can't do anything with the usual "not useful" or "nice".
    There are reasons for your multiple issues with your pathfinder. Firstly let me point them out to you;

    - You create a new thread each time the user walks (very unstable). It should be per room instead.
    - This method call

    Code:
    Thread.Sleep(130);
    Should be 500 milliseconds instead, this processes the thread with less speed so it's like normal walking. If you want to see how a pathfinder is properly implemented, look at Room.java from the Sierra leak. The syntax is almost the same so you should be able to understand it.
    Last edited by Quackster; 10-06-13 at 05:05 AM. Reason: Pathfinding help.

  22. #22
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by Quackster View Post
    I wasn't talking about Butterfly. I was talking about Holograph, Thor. They're pretty decent.



    If you're doing it for your own coding experience, I don't see why it has to be released. It doesn't have sufficient features to run a hotel so therefore it's useless.



    There are reasons for your multiple issues with your pathfinder. Firstly let me point them out to you;

    - You create a new thread each time the user walks (very unstable). It should be per room instead.
    - This method call

    Code:
    Thread.Sleep(130);
    Should be 500 milliseconds instead, this processes the thread with less speed so it's like normal walking. If you want to see how a pathfinder is properly implemented, look at Room.java from the Sierra leak. The syntax is almost the same so you should be able to understand it.
    Sorry to not update the thread every 2 seconds, I already fixed pathfinding yesterday. I know about the roomhandling, I'm gonna recode it after this works better and I cleaned up some code so recoding is easier. Also, I released it here because I want feedback from some coders. If you'd like to come on Skype to give me a lot of feedback about my coding I'll close this thread if you want. I just want to improve my coding by listening to other people's advice.

  23. #23
    Proficient Member MrSolution is offline
    MemberRank
    May 2012 Join Date
    174Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Add some try { } catch or it will hang.

  24. #24
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Ok, kids, let me explain how this stuff works. First of all, adding a try-catch block around ANY code would NEVER make it hang less.
    Having one thread per room is shooting yourself in your foot. It would cause X = amount of loaded rooms to be added to your CPU to be cycled. It scales incredibly poorly and literary eats up system resources.
    The way to go is pooling, as I did in Butterfly. It would probably be a better idea to use a timer or something like that, but the way I did it in bfly was good enough. The difference between this and the other approach is that the OS handles how many threads should be running, not the amount of rooms that is loaded. That way it is more scalable and the calls are asynchronous.

    Edit:
    Also, here is a way better socket which I used in bfly: https://github.com/martinmine/Connectivity It basically talks directly to the Winsock API so you don't need all the overhead caused by the generalized socket class in .NET

  25. #25
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [Starlight] SocketAsyncEventArgs Sockets 0.1 - BETA

    Quote Originally Posted by maritnmine View Post
    Ok, kids, let me explain how this stuff works. First of all, adding a try-catch block around ANY code would NEVER make it hang less.
    Having one thread per room is shooting yourself in your foot. It would cause X = amount of loaded rooms to be added to your CPU to be cycled. It scales incredibly poorly and literary eats up system resources.
    The way to go is pooling, as I did in Butterfly. It would probably be a better idea to use a timer or something like that, but the way I did it in bfly was good enough. The difference between this and the other approach is that the OS handles how many threads should be running, not the amount of rooms that is loaded. That way it is more scalable and the calls are asynchronous.

    Edit:
    Also, here is a way better socket which I used in bfly: https://github.com/martinmine/Connectivity It basically talks directly to the Winsock API so you don't need all the overhead caused by the generalized socket class in .NET
    Are 500ms timers for the pathfinders, and then one thread cycling through all rooms better?



Page 1 of 2 12 LastLast

Advertisement