Re: Icarus (Production) - Java Server [MySQL, Netty]
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
Re: Icarus (Production) - Java Server [MySQL, Netty]
This is so weird:
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;
}
}
So basically you have an addEntity method but you cannot call that on players which are actually also entities?
And in remove entity:
Code:
if (entity.getType() != EntityType.PLAYER) {
// Save coordinates of pet
if (entity.getType() == EntityType.PET) {
((Pet)entity).savePosition();
}
entity.dispose();
}
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:
public boolean hasRights(int userId, boolean ownerCheckOnly) {
Kind weird, why not make an isOwner(Habbo habbo) method?
Code:
public void dispose(boolean forceDisposal) {
if (forceDisposal) {
this.cleanupRoomData();
RoomManager.removeRoom(this.getData().getId());
} else {
--> if (this.getPlayers().size() > 0) {
return;
}
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...
Instead of rushing with implementing features, take some good time to look at your design :)
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
The General
This is so weird:
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;
}
}
So basically you have an addEntity method but you cannot call that on players which are actually also entities?
And in remove entity:
Code:
if (entity.getType() != EntityType.PLAYER) {
// Save coordinates of pet
if (entity.getType() == EntityType.PET) {
((Pet)entity).savePosition();
}
entity.dispose();
}
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:
public boolean hasRights(int userId, boolean ownerCheckOnly) {
Kind weird, why not make an isOwner(Habbo habbo) method?
Code:
public void dispose(boolean forceDisposal) {
if (forceDisposal) {
this.cleanupRoomData();
RoomManager.removeRoom(this.getData().getId());
} else {
--> if (this.getPlayers().size() > 0) {
return;
}
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...
Instead of rushing with implementing features, take some good time to look at your design :)
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.
Quote:
Also looking at this code entity is not disposed for players (Which makes me think there is a possible memory leak?).
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.
Re: Icarus (Production) - Java Server [MySQL, Netty]
Love it! nice work, also great to see other Aussies here :D
Re: Icarus (Production) - Java Server [MySQL, Netty]
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?
Re: Icarus (Production) - Java Server [MySQL, Netty]
"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
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Joopie
Thanks :): That 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 - - -
Quote:
Originally Posted by
Joopie
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. :wink:
Re: Icarus (Production) - Java Server [MySQL, Netty]
Should have used System.arraycopy instead of a for loop :P
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Joopie
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. :P:
Re: Icarus (Production) - Java Server [MySQL, Netty]
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!
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
cabeludo007
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!
Awesome! Glad I'm inspiring others :wink:
I'll do a wiki for documentation of my plugin system in the near future :P:
Re: Project Icarus - Java Server (Up to date) [MySQL, Netty, Plugin System]
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.
https://i.imgur.com/fRHy0Ch.png
https://i.imgur.com/0FwI4Dp.png
Re: Project Icarus - Java Server (Up to date) [MySQL, Netty, Plugin System]
Quote:
Originally Posted by
Quackster
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.
https://i.imgur.com/fRHy0Ch.png
https://i.imgur.com/0FwI4Dp.png
Updates are looking really promising, I've been reading some of your commits on github and I must say you're good at keeping things simple. I love where this project is going, keep it up!
Skickat från min FRD-L09 via Tapatalk
Re: Icarus - Java Server (Up to date) [MySQL, Netty, Plugin System]
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