Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble)

Experienced Elementalist
Joined
May 30, 2013
Messages
288
Reaction score
242
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

I'm personally an advocate for clarity / readable code over micro optimizations.

That said, enum values are stored in a single byte (for up to 255 entries), 2 bytes for more etc. They are not stored as string values for every entry.
You got more issues on your hands if a couple MB at most for a big hotel is what you're trying to safe on diskspace.
From a storage point of view, both boolean/tinyint(1) and enum(online,offline) take up one byte.

From a runtime perspective it's different however. The JVM can optimize a boolean to a single bit, where as an enum would require a heap of objects.
 
Newbie Spellweaver
Joined
Apr 23, 2007
Messages
37
Reaction score
1
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

Thank you for your hard work, I have enjoyed many hours of nostalgia using your emulator.

Is it possible to add the DJ Turntable to the Rares section? I tried adding this to the database but I wasn't sure what to use for the sprite ID and got stuck.
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

Thank you for your hard work, I have enjoyed many hours of nostalgia using your emulator.

Is it possible to add the DJ Turntable to the Rares section? I tried adding this to the database but I wasn't sure what to use for the sprite ID and got stuck.

The sprite id column isn't used by the server. I converted one of my private projects' catalogue for Kepler and I accidentally left the sprite id column in there. :p:
 
Newbie Spellweaver
Joined
Apr 23, 2007
Messages
37
Reaction score
1
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

The sprite id column isn't used by the server. I converted one of my private projects' catalogue for Kepler and I accidentally left the sprite id column in there. :p:

Haven't had any luck getting this done. Are you able to point me in the right direction? Quite rusty with this stuff and need DJ Decks for some stacking nostalgia.
 
Last edited:
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

Haven't had any luck getting this done. Are you able to point me in the right direction? Quite rusty with this stuff and need DJ Decks for some stacking nostalgia.

As I said, don't worry about the sprite_id column, put any value you want in there it's not used by the server or client.
 
Initiate Mage
Joined
Dec 14, 2020
Messages
4
Reaction score
0
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

I originally asked for help in my post but I managed to set it up myself.
 
Last edited:
Initiate Mage
Joined
Dec 14, 2020
Messages
4
Reaction score
0
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

Some furni seems to be missing from the hotel, such as Habbowood, Habboween, Easter, Valentine, Christmas. Is there a way how I can download them and place them in my hotel?
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

No one's made another catalogue for Kepler. You'll have to add them yourself using the catalogue_pages, catalogue_items and items_definitions tables.
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

I'm going to release Kepler with a single fix (items not being unregistered when moving) but would you also like me to release Kepler with SnowStorm included inside of it too? That's the surprise I promised but initially hesitated to release it.
 
Newbie Spellweaver
Joined
Dec 26, 2019
Messages
69
Reaction score
38
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

That would be an amazing Christmas present for the community. I would love for you to release Snowstorm.
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Re: Kepler - Habbo Hotel v14+ server (BattleBall, Camera, Trax, Rollers) [Java]

Happy New Year, Merry Christmas, Saturnalia, Yule etc. :p:

I hope that this release brings many people joy, to make up for what a horrible year that 2020 has been.

Changelog

- Add: SnowStorm! All maps have been added along with all features. Please read README_SnowStorm.txt to get SnowStorm working correctly.
- Fix: Moving furniture properly unregisters it from its previous spot.
- Fix: Game history will show the last 15 games played, instead of expiring them after 10 minutes.

Please make sure to run the v1.3 migration SQL to enable SnowStorm from inside the server.

Huge thanks to Sefhriloff for figuring out the SnowStorm checksum override to make SnowStorm a possibility.

Download:

5fZ7dI - Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble) - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Dec 26, 2019
Messages
69
Reaction score
38
Yesterday I merged your branch into mine and I just want to report back that its works and I couldnt be happier.

I also want thank you for your contributions to the Habbo Retro community this year, its been truly an amazing year and your contributions arent going unnoticed.

I personally hope the community next year will show a more collaborative and supportive spirit so we can continue the retro journey together. Together as a community we can achieve much more.
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
A small little update to Kepler.

I've finished the RCON system so I've completely removed the old system and added a new system, included a PHP example of how to send RCON commands to Kepler too.

Changelog

- Added: New RCON system
- Removed old unused libraries which cut down the compiled size of Kepler by 6 megabytes.

Reminder! Do not make RCON listen on anything other than localhost/127.0.01, if you are please make sure you know what you're doing by exposing the RCON port to the outside world. RCON is not the same as the MUS connection which Kepler also uses.

Download:

PHP code example for sending RCON commands alongside their valid usages:

PHP:
<?php

sendRcon("127.0.0.1", "12309", build("hotel_alert", array(
   "message" => "Hello, World!",
   "sender" => "Alex"
)));

sendRcon("127.0.0.1", "12309", build("hotel_alert", array(
   "message" => "Hello, World!"
)));

sendRcon("127.0.0.1", "12309", build("refresh_looks", array(
   "userId" => "1"
)));

sendRcon("127.0.0.1", "12309", build("refresh_hand", array(
   "userId" => "1"
)));

sendRcon("127.0.0.1", "12309", build("refresh_club", array(
   "userId" => "1"
)));

sendRcon("127.0.0.1", "12309", build("refresh_credits", array(
   "userId" => "1"
)));

function build($header, $parameters) {
  $message = "";
  $message .= pack('N', strlen($header));
  $message .= $header;
  $message .= pack('N', count($parameters));
  
  foreach ($parameters as $key => $value) {
    $message .= pack('N', strlen($key));
    $message .= $key;
 
    $message .= pack('N', strlen($value));
    $message .= $value;
  }
   
  $buffer = "";
  $buffer .= pack('N', strlen($message));
  $buffer .= $message;
  return $buffer;
}

function sendRcon($ip, $port, $command) {
    $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
    socket_connect($socket, $ip, $port);
    socket_send($socket, $command, strlen($command), MSG_DONTROUTE);    
    socket_close($socket);
} 

?>

Java example:

PHP:
public class RconCommand {
    private final RconHeader header;
    private final Map<String, Object> parameters;

    public RconCommand(RconHeader header, Map<String, Object> parameters) {
        this.header = header;
        this.parameters = parameters;
    }
    
    public void send() {
        try (Socket socket = new Socket(ServerConfiguration.getString("rcon.ip"), ServerConfiguration.getInteger("rcon.port"))) {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            DataOutputStream daos = new DataOutputStream(baos);

            daos.writeInt(header.getRawHeader().length());
            daos.write(header.getRawHeader().getBytes(StringUtil.getCharset()));
            daos.writeInt(parameters.size());

            for (var entry : parameters.entrySet()) {
                daos.writeInt(entry.getKey().length());
                daos.write(entry.getKey().getBytes(StringUtil.getCharset()));

                daos.writeInt(entry.getValue().toString().length());
                daos.write(entry.getValue().toString().getBytes(StringUtil.getCharset()));
            }

            try (DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream())) {
                byte[] message = baos.toByteArray();

                dataOutputStream.writeInt(message.length);
                dataOutputStream.write(message);
                dataOutputStream.flush();

                baos.close();
                daos.close();
                socket.close();
            } catch (IOException ignored) {

            }
        } catch (IOException ignored) {

        }
    }
}


Yesterday I merged your branch into mine and I just want to report back that its works and I couldnt be happier.

I also want thank you for your contributions to the Habbo Retro community this year, its been truly an amazing year and your contributions arent going unnoticed.

I personally hope the community next year will show a more collaborative and supportive spirit so we can continue the retro journey together. Together as a community we can achieve much more.

I'm so glad it worked out well and I agree completely.
 
Initiate Mage
Joined
Jan 1, 2021
Messages
3
Reaction score
1
Hi there!
First, thank you for your hard work @Quackster, the result really looks nice ! :)
Though, I'm having an issue connecting to the server from the client..

I'm starting the server from the BAT file, and connecting to localhost using the Basilisk browser (Shockwave is working on some online demos).
I've also ran the SQL file into MySQL.

The issue is when trying to connect with Basilisk, I'm getting the result below when trying to connect (takes a long minute of loading before displaying that):
ScreenKepler - Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble) - RaGEZONE Forums

No error in the server command line but I see a connection attempt (screenshot below).
ScreenKepler2 - Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble) - RaGEZONE Forums


Thank you for your help!
 

Attachments

You must be registered for see attachments list
Last edited:
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Hi there!
First, thank you for your hard work @Quackster, the result really looks nice ! :)
Though, I'm having an issue connecting to the server from the client..

I'm starting the server from the BAT file, and connecting to localhost using the Basilisk browser (Shockwave is working on some online demos).
I've also ran the SQL file into MySQL.

The issue is when trying to connect with Basilisk, I'm getting the result below when trying to connect (takes a long minute of loading before displaying that):
View attachment 168798

No error in the server command line but I see a connection attempt (screenshot below).
View attachment 168799


Thank you for your help!

Okay you are like the tenth person to try and load the Habbo TCP port in the browser, are you all the same person?

You have to use a loader with DCRS on an HTML file that connects to the server. I'm fed up with being asked the same question over the span of a year or more.
 
Joined
Aug 10, 2011
Messages
7,401
Reaction score
3,299
Okay you are like the tenth person to try and load the Habbo TCP port in the browser, are you all the same person?

You have to use a loader with DCRS on an HTML file that connects to the server. I'm fed up with being asked the same question over the span of a year or more.

Add a webserver to Kepler that runs the client. Problem solved /s
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,685
Thank you guys, didn't find this info anywhere before
Sorry for the bother Quackster ..

I apologise if I sounded agitated, I just get this question asked a lot and I'm not sure if it's the same person tormenting me.

You need to download a v14 DCR pack (these are on my archive in my signature) host them on a web server, the HTML embed object will have the connection details that you need to change to be able to connect to Kepler.

v14 DCRS:

You'll need a browser that runs shockwave, check the releases section I just added a portable browser that has both flash and shockwave inside of it.

Put all that above on a web server, edit the external_variables.txt or named similarly and fix the paths.

I hope that makes sense.
 
Last edited:
Initiate Mage
Joined
Jan 1, 2021
Messages
3
Reaction score
1
Hey Quackster,

No worries, I understand! I'm not the person you're thinking about though (just heard about Habbo emulation yesterday).
I'm a developer myself so I know that answering a zillion times the same question is annoying..

Thank you for your instructions, it's working nicely now!
If you're interested I can probably submit a PR on Github with the instruction to set things up in the README ?
Let me know and thanks again for your work
 
Last edited:
Back
Top