Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I started doing some research on other stuff. This won't mean I'll abandon Aurora or stop working on it, but it's an idea for if Aurora gets finished. Of course, the R38 is already pretty far. We're thinking about putting up a BETA around Halloween. Anyways, Aurora will be the biggest priority.
If I ever don't want to do R38, I'll be working on a v9 version of Aurora. Keep in mind though: this version is complete stand-alone. It uses a different server, different client, different database. Even a different programming language.
I'll be using Dart. The database is going to be a PostgreSQL database (simply, Dart has no MySQL libraries working with latest Dart versions). I made a small concept project to see how things work and so far I've been able to get stuff from database, connect to the server, send messages and receive messages, even logging in.
Here's how it looks:
Of course, I'm not 100% sure how the code is. It's a bit tricky as most Database-related stuff at least is asynchronous. I have a few snippets here:
PHP:
Future tryLogin(String username, String password) async {
Habbo habbo = await Engine.HabboHotel.Habbos.getHabboByName(username);
if (habbo != null) {
if (habbo.Password == password) {
_habbo = habbo;
queueMessage(new AuthenticationOkComposer());
queueMessage(new SystemBroadcastComposer("Welcome to HabboDart"));
flush();
return;
}
}
sendMessage(new ErrorComposer("login incorrect: Wrong username/password"));
}
PHP:
Future<Habbo> getHabboByName(String username) async {
if (_habbosByName.containsKey(username)) {
return await _habbosByName[username];
}
DatabaseConnection connection = await Engine.Database.getConnection();
connection.setQuery("SELECT * FROM habbos WHERE username = [USER=411303]username[/USER] LIMIT 1");
connection.addParameter("username", username);
Row row = await connection.getResult();
if (row != null) {
Habbo habbo = new Habbo(row.toMap());
_habbosById.putIfAbsent(habbo.Id, () => habbo);
_habbosByName.putIfAbsent(username, () => habbo);
connection.dispose();
return habbo;
}
return null;
}
This gives you an idea how the Dart programming language looks like. I find it enjoyable in some way and the syntax is very much like C, though, keep in mind, things like properties are really different. Also, the Dart programming language doesn't have some classes like byte, char, short, long etc.
I'll be seeing how far I can get this without raging and crying. The code isn't the best; I agree. But, it's something new and innovating.
Besides that, a CMS will be written using Symfony which I'll try to get working for both versions of Aurora, but first only for the R38 as that's the main priority now.
For the v9, I'll be trying to make all the core game stuff, camera, public rooms, bots, etc. If somebody could help me with battleball I'd really appreciate it (ehh... v9 had battleball... right?).
If anybody is interested in the v9 source ask away, the part which I have right now I can give. If somebody is interested in certain things, ask away. Same goes for the R38, but I won't be giving the source away (I can show some snippets of things you want to see, though I can't promise to show everything).