nolongerinuse
2005
- Feb 1, 2014
- 165
- 137
- Thread starter
- #21
Oh! hahaha Guess you get to see a few things earlyLet's say.. I'm in your Hamachi group. lol
Oh! hahaha Guess you get to see a few things earlyLet's say.. I'm in your Hamachi group. lol
This has potential and your cms does look very nice despite it not looking habbo-ish. Your ccts looks a little bland, a bit of shading to it will make it look better but if anything, good luck.
Code:internal void DFStartGameLooper() { if (!DFArenaRunning) { ThreadStart start = () => DFGameHandler(); DFRunGame = new Thread(start); DFRunGame.Priority = ThreadPriority.Lowest; DFRunGame.Start(); this.DFArenaRunning = true; } else { return; } } internal void DFGameHandler() { while (true) { try { if (PlayersDead >= 4) { Plus.PlusEnvironment.GetGame().GetClientManager().DFMessage("Fallback soilders, the opposition has overtaken the airspace."); Plus.PlusEnvironment.GetGame().GetClientManager().DFMessage("It's all over, he got the best of us."); Thread.Sleep(1000); Plus.PlusEnvironment.GetGame().GetClientManager().DFLoadRoom(50); } if (Session.GetHabbo().DFDead == false && PlayersDead >= 4) { Session.GetHabbo().MatchWins += 1; return; } } catch (Exception e) { Console.Write(e.ToString()); } Thread.Sleep(500); } }
internal void DFStartGameLooper()
{
if (!DFArenaRunning)
{
ThreadStart start = () => DFGameHandler();
DFRunGame = new Thread(start);
DFRunGame.Priority = ThreadPriority.Lowest;
DFRunGame.Start();
this.DFArenaRunning = true;
}
else
{
return;
}
}
internal void DFStartGameLooper()
{
if (DFArenaRunning) return;
ThreadStart start = () => DFGameHandler();
DFRunGame = new Thread(start);
DFRunGame.Priority = ThreadPriority.Lowest;
DFRunGame.Start();
this.DFArenaRunning = true;
}
I had to reset my account password just to comment on this.
In terms of practice you aren't doing too bad, I just don't like the style. The problem with coding big things is you end up with a lot of if statements and you end up indenting code perhaps 10 times. To me that's just silly. For example:
Code:internal void DFStartGameLooper() { if (!DFArenaRunning) { ThreadStart start = () => DFGameHandler(); DFRunGame = new Thread(start); DFRunGame.Priority = ThreadPriority.Lowest; DFRunGame.Start(); this.DFArenaRunning = true; } else { return; } }
You could just replace this to
Code:internal void DFStartGameLooper() { if (DFArenaRunning) return; ThreadStart start = () => DFGameHandler(); DFRunGame = new Thread(start); DFRunGame.Priority = ThreadPriority.Lowest; DFRunGame.Start(); this.DFArenaRunning = true; }
It also seems your GameHandler never ends? They can win the game but the thread still runs? I think if you want to make this system work you should almost abstract most of your code, I'm sure most of your games will run the same sort of systems, i.e. Lobby > GameHandler > Match End. I suggest you make all your games implement an interface.
This looks like an okay project but so far the only thing I like about it is the CMS design, it's clean and very orientated. I just don't think you should make it open-world, you are basically making a generic RP with better mini-games. Either focus on the CoD and BF and create even better games or focus on RP. Don't mix and match.
Ryno - Out!
Just some friendly advice. Rooms have a task ran every 500ms (must not exceed).
A few suggestions:
I also agree with the use of an Interface for your game modes, I think I suggested this to you a while ago.
- Use tasks instead of threads. (You could even implement methods within the room process task).
- Use tick counters rather than thread sleeps.
- Use enums for game states (this is kind of a personal suggestion).
(Another little suggestion which is an easy way out, you could utilize the main game thread that is used within Plus and have methods to cycle there, however I'd not suggest it for game modes).
Nice job, keep it up.
Nope, we haven't spoken since whenever.
Anyway thanks for the feedback and I will.
I suggested it months ago.
--
For your helicopter, you could create it as a furniture and use the SlideObjectBundleMessageComposer to move the helicopter is a nicer fashion. You could also update the height in real-time to give it an even better effect.
Thank you.Thread cleaned. If you want to bicker like kids, take it to PM.
Keep on topic.
I'm adding you, hope u accept me.No longer updated this thread since I can't stand the staff members here and they act like children.
If you want to keep updated ,follow the Facebook page instead, it's ashame but Quackster is already being silly about it and acting like a child for no reason.
Don't blame me, I might open a thread upon the rival forums!
Add me on skype for more updates too or if you want to help towards HabboWarfare: FrancisJoseph15.
Peace!