The packets for bb are the same....
Posted via Mobile Device
The packets for bb are the same....
Posted via Mobile Device
I just had a look at your code and I would like to give you some tips regarding coding structure.
- NEVER use public unless its in a DLL file or like Dispose() using IDisposable
- Having one space between each method makes it easier to read
- Left click in code -> Organize usings -> Remove and sort
- Using a Dictionary instead of an array saves you A LOT of ram
- And looking at your catch statement in the socket, why not call
Core.ClientManager.RemoveClient(this);
instead of
Core.ClientManager.RemoveClient(mID);
? Its waste of time getting the instance to the object when the method is called from the object you are reffering to.
- Use structs instead of classes while storing data
- If built on annother system, try and keep the same coding layout
Annyways, good luck Audun ;)
- Martin
Thanks Martin, I'm still a beginner in coding :)
how did i know you were gonna talk about ram
you can be my ram bitch ^^
Here is my battleball progress:
List games - 100%
Create games - 75% (no powerups)
View game info - 99%-100% (some unknown part of packet)
Join game - 100%
Switch team - 100%
Leave game - 100%
Kick player - 100%
Start game - 5%
I'm recoding big parts of the bb code because it got too messy.
Nice progress AWA :)
Are you going to make it so we can use the other maps or are you just doing the orginal map? :-) aLso great progress are you just guessing the packet structure or using holo :-)
Posted via Mobile Device
I'm gonna add all maps, and I use most packets fro Holograph, someone are different.
Seams to be working fine for me. (one of my many unreleased stuffs)
http://img.sharefast.net/1299604677647160871836.jpg
http://img.sharefast.net/1299604700105326923328.jpg
Nice Progress so far
My listing code:
PHP Code:private void HANDLER159() // "B_" - Get game list
{
mResponse.Init(232); // "Ch"
// open games
List<VirtualGame> games = mRoom.mLobby.GetGames(VirtualGameState.Open);
mResponse.AppendWired(games.Count);
foreach(VirtualGame game in games)
{
mResponse.Append(game.ToFuseString());
}
// running games
games = mRoom.mLobby.GetGames(VirtualGameState.Running);
mResponse.AppendWired(games.Count);
foreach (VirtualGame game in games)
{
mResponse.Append(game.ToFuseString());
}
// ended games
games = mRoom.mLobby.GetGames(VirtualGameState.Closed);
mResponse.AppendWired(games.Count);
foreach (VirtualGame game in games)
{
mResponse.Append(game.ToFuseString());
}
SendResponse();
}
PHP Code:public string ToFuseString()
{
Response r = new Response();
r.AppendWired(mID);
r.AppendString(mName);
r.AppendString(mOwner.mHabbo.mName);
r.AppendWired(mMapID);
return r.ToString();
}