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 - LightSky

Pages: [1] 2 3 4
1
TNet 3 Support / Re: Where I am taking TNet
« on: October 30, 2015, 01:11:45 PM »
an in depth tutorial on the "correct" way to sync character controllers and animations (multi-player) would be very helpful.  i've read many threads (and replies) on this topic and there has never been a decent tutorial and/or examples.

I think this at the moment is one of the larger deterrents of the package.  Most of the tutorials are incredibly basic and TNet has implemented many new features which are not included in the tutorials.  I would love to see an example of a proper third person controller with TNet.  Unity has a sample package that would make for a nice tutorial.
Otherwise I love TNet, I keep coming back to it because it is a very flexible and lightweight networking framework that is "battle-tested".  Meanwhile most other frameworks are suffering from the "we are in beta forever" syndrome or the developers basically give up on it (cough Bolt cough).

2
NGUI 3 Support / Re: Grid Interactivity Help
« on: May 07, 2014, 08:15:36 PM »
I don't know what a 2 dimensional is I'm sorry...Is it like a list or a 2D array?

Also if I removed the elements wouldn't that make it harder to add a block there sense there wouldn't be a collider for it to check against?

Yes a two dimensional array. I forgot a word  :P

Don't "remove" the blocks, instead have a Boolean variable to check to see if they are active.  If you set a element as inactive then set the sprite to be transparent or just disable it.  For activating it you will just check to see what the incoming object is and set it to those properties.  This way you still maintain a perfect grid.

3
NGUI 3 Support / Re: Grid Interactivity Help
« on: May 07, 2014, 07:37:49 PM »
I have somewhat of an idea about how to set it up but I need help with the interactivity portion, specifically what the script should do when a fired block collides with a block that's already filled in, or how to remove a matched set of blocks from the grid.

Create a two dimensional to keep track of all the elements in your grid. 
You will have to write a custom script to parse through the array.  Just create a function that will take a direction you want to move based on the element's position you are checking.  Using this you can easily parse through nearby elements and check if they are the same color.

Ex:  If you fire a square and it hits another square,  call the function to check if the one above/left/right of it are the same color.  If that returns true then check further on as needed.  If lets say, three are matching colors, then "remove" (deactivate the elements) and add points to the player.

4
NGUI 3 Support / Re: Grid Interactivity Help
« on: May 07, 2014, 07:02:13 PM »
NGUI's grid wouldn't add it directly below where the block was hit.  It will add it in a linear fashion as such to what you begin with.   

At quick glance would it be more effective to have the grid already pre-populated with blank squares and then read in which square was hit and then activate/set the blank square below it?  That way you won't have to call the Grid's reposition method which would "mess up" the ordering you were going for.

5
The easiest way to go about this would be to have a grid created in the editor and reference it in your script.
Then make a Prefab of a generic element you want to add to the scrollview. (Typically you will have the ScrollViewDrag attached)
When populating the scrollview modify and instantiate the prefab using the grid as the parent. (NGUI.AddChild method)
Call reposition on the grid when you are done.

-If none of your scrollview elements have a collider it is simpler to toss ScrollViewDrag on a static background.

6
NGUI 3 Support / Re: Dynamic content NGUI
« on: May 07, 2014, 03:28:11 PM »
What are you planning on receiving from the server?  If you plan on only having one UI then you should create a UIRoot in the editor and keep a reference to that in your code. 
As you receive details about your UI you could just use NGUI.AddChild to create more objects, as you progress through it you should be keeping track of which object is what so it will be easier to parse through.

7
I last updated this asset back when NGUI version 3.0 first came out, so it was bound to run into compatibility errors.  I will probably get around to updating it for better compatibility with the newest version of NGUI once finals week is over. 

If you are interested in a personalized version for a game you are working on, I could help you out.  Shoot me a PM with details for what you want in the asset.

8
NGUI 3 Support / Re: Create a pop-up dialog box via script?
« on: May 05, 2014, 12:46:19 AM »
Using a texture background would result in an extra drawcall, meanwhile using a sprite from your Atlas will save drawcalls.
You will need to make a custom script that has a reference to the Label and Sprite and then configure those two how you would want it. 
I would just recommend having everything that you would want to set inside of a constructor, very similarly to Message Boxes in VB/C#.

9
NGUI 3 Support / Re: Create a pop-up dialog box via script?
« on: May 04, 2014, 07:05:57 PM »
Go to NGUI in the toolbar.
NGUI -> Open -> Atlas Maker

Pretty much follow the instructions that it gives you to create a new Atlas. 

10
NGUI 3 Support / Re: Create a pop-up dialog box via script?
« on: May 04, 2014, 06:44:52 PM »
You should put the textures for your UI inside an Atlas. (Watch the NGUI video on this if you need more info)

Your Prefab should look something like this:

-DialogWindow    <--- Prefab GameObject with a script on it that has a reference to the sprite and label
  - Sprite   <--Button Background
  - Label    <--Text for the button

You would instantiate the DialogWindow and call the script attached to set the popup.   Also you should use anchoring to set the default positioning of your text on the sprite.

11
NGUI 3 Support / Re: Create a pop-up dialog box via script?
« on: May 04, 2014, 06:18:15 PM »
You could easily create a dynamic dialog box by having a script attached that will set the text for it and then use UIStretch on the background to match the text/sprite size for the popup.
So you will set the text, the text width/dimensions will be defined by you in the UILabel of the prefab and then UIStretch will be called on the background so it matches nicely.

12
NGUI 3 Support / Re: Create a pop-up dialog box via script?
« on: May 04, 2014, 06:08:16 PM »
You could just create a popup dialog prefab and instantiate it whenever you need it.
Or you could have a reference to a popup window and use that one for all of your popups and modify is when you want to call it.
It mostly depends on what you want to do with the popup and how you want to use it.

13
I don't see a problem with just setting their depth when you create it.  That seems like the most efficient way of going about it,  I have had much success doing it this way for my mobile games.    Creating a new UIPanel for each is a big no no since the draw calls will start to add up quickly depending on how many popups are going on, it would destroy FPS on mobiles.

Everytime you make a new popup just set it like:    (Reference to the HUDText Sprite/Text).depth = DrawCallQueue();

You could just toss this in a static class for global reference.
  1. int mDrawCall = 0; //Start  Depth Value
  2.  
  3. public int DrawCallQueue
  4. {
  5.    get
  6.    {
  7.        mDrawcall++;
  8.        return mDrawCall;
  9.    }
  10. }
  11.  

14
NGUI 3 Support / Re: Noob Question
« on: March 13, 2014, 11:03:07 PM »
It depends on how you want to deal with the transitioning between screens.   You can have them like you are showing and have them do a "fly in effect" or just a simple disable/enable.
 
For making the actual menu you should look at the examples, they go over exactly what you need.  It shows you the basic UI setup and some different styles in how to swap between menus.

15
TNet 3 Support / Re: Any Tutorial to SetUp a Game with Channels?
« on: January 19, 2014, 05:27:48 PM »
Okay thank you.

I have a new Question.
What is the difference between creating Channels(rooms?) and creating a Gameserver?

When you run the TNet.exe, you are starting an actual server.  When people connect to the server they are essentially in the void, if you have them join a channel then they can interact with other players.  (You could think of a channel like a game room)



Pages: [1] 2 3 4