-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Moogly
Imma let you finish but, Python is the best programming language of all time. IoT is only for basement dwellers, and take a REST from your hate m8. You just said it runs slow on lower hardware, but said it runs fast on a Macbook Pro? You must not know what lower hardware is right? :) [/parody]
You did a code only saying Hello World? For one thing you don't understand how complicated strings are in programming, computers don't speak "strings" they speak 1's and 0's, another thing is how you ran it, you likely ran it on defaults and are crying about that? Tell Google to stop using Python, and Dropbox, Pinterest, Hulu, Netflix, Instagram, and whatever else you use that is likely powered by Python. It's good enough, I don't see you doing serious C++ work on here to be talking so highly. If you can't code a simple scripting language correctly don't tell me to shut up? You're using a $35 piece of crap to write code in and you're whining about Python based on that? Nobody is going to run a Habbo server on a Raspberry Pi, only to look like a retard when it hits high enough load. This isn't your IoT community where you need to be closer to Assembly to do anything useful. Everyday people could care less about IoT anyway, right now it is mostly a hobbyist thing. I'd never want half of my house to be on the internet, it's like leaving all your doors to everything you own unlocked.
As Caustik said, we're not here to be Google scale, nor are we here to cater to $35 crappy SBC's or Microcontrollers? As for enterprise experience, Python is used in enterprise. Tell Reddit their Python doesn't scale sometime, or Hulu, or Netflix, then go look at Twitter and how Ruby is going for them, didn't last too long for them. Python gets the job done, and pays for my bills, so till it doesn't pay for my bills, Python is the best programming language in the world. Try making a GUI with Ruby or PhP or Perl, I'll have made one in Python by the time you figure out how to print "Hello World" on the screen, no pun intended.
i like your advice, but guy stay ontopic! I know really well about lower hardware and higher hardware systems, since i work with embedded systems. I also know about machine language you don't need to learn what 0 and 1 are for me. I did only an offtopic comparison that Python can't run very well for advanced systems in things like Raspberry. obviously i will not create a Habbo Server in a Rasp.
Stop being sarcastic. I like you a lot. I think you're a great developer better than me in some things. And why are you talking about Netflix here? lmfao. And Hello World applications are a good way to see how memory a language take over with a basic world knowing application. Also i don't know if you know something about IoT, but if not, please don't try learn to me something about performance. You don't know how difficult it's try to run REST API in an Arduino. With a big complex statemachine. IoT is a lot more complex than Habbo. So you experience and my experience in Habbo are nothing when we go in an IoT scenario. I know it's off topic. But also your comment was a lot off topic... So.. Double off topic hehe..
I liked your joke with the REST word haha. Seriously, i like you, your points are valid. But... please don't try say intelligent words here to make you more smart.
Anyways, @Quackster i wish a good development and luck for you.
I'm totally dumb in Python and never programmed in Python before. So i'm really sorry if i said a lot of shits about Python here.
I only said those things, in a noob way/angle/opinion.
Again, good luck! I'm anxious for new updates!!
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
I'm considering doing it in C/C++ because it's such a beautiful language.
There's a reason the C++ creators are contributing to Golang now.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
jaden83
No one (afaik) I haven't said anything about Python not being used in enterprise development. I was clarifying that when I discussed Python's speed in comparison to other languages I wasn't talking about your every day programming task I was talking on a much broader scale.
Python really is fast enough, stop talking out of your arse.
Quote:
Originally Posted by
Quackster
I'm actually regretting creating this in Python, it's a great language but I didn't realise until I was far into the project that I fucking hate type inference. I'd rather have my objects easily identifiable, otherwise it causes problems for me, and it's the main reason why there's been some slow development.
I don't want to do this in Java either, because I'm fluent in it and I find it boring to redo something I've done a hundred times over before.
I'm considering doing it in C/C++ because it's such a beautiful language.
Most modern tooling makes your objects 'identifiable'. I don't know how you're writing your code, but if you can't discern types and objects, you're definitely doing it wrong.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Caustik
Most modern tooling makes your objects 'identifiable'. I don't know how you're writing your code, but if you can't discern types and objects, you're definitely doing it wrong.
I don't think he's paying attention to Python 3.6 at all?
https://docs.python.org/3.6/library/typing.html
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Moogly
Great, now that requires me to go through every function and add more imports.
I didn't know Python could do that and I don't feel like doing that either.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Great, now that requires me to go through every function and add more imports.
I didn't know Python could do that and I don't feel like doing that either.
Your call, my suggestion is you make a different thread if you change the project language again, it's a bit polluted at this point with irrelevant commentary.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Python can be up to 400 times slower than C++ and pretty much slower than any other language. Just saying.
Python 3 vs C++ g++ (64-bit Ubuntu quad core) | Computer Language Benchmarks Game
@Quackster don't bother writing it in C++, if you have no experience in C++ you will give up quite quickly.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
@
Quackster don't bother writing it in C++, if you have no experience in C++ you will give up quite quickly.
And if you do bother to go with C++, might want to take a look at D Lang.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
I'm a noob in Python. But just as i said, Python is really more slower.
- - - Updated - - -
what the gosh???
http://image.prntscr.com/image/b19d9...26b19206e0.png
http://image.prntscr.com/image/6a990...750545ab04.png
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Your contrived benchmarks don't mean much; if Python can be used by companies like Dropbox and Instagram, what makes your habbo emulator so special?
Also, @Quackster, if you were using modern python techniques it would probably be more pleasant to use.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Caustik
Python really is fast enough, stop talking out of your arse.
... That wasn't my point. I never said it was slow nor did I say it was fast.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
If it matters THAT much performance to you dopes. Python can deliver, Python is coded in C and is highly embeddable into C / C++ projects. This allows you to not just leverage the power of other libraries coded in C / C++ but also achieve such power without the drawbacks of the complexity of programming too much in those languages. You could code the server in Python 3.6 with types, and use UVLoop which drops in with asyncio and just gives it a boost. So if you use the standard Python networking libraries, you can benefit from others adding on to it, as well as having it as an optional import. If it doesn't import, just use the built in networking. If you really care about the speed you can go native. If you want the JVM you can have it. If you want the CLR, you can have that too.
Python UVLoop:
https://magic.io/blog/uvloop-blazing...on-networking/
If he ever drops this project from Python I would definitely find my own time to implement this server with completely modern approaches (starting with the latest stable version of Python 3) and build up from the standard libraries. Python is still my bread and butter, and it's used by real companies all over for all types of mission critical projects (not making this up).
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
jaden83
... That wasn't my point. I never said it was slow nor did I say it was fast.
You spoke about how it was slow compared to other languages...
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
https://www.python.org/doc/essays/comparisons/
See the C++ section. Python can achieve amazing speeds, the types of speed issues you're on about only matter in the IoT world, or in the 1990's. This is 2016, people have amazing hardware to run Python code off of. C++ is great for graphics development, but then embedding a scripting language like Python becomes sane once you've implemented the performance hungry portions. You could probably code a whole server in Python, create extensions in C / C++ and finish within months, long before a C++ programmer has much working without over 9000 memory leaks and bugs they can't seem to figure out because this sections full of kids.
Python is productive, and powerful, if you neglect the current standards you will miss out on it's beauty. I myself keep finding out better ways to do things in Python, and the nicer ways I find of doing Python code, the more I love it. I can run Python anywhere on any OS and not worry about much. I know if I truly need to extend it I can. I know plenty of Linux OS' use it internally. Hell I've seen Lua scale like crazy as a back-end web server language. itch.io is exclussively coded in Lua. :)
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
http://i.imgur.com/MsRJLxH.png
The only thing right now preventing me from creating this as a multi-platform application is because I'm using winsock, which can be easily swapped out.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
My interest in this project lives with the Python side, guess I'll have to feed that interest on my own time. :) Sadly your git repos aren't really available so I can't tinker with the Python as it was left.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Should've opted for Golang, fool
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Moogly
My interest in this project lives with the Python side, guess I'll have to feed that interest on my own time. :) Sadly your git repos aren't really available so I can't tinker with the Python as it was left.
I noticed my links were messed up, here you go fam: https://github.com/Habbotard/Icarus-Python
Quote:
Originally Posted by
Hoshiko
Should've opted for Golang, fool
If I wanted to use C++ I'll use C++, there's no "should've". Sorry. :(:
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Joopie
3rd time, what's next?
4th time.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Hoshiko
Should've opted for Golang, fool
Golang is a terrible language to write software in.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Joopie
3rd time, what's next?
Don't know.
Quote:
Originally Posted by
iExit
4th time.
Java > Python > C++
3 times.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Java > Python > C++
3 times.
For me its:
C++ > Java > Python
When properly written, C++ will outperform both languages. But then again, every problem or application has its own best solution. Only reason I would write something in Python is for like a web api or some other web stuff that requires calls. No big programs. If I need high performance I would go with C/C++.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
For me its:
C++ > Java > Python
When properly written, C++ will outperform both languages. But then again, every problem or application has its own best solution. Only reason I would write something in Python is for like a web api or some other web stuff that requires calls. No big programs. If I need high performance I would go with C/C++.
Oh, you misinterpreted my intention of the arrows, the arrows was language changes I've done in chronological order.
I was not saying Java is better than Python and Python is better then C++
Nonetheless I agree with you.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
@Quackster:
Is your source code anywhere publicly available? I would love to see all the memory leaks you're creating! (No jk, just want to give some feedback)
Also, why Visual C++??? I mean out of everything you could've picked you pick THAT.
PS: Avoid this-> all together in C++. Except when you're having ambiousity (Or however you write it) or have to pass a pointer to a function. Its cluttering and the majority of the C++ community avoids this as much as possible. Use naming conventions.
Also you have atleast 2 memory leaks in your Request class.
Also you read a short but return it as an int. Int is platform depended and may not always be equally sized as a short. (My suggestion don't use int at all but use long (Or even better use int<bitsize>_t eg int32_t)
I don't think you have to cast the chars to unsigned char in readShort. (1: They keep their bit pattern anyways, 2: you already read from an char*)
I wish you luck, because you will need it.
Quote:
Originally Posted by
Caustik
Your contrived benchmarks don't mean much; if Python can be used by companies like Dropbox and Instagram, what makes your habbo emulator so special?
Also, @
Quackster, if you were using modern python techniques it would probably be more pleasant to use.
Because the reason they picked python for it is because they can easily without too much hassle make it distributed. Something which is also possible in C++ but is a bit more difficult to implement and maintain.
Its also the reason why a lot of these services (reddit, paypal, google) moved from Java to Python. The JMS is just slower and it was easier to move to Python.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
@
Quackster:
Is your source code anywhere publicly available? I would love to see all the memory leaks you're creating! (No jk, just want to give some feedback)
Source isn't available, yet.
Quote:
Originally Posted by
The General
Also, why Visual C++??? I mean out of everything you could've picked you pick THAT.
I'm using Visual Studio because that was the first thing I had. Moving to CLion later if I can figure out how to fix a problem where stopping the debug doesn't actually close the process.
There's nothing wrong with Visual Studio, so don't push your opinion on to me.
Quote:
Originally Posted by
The General
PS: Avoid this-> all together in C++. Except when you're having ambiousity (Or however you write it) or have to pass a pointer to a function. Its cluttering and the majority of the C++ community avoids this as much as possible. Use naming conventions.
No.
Quote:
Originally Posted by
The General
Also you have atleast 2 memory leaks in your Request class.
No. I don't. I tested this over and over again and I don't.
Quote:
Originally Posted by
The General
Also you read a short but return it as an int. Int is platform depended and may not always be equally sized as a short. (My suggestion don't use int at all but use long (Or even better use int<bitsize>_t eg int32_t)
Shouldn't be a problem because I'm converting shorts to integers, not the other way around.
Quote:
Originally Posted by
The General
I don't think you have to cast the chars to unsigned char in readShort. (1: They keep their bit pattern anyways, 2: you already read from an char*)
I do, otherwise the outcomes are different.
Quote:
Originally Posted by
The General
I wish you luck, because you will need it.
You're the one who needs luck around here, you seem to assume that I didn't put things the way I did for a reason.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Don't know.
Java > Python > C++
3 times.
After 3 comes 4.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
iExit
After 3 comes 4.
Right, but this is the second time I've changed languages, third time I've started over. How is that hard to understand?
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Right, but this is the second time I've changed languages, third time I've started over. How is that hard to understand?
Why its hard to understand that after 3 comes 4? He wrote "... 3rd time. Whats next?" and its obvious 4.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Source isn't available, yet.
I'm using Visual Studio because that was the first thing I had. Moving to CLion later if I can figure out how to fix a problem where stopping the debug doesn't actually close the process.
There's nothing wrong with Visual Studio, so don't push your opinion on to me.
No.
No. I don't. I tested this over and over again and I don't.
Shouldn't be a problem because I'm converting shorts to integers, not the other way around.
I do, otherwise the outcomes are different.
You're the one who needs luck around here, you seem to assume that I didn't put things the way I did for a reason.
Clion and Visual C++? Goodluck with that because CLion uses CMake and visual C++ has its own buildtools.
Memory leak 1 is in your constructor, you take a char* but you will never delete it.
Memory leak 2 is in your read string method. You return a char* but you will never delete it. If you call new you have to delete it at some point.
I assume you didnt run your program using Valgrind or something.
Should upload the sources to github or send me a copy through PM. I want to help you with feedback Alex, not shoot you down.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
According to @The General "Memory leak 2" return a smart pointer instead of a raw one. And maybe delete the "full_message" in the deconstructor?
After all good luck with your C++ server! :-)
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Boraida
According to @
The General "Memory leak 2" return a smart pointer instead of a raw one. And maybe delete the "full_message" in the deconstructor?
After all good luck with your C++ server! :-)
The fact that this is already in one class makes me worry what other inventive things he will eventually code...
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Btw checkout Boost.Asio. It's awesome and it supports cross-platform networking.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
*tik tik tik tik* ... (when will it go boem?)
http://i.imgur.com/GswqHS8.png
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Because the reason they picked python for it is because they can easily without too much hassle make it distributed. Something which is also possible in C++ but is a bit more difficult to implement and maintain.
Its also the reason why a lot of these services (reddit, paypal, google) moved from Java to Python. The JMS is just slower and it was easier to move to Python.
What..? I didn't mention C++, or Java. You need to learn basic literacy.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Boraida
Btw checkout Boost.Asio. It's awesome and it supports cross-platform networking.
Thats what I am using but I am afraid the documentation would be too complicate for him to understand.
(If he manages to somehow install it :lol:
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Joopie
Fixed.
- - - Updated - - -
Quote:
Originally Posted by
The General
Clion and Visual C++? Goodluck with that because CLion uses CMake and visual C++ has its own buildtools.
Did you even read what I said? Dude.. c'mon I said I'm moving to CLion and Cgywin32 if I can figure out an issue I'm having where if I cancel the debug, the actual process isn't closed.
Quote:
Originally Posted by
The General
Memory leak 1 is in your constructor, you take a char* but you will never delete it.
Actually, since that array was never created with "new" it's been automatically memory allocated, instead of being dynamically allocated (like pointers are) so when the object goes out of the scope, it will be deleted automatically.
Quote:
Originally Posted by
The General
Memory leak 2 is in your read string method. You return a char* but you will never delete it. If you call new you have to delete it at some point.
Using std::string now without any "new" keyword, so once it goes out of the scope it will be automatically freed. :):
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Oh right, thank you sir. :)
Provided Quackster doesn't update the repo or delete the old commits assuming this current version is the very last anyone wanting to directly download the code can do so here:
https://github.com/Habbotard/Icarus-...c358495086.zip
Edit:
On another note, check out D sometime:
Home - D Programming Language
It was started by someone who wrote C++ compilers for years, decided, screw this, C++ has too many limitations because of forced backward compatibility to C (a C++ compiler should be able to compile a C program in other words). He added in nice things like Garbage Collection (optional / modifiable), and it's fully compiled. Look into it when you get sick of C++. Go is only good for the out of the box standard libraries, D is good for OO programming, and other stuff. D is evolving nicely now that it's matured. You can install it with a Visual Studio plugin too.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Fixed.
Did you even read what I said? Dude.. c'mon I said I'm moving to CLion and Cgywin32 if I can figure out an issue I'm having where if I cancel the debug, the actual process isn't closed.
Actually, since that array was never created with "new" it's been automatically memory allocated, instead of being dynamically allocated (like pointers are) so when the object goes out of the scope, it will be deleted automatically.
Using std::string now without any "new" keyword, so once it goes out of the scope it will be automatically freed. :):
You did not mention Cygwin, which is only a set of linux like tools for windows and provides a linux like API. Also Cygwin isn't really needed, MingW should suffice. (As you only need the GCC compiler).
I don't think you've got any clue what you're doing and probably just following some tutorials on the internet....
Also CLion uses CMake so you need that too.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
You did not mention Cygwin, which is only a set of linux like tools for windows and provides a linux like API. Also Cygwin isn't really needed, MingW should suffice. (As you only need the GCC compiler).
I don't think you've got any clue what you're doing and probably just following some tutorials on the internet....
Also CLion uses CMake so you need that too.
What else did you think i was going to use if I wanted to make my C++ program cross-compatible and develop it on Windows?
No. MingW _does not_ suffice.
You're free to think whatever you want, but you're the one who assumed that just because you can see a pointer being created, you believe it wasn't being deleted.
I know what CLion uses and doesn't use, stop telling me this.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
If I see a pointer being created in a class and not deleted in that same class, I dont trust your code unless I can make sure it isnt still floating around somewhere.
The fact that you even use pointers just useless.
Cygwin is different as it tries to provide the UNIX api for windows. You are better off just using different compile targets by crosscompiling.
For the record; I am studying embedded software engineering and have been working with C/C++ for almost 4 years.
Do whatever you want but I tell you, with this attitude of not willing to accept any comments you are not going to make it.
C++ is not a language that should be learned through trial and error, which is what you are doing (Dont try to prove me wrong, these mistakes you made is not something what would happen to someone that started C++ and properly did their research and learning)
I was willing to help you out for the good but you seem a bit stubborn.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
If I see a pointer being created in a class and not deleted in that same class, I dont trust your code unless I can make sure it isnt still floating around somewhere.
All from one screenshot... ridiculous.
Quote:
Originally Posted by
The General
The fact that you even use pointers just useless.
What you just said is the most stupidest things I've ever read in my entire life, pointers are one of the very core features of C++
In certain cases, I want to control how objects get disposed of myself (such as connection instances).
Quote:
Originally Posted by
The General
Cygwin is different as it tries to provide the UNIX api for windows. You are better off just using different compile targets by crosscompiling.
Yes it's only for the API, I'd do the actual testing and compilation under a UNIX environment like my Raspberry Pi or a VM.
Quote:
Originally Posted by
The General
For the record; I am studying embedded software engineering and have been working with C/C++ for almost 4 years.
Cool.
Quote:
Originally Posted by
The General
Do whatever you want but I tell you, with this attitude of not willing to accept any comments you are not going to make it.
For the record, I accepted @Joopie's comment and fixed it, but clearly you ignored that.
Quite ironic considering you never take in my comments.
Quote:
Originally Posted by
The General
C++ is not a language that should be learned through trial and error, which is what you are doing (Dont try to prove me wrong, these mistakes you made is not something what would happen to someone that started C++ and properly did their research and learning)
I was willing to help you out for the good but you seem a bit stubborn.
C++ IS a language where you learn through trial and error
>Dont try to prove me wrong, these mistakes you made is not something what would happen to someone that started C++
Good thing I didn't start programming C++ as my first language then...
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Lol dude. Whatever. We will see when you give up because you get random segfaults and complain it is too complicated.
Am not gonna bother trying to tell you you are doing it wrong. Ask joopie, I am not telling any bullshit here. We study at the same place. I wanted to help you but your stubborness is just part of your ad attitude. Unable to take in critisism.
Edit:
For the people that asked me on skype what is wrong with pointers:
Nothing!
There is nothing wrong with using pointers. alex is just using them wrongly. What is dangerous about is is that you have to clean them up by freeing the memory manually. There is no garbage collection in C++. When calling new you reserve memory and the pointer points to thay piece of memory. You can easily pass this pointer around between functions if you wish. The problem in Alex his piece of code id about who cleans up that string that was newly created? Who takes the responsibility. For example I could read a string, have the packet object go out of scope and pass around the string to other functions. What function will take responsibility and delete that pointer? Who takes ownership? Here the best case wouldve been to just use a std::string object.
Pointers should be avoided in my opinion. (Creating pointers that is. You can always dereference an object to get a pointer to it!)
If there are more things people would like my opinion of feel free to ask.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Lol dude. Whatever. We will see when you give up because you get random segfaults and complain it is too complicated.
Am not gonna bother trying to tell you you are doing it wrong. Ask joopie, I am not telling any bullshit here. We study at the same place. I wanted to help you but your stubborness is just part of your ad attitude. Unable to take in critisism.
So I'm stubborn when I reject invalid criticism? It's not criticism when your criticism is bullshit
@Joopie's response was fine, because there was an actual error.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Which I pointed out :lol:
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
So I'm stubborn when I reject invalid criticism? It's not criticism when your criticism is
bullshit
@
Joopie's response was fine, because there was an actual error.
Just because I sort of spoonfeeded you what was wrong and @The General didn't, doesn't make his criticism bullshit.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Joopie
Just because I sort of spoonfeeded you what was wrong and @
The General didn't, doesn't make his criticism bullshit.
You didn't spoon feed me anything, do you even know the definition of spoon feeding? You just pointed out the error.
Spoonfeeding would be pointing out the error and giving a fix (like stackoverflow answers).
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
You didn't spoon feed me anything, do you even know the definition of spoon feeding? You just pointed out the error.
Spoonfeeding would be pointing out the error and giving a fix (like stackoverflow answers).
Maybe my word choise of using spoonfeeding is not the right one.
But then again my point remains. Just because you couldn't directly see your error does not make his criticism invalid and/or bullshit.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
This thread is for discussion, if you do not want any discussion, feedback or critisism you should not be posting here and just stick to yourself.
Quote:
Originally Posted by
Quackster
You didn't spoon feed me anything, do you even know the definition of spoon feeding? You just pointed out the error.
Spoonfeeding would be pointing out the error and giving a fix (like stackoverflow answers).
And joopie only pointed it out after he asked me what I was talking about.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
This thread is for discussion, if you do not want any discussion, feedback or critisism you should not be posting here and just stick to yourself.
I never said I didn't want critisim, did i?
what makes you think i'm not accepting any criticism?? i clearly took your advice from before, just half of what you say is only your opinion which i ignore
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Raspberry PI :lol:
Arcturus works on raspberry pi too and doesn't even need to be compiled on there!
How long does compilation take on the RPI?
Do you compile using -Wall and -Wextra?
Why not use -Werror ?
Are you using eclipse for the makefiles?
Why use nano on your raspberry pi? IDE too complicated? (You know you can crosscompile....?)
(I'm using Arch linux)
http://i.imgur.com/DAWreRM.png
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Raspberry PI :lol:
Arcturus works on raspberry pi too and doesn't even need to be compiled on there!
How long does compilation take on the RPI?
Do you compile using -Wall and -Wextra?
Why not use -Werror ?
Are you using eclipse for the makefiles?
Why use nano on your raspberry pi? IDE too complicated? (You know you can crosscompile....?)
(I'm using Arch linux)
http://i.imgur.com/DAWreRM.png
I'm only using the Pi to make sure it can compile on *nix systems.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
I'm only using the Pi to make sure it can compile on *nix systems.
It does not work that way :lol:
If you want to have a macOS port, you going to buy a mac for that :lol:?
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
It does not work that way :lol:
If you want to have a macOS port, you going to buy a mac for that :lol:?
Hence why multi-platform C++ releases let people build it themselves.
-
Re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Hence why multi-platform C++ releases let people build it themselves.
Just a quick question, have you already managed to get MySQL connection working?
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Project has been re-opened. I've gone back to Java, like how the project was originally.
I've formatted the absolute hell out of the source from the original Icarus Java project which I started in 2015. The revision has been upgraded from PRODUCTION version 2015 to 2017, and I've added some features that were missing.
I've also updated the main thread so I suggest people should check it out, I still have a long way to go before this can be considered complete.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Catalogue item discount
No credits to me? :(::(::(:
Just kidding, good to see the development thread up again. Cannot wait to see some cool shizzle even though I hate this version to be honest :p.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Glaceon
No credits to me? :(::(::(:
Just kidding, good to see the development thread up again. Cannot wait to see some cool shizzle even though I hate this version to be honest :p.
I'm so sorry! I feel terrible. :(: I updated the thread in a rush, don't worry I will credit everybody that helps me.
Also thanks, personally I'm not sure how I feel about the newer Habbo versions, but at least there's a lot of features. :P:
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Hey Alex,
Nice that you'll continue with Icarus :laugh: Good luck! Which things you're currently working on?
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
streamhotel
Hey Alex,
Nice that you'll continue with Icarus :laugh: Good luck! Which things you're currently working on?
Will post a changelog in a tick, currently working on moodlights/dimmers, but when I press the save button I don't receive any packet from the client, so I don't know what options the user has saved.
Has anyone else experienced this and know how to solve it?
http://i.imgur.com/KlL6AkL.png
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
I don't know yet, i'm trying to make the dimmers work too. When i discover how it works i'll put here...
http://image.prntscr.com/image/cc2ce...aee0833c46.png
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
cabeludo007
I figured out why the client wouldn't send the packet to save moodlight data, I had the wrong structure.
Code:
@Override
public void write() {
this.response.init(Outgoing.MoodlightConfigMessageComposer);
this.response.writeInt(this.data.getPresets().size());
this.response.writeInt(this.data.getCurrentPreset());
int id = 1;
for (MoodlightPreset preset : this.data.getPresets()) {
this.response.writeInt(id);
if (preset.isBackgroundOnly()) {
this.response.writeInt(2);
} else {
this.response.writeInt(1);
}
this.response.writeString(preset.getColorCode());
this.response.writeInt(preset.getColorIntensity());
id++;
}
}
Basically, I forgot to increment the preset ID each loop. :P:
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Still about the dimmer... i would like to know what you think about to save the dimmer configuration data on the furni instead of to save in the room...
I'm planning to do this, saving the data on the furni extradata column (on db), using Json, and then, parsing to the game engine with its own class...
So, the user can save the dimmer config data in the furni, pick up this item, put into another room and don't need to config them again...
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
You should look into the Habbo scripts and then you'll realize you've got over abstraction. There are only 7 types of extradata.
And that DimmerRoomItem constructor. :stupid:
EDIT: I see you've split the inventory items and the room items. Seems like a really solid plan to strain your database and keeping everything synchronized properly will be a bitch.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Changelog
- Added locale support for different languages
- Added changing clothes
- Added moodlight support
- Added roller support (works for stacked items, and items that slide off the roller).
My first time doing both rollers and moodlights/dimmers, actually.
https://www.youtube.com/watch?v=UF2U...ature=youtu.be
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Quackster
Changelog
- Added locale support for different languages
- Added changing clothes
- Added moodlight support
- Added roller support (works for stacked items, and items that slide off the roller).
My first time doing both rollers and moodlights/dimmers, actually.
-- video removed due to being big --
Wow, it looks great! I love the locale support thing; I know for some people it might seem useless but it's something I miss in a lot of emulators. Are you eventually going to open a test hotel or something or not?
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Glaceon
Wow, it looks great! I love the locale support thing; I know for some people it might seem useless but it's something I miss in a lot of emulators. Are you eventually going to open a test hotel or something or not?
Err butterfly had it iirc but people ended up fucking over the source and hardcoding a strings.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
The General
Err butterfly had it iirc but people ended up fucking over the source and hardcoding a strings.
Oh my apologizes then, I never looked much into Butterfly tbh.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
The General
You should look into the Habbo scripts and then you'll realize you've got over abstraction. There are only 7 types of extradata.
And that DimmerRoomItem constructor. :stupid:
EDIT: I see you've split the inventory items and the room items. Seems like a really solid plan to strain your database and keeping everything synchronized properly will be a bitch.
I always look the habbo script, i know that, i wasn't talking about the server-client communication, but the server-db and db-server communication lmao... i don't know why but, thanks for the tip <3
about the dimmer constructor...
Every special furni, with special functions, have their own class to handle the extradata and the item itself into the room
Screenshot by Lightshot
about the edit, i don't know if that was a insult or a compliment but, thanks, i think...
OnTopic:
Nice progress with rollers! how did u make their cycle?
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
The General
Err butterfly had it iirc but people ended up fucking over the source and hardcoding a strings.
You're correct, Butterfly did have locale. It made sense for it to because more than 1 hotel with different languages used it.
For one hotel to build their own copy of Butterfly like I have done with Fresh, it didn't make a lot of sense for us to use the locale anymore as the strings would never, ever need to be changed.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Hi quackster! How you goes with this? Your source can help me with my GopheR Server! (A server written in go). Hope you finish this project bro! Gl!
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
One observation: BoneCP is "deprecated"
"As author of BoneCP (the connection pool that I think is in use in Stash) I'd like to point out that the project is considered deprecated at this point.
May I suggest you migrate to HikariCP instead, which is faster and more stable: https://github.com/brettwooldridge/HikariCP"
https://jira.atlassian.com/browse/BSERV-5402
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Well I'm back to start working on this project again. I started work on Habbo club subscription, it's purchasable, expirable, calculates correct days and all that jazz, just gotta do the monthly (?) gifts.
I also started work on teleporters, right now they only work with teleporters in the same room, not across rooms, but that will be fixed... :P:
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Teleporters are now working. I still have many features to go, but the core fundamental parts of what makes it a hotel is done.
http://i.imgur.com/XWE73sG.png
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Nice to see you again alex! Have you update your github?
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Looking great. Cannot wait to see more updates.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
I'm sure there is an easy explanation, but can someone help me fix the issue where if I click promote room it takes me to the front page of the catalogue? I'm not really sure how to make it show the intended panel/page.
http://i.imgur.com/ZOlOPE2.png
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Quackster
I'm sure there is an easy explanation, but can someone help me fix the issue where if I click promote room it takes me to the front page of the catalogue? I'm not really sure how to make it show the intended panel/page.
http://i.imgur.com/ZOlOPE2.png
Your page needs to have a specific 'external' link/index name, like, the string above/below the page display title in the packet. It tries to open a page with a specific index name. There is where you buy the room promotion.
I don't know the index name but I think you can easily find it searching on anything with promotion stuff. Gluck.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Glaceon
Your page needs to have a specific 'external' link/index name, like, the string above/below the page display title in the packet. It tries to open a page with a specific index name. There is where you buy the room promotion.
I don't know the index name but I think you can easily find it searching on anything with promotion stuff. Gluck.
Thank you :D: Leon saw my post helped me last night by saying the same thing, but I shortly went to bed without saying I fixed it -- was tired. I appreciate your help nonetheless.
I don't know if you can tell, but I'm working on room promotions.
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Quote:
Originally Posted by
Quackster
Thank you :D: Leon saw my post helped me last night by saying the same thing, but I shortly went to bed without saying I fixed it -- was tired. I appreciate your help nonetheless.
I don't know if you can tell, but I'm working on room promotions.
No worries, glad it's fixed :)
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
Changelog
Fixes
- Fixed bug where user could walk about of teleporter while it was teleporting.
- Fixed bug where it wasn't possible to teleport into a locked, or password protected room if the owner of that room was offline (weird bug I know).
- Fixed bug where if multiple purchases of HC was performed, they wouldn't stack.
- Fixed room deletion where the user who deletes their own room now has all their items saved back into their inventory.
- Fixed bug where if an item was picked up or removed underneath the player which raises the players height, the player would be considered floating. Now the player's height adjusts to the next item down when the item has been removed/picked up.
Additions
- Added permission system, along with the ability for permissions to be inherited.
- Added feature to save custom room floor plans.
- Added Lua integration which is now a plugin management system with event handling
Lua Plugin System
So with the Lua plugin system it's possible to change the functionality of the server without requiring any extensive Java knowledge, or without the need to download a Java IDE for the ability to create the plugin .jar files.
What is required is a Notepad program, which is what is used to write these plugins, and the methods/class names within Icarus too.
I've written an example called "BotPlugin" which will load 200 bots into a single room. Here is how it's handled, first with bot_plugin.lua
These method names have been inspired by Bukkit plugins for Minecraft I used to write. When the server first starts up, the "onEnable" is called if the plugin wishes to perform anything while the server loads.
And then it loads all the .lua files that have their paths stored in an array.
Code:
plugin_details = {
name = "BotPlugin",
author = "Quackster",
path = "plugins/BotPlugin"
}
event_register = {
"ROOM_ENTER_EVENT"
}
event_files = {
"room_events.lua"
}
--[[
Called when the plugin first starts up, so the plugin can load data if needed
so when the event is called the plugin is ready
param: plugin instance
return: none
--]]
function onEnable(plugin)
-- If you want, use log.println() to show everyone this method being called
log:println(string.format('[Lua] Initialising plugin %s by %s', plugin:getName(), plugin:getAuthor()))
end
-- Load all event .lua files
-- If you delete this code, ABSOLUTELY NO events will work
for i, file in ipairs(event_files) do
dofile (string.format('%s/events/%s', plugin_details.path, file))
end
Here is the room event handler (room_events.lua):
Code:
--[[
Room enter event called when the user has entered a room
Called when a user has truly entered the room
param:
Player - person who entered room
Room - the room they entered
return: Boolean - event cancelled state
--]]
function onRoomEnterEvent(player, room)
log:println("Room enter event called")
for i = 0, 200 - 1 do
local bot = createBot(room)
randomWalkEntity(bot)
end
return false
end
function createBot(room)
local bot = luajava.newInstance("org.alexdev.icarus.game.bot.Bot");
bot:getDetails():setName("RandomAlexBot")
bot:getDetails():setMotto("")
room:addEntity(bot)
return bot
end
function randomWalkEntity(entity)
local randomX = math.random(0, 25)
local randomY = math.random(0, 25)
entity:getRoomUser():walkTo(randomX, randomY)
plugin:runTaskLater(1, randomWalkEntity, { entity })
end
This will send a repeat call to randomWalkEntity(entity) every 1 second using the command I wrote called plugin:runTaskLater which will call a Lua function in a specified amount of seconds, along with using the function name and the array of parameters supplied.
I will be writing documentation on the plugin system in the future, for now I have created these events. Documentation is required for these events to know what parameters all of them require.
Player events
- PLAYER_LOGIN_EVENT("onPlayerLoginEvent")
- PLAYER_DISCONNECT_EVENT("onPlayerDisconnectEvent")
Console messenger events
- MESSENGER_TALK_EVENT("onMessengerTalkEvent")
Room events
- ROOM_REQUEST_ENTER_EVENT("onRoomRequestEvent")
- ROOM_ENTER_EVENT("onRoomEnterEvent")
- ROOM_LEAVE_EVENT("onRoomLeaveEvent")
- ROOM_PLAYER_CHAT_EVENT("onPlayerChatEvent")
- ROOM_PLAYER_SHOUT_EVENT("onPlayerShoutEvent")
- ROOM_WALK_REQUEST_EVENT("onPlayerWalkRequestEvent")
- ROOM_STOP_WALKING_EVENT("onPlayerStopWalkingEvent")
Item events
- PLACE_FLOOR_ITEM_EVENT("onPlaceFloorItemEvent")
- PLACE_WALL_ITEM_EVENT("onPlaceFloorItemEvent")
- FLOOR_ITEM_INTERACT_EVENT("onInteractFloorItemEvent")
- WALL_ITEM_INTERACT_EVENT("onInteractWallItemEvent")
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
As a proof of concept, I wrote the entire RCON/MUS server in Lua. It will probably need to be rewritten to handle things such as listening on a certain IP address/whitelist IP addresses but apart from that, it works :D:
https://i.imgur.com/pmzAYDA.png
https://github.com/TheAmazingAussie/...on_handler.lua
Code:
--[[
The server socket handler for incoming RCON/MUS connections
@author: Quackster
--]]
function listenServer()
local server_socket = nil
log:println(string.format("[Rcon] Attempting to create RCON server on port %s", rcon_port))
server_socket = luajava.newInstance("java.net.ServerSocket", rcon_port);
log:println(string.format("[Rcon] RCON server listening on port %s", rcon_port))
log:println()
plugin:runTaskAsynchronously(waitForConnections, { server_socket })
end
--[[
The function where the socket waits for incoming socket connections
and listens for data.
@author: Quackster
--]]
function waitForConnections(server_socket)
while (plugin:isClosed() == false) do
local socket = server_socket:accept()
log:println(string.format("Accepted connection from %s", socket:toString()))
local incoming_data = util:readToEnd(socket)
handleRconCommands(incoming_data)
socket:close()
end
end
--[[
RCON command handler where it's possible to remote control
the server.
@author: Quackster
--]]
function handleRconCommands(incoming_data)
local rcon_data = util:split(incoming_data, ";")
local password = rcon_data:get(0)
local command = rcon_data:get(1)
-- Do not continue if the password is incorrect.
if password ~= rcon_password then
do return end
end
-- Find function in global namespace and call it.
_G[command_handlers[command]](rcon_data)
end
Code:
command_handlers = {
["ha"] = "cmdHotelAlert"
}
--[[
This is to send hotel alerts remotely.
@parameters:
rcon_data - split by ';' delimeter
Handler for RCON command : ha
Syntax : password;command;message
Example : password;ha;Hotel alert test!
--]]
function cmdHotelAlert(rcon_data)
local message = rcon_data:get(2)
local players = playerManager:getPlayers()
for i = 0, players:size() - 1 do
local player = players:get(i)
player:sendMessage(message)
end
end
-
Re: Icarus (Production) - Java Server [MySQL, Netty]
I've done a lot since I last posted which was only 5 days ago! I've updated to PRODUCTION-201709052204-426856518 build, which is the most recent Habbo build.
Now here's the changelog...
Targeted Offers
I've added targeted offers, which are special deals that run for a set amount of time before they expire, and they can only be bought once. Basically they look like this:
They will be able to be edited/deleted/added in the housekeeping, you can change the image, the text, how much credits (and/or other activity points such as duckets) cost, the items that can be purchased etc. In the housekeeping shown:
(if MUS/RCON is enabled, upon clicking submit, the targeted offers will be reloaded without restarting server)
Promotions
I've added room promotions, which is the typical feature of having a special entry in the events part of the navigator. It's sorted by the remaining time that is left, so lets say there's a room with 10 minutes and another with 20, the room with the fewer minutes left will be ordered first as that's how it works on Habbo.
Pets
The second feature I started has been pets, you can purchase them, place them - they walk around, and pick them up, they also support the feature where you can let others places their own pets in your room too, and when they're kicked they are placed into their owners inventory. Right now they're incomplete.
Groups
The third feature I've started on has been groups, you can purchase a group for a home room, view its group information, and delete the group, not much apart from that, the group feature is still complete.
Backend
Fun fact! Just today I stripped down Room.java from 629 lines to 202 lines.
Before: https://github.com/TheAmazingAussie/...room/Room.java
After: https://github.com/TheAmazingAussie/...room/Room.java
-
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
-
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... :glare:
https://i.imgur.com/nfumE58.png
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!) :P:
https://i.imgur.com/rpaw9NQ.png
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. :ott1:
Three public rooms have been added
Quote:
Originally Posted by
JustJarno
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
It's still missing quite a few features, but it's the most complete server I've written myself so far. :P: 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 :(: