Hello Guys,
I am quite new to Unity and dont know too much about scenes yet.
My game shall have multiplayer and a character creation scene. Now I started to think how to get this going and I came up with two solutions and I dont know which one should be “the one”.
Ive got a scene called “StartMenu” where I can either start my game as a host or search for online games/servers. Lets say I am searching for a game and find one.
Now to my question: After i click “connect to server” do I need to switch to another/different scene?
In the next scene the server should show me my characters(if they exist) that I played on this specific server with or give me the option to create a new one.(To show only MY characters Ill need a login screen or something, I know that already)
The next scene would be the ingame scene where I play the game.
I hope I explained my problem properly, If you need any additional information, let me know
I’m going to offer you some friendly advice about beginning in Unity. I would recommend that you do not start with multiplayer as your first project, even if it sounds like fun. For sure, you can get there, but it would be much better to try building simpler games, and going over some of the Unity posted tutorials on elements of Unity, scripting, and building small games.
Work your way up, as you follow along and practice. You’ll learn how to create menus, change scenes, etc…
I think you will have a far more productive and enjoyable experience taking this route.
Thanks for the advice, but thats not an option All the games I play nowadays are multiplayer only. the ratio is like 99:1 i guess. So multiplayer it is. And even if it takes longer… I dont work for a company or so. I just am a hobbyist and may proceed in my speed anyway. And I dont have the intent to change that. I do it for fun only ^^
If you got a tutorial that explains my situation id like to read/watch it. But I couldnt find anything. I know how to switch scenes and stuff and even forcing all connected clients to change to other scenes when I want to. But I dont know which way I need to go on the issue explained above yet.
I am programming it right now in 2 scenes only and see what I get, unless someone here says “no you need 3 scenes” and explains why ^^
Sure, well I don’t think there’s anything in your post that would require you to change scenes after connecting, only if you wanted to do so.
By the way, I wasn’t suggesting that you give up on a multiplayer game entirely. I was suggesting that you try working on some more fundamental concepts. If you’re sure you’ve already done that, then that’s cool…
After you said I dont need 3 scenes and 2 are enough ive tinkled a lil around with the code,and it works properly. Thanks for the answer
Then ive missinterpreted that I guess I got the basics down, just never had to bother with changing scenes yet except for in between the normal gameworld and dungeons. And I was unsure about the 2/3 scenes thing. Because I couldnt have imagined that the server can be in scene 3 while client is in scene 2. But apperently its possible and now I know
For the record, if you’re using Unity’s networking, a lot of the ‘friendlier’ stuff doesn’t really support being in different scenes (not everyone’s on the same one*).
At least, that’s my understanding of it.
The players will be mostly in the same scene, ill setup a vote once soneone runs into a trigger to go to dungeon a or b. But I want the “normal game world” to be loaded once a player has joined the server and other players can connect to that server but they,obviously, need to create their character first, would be bad to kick everyone from the normal gaming world whenever someone new joins the server
So I carry over the network manager who manges the connection/character creation stuff into every scene but everyting else will be done “where it needs to be”. Well see if my hobby project ever sees the light of day haha