HabboWarfare [RP] [DEVELOPMENT]

Status
Not open for further replies.

Crup

weeeeee
Jul 25, 2010
545
310
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.
 
Feb 1, 2014
165
137
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.

Thank you for the feedback, will have a go at shadowing.
As for the CMS, I will integrate some aspects of Habbo as requested. :)
 

Ryno

New Member
Jul 7, 2010
3
1
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);
            }
        }

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!
 
Feb 1, 2014
165
137
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!

I shall optimize my code now. :)
Thank you! I shall take the into consideration then!
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Just some friendly advice. Rooms have a task ran every 500ms (must not exceed).

A few suggestions:
  • 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).
I also agree with the use of an Interface for your game modes, I think I suggested this to you a while ago.

(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.
 
Feb 1, 2014
165
137
UPDATE [12/07/2014]

Completed the new UI, although a few things are being changed and added.
Killstreaks are currently being coded, helicopter being the first.
10441979_911241292236223_4810390218890582004_n.png
 
Feb 1, 2014
165
137
Just some friendly advice. Rooms have a task ran every 500ms (must not exceed).

A few suggestions:
  • 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).
I also agree with the use of an Interface for your game modes, I think I suggested this to you a while ago.

(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.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
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.
 
Feb 1, 2014
165
137
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.

I don't recall the conversation. :/
Yes it will be a furniture once I have the correct size for it. Never thought about that, but I will try educate myself about it.
Cheers for the ideas.
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
Thread cleaned. If you want to bicker like kids, take it to PM.

Keep on topic.
 
Feb 1, 2014
165
137
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! :)
 

Mega

Posting Freak
Mar 23, 2013
858
155
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! :)
I'm adding you, hope u accept me.
OT:
Ohh, thats sad.
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
Thread will no longer be updated according to OP. If you want the thread re-opened, PM me.

/closed
 
Status
Not open for further replies.

Users who are viewing this thread

Top