Gaia Emulator - Java - Gradle
Howdy folks,
Today I present you with a project I've been working on for a while now.
I started working on it because I was bored and needed something to do, as AzureJava was discontinued (due to the lack of enthusiasm and updates) and the name got on my nerves, due to my O.C.D when coding high-level OOP languages.
I know what you're going to say, "This is just a copy of AzureJava" --- nothing like it. AzureJava was my first Java Emulator from scratch and I hope you can understand that, your first experience is not always going to be your best, it's not always going to *click* the first time around.
Gaia is to my standards (beware of my O.C.D) clean, documented, and I'd go ahead and say the methods practice is pretty good as well, if you get what I'm trying to say? I don't know how else I would be able to assure you on the fact that I focus on the slightest of detail, from classes I don't have any business being in, look at the GitHub log, random commits titled "Naming Conventions" because that's how I roll
:junglejane:
List of dependencies & frameworks used:
- Netty 4 for it's networking. To specify, our networking component basically consist of a TCP Server and an RCON/MUS Server (RCON is not done yet).
- Hibernate ORM along with java.persistence annotations, used for easily querying known database tables.
- Trove for high performance collections
- Log4j Logging of course!
- Reflections class searching for packet registration
- HikariCP connection pooling
- Guice dependency injection
- Governator Guice extensions
- MappedBus low latency interprocess communication (IPC) library used for sharing memory across the JVM. Will go into more detail on that keep reading!
The software design for my emulator was inspired by Scott and Jordan. Somewhat Microservice Architecture, with touches by moi.
Diagram I wrote up along time ago: http://i.imgur.com/yfwIlNU.png
- The workers are basically separate processes from the master
- This increases the scalability of the overall application, thus quickly fixing errors without restarting the whole hotel.
- For example: Navigator runs on a separate process and crashes... just the navigator will go down, and it can be easily worked on and restarted without the users even noticing.
- This improves the stability of the master application because if you think about it, it's basically load-balancing, which avoids the master from performing vast, strenuous calculations.
Positive and negative feedback appreciated! Open source, so if you feel like you could contribute to the development, go ahead!
GitHub: https://github.com/HeyItsKawaii/Gaia
P.S.
Don't talk shit about how I won't finish my project, at least I'll be providing you with a "good" OPEN SOURCE base to work off of?
Credits:
@Wotsuba (Jaden) Lead Developer, King Kawaii
@Caustik (Adil) one of my best mates, help and support along the way!
@scottstamp851 (Scott) i know we've had a falling out, but your cool man! thanks for the help and encouragement.
@Quackster (Alex) encouraging me?? kinda? x's and o's!
@maritnmine (Martin?) i don't know you personally, but you've helped me a lot through the years with your somewhat educational posts i.e. Guide on writing a Habbo Emulator.
Re: Gaia Emulator - Java - Gradle
Thinking about whether I should use a Scripting Engine (Lua?) to load and interpret plugins, or using JAR files, hoping the plugin manager will be committed tonight, currently leaning in the direction of JAR files.
Re: Gaia Emulator - Java - Gradle
Looks like the most promising project I have seen for a while. But I must ask, what about dependency injection?
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
maritnmine
Looks like the most promising project I have seen for a while. But I must ask, what about dependency injection?
Thanks. I'm new to dependency injection but I'm currently using it to create an instance of a class without having to assigning values that wouldn't be used by the suggested caller. Only 1 class uses it at the moment, which happens to be the main class.
Singleton classes with "default values" are also in mind.
Re: Gaia Emulator - Java - Gradle
Governator is a set of extensions for Guice :p. Also, hibernate may trouble you when you're a bit deeper into the project, so make sure you read up on plenty of documentation.
Looks promising, good luck!
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
Wotsuba
Thanks. I'm new to dependency injection but I'm currently using it to create an instance of a class without having to assigning values that wouldn't be used by the suggested caller. Only 1 class uses it at the moment, which happens to be the main class.
Singleton classes with "default values" are also in mind.
You use dependency injection (DI) to make your objects/modules depend on less modules. That way it is far easier to test. If for example your class relies on a call to a static method, it has one dependency to that part. Therefore your "unit tests" would become more like integration tests when you are writing your tests to that class. This is also why the traditional way of implementing singleton classes in Java is considered as evil.
Re: Gaia Emulator - Java - Gradle
Incase you want to go full overboard: Java binding - zeromq
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
The General
Thanks for the suggestion, I'll look into it!
O.C.D kicked in yesterday night, cleaning up some of the older class files.
http://i.imgur.com/uR8BDx7.png
Sorry I didn't commit the plugin manager yet, nor did I finish working to get the client to load (still thinking of revisions). I wasn't planning on using an encryption, so I was just going to go to the same build Mango used, with the banner.php.
In other news, I've been "thinking" of removing the configuration file, and allowing the user to configure the emulator via database.
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
Wotsuba
Thanks for the suggestion, I'll look into it!
O.C.D kicked in yesterday night, cleaning up some of the older class files.
http://i.imgur.com/uR8BDx7.png
Sorry I didn't commit the plugin manager yet, nor did I finish working to get the client to load (still thinking of revisions). I wasn't planning on using an encryption, so I was just going to go to the same build Mango used, with the banner.php.
In other news, I've been "thinking" of removing the configuration file, and allowing the user to configure the emulator via database.
Only if everything could be solved with a "Fix it!" button.
And how about both? Just like Arcturus, key configuration values like database, gameserver in the config file and all other less important things (read default values) in the database. :P:
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
Wotsuba
Thanks for the suggestion, I'll look into it!
O.C.D kicked in yesterday night, cleaning up some of the older class files.
http://i.imgur.com/uR8BDx7.png
Sorry I didn't commit the plugin manager yet, nor did I finish working to get the client to load (still thinking of revisions). I wasn't planning on using an encryption, so I was just going to go to the same build Mango used, with the banner.php.
In other news, I've been "thinking" of removing the configuration file, and allowing the user to configure the emulator via database.
Fields that are static final/const should be all uppercase :^)
Btw, I see that you are writing a lot of documentation. Like a lot. Make sure that the documentation is short and that you don't have too much bloat in it. If there is something in the documentation that doesn't contribute to the reader's understanding of it, I suggest leave it out. Not sure if you are going to make a whole lot of changes to the code (As this is early in the development stages), there could be major changes that could have a significant impact on the documentation writing and you would have to re-write much of the documentation that you already put a lot of effort into. Might wanna look for a good balance there.
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
maritnmine
Fields that are static final/const should be all uppercase :^)
Btw, I see that you are writing a lot of documentation. Like a lot. Make sure that the documentation is short and that you don't have too much bloat in it. If there is something in the documentation that doesn't contribute to the reader's understanding of it, I suggest leave it out. Not sure if you are going to make a whole lot of changes to the code (As this is early in the development stages), there could be major changes that could have a significant impact on the documentation writing and you would have to re-write much of the documentation that you already put a lot of effort into. Might wanna look for a good balance there.
Thanks for the feedback, I'll try to make it as short and as simple as possible.
Re: Gaia Emulator - Java - Gradle
Lol, since I cannot say this development looks good since that's off topic I might try it again:
Looking good. Cannot wait for some screens. This development surely looks promising!
Re: Gaia Emulator - Java - Gradle
Quote:
Originally Posted by
Glaceon
Lol, since I cannot say this development looks good since that's off topic I might try it again:
Looking good. Cannot wait for some screens. This development surely looks promising!
Thanks. I'm really not focusing on getting the client up until I'm satisfied with every other initialization component within the emulator. In other news... I've just started rewriting the Configuration Manager. Check out the commits: https://github.com/HeyItsKawaii/Gaia.../configuration
Re: Gaia Emulator - Java - Gradle
Re: Gaia Emulator - Java - Gradle
Heh. So, it's not "just AzureJava", but it's literally the same codebase with most of the objects renamed?
Interesting to see you couldn't figure out the correct way to implement the configuration bootstrapping I "borrowed" from Crowley.
Sorry guys. This is old news.
Sent from my iPhone using Tapatalk