Kepler - v21 Emulator [Java, MariaDB, Netty]

Page 1 of 18 12345678911 ... LastLast
Results 1 to 15 of 263
  1. #1
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,213Posts

    Kepler - v21 Emulator [Java, MariaDB, Netty]

    Kepler


    What is this?

    Kepler is a Habbo Hotel emulator that is designed to fully emulate the v21 version from 2008-ish era. The server is written in Java (JDK 10) and it's using various libraries, which means it's multiplatform, as in supports a wide range of operating systems. Windows, Linux distros, etc. I'm using MariaDB which is a fork of MySQL, so it has the same compatibility but it's more modern.

    Libraries Used

    - Netty https://netty.io

    - HikariCP https://github.com/brettwooldridge/HikariCP

    - SLF4J https://www.slf4j.org/

    - Log4j https://logging.apache.org/log4j/2.x/

    - Apache Commons-Configuration https://commons.apache.org/proper/co...configuration/

    Features

    • User
      • Login by SSO ticket.
      • Load fuserights.
      • Load credits.
      • Load pixels.

    • Navigator
      • Lists all public rooms .
      • Lists all private rooms.
      • Navigator category management with rank checking for private rooms.
      • Navigator category management with rank checking for public rooms.
      • Show recent private rooms created in the categories even if the room owner wasn't online.
      • Create private rooms using the navigator.
      • Show own rooms.
      • Hide room owner name.
      • Edit room settings.
      • Delete room.

    • Habbo Club
      • Purchase Habbo club
      • Expiry of Habbo club
      • Show days left

    • Messenger
      • Search users on console.
      • Send user a friend request.
      • Accept friend request.
      • Reject friend request.
      • Send friend message .
      • Delete friend.
      • Change messenger motto.
      • Mark messages are read.
      • Show offline messages.
      • Follow friend.
      • Automatic update friends list.

    • Private room
      • Walking.
      • Walk to door.
      • Chat (and message gets worse quality if you're further away from someone in public rooms).
      • Shout.
      • Whisper.
      • Password protect room.
      • Use room doorbell.

    • Public Room
      • All possible public rooms added (some may be missing
      • All public rooms are fully furnished to what official Habbo had.
      • Sitting on furniture in public rooms.
    • Lido and Diving Deck
      • Change clothes working (with curtain closing).
      • Pool lift door closes and opens depending if a user is inside or not.
      • Buying tickets work for self and other players.
      • Diving.
      • Swimming.
      • Queue works (line up on first tile and the user automatically walks when there is a free spot).

    • Item
      • Show own hand (inventory) with items in it.
      • Place room items.
      • Move and rotate room items.
      • Pickup room item.
      • Place wall items.
      • Pickup wall items.
      • Stack items.
      • Apply room decorations.

    • Item Interactions
      • Dice
      • Bottles
      • Teleporters
      • Rollers
      • Scoreboard
      • Lert
      • Camera

    • Catalogue
      • -
      • Show catalogue pages
      • Show catalogue items and deals (aka packages)
      • Purchase items and packages
      • Show catalogue pages.
      • Show catalogue items and deals (aka packages).
      • Purchase items and packages.
      • Purchase items with pixels and credits.

    • Ranked features
      • Add badge automatically if they are a certain rank.
      • Command registration checking.

    • Commands
      • :about
      • :help


    Screenshots

    -





    Source code

    The source code is available through GithHub at:

    https://github.com/Quackster/Kepler.

    My DCR pack: http://www.mediafire.com/file/3nn4o3...nv/V21.7z/file

    Code Snippets

    NAVIGATE.java (building the navigator public/private rooms and categories)

    Code:
    public class NAVIGATE implements MessageEvent {
    
    @Override
    public void handle(Player player, NettyRequest reader) {
    boolean hideFull = reader.readInt() == 1;
    int categoryId = reader.readInt();
    
    NavigatorCategory category = NavigatorManager.getInstance().getCategoryById(categoryId);
    
    if (category == null) {
    return;
    }
    
    if (category.getMinimumRoleAccess() > player.getDetails().getRank()) {
    return;
    }
    
    List<NavigatorCategory> subCategories = NavigatorManager.getInstance().getCategoriesByParentId(category.getId());
    List<Room> rooms = new ArrayList<>();
    
    int categoryCurrentVisitors = category.getCurrentVisitors();
    int categoryMaxVisitors = category.getMaxVisitors();
    
    if (category.isPublicSpaces()) {
    for (Room room : RoomManager.getInstance().getRooms()) {
    if (room.getData().getCategoryId() != category.getId()) {
    continue;
    }
    
    if (hideFull && room.getData().getVisitorsNow() >= room.getData().getVisitorsMax()) {
    continue;
    }
    
    rooms.add(room);
    }
    } else {
    for (Room room : RoomManager.getInstance().replaceQueryRooms(NavigatorDao.getRecentRooms(30, category.getId()))) {
    if (room.getData().getCategoryId() != category.getId()) {
    continue;
    }
    
    if (hideFull && room.getData().getVisitorsNow() >= room.getData().getVisitorsMax()) {
    continue;
    }
    
    rooms.add(room);
    }
    }
    
    player.send(new NAVIGATE_LIST(player, category, rooms, hideFull, subCategories, categoryCurrentVisitors, categoryMaxVisitors, player.getDetails().getRank()));
    
    }
    }
    RoomEntityManager.java snippets

    Code:
    /**
    * Setup handler for the entity to leave room.
    *
    *   @param entity the entity to leave
    */
    public void leaveRoom(Entity entity, boolean hotelView) {
    if (!this.room.getEntities().contains(entity)) {
    return;
    }
    
    if (entity.getType() == EntityType.PLAYER) {
    PoolHandler.disconnect((Player) entity);
    }
    
    RoomTile tile = entity.getRoomUser().getTile();
    
    if (tile != null) {
    tile.removeEntity(entity);
    }
    
    this.room.getEntities().remove(entity);
    this.room.getData().setVisitorsNow(this.room.getEntityManager().getPlayers().size());
    
    this.room.send(new LOGOUT(entity.getRoomUser().getInstanceId()));
    this.room.tryDispose(false);
    
    entity.getRoomUser().reset();
    
    // From this point onwards we send packets for the user to leave
    if (entity.getType() != EntityType.PLAYER) {
    return;
    }
    
    Player player = (Player) entity;
    
    if (hotelView) {
    player.send(new HOTEL_VIEW());
    }
    }
    Last edited by Quackster; 4 Days Ago at 11:17 PM.
    The Habbo archives: http://alex-dev.org/archive/


  2. #2
    Member Amariconao is offline
    MemberRank
    Nov 2011 Join Date
    66Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    SQLite worth? It's slower and mono-user(no concurrency)...

    Wathever, good luck with the project! If you want to test Go i can publish a little emu with handshake in Go. (You did one with python, java, now C11, etc...)

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

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by Amariconao View Post
    SQLite worth? It's slower and mono-user(no concurrency)...

    Wathever, good luck with the project! If you want to test Go i can publish a little emu with handshake in Go. (You did one with python, java, now C11, etc...)
    SQLite isn't slow, lol, it's much faster than MySQL. It's actually not a disadvantage, this section is just so used to MySQL it treats anything remotely foreign as being inferior, when it's actually just a nice alternative.

    The MySQL C API is horrendous anyways. I had encountered so many unique bugs to do with prepared statements in the API that I resorted to SQLite instead. Overall the code for preparing and selecting with SQLite is smaller than MySQL, and I've not any issues with it since I implemented it.

    I had some unique bugs where selecting a row based on username and password, the user and pass had to be the same length and more than 3 characters long, or the fact that the API only allowed me to select 6 rows.
    Last edited by Quackster; 19-01-18 at 10:47 AM.
    The Habbo archives: http://alex-dev.org/archive/

  4. #4
    Member PH11 is offline
    MemberRank
    Jun 2003 Join Date
    66Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Good luck with your development.

    I have missed the 2006-ish era time because there are no Habbo v13 retro's around anymore.

    I'll be glad to test it out on a server once it comes out.

  5. #5
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is offline
    ModeratorRank
    May 2007 Join Date
    InternetLocation
    2,508Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by Amariconao View Post
    SQLite worth? It's slower and mono-user(no concurrency)...

    Wathever, good luck with the project! If you want to test Go i can publish a little emu with handshake in Go. (You did one with python, java, now C11, etc...)
    I think it's worth it if the project isn't going to have a huge user base since it's compact and easy to use.


    Moderator & Developer
    I CAN NOT HELP YOU WITH YOUR SERVER, USE THE CORRECT HELP SECTION INSTEAD.
    I AM ONLY TAIGA ON RAGEZONE!


    DO NOT PM ME FOR GAME RELATED QUESTIONS, THESE MESSAGES WILL BE IGNORED!


  6. #6
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,213Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by Taiga View Post
    I think it's worth it if the project isn't going to have a huge user base since it's compact and easy to use.
    It doesn't matter if it has a large user base or not if all the queries are executed in the same thread.
    The Habbo archives: http://alex-dev.org/archive/

  7. #7
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,213Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Pathfinder has finally been added with a thread pool system, supports multiple users, collision still needs to be further improved to detect public room furniture and other players, but so far it will stop you from walking outside the bounds of the map and stops the player from going up and down steep heights.

    Short video for the interested: https://www.youtube.com/watch?v=Sm_z...ature=youtu.be

    The Habbo archives: http://alex-dev.org/archive/

  8. #8
    Member Amariconao is offline
    MemberRank
    Nov 2011 Join Date
    66Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Hey Alex! Are tour project un github? It will be interesting! I will check that and start a little project in Go based on your server just for improve muy Go.

    Thanks!

  9. #9
    Member PH11 is offline
    MemberRank
    Jun 2003 Join Date
    66Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    I really like the development it definately brings back the old roots that I have missed

    I'd definatly buy a server to run this on if you are ever planning on releasing it that would be nice

    Probably have said this before in a previous reply but I'm just so thrilled to finally see the old roots come back to the place where it belongs to



    Good luck my friend

  10. #10
    C# / Java Programmer scottstamp851 is offline
    True MemberRank
    Jan 2007 Join Date
    EverywhereLocation
    534Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by Quackster View Post
    stops the player from going up and down steep heights.
    Retail v13 only prevents going *up* steep heights. You can drop from any height. Pretty much so you don't get stuck somewhere high.
    hayhay.

  11. #11
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,213Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by scottstamp851 View Post
    Retail v13 only prevents going *up* steep heights. You can drop from any height. Pretty much so you don't get stuck somewhere high.
    I worded the post quickly...

    Right now the max height the player can go up is 1.5 squares and the max height to go down is 4 squares.

    Quote Originally Posted by PH11 View Post
    I really like the development it definately brings back the old roots that I have missed

    I'd definatly buy a server to run this on if you are ever planning on releasing it that would be nice

    Probably have said this before in a previous reply but I'm just so thrilled to finally see the old roots come back to the place where it belongs to

    Good luck my friend
    The server will be released, otherwise I wouldn't post a development thread about this.

    Quote Originally Posted by Amariconao View Post
    Hey Alex! Are tour project un github? It will be interesting! I will check that and start a little project in Go based on your server just for improve muy Go.

    Thanks!
    The project is on GitHub, but right now the source is private because there's too much changing for me to consider making it public yet. This is an open-source project however, and it will be open to the public once I feel there's enough features added.
    The Habbo archives: http://alex-dev.org/archive/

  12. #12
    Hardcore Member m.tiago is offline
    MemberRank
    Dec 2008 Join Date
    BrazilLocation
    134Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Hey Quack , you will enable SSO Login for PHP ? , because i'm making a CMS like zabboweb with PHP...

    A picutre:




    - - - Updated - - -

    I almost forgot , can you enable the Habbo Welcome Tutorial with the Maid:

    http://www.habborator.org/archive/ch...rs/woman_1.gif


    i Remember she give to new users the Welcome Green Mat... Sorry my english i from brazil...
    Last edited by m.tiago; 24-01-18 at 04:12 AM.

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

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by Quackster View Post
    It doesn't matter if it has a large user base or not if all the queries are executed in the same thread.
    No thats bad. You don't want to rely your SQL on just one thread. Then your whole server will be throttled to that single thread.

    Also why are you using a C collections library when C++ has stl....
    Last edited by The General; 23-01-18 at 09:20 PM.
    Discord: TheGeneral#0063
    Join the Arcturus Discord server: https://discord.gg/eDr7FKQ (You can ask help here regarding Arcturus :love)

  14. #14
    Moderator Quackster is offline
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,213Posts

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Quote Originally Posted by The General View Post
    Also why are you using a C collections library when C++ has stl....
    Because I'm using pure C, not C++.
    The Habbo archives: http://alex-dev.org/archive/

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

    Re: Kepler - v13 Emulator [C11, SQLite3, libuv]

    Im blind and didnt read properly and thought you had given up on life already. :p
    Discord: TheGeneral#0063
    Join the Arcturus Discord server: https://discord.gg/eDr7FKQ (You can ask help here regarding Arcturus :love)



Page 1 of 18 12345678911 ... LastLast

Advertisement