-
[C#, PHP, R38] Project Aurora
Hey,
This is actually my HSR project. I want to rewrite this thread as I kind off got off with it. I rewrote the whole source but it was on a virtual machine which I accidentally removed (since I had 2 Windows 7 VMs and removed the wrong one... silly me!)
Anyways, I decided to rewrite it. The R35 is just an assumption. The base "framework" (which I call Aurora's Habbo Framework) is used for all projects which will be made. Not much, just 2/3 versions, but we'll start with one. Or 2... not sure.
Some tech-stuff:
- The emulator is written in C#.
- The emulator uses DotNetty for networking.
- The emulator uses Fluent NHibernate.
- The emulator creates all database tables upon booting up for the first time.
- The emulator is written from scratch.
- The emulator uses Nuget.
- The emulator uses log4net.
Versions being made / planned:
- V9 (or V7 if somebody can help with packet structures I can't figure out).
- R35-R38 (not sure which one).
More isn't planned, but it's all to be answered. For the R35-R38, the main focus is on Flash first (no worries... Shockwave is a possibility).
The features planned:
V7/V9:
- Camera
- Everything else
- Wobble squabble
- Gamehall
- IF it's v9, battleball
R35-R38:
- Just the full game, with achievements etc etc.
Some custom features might be implemented later but not sure about that.
The source will be available during a later stage at the development. For now, it's not share-worthy as it's kind of messy in some parts still.
A few scripts to show you how things are done:
This code builds the SessionFactory, adds the mappings and updates the schema (database).
PHP Code:
SessionFactory = Fluently.Configure()
.Database(MySQLConfiguration.Standard.ConnectionString(CONNECTION_STRING))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<PlayerMap>())
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<CatalogPageMap>())
.ExposeConfiguration(config =>
{
new SchemaUpdate(config).Execute(false, true);
})
.BuildSessionFactory();
This is an example of a map. In this case, it's the PlayerMap which extends ClassMap<Player>. It loads all data from the table "players".
PHP Code:
public PlayerMap()
{
Table("players");
LazyLoad();
Id(x => x.Id).Column("id").Length(11).GeneratedBy.Identity();
Map(x => x.Username).Column("username").Length(15).Not.Nullable();
Map(x => x.Password).Column("password").Length(80).Not.Nullable();
Map(x => x.Email).Column("email").Length(30).Not.Nullable().Unique();
Map(x => x.Gender).Column("gender").Length(1).Not.Nullable();
Map(x => x.Figure).Column("figure").Length(80).Not.Nullable();
Map(x => x.Motto).Column("motto").Length(40).Default("").Not.Nullable();
Map(x => x.Coins).Column("coins").Length(11).Default("500").Not.Nullable();
Map(x => x.Pixels).Column("pixels").Length(11).Default("0").Not.Nullable();
Map(x => x.Rank).Column("rank").Length(2).Default("1").Not.Nullable();
Map(x => x.HomeRoom).Column("home_room").Length(11).Default("0").Not.Nullable();
Map(x => x.SSO).Column("sso_ticket").Length(40).Not.Nullable().Default("");
}
This reads a packet and handles it. I'm sure it could be cleaned up more... but oh well.
PHP Code:
public override void ChannelRead(IChannelHandlerContext ctx, object msg)
{
Client client = Engine.Game.Clients.GetClient(ctx.Channel);
var message = msg as IByteBuffer;
if (message.ReadByte() == 60)
{
string policy = "<?xml version=\"1.0\"?>\r\n<!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\">\r\n<cross-domain-policy>\r\n <allow-access-from domain=\"*\" to-ports=\"1-65535\" />\r\n</cross-domain-policy>\0";
ctx.Channel.WriteAndFlushAsync(Unpooled.CopiedBuffer(Encoding.Default.GetBytes(policy))).Wait();
}
else
{
int length = Base64Encoding.DecodeInt32(message.ReadBytes(2).ToArray());
IByteBuffer packet = message.ReadBytes(length);
Engine.GameNetwork.Packets.Handle(client, packet);
}
base.ChannelRead(ctx, msg);
}
For more scripts, just ask me. I'm a nice fella and if you think I could change a few things let me know. But please only do constructive criticism.
A few screens:
Now much, just started (and mainly done "kernel" stuff):
http://i.imgur.com/LTRuR5o.png
http://i.imgur.com/D36zOXE.png
The end of my school year is coming up as well so I'll have more time to work on this. And I'm gonna keep it more updated as I kind of forgot in my last thread (and the thread was a mess because I started over and yeah now I know I will only work on this and I got it backed up and stuff maybe put it on git).
Any questions, just ask.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Nice one, good luck with the rest of the project!
V7 had some really weird packet structures (I think Nillus's ION might have a few of these implemented...)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Caustik
Nice one, good luck with the rest of the project!
V7 had some really weird packet structures (I think Nillus's ION might have a few of these implemented...)
True, but it only has login and register and update profile. It doesn't have the things I struggled with. Navigator wasn't even started and club neither. The packet structure I have for club always shows 'Join!' instead of the amount of club days.
V7 would be nice to make but I'll see what happens.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
True, but it only has login and register and update profile. It doesn't have the things I struggled with. Navigator wasn't even started and club neither. The packet structure I have for club always shows 'Join!' instead of the amount of club days.
V7 would be nice to make but I'll see what happens.
We have V1, V5 and V9, is there any need for V7?
I mean sure, it would be nice but there's a lot of missing packet information and structures in V7 that I believe will just lead to frustration causing an incomplete server for that revision.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Quackster
We have V1, V5 and V9, is there any need for V7?
I mean sure, it would be nice but there's a lot of missing packet information and structures in V7 that I believe will just lead to frustration causing an incomplete server for that revision.
There's no need for anything; I'll see what I do though.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Good luck Josh! Hopefully you'll find finally motivation to fully finish this project.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
streamhotel
Good luck Josh! Hopefully you'll find finally motivation to fully finish this project.
I'll try; at least I have some more time now. Any ideas for this project are highly appreciated!
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Hello! I'm part of this development and I'm in the stage of learning alot of C# right now and how Habbo works, or well oldschool habbo works.
Just commited to git with a few changes,
Got rid of godclass by creating an instance of each class that's static so you access the class via GetInstance(), for example:
PHP Code:
ClientManager.GetInstance().AddClient(ctx.Channel);
Instead of doing something like Aurora.GetGame().GetClientManager() or w/e.
I added the ability to "que" composers. If you're going to send alot of composers at once then instead of writing and flushing every single packet, you basically first write all the packets then you flush.
PHP Code:
public void SendComposer(MessageComposer composer) { Send(composer, true); } public void QueueComposer(MessageComposer composer) { Send(composer, false); } public void Send(MessageComposer composer, bool flush) { if (flush) { channel.WriteAndFlushAsync(composer.GetBytes()); } else { channel.WriteAsync(composer.GetBytes()); } } public IChannel Flush() { return channel.Flush(); }
I also tidyed up the composers because @Glaceon was lazy and did wrote the composers inside the events so now they're own classes instead.
I also edited the Habbo.swf alittle since on R35 the icons were limited and you could only choose icon names from an array,
PHP Code:
private static const _SafeStr_6112:Array = ["", "katalogi_ikoni_purse", "katalogi_ikoni_furni", "katalogi_ikoni_plants", "katalogi_ikoni_trax", "katalogi_ikoni_pixels", "katalogi_ikoni_credits", "katalogi_ikoni_recycler", "katalogi_ikoni_pets", "katalogi_ikoni_hc", "katalogi_ikoni_special_offers"];
but now instead it gets the icons like on the new revisions where you get the icons by number, example, "icon_1.png". I also changed the extension from .gif to .png.
I'm in the middle of editing the catalogue right now to make it look alittle bit more like the r37 catalogue where the sub pages have icons aswell. I've currently added the icon to the sub page. Currently working on changing the background color on the sub pages.
How we want it to be:
https://image.prntscr.com/image/77e4...112fca7e61.png
How it currently is:
https://image.prntscr.com/image/a2cd...15fdd632aa.png
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Good luck guys, looking forward to see some more nice screenshots!
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Some small updates:
- Catalogue pages now show the layout and stuff. Products aren't made yet.
- Navigator shows official rooms only. Those are gotten from the database.
http://i.imgur.com/usDTjMO.png
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I miss that public nav view.
Are you going to get past room loading this time? You know, statistically speaking :p:
Nah Im kidding. Nice work so far. Keep it up ^.^
Havent done C# in a while. All I remember is that LINQ is cool but slow as fuck xD
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
I miss that public nav view.
Are you going to get past room loading this time? You know, statistically speaking :p:
Nah Im kidding. Nice work so far. Keep it up ^.^
Havent done C# in a while. All I remember is that LINQ is cool but slow as fuck xD
I won't use LINQ too much, just for Fluent NHibernate (as I guess it uses LINQ somehow itself).
PHP Code:
public OfficialRoomsComposer(IList<FrontpageItem> frontpageItems)
: base(450)
{
AppendVL64(0);
AppendVL64(frontpageItems.Count);
foreach (FrontpageItem item in frontpageItems)
{
AppendString(item.Name);
AppendString(item.Description);
AppendVL64(item.Size);
AppendString(item.Name);
AppendString(item.Image);
AppendVL64(0);
AppendVL64(item.Type);
if (item.Type == 1)
AppendString(item.Tag);
}
}
At least I'm not using LINQ for for(each) loops as that will drop loads of performances. (no comment about the 0, I have to make rooms yet so no user count of something yet).
ALSO: In my old source I got past room loading too, just the annoyance is that shockwave and flash are a bit different in it. That's why I focus on Flash first xp)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Catalog products done *so far*.
http://i.imgur.com/T2nwZbJ.png
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Code:
if (item.Type == 1)
Make an enum for that.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
Code:
if (item.Type == 1)
Make an enum for that.
MySQL gives me errors when trying to create an enum.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I can hear, I can hear the nostalgia coming.
Wasn't you some months ago also developing an v35 Emulator? Or was @Quackster? I don't remember.
Aurora it's a name of a Magibogi Emulator. Actually it was takedown by the creators.: https://github.com/aura-project/aura
Sad.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
I won't use LINQ too much, just for Fluent NHibernate (as I guess it uses LINQ somehow itself).
PHP Code:
public OfficialRoomsComposer(IList<FrontpageItem> frontpageItems)
: base(450)
{
AppendVL64(0);
AppendVL64(frontpageItems.Count);
foreach (FrontpageItem item in frontpageItems)
{
AppendString(item.Name);
AppendString(item.Description);
AppendVL64(item.Size);
AppendString(item.Name);
AppendString(item.Image);
AppendVL64(0);
AppendVL64(item.Type);
if (item.Type == 1)
AppendString(item.Tag);
}
}
At least I'm not using LINQ for for(each) loops as that will drop loads of performances. (no comment about the 0, I have to make rooms yet so no user count of something yet).
ALSO: In my old source I got past room loading too, just the annoyance is that shockwave and flash are a bit different in it. That's why I focus on Flash first xp)
Don't know why u put that name but revise the name "OfficialRoomsComposer", i think "SerializePageItems" is better :p
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
Don't know why u put that name but revise the name "OfficialRoomsComposer", i think "SerializePageItems" is better :p
_events[450] = com.sulake.habbo.communication.messages.incoming.navigator.OfficialRoomsEvent;
This is SWF wise. This is a composer in emulator. I keep the same names.
Quote:
Originally Posted by
saamus
I can hear, I can hear the nostalgia coming.
Wasn't you some months ago also developing an v35 Emulator? Or was @
Quackster? I don't remember.
Aurora it's a name of a Magibogi Emulator. Actually it was takedown by the creators.:
https://github.com/aura-project/aura
Sad.
It was me (it was R38), though I accidentally deleted the virtual machine it was on. Sad story. Now I have it on Github though.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Dont know why... OfficialRoomsEvent for item serializing... Were they drunk when write that?
PD: Good luck with ur project bro, u can do it perfect ;)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
Dont know why... OfficialRoomsEvent for item serializing... Were they drunk when write that?
PD: Good luck with ur project bro, u can do it perfect ;)
No.
https://pastebin.com/T57CzCHN
I think these names are correct. I keep the same names as Habbo did. SerializePageItems doesn't even tell you which packet it is.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
_events[450] = com.sulake.habbo.communication.messages.incoming.navigator.OfficialRoomsEvent;
This is SWF wise. This is a composer in emulator. I keep the same names.
It was me (it was R38), though I accidentally deleted the virtual machine it was on. Sad story. Now I have it on Github though.
You did wha.... Anyways, good luck on this project :D
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
saamus
You did wha.... Anyways, good luck on this project :D
This happens when I get annoyed because my computer is full of shit and I remove without thinking. Thanks anyways.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
A few things happened:
- Catalogue deals work now, you can make packages of furniture. Maybe database wise and code wise it can be improved.
- The emulator doesn't use NHibernate anymore since @spreedblood found it too hard and I found joins annoying.
- The database uses foreign keys and better collations (utf8mb4_general_ci mostly which is like utf8_general_ci but better) .
- Updated DotNetty to latest version on Nuget.
http://i.imgur.com/3HZNqIN.png
Thanks to @spreedblood for writing the database stuff and part of the controllers and the entity classes.
PHP Code:
using System;
using System.Collections.Concurrent;
namespace AuroraEmu.Database.Pool
{
public class ObjectPool<T>
{
private ConcurrentBag<T> _objects;
private Func<T> _objectGenerator;
public ObjectPool(Func<T> objectGenerator)
{
if (objectGenerator == null) throw new ArgumentNullException("objectGenerator");
_objects = new ConcurrentBag<T>();
_objectGenerator = objectGenerator;
}
public T GetObject()
{
T item;
if (_objects.TryTake(out item)) return item;
return _objectGenerator();
}
public void PutObject(T item)
{
_objects.Add(item);
}
}
}
PHP Code:
using AuroraEmu.Database.Pool;
using MySql.Data.MySqlClient;
using System;
using System.Data;
namespace AuroraEmu.Database
{
public class DatabaseConnection : IDisposable
{
private readonly ObjectPool<DatabaseConnection> objectPool;
private MySqlConnection connection;
private MySqlCommand command;
private MySqlTransaction transaction;
public DatabaseConnection(string connectionString, ObjectPool<DatabaseConnection> pool)
{
objectPool = pool;
connection = new MySqlConnection(connectionString);
command = connection.CreateCommand();
}
public void Open()
{
if(connection.State == ConnectionState.Open)
{
throw new InvalidOperationException("Connection is already opened...");
}
connection.Open();
}
public bool IsOpen()
{
return connection.State == ConnectionState.Open;
}
/// <summary>
/// Adds a parameter to the MySqlCommand.
/// </summary>
/// <param name="parameter">The parameter with prefixed with an '@'</param>
/// <param name="value">The value of the parameter.</param>
public void AddParameter(string parameter, object value)
{
command.Parameters.AddWithValue(parameter, value);
}
public void SetQuery(string query)
{
command.CommandText = query;
}
/// <summary>
/// Executes a query.
/// </summary>
/// <returns>The number of rows affected.</returns>
public int Execute()
{
try
{
return command.ExecuteNonQuery();
}
catch (MySqlException ex)
{
Engine.Logger.Error("MySQL Error: ", ex);
return -1;
}
finally
{
command.CommandText = string.Empty;
command.Parameters.Clear();
}
}
public DataSet GetDataSet()
{
try
{
DataSet dataSet = new DataSet();
using (MySqlDataAdapter adapter = new MySqlDataAdapter(command))
{
adapter.Fill(dataSet);
}
return dataSet;
}
catch (Exception ex)
{
Engine.Logger.Error("MySQL Error: ", ex);
return null;
}
}
public DataTable GetTable()
{
try
{
DataTable dataTable = new DataTable();
using (MySqlDataAdapter adapter = new MySqlDataAdapter(command))
{
adapter.Fill(dataTable);
}
return dataTable;
}
catch (Exception ex)
{
Engine.Logger.Error("MySQL Error: ", ex);
return null;
}
}
public DataRow GetRow()
{
try
{
DataRow row = null;
DataSet dataSet = GetDataSet();
if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count == 1)
{
row = dataSet.Tables[0].Rows[0];
}
return row;
}
catch (Exception ex)
{
Engine.Logger.Error("MySQL Error: ", ex);
return null;
}
}
/// <summary>
/// Executes an 'insert'-query. Instead of 'Execute', it returns the inserted ID rather than the amount of affected rows.
/// </summary>
/// <returns>The inserted ID.</returns>
public int Insert()
{
try
{
command.ExecuteNonQuery();
return (int)command.LastInsertedId;
}
catch (MySqlException ex)
{
Engine.Logger.Error("MySQL Error: ", ex);
return -1;
}
finally
{
command.CommandText = string.Empty;
command.Parameters.Clear();
}
}
public void BeginTransaction()
{
transaction = connection.BeginTransaction();
}
public void Commit()
{
if (transaction == null)
throw new InvalidOperationException("Transaction hasn't started yet.");
transaction.Commit();
}
public void Rollback()
{
if (transaction == null)
throw new InvalidOperationException("Transaction hasn't started yet.");
transaction.Rollback();
}
public void Dispose()
{
if(IsOpen())
{
connection.Close();
}
if(transaction != null)
{
transaction.Dispose();
}
if(command != null)
{
command.Dispose();
}
}
}
}
PHP Code:
public Player GetPlayerById(int id)
{
Player player;
if (playersById.TryGetValue(id, out player))
return player;
DataRow result = null;
using (DatabaseConnection dbClient = DatabaseManager.GetInstance().GetConnection())
{
dbClient.SetQuery("SELECT id, username, password, email, gender, figure, motto, coins, pixels, rank, home_room, sso_ticket FROM players WHERE id = @id;");
dbClient.AddParameter("@id", id);
dbClient.Open();
result = dbClient.GetRow();
}
if (result != null)
{
player = new Player(result);
playersById.TryAdd(player.Id, player);
return player;
}
return null;
}
I'm pretty sure most code can be cleaned up even more, but to be honest I'm cba to do it now.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I'm not sure what is worse... a so called god class or making a instance of it static..
What about dependency injection?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Joopie
I'm not sure what is worse... a so called god class or making a instance of it static..
What about dependency injection?
Don't blame me about the way it's done now, with the bla.GetInstance() stuff, @spreedblood is completely responsible for it. It was his idea and he changed all that stuff.
But, what way would you recommend?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Don't blame me about the way it's done now, with the bla.GetInstance() stuff, @
spreedblood is completely responsible for it. It was his idea and he changed all that stuff.
But, what way would you recommend?
And when someone in my project group does something wrong it is not my fault. Sadly it does not work like that. In this project you two are working together. If you do not like his changes, you should have declined it. Ofcourse, vice versa. Saying "it is not me, he did it" is just wrong. I hope you have learned to never point a finger to someone else.
What I recommend? I suggest you read my previous post again.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Joopie
And when someone in my project group does something wrong it is not my fault. Sadly it does not work like that. In this project you two are working together. If you do not like his changes, you should have declined it. Ofcourse, vice versa. Saying "it is not me, he did it" is just wrong. I hope you have learned to never point a finger to someone else.
What I recommend? I suggest you read my previous post again.
True. However I did not do research into this, and because it seemed like he did I just assumed what he was telling me was right; however, you are right about that.
I'll try and look into dependency injection.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Why dont you skip the catalog part and go straight to loading rooms? Yeah I know its cool to have something that already works on the hotelview but rooms is what habbo is about. This is the kind of George dev structure you apply for any emulator. :p:
Next up is messenger and modtools along with the inventory and purse. Haha :)"
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
Why dont you skip the catalog part and go straight to loading rooms? Yeah I know its cool to have something that already works on the hotelview but rooms is what habbo is about. This is the kind of George dev structure you apply for any emulator. :p:
Next up is messenger and modtools along with the inventory and purse. Haha :)"
Funny thing. One, purse? Purse is just one packet unless you mean something else than purse. Modtools won't be done until everything else is finished. Messenger is in progress but not by me but by @spreedblood. As a mMy Home My Profile Messages atter of fact, I just wanted to have the catalogue listing and pages done first and then focus on navigator. When navigator is mostly finished, I'll move over to room entry.
Now, just accept the way I'm working. And if you don't like it: you can use a magical keyboard combination which contains an ALT and a F4. Have a good day Wesley.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Omg very nice, Question i have is, What made you go backwards? Jw(Y)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
PythoneX12
Omg very nice, Question i have is, What made you go backwards? Jw(Y)
What do you mean?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
What do you mean?
Pretty sure he's asking why you're using an old Habbo version, not sure.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Yes, An old version. What made you decide that? Just curious(Y)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
MySQL gives me errors when trying to create an enum.
Which errors?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
PythoneX12
Yes, An old version. What made you decide that? Just curious(Y)
Because no emulator hasn't been made for R35 flash (no good complete one). The one that was far completed (Hebbo's CachingVB6) is vb6 (one thing) and is down (at least, no database is downloadable as it's lost). As for V9, the only good emulator is Thor which was still unfinished and uses MsSQL.
Quote:
Originally Posted by
Wuzix
Which errors?
http://i.imgur.com/aJkpjSL.png
http://i.imgur.com/hCG3Q45.png
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Because no emulator hasn't been made for R35 flash (no good complete one). The one that was far completed (Hebbo's CachingVB6) is vb6 (one thing) and is down (at least, no database is downloadable as it's lost). As for V9, the only good emulator is Thor which was still unfinished and uses MsSQL.
http://i.imgur.com/aJkpjSL.png
http://i.imgur.com/hCG3Q45.png
Try
PHP Code:
ALTER TABLE players ADD online ENUM('0') NOT NULL DEFAULT;
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Alright, since I was up pretty early I decided to do some shit on my emulator. Few things changed:
- Using C# 7.0 now, which means
PHP Code:
Item item;
if (items.TryGetValue(itemId, out item))
Is now changed to
PHP Code:
if (items.TryGetValue(itemId, out Item item))
Which looks much cleaner in my opinion.
Also, a new packet is added:
PHP Code:
class MyRoomsSearchMessageEvent : IPacketEvent
{
public void Run(Client client, MessageEvent msgEvent)
{
client.SendComposer(new GuestRoomSearchResultComposer(msgEvent.ReadVL64(), 5, "", NavigatorController.GetInstance().GetRoomsByOwner(client.Player.Id)));
}
}
PHP Code:
using AuroraEmu.Game.Rooms;
using System.Collections.Generic;
namespace AuroraEmu.Network.Game.Packets.Composers.Navigator
{
class GuestRoomSearchResultComposer : MessageComposer
{
public GuestRoomSearchResultComposer(int tab1, int tab2, string search, List<Room> rooms)
: base(451)
{
AppendVL64(tab1);
AppendVL64(tab2);
AppendString(search);
AppendVL64(rooms.Count);
foreach(Room room in rooms)
{
SerializeRoom(room);
}
}
public void SerializeRoom(Room room)
{
AppendVL64(room.Id);
AppendVL64(false); // events
AppendString(room.Name);
AppendString(room.Owner);
AppendVL64((int)room.State);
AppendVL64(7);
AppendVL64(0);
AppendString(room.Description);
AppendVL64(0);
AppendVL64(false); // can trade
AppendVL64(0); // score
AppendVL64(0); // tags
AppendString(room.Icon, 0);
}
}
}
Not everything is done yet but it's starting to look okay. Also @The General maybe this weekend I'll do the room entry so you can be happy ;-)
Also, if anybody knows stuff about R35 or want to help editing SWF add me on Skype: mr.josh.97
Or join my discord: https://discordapp.com/channels/320626401185366016 in where I'll be available most of the time (chances are that I'll answer faster there though).
Screen for the navigator:
http://i.imgur.com/zmiuOVr.png
[QUOTE=u20;8794806]Try
PHP Code:
ALTER TABLE players ADD online ENUM('0') NOT NULL DEFAULT;
Didn't work but
PHP Code:
ALTER TABLE players MODIFY online ENUM('1','0') NOT NULL DEFAULT '0';
did work.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
[QUOTE=Glaceon;8794904]
Quote:
Originally Posted by
u20
Try
PHP Code:
ALTER TABLE players ADD online ENUM('0') NOT NULL DEFAULT;
Didn't work but
PHP Code:
ALTER TABLE players MODIFY online ENUM('1','0') NOT NULL DEFAULT '0';
did work.
ya, I forgot the '0' after default, however good job. It reminds me past time, like 2010-2011 :(!
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
http://i.imgur.com/qcCKZ67.png
PHP Code:
class GetRoomEntryDataMessageEvent : IPacketEvent
{
public void Run(Client client, MessageEvent msgEvent)
{
client.SendComposer(new UsersMessageComposer(client.LoadingRoom.Actors.Values));
client.LoadingRoom.AddActor(client);
client.CurrentRoom.SendComposer(new UsersMessageComposer(client.RoomActor));
}
}
PHP Code:
public UsersMessageComposer(RoomActor actor)
: base(28)
{
AppendVL64(1);
SerializeActor(actor);
}
public UsersMessageComposer(ICollection<RoomActor> actors)
: base(28)
{
AppendVL64(actors.Count);
foreach(RoomActor actor in actors)
{
SerializeActor(actor);
}
}
private void SerializeActor(RoomActor actor)
{
AppendVL64(actor.Client.Player.Id);
AppendString(actor.Client.Player.Username);
AppendString(actor.Client.Player.Motto);
AppendString(actor.Client.Player.Figure);
AppendVL64(actor.VirtualID);
AppendVL64(actor.X);
AppendVL64(actor.Y);
AppendString(actor.Z.ToString());
AppendVL64(actor.Rotation);
AppendVL64(1); // TODO: BOTs, PETs etc.
AppendString(actor.Client.Player.Gender);
AppendVL64(5); // xp not used in flash...
AppendVL64(-1);
AppendVL64(-1);
AppendString(""); // pool figure
}
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
http://i.imgur.com/LOnyWlE.png
http://i.imgur.com/fyQOYjf.png
PHP Code:
public PopularRoomTagsResultComposer(int history, ICollection<RoomCategory> categories)
:base(452)
{
AppendVL64(history);
AppendVL64(categories.Count);
foreach (RoomCategory category in categories.OrderBy(x => x.PlayersInside))
{
AppendString(category.Name);
AppendVL64(category.PlayersInside);
}
}
A little note: I think the history int is used for the navigator history. In R35 navigator there was a history. If you clicked through tabs, you had a button that would you take back to the previous tab you clicked. Useless in my opinion, but certainly cool.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
@Glaceon I'm really excited with this development.
GitHub already?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Omg so amazing, some beta?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
saamus
@
Glaceon I'm really excited with this development.
GitHub already?
There's a Github already, but it's private.
Quote:
Originally Posted by
vReaper
Omg so amazing, some beta?
No BETA yet until more features are finished. It depends on how much I code from day to day, I can't guarantee a BETA date yet... though I hope one can be put online in around 2/3 months.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Very great work ! I like it ! :D
I have something about Shockwave ! A little utility, who work like Bittorent/uTorrent when i click on a magnet link (Enter on hotel).
With this, you must install a little silent utility and when you click on the "Enter>>", a new beautiful popup is displayed with hotel ! But i haven't finish this...
But i thinks it's a really good solution !
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
No updates for the week, I'll definitely post some next weekend. I have my last week of my internship and got some work left to do for school. Also, #rip to my subscription, it was fun while it lasted... now I'm just another Alpha Male (wonders me, is there an Alpha Female??)
If there's anybody who wants to help I'll maybe put git on public soon but I don't know yet. You can always hit me up if you want to help.
I hope y'all have a wonderful week.
Quote:
Originally Posted by
pipitt05000
Very great work ! I like it ! :D
I have something about Shockwave ! A little utility, who work like Bittorent/uTorrent when i click on a magnet link (Enter on hotel).
With this, you must install a little silent utility and when you click on the "Enter>>", a new beautiful popup is displayed with hotel ! But i haven't finish this...
But i thinks it's a really good solution !
Sounds interesting, but the thing is that the "install something for a hotel" thing is all what really matters.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Amazing, don't let this project die. The R35/36 BETA is my favorite version and always will be!
Keep going dude :)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
'Cause I promised:
http://i.imgur.com/TtKqPUy.png
PHP Code:
class ObjectsMessageComposer : MessageComposer
{
public ObjectsMessageComposer(ConcurrentBag<Item> floorItems)
: base (32)
{
AppendVL64(floorItems.Count);
foreach (Item floorItem in floorItems)
{
SerializeItem(floorItem);
}
}
private void SerializeItem(Item item)
{
AppendVL64(item.Id);
AppendVL64(item.Definition.SpriteId);
AppendVL64(item.X);
AppendVL64(item.Y);
AppendVL64(item.Rotation);
AppendString(item.Z.ToString());
AppendVL64(0); // Not used AT ALL
AppendString(item.Data);
AppendVL64(-1); // Not used AT ALL
}
}
(the 'Not used AT ALL' isn't a joke; they really aren't used in the SWF...)
PHP Code:
client.SendComposer(new ObjectsMessageComposer(client.CurrentRoom.GetFloorItems()));
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
When are you going to start with the pathfinder?
Looks good.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
vReaper
When are you going to start with the pathfinder?
Looks good.
Whenever room loading is fully done I think.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Nice to see this progressing well, keep it up
(Also: do you want to be a part of a super secret developer discord? PM me)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Wall items work correctly now too:
http://i.imgur.com/FcM8hfQ.png
PHP Code:
class ItemsMessageComposer : MessageComposer
{
public ItemsMessageComposer(ConcurrentBag<Item> wallItems)
: base(45)
{
AppendVL64(wallItems.Count);
foreach (Item wallItem in wallItems)
{
SerializeItem(wallItem);
}
}
private void SerializeItem(Item item)
{
AppendString(item.Id.ToString());
AppendVL64(item.Definition.SpriteId);
AppendString(item.Wallposition);
AppendString(item.Data);
}
}
All is from database too, nothing is hard-coded! (thought it'd be worth mentioning...)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Cool you got past entering rooms :p
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
Cool you got past entering rooms :p
Nice work josh, i hope more updates soon :w00t:
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
Cool you got past entering rooms :p
Cool, you don't act like a noob for once ;p
(don't throw a boomerang, it will always return ;))
Just kidding.
Quote:
Originally Posted by
Amariconao
You are a good coder. But a little idiot too.
Nice work josh, i hope more updates soon :w00t:
Don't call my homeboy an idiot!! But thanks ;p
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
You are a good coder. But a little idiot too.
Nice work josh, i hope more updates soon :w00t:
It's a running joke. :P:
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
It's a running joke. :P:
Ah, sorry, I thought you really told him, To have comments like this would put me back on a project like this. I will delete my last comment and Hope u2 good luck with ur proyects!
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
http://i.imgur.com/eX9hUCW.png
http://i.imgur.com/uRouMOy.png
http://i.imgur.com/LteaK2v.png
I forgot to add the one with one throne after first purchase to imgur... but you get the deal; it works.
If there are any SWF "hijackers" who are willing to modify the Habbo.swf for me for some stuff contact me.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I pretty like how the far the development it's going.
I'm pretty anxious for new updates and feature for this emulator.
It's been, what? 3 weeks? or 4 weeks? And we just have basics catalogue yet? xD
I'm too much anxious..
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
saamus
I pretty like how the far the development it's going.
I'm pretty anxious for new updates and feature for this emulator.
It's been, what? 3 weeks? or 4 weeks? And we just have basics catalogue yet? xD
I'm too much anxious..
Eh what? You're... anxious? I don't really know what you're trying to say.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Eh what? You're... anxious? I don't really know what you're trying to say.
I think he might be high on something since I also don't really understand what he is trying to say.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Wuzix
I think he might be high on something since I also don't really understand what he is trying to say.
Probably, but I think he meant to say excited haha. Pretty sure the two words work interchangeably in Brazilian.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Probably, I mean, it would be weird if he actually was anxious o_O
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Probably, I mean, it would be weird if he actually was anxious o_O
I mean, I'm excited. Not anxious, my bad.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Navigator search works (for now) as good as possible.
The rooms I have:
http://i.imgur.com/XIjpfcI.png
When I search on "Josh":
http://i.imgur.com/q2WPuU7.png
When I search on my player name (Raiden):
http://i.imgur.com/N2fz67f.png
(don't get fooled, the "Search users" thing doesn't do anything)
Super small snippet:
PHP Code:
dbConnection.SetQuery("SELECT * FROM rooms WHERE name LIKE [MENTION=111754]search[/MENTION] OR owner_id IN (SELECT id FROM players WHERE username LIKE [MENTION=111754]search[/MENTION])");
dbConnection.AddParameter( [MENTION=111754]search[/MENTION]", "%" + search + "%");
result = dbConnection.GetTable();
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Love the mention inside your code tag :)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Yesser
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
Dear not developer of (both?) Aurora(s),
The person in question can ask that same question by himself. However, it's not like his emulator is that known by everybody. In fact it's forgotten and out dated.
(I actually had to Google it first to make sure I didn't post anything stupid. As it turns out: I'm glad I did!)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Yesser
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
If it was active, well known or something, I would've known it. Since it's not, I didn't and so I won't change it.
If that owner wants me to rename it, I'd be glad to. But then that person has to ask it for himself.
Quote:
Originally Posted by
Joopie
Love the mention inside your code tag :)
Urgh why is this still a thing? RZ should fix this... why would you want to mention anybody in a CODE/PHP tag lol.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
A small update:
Rooms before room icon save:
http://i.imgur.com/SLmgUka.png
What I change the icon into:
http://i.imgur.com/dG6XWkG.png
Rooms after room icon save:
http://i.imgur.com/N5edzZv.png
(NOTE: IGNORE the UberEmu and Bfly githubs, NO code is taken from it, only reference to packets!)
PHP Code:
string query = "UPDATE rooms SET ";
MySqlParameter[] parameters = new MySqlParameter[columns.Length + 1];
for (int i = 0; i < columns.Length && i < values.Length; i++)
{
if (i > 0)
query += ", ";
query += $"{columns[i]} = @{columns[i]}";
parameters[i] = new MySqlParameter($"@{columns[i]}", values[i]);
}
query += " WHERE id = @ roomId";
parameters[parameters.Length - 1] = new MySqlParameter("@ roomId", Id);
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
A small update:
Rooms before room icon save:
http://i.imgur.com/SLmgUka.png
What I change the icon into:
http://i.imgur.com/dG6XWkG.png
Rooms after room icon save:
http://i.imgur.com/N5edzZv.png
(NOTE: IGNORE the UberEmu and Bfly githubs, NO code is taken from it, only reference to packets!)
PHP Code:
string query = "UPDATE rooms SET ";
MySqlParameter[] parameters = new MySqlParameter[columns.Length + 1];
for (int i = 0; i < columns.Length && i < values.Length; i++)
{
if (i > 0)
query += ", ";
query += $"{columns[i]} = @{columns[i]}";
parameters[i] = new MySqlParameter($"@{columns[i]}", values[i]);
}
query += " WHERE id = @ roomId";
parameters[parameters.Length - 1] = new MySqlParameter("@ roomId", Id);
What the fuck is this injectable query...
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
saamus
What the fuck is this injectable query...
How is it injectable if I use MySqlParameter? Also, please don't quote my whole post if it's a big post with images.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I think use += for the string query is not the best way.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
I think use += for the string query is not the best way.
Then what? There's no way to generate a query based on parameters of a function (which will only be made in the emulator, without user input, and the user input there is is stored in MySqlParameter) without using +=.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Then what? There's no way to generate a query based on parameters of a function (which will only be made in the emulator, without user input, and the user input there is is stored in MySqlParameter) without using +=.
I said for concat string, i always prefer to use a stringbuilder or something like that
https://stackoverflow.com/questions/...tenate-strings
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
So what does the StringBuilder class do better than a "+=" operator in this scenario?
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Boraida
So what does the StringBuilder class do better than a "+=" operator in this scenario?
I dont know what is the max lenght of columns will be, but is a question of permormance. I give you a stackoverflow post for read, not for state there and be beautifull...
https://stackoverflow.com/a/74233
PD: I know use StringBuilder will not be the best way, but i dont know what is the lenght of the columns you use on the for, but think on it, use the best way can save your ass a lot of times
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Boraida
So what does the StringBuilder class do better than a "+=" operator in this scenario?
Not returning a new string when appending.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
The General
Not returning a new string when appending.
TRUE!:love:
As martinmine say on his post: http://forum.ragezone.com/f331/write-emulator-991142/
Understand what happens under the hood
If you want to write effective code, you must understand what happens under the hood of the code you are using.
Write maintainable code
Under the hood isn't the same use strings.Join(), StringBuilder or +=, and i have to say StringBuilder
is the easiest code to keep, in my thinking
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Okay, I will use StringBuilder then. As for how much columns, it can be either 1, 2, 3 or like 8. It depends on where you use it.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Okay, I will use StringBuilder then. As for how much columns, it can be either 1, 2, 3 or like 8. It depends on where you use it.
You can try with string.Join(STR, ",") it will be better too :p
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Sorry for the lack of updates. I simply have had a hard time with school, and after that I needed some rest. Now, other personal things are on my mind (things, much much much more important than Habbo stuff). I would love to explain it, but nobody cares anyways (you can send me a PM, if you want to know, no promises I'll explain it though).
@spreedblood was working on pathfinder and I'll most likely get back pretty soon. I had an annoying bug last time I worked on Aurora, which prevented me from working nicely (I could build the emulator once, then it'd give me errors saying "could not copy obj/....exe to bin/.....exe").
Just so you know, the emulator development isn't stopped, I just wasn't up for it. I still am not, but I should continue someday. So it doesn't hurt to start.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Achievements, I hope Aurora Plus Like You See ...
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Sorry for the lack of updates, we've both been busy with irl and I decided to pick up on where we left. I've started rewriting the source and from now on we don't use the 'GetInstance()' that created an instance of the class and followed the singleton pattern but instead (credits to @Joopie) I started reading up on Dependency Injection. I'm now using a IoC container (DI Container) called Autofac. I associate every controller with an interface and then setup the controllers.
PHP Code:
ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<MainController>();
builder.RegisterType<ControllerLocator>().As<IControllerLocator>();
builder.RegisterType<CatalogController>().As<ICatalogController>();
builder.RegisterType<ClientController>().As<IClientController>();
builder.RegisterType<ItemController>().As<IItemController>();
builder.RegisterType<MessengerController>().As<IMessengerController>();
builder.RegisterType<NavigatorController>().As<INavigatorController>();
builder.RegisterType<PlayerController>().As<IPlayerController>();
builder.RegisterType<RoomController>().As<IRoomController>();
builder.RegisterType<TaskController>().As<ITaskController>();
builder.RegisterType<WordfilterController>().As<IWordfilterController>();
Container = builder.Build();
Controller = Container.Resolve<MainController>();
Controller.SetupControllers();
I've then created a controller locator that I pass as a parameter to the main controller which then locates for me all the controllers.
Screenshot: Screenshot by Lightshot.
I'm fairly new to Dependency Injection and I'll continue reading up on this.
I've also made a Task controller that can execute periodic tasks for me, it's currently being used in the cycling of the rooms. You can currently walk around but there's something wrong in the a* algorithm where it won't find the path to the last point. Once I've done that I'll include some screenshots. :) (Thanks to @Joopie for pointing out Dependency Injection).
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I want to clarify something, I will wait until @spreedblood is done with the updated source. Also, then I don't know how long it'll be. I just started my work so I have to get used to long days again. I might start on a CMS on Symfony in the weekends, if I feel like.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
I might start on a CMS on Symfony in the weekends, if I feel like.
One project at a time or it'll end up like every other project you've done. Get the emulator to a stable state before even considering working on a CMS.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
NoBrain
One project at a time or it'll end up like every other project you've done. Get the emulator to a stable state before even considering working on a CMS.
Good thing we're 2 people on this project of his :wink:
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
spreedblood
Good thing we're 2 people on this project of his :wink:
The focus on the emulator is main prio, what josh can is a simple cms with a client. that just it :)
i wish everyone goodluck with this.!
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Is this in .net core so we can finally have something running on linux written in C#? (its 2017 guys...)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
maritnmine
Is this in .net core so we can finally have something running on linux written in C#? (its 2017 guys...)
Concidered it, might do it. If @spreedblood can get all the stuff working on .NET Core. I fully agree with you though.
Quote:
Originally Posted by
NoBrain
One project at a time or it'll end up like every other project you've done. Get the emulator to a stable state before even considering working on a CMS.
A simple CMS with login, register and a client (MAYBE, just maybe, simple news), isn't a big project. Besides, with Symfony those things are done easily. And @spreedblood is working a lot on the emulator, and I'm settling in with work (started last week, it's tough getting back to 8 hours of work after doing nothing for 2 months). Anyways, once @spreedblood is done rewriting the source and doing DI, I'll continue on the emulator as well. But once the emulator is in a stable state there has to be a simple CMS for it for a BETA test, so why not write one while I'm waiting for the emulator rewrite. I might think in a weird, maybe stupid way, but I feel like this is a decent plan. Of course I understand you, I do, but I don't agree.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Concidered it, might do it. If @
spreedblood can get all the stuff working on .NET Core. I fully agree with you though.
Last time I checked, NHibernate does not support .net core yet. Considering their low activity, I actually doubt they ever will. Its an old and slow ORM. If you consider switching, Entity Framework Core is a much better option. I do however see that Log4net already supports .net core (please remind me why we need a dependency for printing to the console?).
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
maritnmine
Last time I checked, NHibernate does not support .net core yet. Considering their low activity, I actually doubt they ever will. Its an old and slow ORM. If you consider switching, Entity Framework Core is a much better option. I do however see that Log4net already supports .net core (please remind me why we need a dependency for printing to the console?).
Tapatalk notification woke me up :wink: For log4net you got a point. And as for .net core the emulator is up and running on .net core. I havn't contributed to git yet though I will soon after I've done a few modifications. The emulator is being developed on Ubuntu right now! DotNetty and Autofac are both our primary libraries that are being used and they are both being supported on .net core so I guess we're alittle lucky? :wink: I'm really happy you pointed out using .net core and I'm in love.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
maritnmine
Last time I checked, NHibernate does not support .net core yet. Considering their low activity, I actually doubt they ever will. Its an old and slow ORM. If you consider switching, Entity Framework Core is a much better option. I do however see that Log4net already supports .net core (please remind me why we need a dependency for printing to the console?).
Don't ask me; I was suggested to use Log4net, and about the whole NHibernate, we're not using it anymore. It might change in the future though, not 100% sure. We've both been busy with other stuff, I with work and @spreedblood with school and stuff. Part of the source was working on .NET Core as far as I know.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Don't ask me; I was suggested to use Log4net, and about the whole NHibernate, we're not using it anymore. It might change in the future though, not 100% sure. We've both been busy with other stuff, I with work and @
spreedblood with school and stuff. Part of the source was working on .NET Core as far as I know.
Nice to know, another your project dead again.
I don't know why.. still open projects when you haven't time to finish them.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Kyle Betts
Nice to know, another your project dead again.
I don't know why.. still open projects when you haven't time to finish them.
Just because we're busy doesn't mean project is dead. It will definetely not die untill it is completed 100%. None of us are interested in quitting right now, though we're just slowing pace. It's not being worked on as quick as earlier though it is being worked on.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Kyle Betts
Nice to know, another your project dead again.
I don't know why.. still open projects when you haven't time to finish them.
I have time to finish it. It's not like there's a stupid customer who paid millions of dollars for this saying I have to finish it in one month. If I take another year, I take another year. I don't have a deadline, nor there will ever be one simply due to the fact life can throw things at you at random times.
No, it's not dead. I still have to wait until the GIT repository is updated, which @spreedblood does when everything's working with .NET Core. Until then, I'm not going to continue (not knowing other modifications he'll make).
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
It finally happened: an update.
http://i.imgur.com/hyorUZp.png
Before for some reason multiple users didn't work really well, now it should work good (it surely has to be tested some more). Part of item placing has been done by @spreedblood, yet it's not good enough to show off (no negativity intended, it's not fully finished).
I will finish up some small features, like dancing, waving etc. Also, we've updated to R38 @spreedblood wanted it, because of clothes, which seems fair, also R38 is still good enough for me).
--
Oops, I just noticed the bug. Will be sorted out.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Wow,... God bless this update !
Have you a Github for follow your work ? :)
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
pipitt05000
Wow,... God bless this update !
Have you a Github for follow your work ? :)
Unfortunately, during early development, the source is only available to team members and developers. When most of the basic stuff is done, and it's ready for a basic hotel, the Github will be public. For now, it remains private.
Thanks for your comment :).
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Rotating placing + picking up furni is done now. Just noticed an issue with the pathfinder algorithm that I will look more into later on. For now I'll be working on furni interactions.
-
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]