Author Topic: Back to Tnet !? Some questions before.  (Read 3986 times)

m_stolley

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Back to Tnet !? Some questions before.
« on: April 14, 2016, 04:18:55 AM »
Hi,

i just saw that Tnet was updated and downloaded it and have some questions.

Can i or better how can i use Tnet in a multiplayergame mit some scenes where some players play at the moment in some scenes and others in different scenes?

With Unitys own Unet i only can have multiplayergames with one scene at the time with the actual version but that is not how i want my game.

Only the players can change the scenes from isles to isles.

Then i saw in Windward that even if i start a singleplayergame i can allow my steam friends to connect to this game.
How was this done?
So is the Singleplayergame also a multiplayergame?
Or is this something that is depending on the steam sdk?
I am mostly interested to release at steam too.

Can i use other assets i bought from the assetstore to allow players for example to talk by push a button with each other or filter bad words out of the chat?
What do i have to look at to get this to work?
Can i use Tnet also with UMA2?

How can i use things in the multiplayer menu to limit the players to 16 or 4 or so?
How can i put in a password to only let friend inside if i the player use his own server with the server.exe?

Can i customize the server.exe in some way?

What do i have to look at so that an Iphone user can start a game made with Tnet, choose to play multiplayer, so start the game as a server and then an Android user can play with him or the other way around?

Oh and i wish i could also use World Streamer
https://www.assetstore.unity3d.com/en/#!/content/36486
together with Tnet. Does anything look that it does not work with Tnet for example the floating point error fix system that i want to use?

Thank you for making nice assets.

With kind regards

Mathias


Edit:
I am stil at reading the documentation and found something very interisting so i have new questions.
Can i use the datanode not only to add content to a game but exchange for example prefabs or shaders?

I thought about something like skins for games like make a low poly version for lower spec computers and then give away skins so the low poly versions will be changed to high poly versions and better shaders. So everyone can have the game run fluently and also can play together but the look can be different.
That way maybe others can make also free skins for the games.

Does Tnet support also AppleTV?

Edit2:

Ok, read about possible ios problems so AppleTV is a maybe.

Also i read more about the datanode and beginn to look at your Windward modding tutorials. So i know i can use prefabs for it and i think it will be ok to stay with the standard unity shader.

About the server.exe customization i read that i can build it by myself from unity so i can customize it i think.

The other questions are still interesting.
Also i know that there are limitations with ios i am interested in making the game so that players can play with each others from different platforms.
So maybe ios but at least pc, mac, linux, hopefully android and perhaps more if you support it in the future.

Then i have one more question but i think i have read that i can use it but i am a little unsure here.
I want to animate my characters with mecanim. Can i use it with Tnet?
I read that i just can send or call the mecanim propertys so i think i can.
But what is with moving/animation prediction and such so the animations are lookink mostly good and not stutter or the objects even jumps suddenly?
« Last Edit: April 15, 2016, 04:01:06 AM by m_stolley »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Back to Tnet !? Some questions before.
« Reply #1 on: April 15, 2016, 08:17:32 AM »
Quote
Can i or better how can i use Tnet in a multiplayergame mit some scenes where some players play at the moment in some scenes and others in different scenes?
Each channel you join with TNet is separate. You can have thousands of channels, and as such thousands of private games on one server if you like.
Quote
Then i saw in Windward that even if i start a singleplayergame i can allow my steam friends to connect to this game.
How was this done?
So is the Singleplayergame also a multiplayergame?
Or is this something that is depending on the steam sdk?
I am mostly interested to release at steam too.
I used TNet. Steam's networking is separate. When calling TNServerInstance.Start you can specify it with no parameters, meaning it will be a virtual private server (no sockets used), or you can specify a port to listen to. If you specify a port, friends will be able to connect to your game. I used Steam's API only to set a visible "status" that has information regarding what IP and port is used so that other clients are able to join via a direct connection.
Quote
Can i use other assets i bought from the assetstore to allow players for example to talk by push a button with each other or filter bad words out of the chat?
TNet doesn't limit you by what you can send. You can send binary data in your RFCs that you can then play back as audio, or you can send strings that you can then filter and display in your chat window. TNet has an example of a chat window.
Quote
What do i have to look at to get this to work?
Follow the tutorials. :)
Quote
Can i use Tnet also with UMA2?
I am not familiar with UMA2.
Quote
How can i use things in the multiplayer menu to limit the players to 16 or 4 or so?
You can specify a player limit on channels.
Quote
How can i put in a password to only let friend inside if i the player use his own server with the server.exe?
You can specify a password on channels too.
Quote
Can i customize the server.exe in some way?
Yes, its project files are included with TNet, although I never had to with Windward. You can do just about everything without modifying it.
Quote
What do i have to look at so that an Iphone user can start a game made with Tnet, choose to play multiplayer, so start the game as a server and then an Android user can play with him or the other way around?
Nothing. It will work fine. If using LAN discovery though, you will want to set both to use the same broadcasting method: TNet.UdpProtocol.useMulticasting = true/false.
Quote
Oh and i wish i could also use World Streamer
You can. TNet 3 supports multiple channels, so you can join/leave channels at will as you explore your world. If each terrain tile has a position, you can use that as a channel ID -- so as it loads a new terrain, you also join that channel. The player will travel between channels as he explores the world. TNet comes with an example showing how this is done.
Quote
Can i use the datanode not only to add content to a game but exchange for example prefabs or shaders?
DataNode can serialize anything that's serializable. It's not possible to create surface shaders at run-time without some epic hacks, so shader code is not serializable. References to shaders in the Resources folder are, however. You can also export as Asset Bundles embedded in DataNode -- this will let you export everything, including shaders.
Quote
Does Tnet support also AppleTV?
No idea.
Quote
I want to animate my characters with mecanim. Can i use it with Tnet?
Visualization has nothing to do with TNet. TNet is for communication and serialization. Generally what I recommend is to keep animations be local. Don't try to sync them. Generally with mecanim you should be setting vectors that will cause appropriate animations to play anyway -- vectors such as "forward/back axis" and "left/right axis" -- same axes you need to sync anyway when synchronizing movement for multiplayer. As such, animations will be sync'd without you doing anything. Of course when doing something specific such as a jump animation you can always also just send an RFC saying that's what you want to do and inside the RFC trigger that animation.

m_stolley

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Back to Tnet !? Some questions before.
« Reply #2 on: April 15, 2016, 08:43:20 AM »
Thank you ArenMook,

i am glad you answered so fast :)
Nice support!

And i am happy about your answers too.
So i just decided to use your Tnet in my new project.
Comming back then with more questions later ;)

m_stolley

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Back to Tnet !? Some questions before.
« Reply #3 on: April 20, 2016, 09:11:32 AM »
So i have another question becouse i read this thread in the unity forum.

http://forum.unity3d.com/threads/end-of-the-resources-folder.363800/

So if i remember right Tnet use the recource folder, does this mean we can not use Tnet later when unity let us not use the recource folder anymore?
I just start with my new project so it will take a while but am afraid that i put much time in it and later can not use it if for example other new features try to get me into a unity update.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Back to Tnet !? Some questions before.
« Reply #4 on: April 20, 2016, 05:08:31 PM »
TNet isn't relying on the Resources folder. In fact, it's seamlessly able to load DataNode-exported objects from a local drive as if it was a prefab/texture/whatever in the Resources folder. It "just works", and is perfect for modding (since modders obviously can't add stuff to your Resources folder!)