[C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

Page 1 of 4 1234 LastLast
Results 1 to 15 of 51
  1. #1
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]
    Okay so once again I have to rewrite this thread, as I did decide to focus solely on v7, since no v7 has ever been made. I have a new source than my previous version, not sure what happened to it but I cba (probably in some of my posts).

    Features:
    - Only basic stuff
    - Camera

    Keep in mind, battleball was not in this version, in fact battleball was released in v8. Also the future DCR pack will contain custom furniture files which contains the old branded items which were originally removed in this version for those who want it.

    Tech stuff nobody cares about:
    - Written in C#
    - Written from scatch
    - Using .NET Core 3.1 (multiplatform)
    - Using C# 8.0
    - Using Fluent NHibernate
    - Using DotNetty

    Some screens:






    Snippets:

    I cannot be arsed but maybe eventually I'll put up git, basically posts from and after http://forum.ragezone.com/f331/asp-n...3/#post9023343 might contain the latest code snippets.

    Credits:

    - Quackster for helping me out a lot with packet stuff and Lingo scripts
    - Somebody else who probably knows for giving Lingo scripts way before the scripts were publicly available
    - Nillus for Blunk for some packet examples which for some parts are equal to v7 (besides the protocol)
    - JoeH for Thor for some packet examples
    - AmyIsSweet for releasing the real v7 DCRs quite some time ago with encryption bypass
    Last edited by Emily; 01-07-20 at 10:05 PM.
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631


  2. #2
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,407Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Looks awesome! Nice to the v7 working more than just login (unlike ION) and seeing the walls load. And it looks more promising than this project which was never released.

    Good luck! And yes, I won't make Kepler support v7.
    The Habbo archives: http://alex-dev.org/archive/

  3. #3
    Member Rubber is offline
    MemberRank
    Apr 2015 Join Date
    ValkenburgLocation
    90Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Good Luck with this looking forward to follow this development

  4. #4
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]



    Gotta make things a bit quicker though. It still is in work of being optimized.
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

  5. #5
    #GoFuckYourself Cankiee is offline
    True MemberRank
    May 2013 Join Date
    North KoreaLocation
    974Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Good Luck with this development!




  6. #6
    Hardcore Member treebeard is offline
    MemberRank
    Jun 2018 Join Date
    Middle EarthLocation
    106Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Nice! I hope ya actually see this through; it would be great to actually checkout v7.

    PS make your packet headers const [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Sent from my SM-G530T using Tapatalk

  7. #7
    j’aime ma famille dominic is offline
    True MemberRank
    Aug 2012 Join Date
    ~/Location
    648Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by Emily View Post
    Hello,

    (Please, read the whole thread before asking questions already in the thread, thank you)

    Due to stuff happening (refer to http://forum.ragezone.com/f331/php-r...4/#post8920734 to read the story, questions about it can be asked in a PM or Discord, NOT in this thread!) I decided to rewrite Aurora to be better. The old source was messy and in some parts I was even confused by how things were done. Also, it was using SOME dependency injection stuff but it was still terrible. This doesn't mean the old source isn't used as much code is taken from the old source, making the time spent on it not for nothing.

    The functionality isn't as big as it was before, but I decided to at least make a thread as things are going alright now. This project is a bit bigger than before, so I decided to call it Aurora PRO (10 cookies for anybody getting the reference... hint hint). All jokes aside, the project contains 3 versions, based on the same base (my own base I wrote myself), a v7 (there has never been a released v7 server) and R38 (both shockwave and flash compatible since this was the original project and the main project). The R38 is the main focus but the v7 one is something extra @Quackster, don't make Kepler working on v7 thanks :( ) Okay, let's divide all the parts up:

    Aurora Pro R38

    Features:
    - Login with SSO is working
    - Catalog pages are working including items and deals (offers / packages whatever you want to call them)
    - Friendlist is working (with incorrect user online check)
    - Navigator frontpage is partly working (besides rooms, and categories)

    CMS:
    Will contain a CMS written from scratch in ASP DotNet Core (C#). Contain the style used around this time (HoloCMS/PHPRetro style). Might be multi template system and multi language system supported. No PHP cuz it's overused.

    Extra information / cool stuff:
    - Shockwave will have camera thanks to @Quackster for telling me how to enable it
    - Shockwave might get battleball / snowstorm (maybe, just maybe...)

    Screens:
    Spoiler:






    Snippets:
    FlashSSOTicketMessageEvent (flash packet 415):
    PHP Code:
    class FlashSSOTicketMessageEvent IPacket
        
    {
            public 
    int Header => 415;

            private 
    readonly IPlayerController _playerController;

            public 
    FlashSSOTicketMessageEvent(IPlayerController playerController)
            {
                
    _playerController playerController;
            }

            public 
    async Task Handle(Session sessionEvent message)
            {
                
    string sso message.GetString();

                
    Player player await _playerController.GetPlayerBySSO(sso);

                if (
    player != null)
                {
                    
    session.Player player;

                    
    session.QueueMessage(AuthenticationOKMessageComposer.Compose());
                    
    session.Flush();
                }
                else
                {
                    
    await session.Disconnect();
                }
            }
        } 
    PlayerController:
    PHP Code:
    public class PlayerController IPlayerController
        
    {
            private 
    readonly IPlayerDao _dao;
            private 
    readonly Dictionary<intPlayer_players;

            public 
    PlayerController(IPlayerDao dao)
            {
                
    _dao dao;
                
    _players = new Dictionary<intPlayer>();
            }

            public 
    async Task<PlayerGetPlayerById(int playerId)
            {
                if (
    _players.TryGetValue(playerIdout Player player))
                {
                    return 
    player;
                }

                
    player await _dao.GetPlayerById(playerId);
                
    _players.Add(playerIdplayer);

                return 
    player;
            }

            public 
    async Task<PlayerGetPlayerBySSO(string ssoTicket)
            {
                return 
    await _dao.GetPlayerBySSO(ssoTicket);
            }
        } 
    PlayerDao:
    PHP Code:
    public class PlayerDao IPlayerDao
        
    {
            private 
    readonly DatabaseFactory _databaseFactory;

            public 
    PlayerDao(DatabaseFactory databaseFactory)
            {
                
    _databaseFactory databaseFactory;
            }

            public 
    async Task<PlayerGetPlayerById(int playerId)
            {
                
    Player player null;

                
    await _databaseFactory.Select(
                    
    "SELECT * FROM players WHERE id = [MENTION=1235]Player[/MENTION]Id LIMIT 1",
                    
    async (reader) =>
                    {
                        if (
    await reader.ReadAsync())
                        {
                            
    player = new Player(reader);
                        }
                    },
                    ( [
    MENTION=1235]Player[/MENTION]Id", playerId));

                return player;
            }

            public async Task<Player> GetPlayerBySSO(string ssoTicket)
            {
                Player player = null;

                await _databaseFactory.Select(
                    "
    SELECT FROM players WHERE sso_ticket = @ssoTicket LIMIT 1",
                    async (reader) =>
                    {
                        if (await reader.ReadAsync())
                        {
                            player = new Player(reader);
                        }
                    },
                    ("
    @ssoTicket", ssoTicket));

                return player;
            }
        } 
    Aurora v7

    Features:
    - Login is working
    - Navigator nodes are working
    - Own rooms list is working
    - Going to private rooms is working (not 100% finished though)
    - Loading items in a room is working (both floor and wall items)
    - Catalog pages are working without items yet

    CMS:
    Won't contain a CMS, will purely be HTML with the layout used at that time. No login stuff or anything, v7 don't support SSO! (I might try to implement it if people really want to see it).

    Extra information / cool stuff:
    - Might be updated eventually to v9 with battleball
    - Packets figured out reading the Lingo code (not going to mention names who helped me to prevent them being annoyed)
    - Will contain a decently big CCT pack containing all the texts from various languages, badges and most of the room CCTs

    Screens:
    Spoiler:






    (I use the Dutch external texts; the emulator itself and database is English! Catalog is made by myself as close to Habbo's one was in terms of texts etc.)

    Snippets:
    None for now, no proirity. Most code besides packets is similar to R38 ones.

    So, the main focus is on the R38 project. I might make a git repository soon, just not sure. Any other questions feel free to ask, ideas: feel free to ask (even if this means editing game files) and code tips feel free to point out.

    Again: this is a rewrite which still uses lots of code from the old source, just done in a better way and slightly more clean.
    dude, i wish you the best. finish this pls, dont keep opening projects and let them die

  8. #8
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by dominic View Post
    dude, i wish you the best. finish this pls, dont keep opening projects and let them die
    Please, do not quote my whole post the next time. Thanks anyways.
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

  9. #9
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Removed the overload of async/await operations to speed up the emulator massively. This evening I will try to finish most of the Flash navigator maybe start on room entry.
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

  10. #10
    Retired maritnmine is offline
    True MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,119Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    What database framework are you using? Imo this looks like an really bloaty and awful API just to fetch a user object from the database. I suggest using something like Dapper (https://github.com/StackExchange/Dapper), it would make your code a lot cleaner:

    Code:
    public class PlayerDao : IPlayerDao
    {
        private readonly IDatabaseFactory _dbFactory;
    
        public PlayerDao(IDatabaseFactory dbFactory)
        {
            _dbFactory = dbFactory;
        }
    
        public async Task<Player> GetPlayerById(int playerId)
        {
            using (var connection = await _dbFactory.GetOpenConnection())
            {
                return await connection.QueryAsync<Player>(
                        "SELECT * FROM players WHERE id = @PlayerId",
                        new {playerId = playerId});
            }
        }
    
        public async Task<Player> GetPlayerBySSO(string ssoTicket)
        {
            using (var connection = await _dbFactory.GetOpenConnection())
            {
                return await connection.QueryAsync<Player>(
                        "SELECT * FROM players WHERE sso_ticket = @ssoTicket",
                        new {ssoTicket = ssoTicket});
            }
        }
    }
    
    Last edited by maritnmine; 09-02-19 at 08:09 PM. Reason: the code editor/formattor fucked up my post a few times, idk why it got herpes (what else is new?)

  11. #11
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by maritnmine View Post
    What database framework are you using? Imo this looks like an really bloaty and awful API just to fetch a user object from the database. I suggest using something like Dapper (https://github.com/StackExchange/Dapper), it would make your code a lot cleaner:

    Code:
    ... not gonna quote code
    I wasn't using any real database framework but I'll definitely take a look at Dapper or something else. Thanks for the suggestion!
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

  12. #12
    Evil Scottish Overlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,772Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by Emily View Post
    Removed the overload of async/await operations to speed up the emulator massively. This evening I will try to finish most of the Flash navigator maybe start on room entry.
    I'd like to know how the "overload" of async/await operations can decrease the speed "massively". Could you explain it?

    Also, if you're working with async methods. Name them accordingly, like: GetPlayerByIdAsync etc.


    Join Our RaGEZONE Discord Now!


    Send me a PM | send me a mail

    Still waiting for XenForo to hit RaGEZONE.

  13. #13
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by Joopie View Post
    I'd like to know how the "overload" of async/await operations can decrease the speed "massively". Could you explain it?

    Also, if you're working with async methods. Name them accordingly, like: GetPlayerByIdAsync etc.
    I didn't know what I wrote there. To be completely fair, I think I had some bad code somewhere and I thought it was the async methods doing it (just os you know, I think (almost) every method was async before), but I'm not sure if I've changed any other code. I agree with your second point, I just partly didn't care since most of my methods were async anyways so the '..Async' would be obsolete (no, I don't see this as an excuse and I agree with your point; just saying I've been too lazy to add the Async because of that reason).
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

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

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Care to give me some clear examples why you would want everything async...?
    Feel free to add me on Discord: tdid#5193 :)

  15. #15
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: [C#/ASP .NET/DotNet Core] Project Aurora Pro [v7/R38]

    Quote Originally Posted by The General View Post
    Care to give me some clear examples why you would want everything async...?
    To be quite honest I have no idea why I did; I know that this isn't a good reason, again I took most of the code from my old source and changed parts of it but I don't know how I came up with it in my old source. Again, I'm changing stuff when I'm free (but the flu hit me and I've been sick for over a week now).
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631



Page 1 of 4 1234 LastLast

Advertisement