Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: krvc on November 20, 2016, 11:10:08 PM
-
How to create game?
1. channels
i think need main Channel and Game channels.
Game channel must have flag persistens = false
2. neutral monster
i think it need TNManager.Instantiate, and must have flag persistens = true
if player leave, monsters not.
3. Data sending
Game need send data to players.
Q: what better way, use RFC or set get channel data?
4. Game time.
Game need time. i think time must send only 1 player. Need create Empy obj+TNO whith script and check if tno.isMine, when send time to all Players.
5. create players...
oh... its a problem, my prefab have position 0*0*0, but all players have not One spawn position. if i create player in pos much more >0*0*0, when player create in not my position.
it Transform t = go.transform; have conflict whith NavMesh component....
i solved it problem to create prefabs for all players p1 20*20*20 p2 40*40*40, etc...
-
If you want your monsters to remain in the world, then the channel they're in must also be marked as persistent.
Most flexible way of setting individual data is via tno.Set / tno.Get. This lets you set persistent data on individual TNObjects without the need for RFCs, and the amount of data is completely flexible. For example in W2 I set vehicle colors, name of the player that created it and a couple more values when creating the vehicle. Most efficient way is still via RFCs -- but the disadvantage of RFCs is that the number and type of parameters has to remain fixed from the first time you use that RFC.
Game time is TNManager.time.
I don't understand #5.