I love the updates, looks really good so far. I've been reading the source and you just improve more and more. I like that you refactor code while updating other things instead of just adding bunch of code, just to 'work'. Goodluck with this! :D
I love the updates, looks really good so far. I've been reading the source and you just improve more and more. I like that you refactor code while updating other things instead of just adding bunch of code, just to 'work'. Goodluck with this! :D
This is so weird:
So basically you have an addEntity method but you cannot call that on players which are actually also entities?Code:public void addEntity(Entity entity) { this.addEntity(entity, this.getModel().getDoorLocation().getX(), this.getModel().getDoorLocation().getY(), this.getModel().getDoorLocation().getRotation()); } public void addEntity(Entity entity, int x, int y, int rotation) { if (entity.getType() == EntityType.PLAYER) { return; } }
And in remove entity:
Why not use an interface or something so you don't have to check against the entity type? Also looking at this code entity is not disposed for players (Which makes me think there is a possible memory leak?).Code:if (entity.getType() != EntityType.PLAYER) { // Save coordinates of pet if (entity.getType() == EntityType.PET) { ((Pet)entity).savePosition(); } entity.dispose(); }
Kind weird, why not make an isOwner(Habbo habbo) method?Code:public boolean hasRights(int userId, boolean ownerCheckOnly) {
It is strange to see a dispose method not actually disposing if there are players in the room. Like, you expect it to dispose the room as thats what your method is named after... Unless you don't want to have it mimic a deconstructor, I think dispose is a bad name for a function that doesn't always dispose...Code:public void dispose(boolean forceDisposal) { if (forceDisposal) { this.cleanupRoomData(); RoomManager.removeRoom(this.getData().getId()); } else { --> if (this.getPlayers().size() > 0) { return; }
Instead of rushing with implementing features, take some good time to look at your design :)
Last edited by The General; 14-09-17 at 02:23 PM.
The addEntity and the check rights stuff was going to be rewritten, trust me on that. I'm in the process right now of refactoring everything actually.
The snippet of code within Player.java takes care of being disposed, but after the refactoring I was still going to go over and check that everything gets nullified and is eligible for cleanup.Also looking at this code entity is not disposed for players (Which makes me think there is a possible memory leak?).
Love it! nice work, also great to see other Aussies here :D
Changelog
- Upgraded to PRODUCTION-201709192204-203982672 (the latest version as of right now).
https://github.com/TheAmazingAussie/...3b95ebc2945823
- Added user group management, support for requesting to be inside a group, along with locked groups etc.
https://github.com/TheAmazingAussie/...erManager.java
https://github.com/TheAmazingAussie/...emberType.java
- The entire source code has been commented too (or almost anyways, excluding message composers and event classes).
- I've also added encryption, but not sure if it's worth it?
Also I've been thinking about swapping out libraries? Is it worth it to switch to something like Apache MINA and HikariCP instead?
Last edited by Quackster; 23-09-17 at 02:37 PM.
"your" RSA pcks unpad function is flawed. Sometimes it fails to unpad, never understood why.. I fixed it with this implementation: https://github.com/Joopie1994/habbo-...Crypto.cs#L173
ThanksThat was actually the issue I had which made me question if adding encryption was worth it.
I'll have a look at your implementation.
- - - Updated - - -
I've just committed the change.
https://github.com/TheAmazingAussie/...41792ac6dc98dc
https://github.com/TheAmazingAussie/.../RSA.java#L185
It seems to work for now, though I don't trust my porting skills so we'll see.![]()
Should have used System.arraycopy instead of a for loop :P
I didn't know that one existed. I was only looking at the Arrays class and thought there was no equivalent Java function.![]()
Last edited by Quackster; 24-09-17 at 06:32 AM.
Thanks for sharing this emu development! i loved your plugin manager so much that i decided to make my own plugin manager based on yours. I used luaj as you did and i used Rhino for javascript plugins.
Screenshot by Lightshot
Screenshot by Lightshot
i loved this because its simple and fast. thanks you again!
Last edited by Quackster; 24-09-17 at 06:42 AM.
Updates
Added
- Updated to PRODUCTION-201709192204-203982672
- Thumbnails now working 100% (the previous thumbnail picture gets deleted if user sets a new thumbnail, or deletes the room, to save disk space).
- Camera photos now purchasable.
- Place photo in room.
- Pickup photo.
- Delete photo.
- One way gates interaction added.
- User management in groups finished.
- Ability to disable thumbnail functions in server properties file.
- Ability to disable camera functions in server properties file.
Fixed
- Furniture interaction sometimes doesn't work while on rugs.
![]()
Last edited by Quackster; 02-10-17 at 04:14 AM.
already love this emulator, just wondering how far it is already? when will we have some kind of release because i'd love to use this
Updates
(Backend...)
- Finally switched to using Gradle, so no more packaging jar bullshit when people want to recompile.
- Switched from using BoneCP, as it's end of life, to HikariCP.
- Switched to using Lo4j logger, but I noticed that's end of life too, so I maybe need to use Log4j 2 if I want Java 9 compatibility in future.
- Now I've personally switched to IntelliJ over from Eclipse, but due to the nature of .gitignore and how Gradle can be imported into various IDE's, people can still use Eclipse if they wish (although I wouldn't recommend it...).
(Frontend...)
Switched to using Plus' catalogue, but I noticed there's a lot of customs and stuff that I just don't want, as I want to give a vanilla Habbo experience. I don't want customs filling up the furnidata, catalogue, etc. By scrubbing out the customs, it gives users a choice if they wish to add specific customs into their own server anyways.
So I ended up writing a converter that set all sprite ids in my database to -1 and then I read Habbo's official furnidata and then applied the sprite ids to the furniture that it could find, if it was the same class name and item type (wallitemtypes for wall items, and flooritemtypes for floor items, these tags can be found in the XML file).
The reason is that it helped distinguish to me what was a custom, and what was Habbo's official furni. Now Icarus is compatible with Habbo's official furnidata.xml
And I've also been organising the catalogue, by that I mean adding furni that is seemingly missing from from the catalogue, such as the lack of country flags that current Habbo retros have in regards to official Habbo, I mean seriously, there was no Australian flag until I redid the posters/wall decorations page...
The catalogues avaliable are also missing the dark iced furniture, and the dark pura furniture that Habbo currently has their catalogue, so right now I've added all of them and they just need to be configured (don't worry, the original Iced furniture is still there!)
Oh, and I've also recounted the item definition ids, the catalogue page ids, the catalogue item ids from 1 upwards, because I noticed the later rows had like, ID 8000000+ when there was only 7000 rows in the database, but that's all fixed too.
Three public rooms have been added
Spoiler:
It's still missing quite a few features, but it's the most complete server I've written myself so far.I can't give an ETA on release, but I would appreciate it if people still kept replying to this thread.
It's been kind of dead lately even after posting updates![]()
Last edited by Quackster; 13-10-17 at 03:28 PM.