After having kinda hi-jacked the New Actions thread for Photon, I thought I start anew here.
This is action more like a diary for ME, than anything, So EXCUE HUGE POST:
Please skip to second post for simple question.Jean has offered to give me a hand when he has a moment, but for now Im trying to do a few things to the basic Photon Demo (
https://hutonggames.fogbugz.com/default.asp?W927).
The changes I want to make are.
1. remove chat
2. remove all start-up interface (choose room, name player etc) to trick the player into thinking they are in a single player game.
3. Restrict to 4 players, (5th player to join should create a new room)
4. 4 separate spawn positions in the game, and...
5. 4 different models/ dialogues, animations, totally different stories infact.
Stage One: Removing Stuff from the demo.The DemoWorker demo has 6 Game objects
1. The first is simply
Unity stuff (light ground etc) + 1 FSM that simple turns on message queing
(I dont really know what this is except that I think its just turns the whole network s*** on... so I left it here..)
2.
Chat. I just switched this off, It didn't
stay off, but then you need to look at GameObject 3.
3.
Enabler. This simple FSM, just seems to turn on or off the required items... including destroying the menu when you are done with it... As of Now I dont think it has ANY OTHER function than to check if you are in a room, and if you are, remove the menu, if not show the menu. As I will NOT be wanting a menu AT ALL I will probably have to come back to this but for now, I just turned off the Chat.. and tested...
Part 1 of my requirements ACHIEVED!
4. The 4th Game Object
Game, has the FSM responsible for Spawning the player, its here I will no doubt come back to for counting the amount of players and spawning to different locations and using different Player Models, and has FSMs for checking if all is OK (whether we are in a room yet,) and displaying messages, and the Quit button. I can leave all this in for now, although the quit button currently takes you back to the menu (which I hope to remove) So I will have to come back to this, and see what to do here...
5. OK.. here it all is... the
Menu or.. "the good stuff". Here I want to try to remove things, but still have them working...
It has 8 FSMs attatched.
Connection, Connects and displays short messages.. I'll leave that
Connection failure button, to try again if connection fails... I'll leave that too... for now...
Create room Is important, as its a button to create the room... Ill need to Create the room, but, dont want people to know thats what they are doing.. So... on the Photon Network Create Room Action, I Add a hard-coded Room Name "Main" and change Max Number of Players to 4.
Ill turn off the Text field that allows you to choose a room (this doesnt work anymore anyhow) and change the name of the button from GO... to START. This will LOOK like a game start button, but actually its Creating a room, called "Main".
The remaining FSMs on the
Menu game object are all about joining to rooms you have crated, listing the current rooms, and displaying Server information...
Join random room (dont want to do this)
Join room by title (dont want to do this)
Main Menu (seems to be just about NAMING your character, for the chat function... )
Room List Gui (displays the list of created room, I dont want this, Ive created one behind the scenes called "Main" .. and later will hope to create more rooms in the background, so that more than 4 players can play... MAin2 Main 3 etc... Ill get back to this)
Server Stats Gui (displays stats)
QUESTION... CAN I JUST TURN THEM ALL OFF?
I try... and... Its fails
The first instance works, I get a START button then a character spawns, BUT, its hard-coded to create a room called "Main" so when I launch a second instance of the game, it fails..
Why.. because the only button I have left is the Create Room Button, that I have renames to START, so in other words, I am trying to create a "main" room twice. So I think I need to look back at my turned off FSM called Rooms list... turn off the gui stuff, but use the " do we have rooms" action, currently only resolving to YES, and listing the rooms, If I can miss that out and go straight to Join Room (Photon network Join Room) I can add a NO option, where I add the Create Room thing from the Creat Room FSM.
Ill make BOTH buttons read START, so they will LOOK the same for all player, but actually the First Player, will be creating a room called "Main" and the second will be joining a room called "Main"..
Off to try now...