Skilled Illusionist
- Joined
- Feb 25, 2009
- Messages
- 343
- Reaction score
- 114
Hey ! This is the best choiceMoved to Java a few days ago, got extremely tired debugging undefined behaviour just for a Habbo server, and the slightest issue could cause the server to crash, it's not worth it in my opinion when I want to spend time adding features instead. The problems were to do with concurrency, where tasks would just stop and GDB/Valgrind would show an error but these errors were not easy to track to their original cause.
And I moved to MariaDB (same compability as MySQL) because this is more suited for this type of projects. I should've listened to the earlier posts complaining about me using SQLite, but I also chose it because the MySQL C library was atrocious and I couldn't get it to work. I was originally intending to use MySQL at the time.
I vastly underestimated the task on C, especially when it came to concurrency which is my biggest weakness. The Kepler C version was my first biggest attempt which I wasn't prepared for, but in the long run I believe the Java version will pay off.
The good news is that I'm more than half way towards being feature on-par with the Kepler C version,You must be registered to see linkspacket registers vsYou must be registered to see linkson the C version. I was able to add far more features in a shorter about of time in the Java version than the C version:
You can view the C code in the 'legacy' branch, here:You must be registered to see links
I still wish you goodluck with it even though my excitement died a bit. Besides the oldskool part it's just going to be another standard Java server (at least, that's how it'd feel to me), only difference is the oldskool part.
Don't blame you for your choice, but it's just sad. Still, I wish you goodluck and hope you can make something nice!
Idk use CLion, how Can I add a lib in CMake?
You must be registered to see links
I understand how you feel and that's completely fine. It just got incredibly tedious with debugging all the time and that's not something I'd like to be doing (unless I get paid for it: ). I definitely underestimated the amount of work required to get Kepler in a crash-free state when I initially chose C.
Updates
The Java development is going along super nicely, it's like 2-3 features away from being on par with the C version, and it's a lot more bug-free!
- Added: :givedrink command.
- Added: :sit command.
- Added: Roller animation (you know, when the conveyor belt moves).
- Added: AFK/idle timer like how Habbo does it, after 5 minutes idle, your character sleeps, and after the next 10 minutes your character will be kicked from the room (15 minutes total).
- Added: Walkways between public rooms, Habbo Lido to the diving deck, Lower Hallways, etc.
- Added: Furniture interaction, toggle items on/off, etc.
- Added: Post-It/Sticky handling.
- Added: Vending machine support in both public rooms and user flats (private rooms).
- Added: When writing "o/" your character will wave.
- Modified: LOOKTO so it supports head rotation when users are sitting.
- Modified: Room manager caching system so it only caches rooms that have users inside.
- Fixed: Slide-rollback bug where a user would walk off the roller, but the next cycle would slide you back.
- Fixed: Users with rank 1 couldn't create rooms due to a broken fuseright check.
Pictures
Here's a little gif demonstrating the sitting and giving drink, etc!
This is super:, I hope see more updates like this! The rollers have always been a missing complement working in retros like so many things from the v23-34 and walkways or known as room_magictiles also was rarely fixed, I like your v21 and your project although for me I hope in the future, someday also someone would like to fix v31-32 or 33, v31 and 32 was my favorite and I think that the more complete but at the same time more complex versions
You test if the Server still working with v13 or v18 ?
Ah, I didn't know they were called room_magictiles. Is that something that's called in the later Habbo versions?
Also yeah since I use composers, or one packet class for every unique packet it will be easy in future to make it compatible with multiple versions. Not sure about the v30+ versions though, a lot changed. Maybe with some magic...:
catch (SQLException e) { Storage.logError(e); throw e;}
Hi qwek, this looks very good. It is very nice to see you have picked up on proper project management by using Gradle and handling your dependencies nicely. I even see a Dockerfile in your repo which makes marit proud.
I just browsed through your code, and there is something I want you to be aware of. It is sort of an anti-pattern related to exception-hiding, one example of this is in the DAO class for storing items:You must be registered to see links
The problem here is if I call newItem, I get an exception because my database is down, is full, corrupt, or whatever, there is no way for me as a caller to see that the database operation has failed and why it has failed. You log the exception, and this is fine. But there is no way for your code to understand that the database operation has failed otherwise. A good practice to do then is just to rethrow the exception, something like this:
Code:catch (SQLException e) { Storage.logError(e); throw e;}
This way, it gets much easier for my code to understand that the database operation has failed and the user doesn't for example get the item in their hand. I have been struggling with this anti-pattern for the past few weeks where I have been writing integration tests for some legacy code. Just wanted to make you aware of this issue. Keep up the good werk qwek <3
Im sry qwek, but I am already marrid to my butiful wifeIf you have the time, then by all means please contribute to the git repository as I don't bite.
Will this emulator work with PHPretro CMS?
Good News , i finally started to work on a CMS for Kepler ... For now i make the Login/Logout System works , was hard make the System works with Argon2 because i never used before... I'm using PHP + PDO...
Next step is get all data from the database like Credits , Habbo Club... Alex i have a doubt , how i can get the online users count ? u save that on database ?
Updates:
- Get Club Days (I Dont understand how works but i can get)
- Get Credits
- Get Motto
- Get Badge ( Only if is visible)
CREATE TABLE `site_settings` (
`setting` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `site_settings` (`setting`, `value`) VALUES
('users_online', '0');
ALTER TABLE `site_settings`
ADD UNIQUE KEY `setting` (`setting`);
COMMIT;