Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nosyrbllewe

Pages: [1]
1
TNet 3 Support / Re: List<> problem
« on: August 20, 2016, 03:47:06 PM »
I personally prefer to use the System.Collections.Generic.List<>, so here is my solution.

At the top with the rest of the using statements, add:
  1. using S = System.Collections.Generic;
Now when you want to use the System List, you just type:
  1. S.List<string> myList = new S.List<string>();
It is not perfect by any means, but it is easier than typing out the full namespace every time. I just wonder why Aren has named his class in TNet List<> when in NGUI he has another one called BetterList<>. Maybe they could be consolidated into one class into part of something like "Tasharen Standard Assets"?

2
TNet 3 Support / Re: TNet 3 Support Ufps
« on: June 04, 2016, 09:58:34 PM »
I sort of got TNet working with UFPS (though I still have issues with the BodyAnimator has some issues right now and requires heavy modification of UFPS's scripts). In order to get it to work you have to instantiate the same First Person controller for both the local player and remote players and then skip all of the first person code using tno.isMine in each of UFPS's scripts. This can become a huge pain due to the inheritance structure of UFPS, but what I did was move all of the First Person logic to methods like DoAwake() and only calling such methods from Awake() if tno.IsMine == true (See below for better explanation)

In vp_FPXXXXX:

void Awake()
{
if(tno.isMine)
DoAwake();
base.Awake();
}

DoAwake()
{
//Move UFPS's First person code here
}


I hope this helps.

3
TNet 3 Support / Re: TNet Tutorials
« on: February 06, 2016, 11:18:35 PM »
I concur with @devomage suggestions, especially for UFPS.

4
The way my game works is that your friends join your saved game, so there is no need for another player to become host. Regarding modularity, UFPS already has it down. For example, they use a script such as vp_PlayerDamageHandler that handles base damage handling and is INTENDED for use for networked players. The local player then inherits from this script as vp_FPPlayerDamageHandler. The UFPS team has this working with Photon, so, how can I do it with TNet? They use two prefabs, one for networked players with the base scripts and one for the local player scripts and cameras. How can I instantiate the Networked prefab to work with TNet? You also can't avoid disabling things if you do it your way, as the local First-person controller has two cameras and leaving them be will only cause problems. Furthermore, with over half of the scripts on the local player not needed on the networked players it makes much more sense for them not to even be there and trying to add the tno.isMine check for some scripts is not the best solution due to the inheritance structure. So again, how can I sync two different prefabs with scripts inherited from each other as it is possible?
PS: By networked players I mean the other player prefabs on each players machine. Every player has the First-person scripts for their player on their machine, but has simplified functionality when displayed on other machines.

5
Thanks for your reply, but that is currently what I am doing. To me, it feels a bit messy trying to disable most of the components on a controller. Also, I am using UFPS and for their networking using Photon, they use a simplified controller for all of the networked players and AI (with the local player scripts inheriting from the simplified ones). In testing right now I am using just the Standard Assets controller, disabling components works. But once I switch over to UFPS to actually implement it, many issues will likely appear with using the same prefab.

6
Hi, I am kind of new to Networking  and I am trying to convert my FPS to multiplayer using TNet. Currently I am stuck in the issue of instantiating the players. For the local player I want to instantiate a full FPS controller, while for the networked players I want to instantiate "dummy" controllers. Using your tutorials, I can get instantiating all of them same type to work, but for obvious reasons, networked players should be not using a first-person rig. So, how can I create a different object depending on if the player is local or not and get it to sync properly? Thanks.

7
NGUI 3 Support / Re: UIPopupList Bug/Help
« on: April 05, 2015, 09:58:22 PM »
I updated to 3.8.2 and I still have the issue of the drop-downs not being deleted. I would have probably tried updating earlier but I heavily modified the Inventory system and didn't want to update in fear of breaking it. I was doing some testing and I think I figured out what the cause is. When the Drop-down button is active on scene start-up, it works fine. But, if the button (or parent) starts inactive and made active during gameplay (like my scene), then the drop-down wont be deleted. EDIT: I made some more tests and this seems to not be the cause.

8
NGUI 3 Support / Re: UIPopupList Bug/Help
« on: April 02, 2015, 06:01:59 PM »
My current version is 3.7.8. Should I update my version of NGUI?

9
NGUI 3 Support / Re: UIPopupList Bug/Help
« on: March 30, 2015, 04:24:50 PM »
Sorry for the lack of explanation, I was typing it on my phone at the time. What I meant was that the pop-up list is not getting deleted. After clicking the button 5 times, there are 5 deactivated dropdown lists. Every time the button is pressed a new dropdown list is created without deleting the old one. Thanks.

10
NGUI 3 Support / UIPopupList Bug/Help
« on: March 25, 2015, 05:28:09 PM »
Hi,
When I use a UIPopupList on a button, every time I click on it a new popup list is instantiated in my hierarchy. How can I make it use the same one over again? Also, how can you set the depth layer of the popup window? it appears behind some of my other widgets and want it to appear in front. Thanks.

11
NGUI 3 Support / Re: [RELEASED] Minimap / World Map System for NGUI
« on: May 26, 2013, 11:09:36 AM »
It says it generates textures automatically. Does this mean it would work with a voxel engine and deformable terrain during runtime?

Pages: [1]