[C#, PHP, R38] Project Aurora

Page 1 of 14 12345678911 ... LastLast
Results 1 to 15 of 199
  1. #1
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    [C#, PHP, R38] Project Aurora

    Hey,

    This is actually my HSR project. I want to rewrite this thread as I kind off got off with it. I rewrote the whole source but it was on a virtual machine which I accidentally removed (since I had 2 Windows 7 VMs and removed the wrong one... silly me!)

    Anyways, I decided to rewrite it. The R35 is just an assumption. The base "framework" (which I call Aurora's Habbo Framework) is used for all projects which will be made. Not much, just 2/3 versions, but we'll start with one. Or 2... not sure.

    Some tech-stuff:

    - The emulator is written in C#.
    - The emulator uses DotNetty for networking.
    - The emulator uses Fluent NHibernate.
    - The emulator creates all database tables upon booting up for the first time.
    - The emulator is written from scratch.
    - The emulator uses Nuget.
    - The emulator uses log4net.

    Versions being made / planned:

    - V9 (or V7 if somebody can help with packet structures I can't figure out).
    - R35-R38 (not sure which one).

    More isn't planned, but it's all to be answered. For the R35-R38, the main focus is on Flash first (no worries... Shockwave is a possibility).

    The features planned:

    V7/V9:
    - Camera
    - Everything else
    - Wobble squabble
    - Gamehall
    - IF it's v9, battleball

    R35-R38:
    - Just the full game, with achievements etc etc.

    Some custom features might be implemented later but not sure about that.

    The source will be available during a later stage at the development. For now, it's not share-worthy as it's kind of messy in some parts still.

    A few scripts to show you how things are done:

    This code builds the SessionFactory, adds the mappings and updates the schema (database).

    PHP Code:
    SessionFactory Fluently.Configure()
                        .
    Database(MySQLConfiguration.Standard.ConnectionString(CONNECTION_STRING))
                        .
    Mappings(=> m.FluentMappings.AddFromAssemblyOf<PlayerMap>())
                        .
    Mappings(=> m.FluentMappings.AddFromAssemblyOf<CatalogPageMap>())
                        .
    ExposeConfiguration(config =>
                        {
                            new 
    SchemaUpdate(config).Execute(falsetrue);
                        })
                        .
    BuildSessionFactory(); 
    This is an example of a map. In this case, it's the PlayerMap which extends ClassMap<Player>. It loads all data from the table "players".

    PHP Code:
     public PlayerMap()
            {
                
    Table("players");
                
    LazyLoad();
                
    Id(=> x.Id).Column("id").Length(11).GeneratedBy.Identity();
                
    Map(=> x.Username).Column("username").Length(15).Not.Nullable();
                
    Map(=> x.Password).Column("password").Length(80).Not.Nullable();
                
    Map(=> x.Email).Column("email").Length(30).Not.Nullable().Unique();
                
    Map(=> x.Gender).Column("gender").Length(1).Not.Nullable();
                
    Map(=> x.Figure).Column("figure").Length(80).Not.Nullable();
                
    Map(=> x.Motto).Column("motto").Length(40).Default("").Not.Nullable();
                
    Map(=> x.Coins).Column("coins").Length(11).Default("500").Not.Nullable();
                
    Map(=> x.Pixels).Column("pixels").Length(11).Default("0").Not.Nullable();
                
    Map(=> x.Rank).Column("rank").Length(2).Default("1").Not.Nullable();
                
    Map(=> x.HomeRoom).Column("home_room").Length(11).Default("0").Not.Nullable();
                
    Map(=> x.SSO).Column("sso_ticket").Length(40).Not.Nullable().Default("");
            } 
    This reads a packet and handles it. I'm sure it could be cleaned up more... but oh well.

    PHP Code:
     public override void ChannelRead(IChannelHandlerContext ctx, object msg)
            {
                Client client = Engine.Game.Clients.GetClient(ctx.Channel);
                var message = msg as IByteBuffer;

                if (message.ReadByte() == 60)
                {
                    string policy = "<?xml version=\"1.0\"?>\r\n<!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\">\r\n<cross-domain-policy>\r\n   <allow-access-from domain=\"*\" to-ports=\"1-65535\" />\r\n</cross-domain-policy>\0";
                    
    ctx.Channel.WriteAndFlushAsync(Unpooled.CopiedBuffer(Encoding.Default.GetBytes(policy))).Wait();
                }
                else
                {
                    
    int length Base64Encoding.DecodeInt32(message.ReadBytes(2).ToArray());
                    
    IByteBuffer packet message.ReadBytes(length);

                    
    Engine.GameNetwork.Packets.Handle(clientpacket);
                }

                
    base.ChannelRead(ctxmsg);
            }
    For more scripts, just ask me. I'm a nice fella and if you think I could change a few things let me know. But please only do constructive criticism.

    A few screens:

    Now much, just started (and mainly done "kernel" stuff):




    The end of my school year is coming up as well so I'll have more time to work on this. And I'm gonna keep it more updated as I kind of forgot in my last thread (and the thread was a mess because I started over and yeah now I know I will only work on this and I got it backed up and stuff maybe put it on git).

    Any questions, just ask.
    Last edited by Quackster; 18-08-18 at 12:52 AM.
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055


  2. #2
    Alpha Member Caustik is offline
    Alpha MaleRank
    May 2011 Join Date
    LondonLocation
    1,903Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Nice one, good luck with the rest of the project!

    V7 had some really weird packet structures (I think Nillus's ION might have a few of these implemented...)
    Interested in joining a developer/tech discord? PM me for more information!

  3. #3
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by Caustik View Post
    Nice one, good luck with the rest of the project!

    V7 had some really weird packet structures (I think Nillus's ION might have a few of these implemented...)
    True, but it only has login and register and update profile. It doesn't have the things I struggled with. Navigator wasn't even started and club neither. The packet structure I have for club always shows 'Join!' instead of the amount of club days.

    V7 would be nice to make but I'll see what happens.
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  4. #4
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,205Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by Glaceon View Post
    True, but it only has login and register and update profile. It doesn't have the things I struggled with. Navigator wasn't even started and club neither. The packet structure I have for club always shows 'Join!' instead of the amount of club days.

    V7 would be nice to make but I'll see what happens.
    We have V1, V5 and V9, is there any need for V7?

    I mean sure, it would be nice but there's a lot of missing packet information and structures in V7 that I believe will just lead to frustration causing an incomplete server for that revision.
    The Habbo archives: http://alex-dev.org/archive/

  5. #5
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by Quackster View Post
    We have V1, V5 and V9, is there any need for V7?

    I mean sure, it would be nice but there's a lot of missing packet information and structures in V7 that I believe will just lead to frustration causing an incomplete server for that revision.
    There's no need for anything; I'll see what I do though.
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  6. #6
    Account Upgraded | Title Enabled! streamhotel is offline
    True MemberRank
    Apr 2012 Join Date
    EarthLocation
    545Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Good luck Josh! Hopefully you'll find finally motivation to fully finish this project.

  7. #7
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by streamhotel View Post
    Good luck Josh! Hopefully you'll find finally motivation to fully finish this project.
    I'll try; at least I have some more time now. Any ideas for this project are highly appreciated!
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  8. #8
    Ultimate Member spreedblood is offline
    MemberRank
    May 2014 Join Date
    174Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Hello! I'm part of this development and I'm in the stage of learning alot of C# right now and how Habbo works, or well oldschool habbo works.

    Just commited to git with a few changes,
    Got rid of godclass by creating an instance of each class that's static so you access the class via GetInstance(), for example:
    PHP Code:
    ClientManager.GetInstance().AddClient(ctx.Channel); 
    Instead of doing something like Aurora.GetGame().GetClientManager() or w/e.

    I added the ability to "que" composers. If you're going to send alot of composers at once then instead of writing and flushing every single packet, you basically first write all the packets then you flush.
    PHP Code:
    public void SendComposer(MessageComposer composer)        {            Send(composertrue);        }        public void QueueComposer(MessageComposer composer)        {            Send(composerfalse);        }        public void Send(MessageComposer composerbool flush)        {            if (flush)            {                channel.WriteAndFlushAsync(composer.GetBytes());            } else            {                channel.WriteAsync(composer.GetBytes());            }        }        public IChannel Flush()        {            return channel.Flush();        } 
    I also tidyed up the composers because @Glaceon was lazy and did wrote the composers inside the events so now they're own classes instead.

    I also edited the Habbo.swf alittle since on R35 the icons were limited and you could only choose icon names from an array,
    PHP Code:
    private static const _SafeStr_6112:Array = ["""katalogi_ikoni_purse""katalogi_ikoni_furni""katalogi_ikoni_plants""katalogi_ikoni_trax""katalogi_ikoni_pixels""katalogi_ikoni_credits""katalogi_ikoni_recycler""katalogi_ikoni_pets""katalogi_ikoni_hc""katalogi_ikoni_special_offers"]; 
    but now instead it gets the icons like on the new revisions where you get the icons by number, example, "icon_1.png". I also changed the extension from .gif to .png.

    I'm in the middle of editing the catalogue right now to make it look alittle bit more like the r37 catalogue where the sub pages have icons aswell. I've currently added the icon to the sub page. Currently working on changing the background color on the sub pages.
    How we want it to be:

    How it currently is:
    Last edited by spreedblood; 21-05-17 at 07:49 PM.

  9. #9
    Ultimate Member FunHotel is offline
    MemberRank
    Feb 2013 Join Date
    196Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Good luck guys, looking forward to see some more nice screenshots!
    java ~ php

  10. #10
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Some small updates:

    - Catalogue pages now show the layout and stuff. Products aren't made yet.
    - Navigator shows official rooms only. Those are gotten from the database.

    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  11. #11
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,235Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    I miss that public nav view.

    Are you going to get past room loading this time? You know, statistically speaking :p:

    Nah Im kidding. Nice work so far. Keep it up ^.^

    Havent done C# in a while. All I remember is that LINQ is cool but slow as fuck xD
    Discord: TheGeneral#0063
    Join the Arcturus Discord server: https://discord.gg/eDr7FKQ (You can ask help here regarding Arcturus :love)

  12. #12
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by The General View Post
    I miss that public nav view.

    Are you going to get past room loading this time? You know, statistically speaking :p:

    Nah Im kidding. Nice work so far. Keep it up ^.^

    Havent done C# in a while. All I remember is that LINQ is cool but slow as fuck xD
    I won't use LINQ too much, just for Fluent NHibernate (as I guess it uses LINQ somehow itself).

    PHP Code:
     public OfficialRoomsComposer(IList<FrontpageItemfrontpageItems)
                : 
    base(450)
            {
                
    AppendVL64(0);
                
    AppendVL64(frontpageItems.Count);

                foreach (
    FrontpageItem item in frontpageItems)
                {
                    
    AppendString(item.Name);
                    
    AppendString(item.Description);
                    
    AppendVL64(item.Size);
                    
    AppendString(item.Name);
                    
    AppendString(item.Image);
                    
    AppendVL64(0);
                    
    AppendVL64(item.Type);

                    if (
    item.Type == 1)
                        
    AppendString(item.Tag);
                }
            } 
    At least I'm not using LINQ for for(each) loops as that will drop loads of performances. (no comment about the 0, I have to make rooms yet so no user count of something yet).

    ALSO: In my old source I got past room loading too, just the annoyance is that shockwave and flash are a bit different in it. That's why I focus on Flash first xp)
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  13. #13
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Catalog products done *so far*.

    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055

  14. #14
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,235Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Code:
    if (item.Type == 1)
    Make an enum for that.
    Discord: TheGeneral#0063
    Join the Arcturus Discord server: https://discord.gg/eDr7FKQ (You can ask help here regarding Arcturus :love)

  15. #15
    Oldskool Resurrector Navine is offline
      V.I.P  Rank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,331Posts

    Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]

    Quote Originally Posted by The General View Post
    Code:
    if (item.Type == 1)
    Make an enum for that.
    MySQL gives me errors when trying to create an enum.
    Developer of Aurora (huge oldskool & Habbo BETA project):
    http://forum.ragezone.com/f331/v9-r3...netty-1132388/

    - C# developer
    - Webdeveloper

    Contact me @ discord: navv13#8055



Page 1 of 14 12345678911 ... LastLast

Advertisement