Tasharen Entertainment Forum

Support => Other Packages => Topic started by: ArenMook on June 03, 2013, 07:51:53 AM

Title: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 03, 2013, 07:51:53 AM
(http://misc.tasharen.com/assetstore.png) (https://www.assetstore.unity3d.com/#/content/9169)
* Requires NGUI: Next-Gen UI kit *
* Does NOT require TNet, but has more features with it

UISK: Starlink gives you the NGUI-based user interface from a successful Android/iOS game - Starlink, including all the helpful systems that drive it. It's full of short and to-the-point scripts that can save you many hours in your own game development endeavors. Even without the scripts it would be a pretty solid example of using both NGUI and TNet, but with them you get:
Optional TNet Networking integration adds:
Sounds interesting? Here is the ReadMe doc that comes with it (https://docs.google.com/file/d/0B2Tyhvfb_nj5ZUQyNWNfVEF0OHM/edit?usp=sharing).

Too much reading? Perhaps a video will strike your fancy: http://www.youtube.com/watch?v=nNDKr716MT8

Want to play with something instead?

NGUI-only Version (no TNet): Web Player (http://starlink.tasharen.com/ui1/)
TNet Version: Windows (http://misc.tasharen.com/suiwin.zip), Mac (http://misc.tasharen.com/suimac.zip), Android (http://misc.tasharen.com/sui.apk)

(http://starlink.tasharen.com/ui1/pic1.jpg)

(http://starlink.tasharen.com/ui1/pic2.jpg)

(http://starlink.tasharen.com/ui1/pic3.jpg)

(http://starlink.tasharen.com/ui1/pic4.jpg)

(http://starlink.tasharen.com/ui1/pic5.jpg)

(http://starlink.tasharen.com/ui1/pic6.jpg)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 03, 2013, 08:49:17 PM
It's not available yet :) I am waiting for it to get approved on the Asset Store.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: littleallred008 on June 03, 2013, 09:18:09 PM
I can't wait! Can we know what the price will be yet?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 03, 2013, 09:26:35 PM
$45
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: SketchWork on June 06, 2013, 03:26:28 PM
This sounds very interesting indeed.  I like the look at those new functions in this kit :)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 07, 2013, 08:33:27 PM
Now available -- https://www.assetstore.unity3d.com/#/search/starlink
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Burletech on June 07, 2013, 08:53:10 PM
Is there a reason it requires V4.1.3? Like to check it out but I'm still running V3.5.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 07, 2013, 09:36:55 PM
I used the latest version of Unity when making Starlink, so the kit has the same requirements. Unfortunately the 3.5.7 version of it is likely not going to be feasible.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: iwishash on June 07, 2013, 11:44:00 PM
Hi,
I bought this package but there's an error when install.

"Assets/StarlinkUI/Scripts/Generic/UI/UIWindow.cs(103,52): error CS1061: Type `BetterList<UIPanel>' does not contain a definition for `Pop' and no extension method `Pop' of type `BetterList<UIPanel>' could be found (are you missing a using directive or an assembly reference?)"


I installed Starlink package first, then installed NGUI package except example as you said at the video.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: pretender on June 08, 2013, 05:30:56 AM
So no 3.5 :(
Can i still buy it and make some of it work on 3.5? Like networking part. What parts will not work on 3.5?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 08, 2013, 08:35:33 AM
@iwishash: I may have used NGUI 2.6.2 for this one, but that fix is simple. Add the following function to BetterList class:
  1. public T Pop ()
  2.         {
  3.                 if (buffer != null && size != 0)
  4.                 {
  5.                         T val = buffer[--size];
  6.                         buffer[size] = default(T);
  7.                         return val;
  8.                 }
  9.                 return default(T);
  10.         }
...or just replace the file with the attached one for your convenience.

@pretender: For 3.5 you may have to replace a few gameObject.SetActive with NGUITools.SetActive, but as far as the scene and prefabs go... I'm not sure what would be involved. The kit doesn't need Unity pro, so you can have it installed on a free version of Unity 4.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: danreid70 on June 08, 2013, 09:39:53 AM
If using Javascript - with NGUI and TNET, I move certain folders into the Plugins folder (which works like a charm!). I purchased the UI Starter Kit, installed, and works flawlessly! Then imported TNET part - and also overwrote the BetterList.cs file with your attached file.

But, after importing the TNET part, I'm getting 2 errors:


Assets/StarlinkUI/Scripts/Custom/Misc/GameManager.cs(359,29): error CS1502: The best overloaded method match for `TNObject.Send(string, TNet.Target, params object[])' has some invalid arguments

Assets/StarlinkUI/Scripts/Custom/Misc/GameManager.cs(359,29): error CS1503: Argument `#2' cannot convert `Player' expression to type `TNet.Target'

Am I just being stupid and I'm missing moving something into the Plugins folder? It wouldn't be the first time I've missed something stupidly obvious... :D


REALLY looking forward to using this, Aren! It's VERY thorough! Just like NGUI and TNET! I've been following the forums (almost religiously!) since TNET was first mentioned - and it's amazing what you've created with these ESSENTIAL Unity tools!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: danreid70 on June 08, 2013, 10:17:13 AM
Actually, I think I found what's causing these quirks - a couple other packages I have downloaded create classes of "Player", and I think that's where the conflicts are happening. I started removing packages I "suspected" of conflicting, and it seems that might be the issue. Would be nice if packages used unique class-names, but - eh... I'll just have to scour them more thoroughly... :) Something to watch out for when combining packages from Asset Store...
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: _Daniel_ on June 08, 2013, 12:33:08 PM
I saw that youtube video of this package and was a little bit surprised about how you chose to organize your classes.  You have an individual class for every UI element (e.g. UIProfileButton, UIPauseButton, UIPlayButton, etc...).  This format is new to me, and seems unusual (don't get me wrong, if it works for you then great). Have you ever heard of MVC?  What I have been doing is similar to Apple's cocoa framework, and that is creating a single NGUI Controller that basically does the hookup and links all of the UI Elements to the rest of the game.  This kind of organization has been working well for me so far.

@ArenMook: I'm wondering what your opinion is on this; why do you prefer many small individual classes vs single controller class?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 08, 2013, 05:22:26 PM
I put up NGUI 2.6.2, which has the Pop() function in it, so new users won't run into the same problem.

@danreid70: TNet's Player class is in a namespace so it won't cause conflicts, but if another package defines theirs outside a namespace, then yes there is going to be ambiguity.

@Daniel: I like short and to-the-point scripts. When I'm looking at a button, I want to be able to see exactly what the button does without having to track down which function it calls within some giant blob of a class. Singletons lead to singletonitis, and should generally be reserved for special classes -- "game manager", for example. That said, MVC and singletons don't have much to do together. MVC is good, but should be followed loosely. It's always a good idea to separate your input (controller) from your main logic (model), as it allows you to have input come from various sources without having to alter game code (example: keyboard/mouse, or network player).

Separating main logic from visualization (view) makes a lot of sense in game engine design (the ability to swap in an OpenGL renderer with a DirectX one for example), but in case of a Unity-based game doesn't really apply. Too much separation leads to confusion, frustration, and much difficulty when it comes to maintaining the code later.

Short and to-the-point scripts, on the other hand, never cause problems, and are always the easiest kind of scripts for other users to learn from.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: _Daniel_ on June 08, 2013, 09:18:49 PM
Thanks for the clarification.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: iwishash on June 10, 2013, 02:21:53 AM
I reviewed this package.
I think there's lots of useful info about UI design.
I have simple question.
Why do you use seperated "Background Camera" for showing background images?
Is there any benefit compare with using single UI camera?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 10, 2013, 02:34:02 AM
As I recall, the background camera is used to draw the starry background, which is a mesh rather than a widget -- as well as the blinking star particles.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: galuodo on June 13, 2013, 09:42:17 PM
could you please offer a picture of chat window?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 13, 2013, 10:02:42 PM
It's the second from the bottom. Easier to see it in action -- open up the demo, play, single player, start the match. You can now type by hitting enter.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Trithilon on June 15, 2013, 11:50:38 AM
This is brilliant! I am happy you considered splitting Starlink and doing this in parts. :)
I am going to get this! XD
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sonicviz on June 29, 2013, 07:12:05 AM
HI,
Nice work, I picked it up and I'm playing with it now.
Especially like the TNet integration example.

At the moment however I have my head deep in UI visual design.

While I have certain visual skills (photo/video etc) one of my weaknesses, like a lot of programmer centric people I suspect, is UI design skills.
I've trawled the sites like http://graphicriver.net/collections/2642138-kn-bz-ui-kit (http://graphicriver.net/collections/2642138-kn-bz-ui-kit) looking for complete UI kits (as well as Asset Store kits), and I'm talking to some artists, but still not quite finding what I need.

I like the clean design of the starlink kit and I've been playing around with some new controls to see if I can use them for a current project.
ex: (http://sonicviz.com/gallery/NGui-Controls.jpg)

Unfortunately it's missing a few essential GUI controls (drop down etc). I'm thinking of making them to fill the gap.
While the photoshop files are included it would be great if you could write up a quick guide as to HOW you created the controls for starlink, as there needs to be consistency to some degree for new controls to fit. Or can you point to a guide you used to create them? for ex, the main button seems to be a thin pixel square with a gradient applied, offset with a black background which ends up as a slight shadow effect?

ty!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 29, 2013, 03:21:58 PM
Starlink UI features fancy looking buttons and irregularly shaped windows, but you seem to just have square ones here. I'm pretty sure the elements you've used here can all be found in one of the example atlases that comes with NGUI (wooden one I think). Nonetheless, to answer your question, I created all of these in photoshop, but the process can be hard to explain as it involves many steps. For the simplest case try this:

1. Color the background grey so you can see what you're doing in the future.
2. Create a new layer.
3. Draw a white box on this layer.
4. Double-click the white box layer, bringing up Layer Style window.
5. Add a Stroke the same color as the box (white).
6. Right click the layer, rasterize it (this collapses the style)
7. Double-click the layer again for a new Layer style.
8. Add a gradient overlay with 20% Opacity.
9. Add a Drop Shadow effect.
10. Add a Stroke effect and change its Size to be 1 pixel.
11. Close the Layer Style window and hide the Background layer.
12. Save.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sonicviz on June 29, 2013, 07:24:56 PM
Yes, I've been playing with the other irregular designs as well. This test was more about exploring the standard feel, as well as the gradient semi 3D look.
Just the standard NGUI atlases don't include any of the base files so it's difficult to see the process to modify them for a new atlas.

Thanks for the process outline.

For doing the irregular designs are you using the pen tool to draw them out, then pretty much a variant of the above process?

ty!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 29, 2013, 08:12:22 PM
Pen to draw the outline.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: xunxun on June 30, 2013, 04:13:33 AM
does this work on iOS for both NGui and Tnet integrated?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 30, 2013, 04:21:58 AM
Starlink is a game for both iOS and Android, and it uses TNet + NGUI. The content of kit is taken directly from that game. So the answer to your question is "yes".
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sonicviz on July 04, 2013, 08:57:56 PM

4. Double-click the white box layer, bringing up Layer Style window.
5. Add a Stroke the same color as the box (white).


I don't quite get this.
How big a stroke in pixels?
And isn't creating a white stroke and then rasterizing it the same as just creating a white box in the first place?
Or is to to make the corners not so sharp?

ty!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: LightSky on July 05, 2013, 01:29:49 AM
I just picked this up and it looks fantastic so far. 
Just a quick question regarding the TNet aspect, I have my TNet server running and I assigned the address for the server into the TnTcp script and I can see the server itself on LAN and it works fine.  However whenever I try to connect to the server via TnTcp it causes my client connection to time out repeatedly and it will not show the games that are currently created (The ones created in LAN on the server that was visible).

TLDR:  I can see my TNet server in LAN and makes games but it doesn't work via TNTcp.  It keeps timing out.  I am using my external address.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 05, 2013, 07:31:19 AM
I don't quite get this.
How big a stroke in pixels?
And isn't creating a white stroke and then rasterizing it the same as just creating a white box in the first place?
Or is to to make the corners not so sharp?

ty!
Default size  (3 pixels). Stroke around a box creates rounded edges.

@LightSky: Via TnTcp? Do you mean just TCP? All connections are done via TCP. UDP is an option for frequent data that you may or may not use. Timing out is most often caused by forgetting to choose "run in background" when building Unity.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: LightSky on July 05, 2013, 12:45:05 PM
@LightSky: Via TnTcp? Do you mean just TCP? All connections are done via TCP. UDP is an option for frequent data that you may or may not use. Timing out is most often caused by forgetting to choose "run in background" when building Unity.

Yes, I meant TCP, which you call TnTcp in your script for TCP (as seen in pic below).  I already had it set to "run in background" and I have not changed any code in the project, all I did was enter my external IP into the TCP script in the inspector.  It knows the server is running because It connects but it has trouble maintaining a stable connection. The TNet example scenes work fine as well, so it is something with this scene.

http://i.imgur.com/vBNR3uz.png (http://i.imgur.com/vBNR3uz.png)

Edit: Thanks, that was it.  It is working fine now.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 05, 2013, 03:21:47 PM
TNTcpLobbyClient is meant to connect to a TCP-based lobby server. You are running a UDP-based lobby server, and instead you have your TCP Lobby Client trying to connect to your game server. This isn't going to work.

Port 5127 = game server.
Port 5129 = lobby server.

You need to launch your server with -tcpLobby 5129 instead of -udpLobby 5129, and have your lobby connect to port 5129 instead of 5127.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 06, 2013, 05:10:42 PM
Question!:
I purchased the UI Starter kit + the game

trying to get them working together- and digging.. and digging and digging..

hopefully this is a quick quwstion-
One used TNmanagwer to connect and the other uses TNAutoJoin..

I havent figured out the difference between these yet--

my basic question is- from the UI Starter kit code- what would be the recommended way to kick off the game with the multi-players enabled etc?

I am going to be digging into this for the rest of the day and all day tomorrow- but thought it wouldnt hurt to post the question while I dig..

thanks!

Brian
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 06, 2013, 09:57:21 PM
Starlink UI Starter Kit doesn't use Auto series of scripts. It connects directly using TNManager.Connect. Auto series of scripts are for convenience purposes -- they simply automate certain aspects of TNet if you choose to use them, but TNet is more robust when you use it directly (like Starlink does).
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 09, 2013, 10:01:47 PM
Question-
I have spent all weekend digging through this code

1- I love it!
but
2- I am still struggling a bit

question- on the youtube video the "server list" screen WORKS!- but on the package I purchased it does not

I am *******HOPING********* to get this functionality:

a- user can start a game
b- other users can see the game show up in the lobby
c- users can just click on the game in the lobby to JOIN it
*** AT NO TIME SHOULD THE USERS HAVE TO TYPE IN AN IP ADDRESS***

NOW- here is how the code works:

a- user can start a game in the lobby- other users can see it - but NOONE can join it- it just beeps at you when you try
b- a user can start a game via the "direct" screen- but the OTHER users have to type in an IP address to join
this DOES work- nicely- but making them type an IP is not going to work for me

(I am targetting the Ouya- so typing in a ip address is extra , extra painful since its controller based with no keyboard)


I am HOPING to actually get both of those things to work together- so user's dont have to type IP addresses..

I am curious- why have the lobby screen with the nicely populated game list if the rest of the screen doesnt work?
is that just an example to get us started?

It seems weird though- that clever things like the low power mode and stuff would be implemented but the lobby not???

or am I doing something wrong?

I am continuing to dig on this- I have a day job- so I end up staying up very late - I have already spent about 18 hours on this specific issue- testing and digging.. I will sneak out again at lunch with two laptops and frantically hack on this at lunch.

I am a little frustrated since I THOUGHT the lobby support was a part of the package-maybe it is and I am doing something wrong? Is it intentionally not complete- or am I just an idiot?

In any case- ANY advice or guidance appreciated.. I am having to tunnel through the code and put hundeds of log statements to try to figure out how to get the lobby to actually allow the user to join a game.. A little guidance might save me many future hours ...

ANY help- even evil taunting- appreciated :)

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 09, 2013, 10:12:04 PM
I am assuming the video you're referring to is Starlink -- the game itself.

Starlink has a server hosted on an Amazon EC2 micro instance that players connect to for multiplayer games. This is also the server that actual game servers register with -- and what allows you to see the list of servers.

It wouldn't make sense to have the UI Starter Kit connect to actual game servers, but if you run your own TNServerInstance somewhere (for example locally), and connect to that, you will be able to see a list of servers to choose from.

Going into the LAN gameplay menu also lets you host your own LAN servers, letting other people on your LAN see this game and join it without having to type in an IP address.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 08:17:19 AM
"I am assuming the video you're referring to is Starlink -- the game itself.
"
No, I am referring to the video where you demo the unity package

"Starlink has a server hosted on an Amazon EC2 micro instance that players connect to for multiplayer games. This is also the server that actual game servers register with -- and what allows you to see the list of servers.

It wouldn't make sense to have the UI Starter Kit connect to actual game servers, but if you run your own TNServerInstance somewhere (for example locally), and connect to that, you will be able to see a list of servers to choose from.
"
right- all I am saying is 50% of the networking functionality in the "UI Starter Kit" unity package - I cannot seem to make it work.
should it work? or is it just a beginning and not intended to be complete?


"Going into the LAN gameplay menu also lets you host your own LAN servers, letting other people on your LAN see this game and join it without having to type in an IP address."

Ok - that functionality doesnt work for me.

I am trying to figure out 1- is it just me\do I have a config problem or 2-is the "LAN SERVER" part of the package just not complete

video:
UI Starter Kit: Starlink (NGUI+TNet)
http://www.youtube.com/watch?v=nNDKr716MT8&feature=c4-overview&list=UUQGZdUwzE8gmvgjomZSNFJg

go to about 8:30

in the VIDEO, you start a lan server and JOIN it-

YEAH! THATS WHAT I WANT!

When I saw that video, it inspired me to purchase everything ..

but it doesnt work ...

I have tried re-importing the package and double checking everything-when I make a lan server and try to join it myself or have another computer join it by clicking on the server (LIKE IN YOUR VIDEO)- it just beeps and does nothingt

if I make a server via the "direct" menu selection- it DOES WORK- BUT THE USER HAS TO TYPE IP ADDRESSES

I THINK the code you put in the package is incomplete- thats my current theory..

I am having to dig deep into your code and learn it to debug it - and unfortunately I am not a NGUI or Tasharent Networking expert so its taking me a bit..





Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 09:49:39 AM
Michael,

I am beginning to think that your package from the unity store is broken.

I have done a clean import of the project a few times and tried several different computers, and still have the same problem.

The screen where we can find a lan server that's being broadcast and click on it and JOIN it-

*** in your video- you click on it and it goes to the join screen ******

*** when I try it- it just beeps and doesnt nothing- but it DOES seem to start a server **

** in the package I got from the unity asset store- THERE DOES NOT APPEAR TO BE ANY CODE TO LAUNCH the join screen!!! ***

I am thinking the source of my problems could very well be just a broken unity package

Michael, so when I click on the server in the LAN screen (where I discovered another server on my lan) WHAT code should cause me to connect to that server and view the games he is publishing?

maybe if you can tell me what code that is supposed to be doing that last part- I can doubly-verify how you think it should work vs how the code I got from the unity asset store works..


thanks!

Brian



Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 09:51:18 AM
I go to lunch in an hour- so will spend some more time hacking on that then- hopefully I will be able to give you more informtaion
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 10:48:21 AM
here is a much more clear \ succinct write up:
-----------------------------------------------------------

Here is the functionality I need:

1- a computer on the local network hosts a game (Ip is assigned by local network)
2- other users can go to a lobby screen to find any games being hosted on the local network
3- users can click on the game they found in the lobby to join the game- local network only

with the package I purchased

1- the direct connect works (yeah!) but they have to type in an IP
and
2- the lobby screen works for broadcasting games (yeah!) - but that screen does not allow users to join the server they selected (*********code appears to be incomplete, or broken?? or doesnt run on my computer?**************)


My main question is:

"Should the lobby screen WORK? (in the video it does) Or is that intentionally not complete?"

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: LightSky on July 10, 2013, 11:27:14 AM
My main question is:

"Should the lobby screen WORK? (in the video it does) Or is that intentionally not complete?"

Everything in the video is working as shown (at least for me).
-It could be that TNet is required for the networking aspect, I didn't use it without TNet so I don't know, I am assuming this is the reason.
-Or that his package is broken and should reimport.

Edit:  Tried a fresh project install of Starlink and it won't even allow you to create games without TNet.  Also the LAN worked instantly upon importing TNet.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 11:36:22 AM
hmm...

what the hell? maybe my computers have gremlins..

lightsky- when you go to the lan screen- start a server- and then CLICK TO CONNECT TO IT- does it connect?

I am talking about the LAN connect screen NOT the direct connect screen
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 11:42:04 AM
note:

UI Starter Kit: Starlink (NGUI+TNet)
http://www.youtube.com/watch?v=nNDKr716MT8&feature=c4-overview&list=UUQGZdUwzE8gmvgjomZSNFJg

go to about 8:30

he clicks on play-then lan- then he CLICKS on the name of the server found

does that part work for you?

thats the part that for me- it just beeps and does nothing

also looking at the code- there doesnt seem to be any code to launch the "join" window- in the video he clicks on the server- and the join window shows up



Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 10, 2013, 12:11:57 PM
Did you import TNet and the tnet_integration package that comes inside the Starlink UI kit?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 12:13:14 PM
hah

learning more ...

ok - the LAN screen appears to be using UDP- whereas the direct is using TCP-

that would explain why if you host a game with direct - you cannot find nor join with the lobby..

OK

Michael,

The UDP lobby support in the package on the unity asset store appears to not be functional

though in your VIDEO - it appears to work:

UI Starter Kit: Starlink (NGUI+TNet)
http://www.youtube.com/watch?v=nNDKr716MT8&feature=c4-overview&list=UUQGZdUwzE8gmvgjomZSNFJg

go to about 8:30

he clicks on play-then lan- then he CLICKS on the name of the server found

PART of the problem in making the code work - is the place where that click on the server happens
UIServerListItem- has no rational access to the other windows etc

I TRIED putting a hack static in exposing the UIPanel channelListWindow from the UIDirectCOnnect screen- but that did not work :(

I need to learn more about all the parts here . clearly, and how to make them work..

in the MEANTIME:
!!!!!!!!!!!!!!!!!!!!!!!!
************
REQUEST FOR MICHAEL
**************
!!!!!!!!!!!!!!!!!!!!!!!!!!!
can you either
1- share the code of how to get the UDP lobby code working like in your video? (for those of us who purchased :) )

OR

2- Provide some guidance on how to get the UDP lobby working like in your video- PLEASE?!?! :)

for YOU- you wrote the code- so its "easy" for you-

but for me I am slower because-

I am learning 1- the ui tookkit, 2- ngui, 3- tnet ALL AT THE SAME TIME- so for me the debugging \ hacking etc has been slow and painful

I had a four day weekend-

I was hoping to finish my game over the four day weekend-

INSTEAD I spent the entire time wrestling with these things.. :(

welp my lunch is over- now I need to rush back to work

I am hoping michael responds to this by the time my day ends- when I get home tonight will have a few hours to hack on this some more..


Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 12:18:26 PM
"
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #44 on: Today at 12:11:57 PM »
Quote
Did you import TNet and the tnet_integration package that comes inside the Starlink UI kit?
"
YES!

The direct connection WORKS- if I failed to import the package correctly- I would expect that to NOT work


Here is the functionality I need:

1- a computer on the local network hosts a game (Ip is assigned by local network)
2- other users can go to a lobby screen to find any games being hosted on the local network
3- users can click on the game they found in the lobby to join the game- local network only

********** with the package I purchased ****** ON MY COMPUTER THE FOLLOWING IS WHAT WORKS AND WHAT DOESNT
***********************************

1- the direct connect works between two computers (yeah!) but they have to type in an IP
and
2- the lobby screen works for broadcasting servers with games (yeah!) - but that screen does not allow users to join the server they selected (*********code appears to be incomplete, or broken?? or doesnt run on my computer?**************)


My main question is:

"Should the lobby screen WORK? (in the video it does) Or is that intentionally not complete?"

-=----------
since I wrote above- I have figured out that the lobby is using UDP
and the direct is using TCP

so michael,

in your video the udp lobby WORKS-

in the code that I bought from the unity store- it does NOT work

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 12:19:50 PM
Michael,

I believe the package that gets downloaded from the Unity store on purchase is either broken or incomplete for the UDP lobby.

I believe this because in your video it works- but in the code I have - there does not appear to be any code to join nor to fire off the join screen when the user clicks on the server

MAKE SENSE???

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: LightSky on July 10, 2013, 12:27:47 PM
There does not appear to be any code to join nor to fire off the join screen when the user clicks on the server

MAKE SENSE???

When joining a server from the list:
The code is located in "UIServerListItem".
When joining a game from the list:
The code to join a game that is hosted is located in "UIChannelListItem".
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 10, 2013, 12:54:29 PM
Update-
Ok lightsky has shared some info with me-

for HIM the UDP lobby works..

hmm.. ok Michael- so its something on my end

Thank you ALOT Lightsky- this gives me some fundamental info that I can use to further debug

*********
what MIGHT be an issue?

Michael, the code for discovery of the internal IP for the nic card- doesnt work on BOTH mac laptops I have - both of them have vmware installed- I think its grabbing the vmware IP
i have a fix for this if you are interested

I am WONDERING though- if my 'fix' for that problem is what is driving the UDP lobby not working..

thanks to lightsky though- I at least have verification that the UDP part works for someone else off the same package

after work today- time for more digging..

My current theory:
* the network code in the package has a bug in that it doesnt grab the correct IP address when you have vmware installed on mac os (I think its' vm ware thats doing it)

* My fix for that- I think it might have broken the udp support- ? then maybe?

this is what I will dig on after work- I will report here what I learn

thanks guys!

Brian



Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 10, 2013, 01:09:29 PM
Virtual networks will do that, yes.

As far as I know there is no clear way of differentiating between a real network and a fake network. I remember there being a thread on this many months ago.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 11, 2013, 08:06:10 AM
I have figured out some code that does work- basically it boils down to reading the routing table to see who has an outbound route , that should be your network card for the network-

this is made all the more complicated by the fact that - i found- mono on mac- the networkcard information API is incomplete- so - on mac- you dont have enough info to figure this out- so I am - just on mac - reading the routing table- and that seems to work...

Now, if you have wireless and wired ethernet and or dial up networking active etc- you will have multiple outbound Ips..

so the code I have just picks the first one=- which is not ideal..

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 11, 2013, 08:09:15 AM
Update-

I worked on this issue some more this evening.. I am still not able to get the UDP lobby working right :(

I normaly use mac- but I setup a VM with unity on it and windows- and tried testing there

I still have a failure trying to use the UDP lobby


BUT- at least now I have an error message:

see here:

https://dl.dropboxusercontent.com/u/46532640/tnetissues.png

"UPnP Discovery Failed"

hm....

well.. hmm..

I have tried 2 mac machines and now a windows vm... I must have gremlins :(....

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: brianbraatz on July 11, 2013, 10:00:18 AM
Update:

thinking - my VM is xp-  I recall XP has extra stuff you have to do to enable upnp- thats probably where my error is coming from ....

what I think RIGHT NOW:
1- The package has some issues with vmware adapters + mac os (mostly this is a mono issue- its just a problem in mono breaks the cross platform code in the package)- I implemented some mac specific logic (in c#) to fix this problem- on my mac I can now reliably get the ip address of my local outbound nic card

2- There is an additional issue with mac os + Upnp which is likely made worse by having vmware installed -> this is my working theory at the moment

my PLAN:

I am going to try a windows 7 machine running - hopefully the udp lobby will work on that

once I have the UDP lobby actually running- I can compare the working code's behavior against the non-working code-  from there I should be able to narrow in on the problem..

I am hoping to figure this out soon :)

thanks everyone for your help!

Brian
:)

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sicga123 on July 28, 2013, 12:32:04 PM
Hi just a quick question, probably rather simple and I should know the answer. is it essential that the Layers 8 and 9 are used for Starlink UI? - I'm already uisng them. Or could I use the next 2 layers down?

Thanks
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 28, 2013, 04:33:44 PM
Nope, it's certainly not essential. I just needed one layer for 3D UI and another for the 2D UI. You can change them, but don't forget to update the culling mask and even mask on the cameras.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sicga123 on July 29, 2013, 02:26:37 AM
Thanks for the quick reply.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sloopernine on August 06, 2013, 12:33:28 AM
Really wish this package was included in the summer sale campaign at unity asset store! :D

EDIT/ Btw does this include the register/login part of the menu aswell to be able to see how you did it?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on August 07, 2013, 04:33:02 AM
Register/login? There is no registration in Starlink, only Windward.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: velsthinez on August 20, 2013, 03:46:38 AM
I've bought this kit and have spend a few days reading and learning the scripts.

One thing I noticed was that there's no animation Component on the Panel for the transition.
I hunt it down and see that the 'magic' is done in the buttons, under the UIWindowButton Script.
But I see it again and there's no animation component hooked up anywhere.

Could someone kindly guide me on how to utilize this ? It's create a very clean structure,
sometime which my own scene is lacking. I am currently using NGUI's Button Play Animation script, but there's so many panels, it's not elegant at all.

Hope to get some advice on this.


Nevermind, I finally found out it basically is doing a Scale tween. Feel like a noob.  :-[

Thanks!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on September 10, 2013, 08:07:42 AM
Hello, I have a question: does the feature "Direct Connect" work over internet ? or its only limited to lan?
when i click on "Play" >> "Direct" it show: your internal IP and Your External IP they a re both same and 10.xx.xx.xx (LAN address)

what should i change ?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on September 10, 2013, 09:07:12 AM
Direct connect goes by IP, so yes -- assuming the remote person's port is open. TNet opens it if UPnP is supported. Use the external IP. If they both match, that generally means that TNet wasn't able to figure out what your external IP is. You can figure it out by navigating to http://www.whatsmyip.org/
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Nevulus on September 26, 2013, 02:56:52 AM
post edited - No longer relevant, ArenMook took care of it.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on September 26, 2013, 01:43:44 PM
There is no UIInputSaved anymore because the functionality is inside UIInput itself. I thought I upgraded all UIInputSaved fields to UIInput fields? Did I miss one?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Nevulus on September 26, 2013, 01:56:57 PM
post edited - No longer relevant, ArenMook took care of it.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on September 26, 2013, 04:24:00 PM
No it doesn't. o_O
  1. public class UIResetInput : MonoBehaviour
  2. {
  3.         public UIInput input;
  4.  
  5.         void OnClick ()
  6.         {
  7.                 input.value = "";
  8.         }
  9. }
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Nevulus on September 28, 2013, 10:43:30 PM
post edited - No longer relevant, ArenMook took care of it.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on September 29, 2013, 04:48:25 AM
Same problem here I have the 3 package all in the last version

i instal ngui: no problem
i install Starlink package: no problem
i install TNET: 18 errors

i load the Starlink Tnet package and have this error
Assets/StarlinkUI/Scripts/Generic/UI/UIResetInput.cs(9,16): error CS0246: The type or namespace name `UIInputSaved' could not be found. Are you missing a using directive or an assembly reference?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on September 29, 2013, 05:05:35 AM
well i founded the way to dont have errors:
import ngui
import tnet
import starlink
then in starlink folder import tnet integration but disable the importation of UIRESETImput
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on September 29, 2013, 09:23:00 PM
Curious. I may have forgotten to update that one in the integration package then. Well, I've re-uploaded the update with it there.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Nevulus on September 30, 2013, 09:48:19 PM
Just imported UI Starter Kit v1.1.1, running with Tnet v1.8.2 and NGUI v3.0.1, & Tnet integration package:

I noticed the chatroom in the Game scene was not re-sizing height for ChatEntry gameobjects, and the chat input label itself was set to re-size height instead of clamp.

So I changed chat input label's overflow method to "Clamp Content"

and in UIChat.cs I added a new line of code so that Chat Entry's label will be set to "Resize Height" during InternalAdd function.

  1. void InternalAdd (string text, Color color) {
  2. ...
  3. ent.label.overflowMethod = UILabel.Overflow.ResizeHeight;
  4. ...
  5. }
  6.  
I will verify tomorrow with another clean install of the asset packages to see if the labels came like that. Hope this helps others.

Now my question is how can I increase the spacing between Chat entry game objects and have background adjust to new heights accordingly? I figure I'd squeeze in a question on this same thread before experimenting. I can affect line height by adding to the font.size, but the background stays misaligned.  :)

Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: jwb21 on October 27, 2013, 10:37:41 AM
hi,
I just purchased the Starlink kit, and imported it into its own project, and then imported the latest TNET and NGUI 3.x.
I'm getting the following three errors in the console:


Assets/StarlinkUI/Scripts/Generic/UI/UIChat.cs(129,42): error CS0117: `NGUITools' does not contain a definition for `StripSymbols'

Assets/StarlinkUI/Scripts/Generic/UI/UIChat.cs(176,69): error CS1061: Type `UIFont' does not contain a definition for `size' and no extension method `size' of type `UIFont' could be found (are you missing a using directive or an assembly reference?)

Assets/StarlinkUI/Scripts/Generic/UI/UIChat.cs(274,71): error CS1061: Type `UIFont' does not contain a definition for `size' and no extension method `size' of type `UIFont' could be found (are you missing a using directive or an assembly reference?)

thanks,
Jon
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on October 27, 2013, 10:27:28 PM
The kit has been updated, but unfortunately it hasn't been added to the "trusted" list by Unity yet, which means that there is a delay between the submission time and the time when the update becomes available. It should become available soon.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on November 02, 2013, 12:42:56 PM
[modified post to make it more clear]

If you Want to use the Starlink Kit with an Amazon Lobby Server:
1: register here, it is free http://aws.amazon.com/fr/free/
2: open the port for tnet in the amazon server management section
3: send your tnet server to the amazon server( I did it using dropbox, and disabling all security)
4: run it it should display an external IP for the lobby



In the scene:

5: add your amazon server IP
_Network Manager
            TCP Lobby : changed the ip to my amazon server ( I am correct its not the UDP one ? udp shoud be left blank for lan ?)
then I click on internet: Server list: Searching... not yet finished

it seems that the internet panel is not finished in the kit.
@ ArenMook, is it possible to make an update to the package and add the possibility to do same  like in the LAN section:
Create a chanel( add our channel to the internet lobby server ) or click on a chanel to join( request chanel list on our internet lobby server ip)


so we just have to put the IP of our server and ..activate the internet collider.

it would be awesome if you could use the same menu from the LAN window to select internet lobby channel or create game here


maybe this could work:
On "Window Internet" add the component "UICreateServer" to make it behave like the "Window LAN" component
then we need to duplicate the component required from "Window LAN":
-Button - Start
-the label inside the button that will change start/stop value
-the server name UIImput

just do control + D, move them into "Window Internet" panel and assign the public field variable with them.
then It almost work ! the server register in the Lan lobby.

But i believe there is something to change here:

UICreateServer.cs
  1. void OnButtonClick (GameObject go)
  2.         {
  3.                 if (!TNServerInstance.isActive)
  4.                 {
  5.                         TNServerInstance.serverName = string.IsNullOrEmpty(serverName.value) ? "LAN Server" : serverName.value;
  6.                         TNServerInstance.Start(5127, 0, null, 5129);
  7.                         UpdateButtonText();
  8.                 }
  9.                 else
  10.                 {
  11.                         TNServerInstance.Stop();
  12.                         UpdateButtonText();
  13.                 }
  14.         }
  15.  
  16.         void OnNameChange ()
  17.         {
  18.                 TNServerInstance.serverName = string.IsNullOrEmpty(UIInput.current.value) ? "LAN Server" : UIInput.current.value;
  19.         }
  20.  
  21.         void UpdateButtonText ()
  22.         {
  23.                 buttonText.text = Localization.Localize(TNServerInstance.isActive ? "Stop" : "Start");
  24.         }
  25. }
this currently only work for LAN

now i changed it to
  1. void OnButtonClick (GameObject go)
  2.         {
  3.                 if (!TNServerInstance.isActive)
  4.                 {
  5.                         TNServerInstance.serverName = string.IsNullOrEmpty(serverName.value) ? "LAN Server" : serverName.value;
  6.                         if(!internet)
  7.                         {
  8.                         TNServerInstance.Start(5127, 0, null, 5129);
  9.                         }
  10.                         else{
  11.                         TNServerInstance.Start (5129,5129,null,TNServerInstance.Type.Tcp,TNet.Tools.ResolveEndPoint (lobbyServ,5129));
  12.                         }
  13.                         UpdateButtonText();
then my amazon lobby server flood this line when i create a server every 7 seconds:
  1. <ip>:<some port> has connected
  2. <ip>:<some port>has timed out
  3. <ip>:<some port> has disconnected
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 03, 2013, 09:18:38 AM
You specified port 5129 twice. Check the signature of TNServerInstance.Start:
  1. static public bool Start (int tcpPort, int udpPort, string fileName, Type type, IPEndPoint remoteLobby)
First parameter is TCP, second parameter is UDP. You can't specify the same value.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on November 03, 2013, 08:26:33 PM
I am a bit confused now if I check in the menu scene in the _network manager, by default all port are 5129
I changed it:
  1. void OnButtonClick (GameObject go)
  2.     {
  3.         if (!TNServerInstance.isActive)
  4.         {
  5.             TNServerInstance.serverName = string.IsNullOrEmpty(serverName.value) ? "LAN Server" : serverName.value;
  6.             if(!internet)
  7.             {
  8.             TNServerInstance.Start(5127, 0, null, 5129);
  9.                         UpdateButtonText();
  10.             }
  11.             else
  12.                         {
  13.                  TNServerInstance.Start (5127,5129,null,TNServerInstance.Type.Tcp,TNet.Tools.ResolveEndPoint (lobbyServ,5129));
  14.                         UpdateButtonText();
  15.             }
  16.            
  17.                 }
  18.                 else
  19.         {
  20.             TNServerInstance.Stop();
  21.             UpdateButtonText();
  22.         }
  23.         }
my tcp lobby gameobject with the TNTcpLobbyClient have my amazon serv adress and my port 5127
it still flood the errors:
  1. <ip>:<some port> has connected
  2. <ip>:<some port>has timed out
  3. <ip>:<some port> has disconnected
and after a minute my editor in unity return a warning
  1. Unable to connect
  2. UnityEngine.Debug:LogWarning(Object)
  3. TNTcpLobbyClient:Update() (at Assets/TNet/Client/TNTcpLobbyClient.cs:115)
  4.  

Would really appreciate an update to finish the Internet lobby part of the kit
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 04, 2013, 12:52:22 PM
Remove the second parameter from TNServerInstance.Start. Leave it at zero. Other than that what you are doing is fine. Make sure you have "run in background" set on your application.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on November 04, 2013, 09:06:21 PM
I changed the script and it still same: timed out disconnected and no servers in the list
here is the script changed
for create server:
  1. using UnityEngine;
  2.  
  3. public class UICreateServer : MonoBehaviour
  4. {
  5.         public UIButton button;
  6.         public UILabel buttonText;
  7.         public UIInput serverName;
  8.         public bool internet = false;
  9.         public string lobbyServ;
  10.        
  11.         void Start ()
  12.         {
  13.                 UIEventListener.Get(button.gameObject).onClick = OnButtonClick;
  14.                 EventDelegate.Set(serverName.onSubmit, OnNameChange);
  15.         }
  16.  
  17.         void OnEnable ()
  18.         {
  19.                 UpdateButtonText();
  20.         }
  21.  
  22. void OnButtonClick (GameObject go)
  23.     {
  24.         if (!TNServerInstance.isActive)
  25.         {
  26.             TNServerInstance.serverName = string.IsNullOrEmpty(serverName.value) ? "LAN Server" : serverName.value;
  27.             if(!internet)
  28.             {
  29.             TNServerInstance.Start(5127, 0, null, 5129);
  30.                         UpdateButtonText();
  31.             }
  32.             else
  33.                         {
  34.                  TNServerInstance.Start (5127,0,null,TNServerInstance.Type.Tcp,TNet.Tools.ResolveEndPoint (lobbyServ,5129));
  35.                         UpdateButtonText();
  36.             }
  37.            
  38.                 }
  39.                 else
  40.         {
  41.             TNServerInstance.Stop();
  42.             UpdateButtonText();
  43.         }
  44.         }
  45.  
  46.         void OnNameChange ()
  47.         {
  48.                 TNServerInstance.serverName = string.IsNullOrEmpty(UIInput.current.value) ? "LAN Server" : UIInput.current.value;
  49.         }
  50.  
  51.         void UpdateButtonText ()
  52.         {
  53.                 buttonText.text = Localization.Localize(TNServerInstance.isActive ? "Stop" : "Start");
  54.         }
  55. }
  56.  

then on the gameobjects _NectworkManagers>Tcp Lobby Remote Port set to 5127 instead of 5129 ( right? it doesnt connect if i dont do so)
run in background ticked
I am out of options to make the lobby server work, someone tried and succeeded?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 05, 2013, 02:41:00 PM
I will see about changing the built-in example to use a remote server and package it up sometime tomorrow.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on November 05, 2013, 08:21:19 PM
ah you are awesome, you will probably save months of hard testing for lot of novice devs like me in one hour ;D
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 06, 2013, 10:29:18 AM
So here's the most basic example.

1. Start the TNServer as a lobby server on a remote PC. Note that it has to be a remote PC as this is a lobby server, not a game server. I started it on my Amazon EC2 micro instance, for example.
  1. tnserver.exe -name "Remote Lobby" -tcpLobby 5129
2. Create a new scene, add a game object, add a new script to this game object:
  1. using UnityEngine;
  2. using TNet;
  3.  
  4. public class Test : TNBehaviour
  5. {
  6.         void Start ()
  7.         {
  8.                 TNServerInstance.serverName = "My Server";
  9.                 TNServerInstance.Start(5127, 0, null, TNServerInstance.Type.Tcp, Tools.ResolveEndPoint("your.lobbyServer.com:5129"));
  10.         }
  11. }
3. Assuming you changed "your.lobbyServer.com" to be your remote server's address, hit Play. You should now see the game server get added to your lobby server and stay on the list.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: aidji on November 06, 2013, 09:56:30 PM
oh thank you so much, it was the server on amazon that didnt had the good config i did this :

start> run> browse to the server exe and add this after in the field "-name "Remote Lobby" -tcpLobby 5129"
then in the unity editor changed back tcp port to 5129 and it worked perfectly
thank you one million time
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: DonChipriani on November 11, 2013, 10:14:08 PM
Hi. I stumbled upon this issue while trying to build Starlink UI Starter Kit for IOS.

UIOptionWifi.cs needs updated to NGUI v3

the code between #if UNITY_ANDROID || UNITY_IPHONE #
bellow is the changed code with the original code commented out:

  1. using UnityEngine;
  2.  
  3. /// <summary>
  4. /// Checkbox controller for the "wifi" state in options.
  5. /// </summary>
  6.  
  7. [RequireComponent(typeof(UIToggle))]
  8. public class UIOptionWifi : MonoBehaviour
  9. {
  10.         public UILabel info;
  11.         void OnClick () { info.text = Localization.Localize("Carrier Info"); }
  12.  
  13. #if UNITY_ANDROID || UNITY_IPHONE
  14.         UIToggle mCheck;
  15.  
  16.         void Awake ()
  17.         {
  18.                 mCheck = GetComponent<UIToggle>();
  19. //              mCheck.onStateChange = SaveState;
  20.                 EventDelegate.Set(mCheck.onChange, SaveState);         
  21.         }
  22.  
  23.         void OnDestroy () {
  24. //              mCheck.onStateChange -= SaveState;
  25.                 EventDelegate.Remove(mCheck.onChange, SaveState);      
  26.         }
  27. //      void OnEnable () { mCheck.isChecked = PlayerProfile.allow3G; }
  28.         void OnEnable () { mCheck.value = PlayerProfile.allow3G; }     
  29. //      void SaveState (bool state) { PlayerProfile.allow3G = state; } 
  30.         void SaveState () { PlayerProfile.allow3G = mCheck.value; }
  31. #else
  32.         void Awake () { NGUITools.SetActive(gameObject, false); }
  33. #endif
  34. }
  35.  
  36.  
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 13, 2013, 03:09:34 PM
I guess I missed that one, thanks!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: TriplePAF on November 15, 2013, 10:48:54 AM
Hello,

Is it allowed to use the artwork from this package in a commercial product. In my case I wan't to use the background pictures (Nebula with the big S inside).

Kind regards,


Peter Fonk.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 15, 2013, 11:42:34 AM
Yup, go for it. :)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: DonChipriani on November 30, 2013, 08:00:31 PM
Why does this asset require Unity 4.3 after the last update(s)?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on November 30, 2013, 08:47:23 PM
It's just the version I used to upload it. I only have 3.5.7, 4.3.1, and 4.5 installed.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: DonChipriani on December 04, 2013, 11:13:16 PM
How is v4.5 working out for you?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on December 05, 2013, 03:55:46 PM
It's perfect, and no bugs whatsoever!  ::)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: bjornrun on December 25, 2013, 05:29:59 AM
When using the input areas in Main Menu, how can you get them scroll horizontal when entering more text than can be shown at one time?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on December 25, 2013, 03:39:09 PM
All NGUI input fields do that by default if you set the max number of lines to 1.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: tbj22 on February 10, 2014, 02:42:47 PM
Thanks for posting this package.  The code is very clear and well laid out.

For a larger team, where multiple developers/designers would be working on each UI screen, would you recommend splitting the "Window" objects (eg "Window - Main Menu" etc) into prefabs, or into seperate scenes, or something else?  The entire UI being in one scene would cause problems for a larger team.

I played around with creating the Windows as prefabs, and it works ok, except the "window" property of the UIWindowButton script cannot be set in the prefab data, only in the instance data.  This makes sense, and I guess a different approach would have to be taken, maybe to create a mapping of enums to "Window" prefab instances.

Thanks again!
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on February 10, 2014, 06:26:47 PM
Prefabs can't reference things that are not a part of the prefab -- it's a Unity limitation that makes perfect sense.

You can create a compartmentalized UI where each window is its own prefab. You will want to make it so that the main menu that links all the windows together is either a separate prefab, or not a prefab at all -- it will just always be a part of the scene. This way you can have it keep all the references.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Bradamante3D on February 12, 2014, 06:10:02 AM
Has Starlink UI been upgraded to the changes that NGUI 3.x brought? Or, do I have to update Starlink UI myself (as shown in your YouTube "fixing my own crap" video) once I bought it?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on February 13, 2014, 03:31:30 AM
Yes, it has been updated. The video showed me updating it -- I simply kept it as a helpful reference for others.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: DevFromSpace on February 15, 2014, 11:05:27 PM
I want to play with the ranking system, i found how to load the file from a webserver.

so if i want to update the ranked.txt file value. like after each party can i do something like:

PlayerProfile.RankXP(addValue);

i believe it need to write the file. its definitely note included in the current version? its only readable?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on February 16, 2014, 03:44:00 AM
The rankings are from the actual game -- Starlink. The game is what updates those values. UI kit simply reads them.

I do the updating via a web call to a PHP script residing on tasharen.com.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: hexaust on March 05, 2014, 10:39:04 AM
Any idea on what happened with the fonts? I updated to NGUI 3.5.2 and this showed up:

(http://i.imgur.com/ogSoPJQ.png)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on March 06, 2014, 12:31:20 PM
The atlas texture was imported with "Alpha is Transparency" checked. Uncheck it.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: casperjeff on March 23, 2014, 09:11:25 AM
Question about resize/scaling for different resolutions.

I accidentally deployed a derivative of this UI on galaxy s4 in portrait mode and obviously - things didn't fit so good.
I re-deployed in landscape and all was better - although there was some unused screen real estate - and the interface could have been bigger to accommodate.
I'm not an NGUI expert...but tips on how to make the entire menu system (if possible) to auto-scale based on screen resolution or is it designed for a single size?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on March 24, 2014, 06:44:41 PM
It's using Fixed Size root, meaning it's always the same size relative to the height of the screen. If you want it to be relative to width or height, check the "Shrink Portrait UI" option on the UIRoot.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: casperjeff on March 24, 2014, 08:20:40 PM
as always...thanks for the quick reply and the great asset(s)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: casperjeff on April 04, 2014, 07:38:08 AM
NGUI and UI Starter Kit...
It does an indie good......
...saved me countless hours (some of the helper nuggets in the UI Starter Kit are pretty slick!)
https://www.youtube.com/watch?v=vDooQW1DXzw (https://www.youtube.com/watch?v=vDooQW1DXzw)


Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sonicviz on July 03, 2014, 12:06:21 PM
Hi,
I've got a very weird problem using the UIWindowButton from Starlink.

I have my UI axis aligned on x,y,z = 0, and the main panel shows correctly on scene start.
But when I hit a UIWindowButton to go to another panel the panels are getting offset on y axis by 6, causing stretched backgrounds to show gaps on each side.

Is there some hard coding or a setting somewhere that's doing this, because I can't figure out what is causing it.

ty!

EDIT: I think I found it. In UIWindow update is a check against layer == 10 that does a rotation around the y-axis.
Layer 10 is hardcoded as the 3D UI layer , which I'm not sure is a good idea, or the fact that the y-axis rotates but does not get set back to 0 and so is not axis aligned.

Also, will the starlink kit be updated to latest NGUI techniques soon?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 04, 2014, 03:15:42 PM
Which techniques are you referring to?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: sonicviz on July 04, 2014, 10:11:55 PM
I think last time I looked it was using the old deprecated anchor system and I think I noticed something else like that but can't recall off the top off my head.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 05, 2014, 11:24:42 PM
You just reminded me why I should fix that deprecated anchor regression issue introduced in the last version. :)

I'll revisit the UI kit in the near future.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: dustinwloring1988 on January 18, 2015, 09:29:45 PM
get the following error any idea
im using the latest version on NGUI and unity 4.5.5
Assets/StarlinkUI/Scripts/Custom/UI/UIOptionCaps.cs(20,46): error CS0117: `Localization' does not contain a definition for `instance'
Assets/StarlinkUI/Scripts/Custom/UI/UIOptionCaps.cs(30,30): error CS0117: `Localization' does not contain a definition for `instance'

thanks
dustin
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on January 19, 2015, 12:10:19 PM
You need to update your UI Starter Kit. It doesn't use Localization.instance anywhere.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ricky on August 15, 2015, 05:41:17 AM
sorry to revisit the lan issue again, but i'm having problem like previous user who made about 10 posts regarding the subject.

In the video, you click on Lan, start lan, then join the lan as host and it takes you to the next screen for game settings.

https://youtu.be/nNDKr716MT8?t=8m43s (https://youtu.be/nNDKr716MT8?t=8m43s)

That is not happening.

Followed step by step instructions, and can't get lan to work properly.  The lan window shows the server listed, when clicking on it, it says there is 1 client connected, when 2nd client clicks on it, it says there are 2 clients.

Neither the host or the client is sent to the next step.

Reiterating, the video shows the host start lan game, then, connect to it's own lan game, then immediately after connecting by clicking the server listed, the following occurs:

+Join Game
+Create
+New Game
Loads "Game Scene"

The current asset store package, never makes it to Join Game window, it just refreshes Server List window with number of clients connected to the LAN server that is made.

There are no errors displayed.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on August 15, 2015, 11:14:23 PM
Did you add the scenes to the build list?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ricky on August 21, 2015, 09:39:34 AM
yes i did, and it's still not working at all.  Is there any way you can explain what is supposed to be happening, behind the scenes, when you click that lan server join?  Or can I show you on twitch in a live demo of the event, and what's going on?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ricky on August 21, 2015, 09:51:32 AM
Did you add the scenes to the build list?

here is a screenshot of what is going on:

(http://i.imgur.com/FdnPWmd.png)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ricky on August 21, 2015, 10:16:34 AM
wow, i just randomly found the solution and better yet why the problem exists in the first place and I believe it's all in the order in which you import the packages.  Especially since this is an 'example' asset on how to use, this may be important for anyone else who runs into this problem.

Steps to reproduce:
Start with new empty project
Import Starlink UI project
Import NGUI
Open Menu scene
Import TNET starlink addon (menu scene will now reload)

..... Although compilation hasn't finished due to not having imported TNET yet, the problem might occur here.....

Import TNET.

Aftercompilation, an assignment is missing on one of the menu items.

(http://i.imgur.com/POJY4g5.png)

Since I had never seen the asset before, how was I to know an assignment was missing there?  The misleading part was, there is nothing in the code on the actual button you press that would indicate the action is to be performed somewhere else, in another script and the script is attached to a completely different game object.

If I import TNET first before doing any other step, then import Starlink/TNET Integration/NGUI, there are no issues.

=D
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Bradamante3D on March 22, 2016, 09:12:44 AM
Hi,

are there any plans for updating the Starter Kit: Starlink for TNet 3? I bought Starlink UI a while ago (and the Space Game Starter Kit for that matter) and I think both are still valid learning material. I guess I don't want to see my purchases invalidated I guess.

Any plans?
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on March 24, 2016, 03:12:37 AM
I'll add it to the TODO list.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Bill.Smock on June 07, 2016, 08:17:04 PM
My internet lobby list is including the main TNet Server instance that is running on EC2.  Should I simply exclude this by name or is there another way you would recommend?  (this lobby was set up as detailed on pages 5-6).  Amazing how easy it is, considering I have no experience with any of this and it took all of 2.5 hours. 

(https://i.imgur.com/Qmf9dRb.png)

edit:  thanks for updating to TNet3 :)
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 09, 2016, 02:57:12 PM
Start your lobby server without running the game server.
  1. TNServer.exe -name "Lobby" -tcpLobby 5123
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Sarper on June 22, 2017, 08:20:54 AM
I'll add it to the TODO list.

Any news on updating the Starlink to work with TNet3? Purchased it before it was free, would love to use it to learn more about Tnet3.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on June 27, 2017, 12:06:22 PM
Starlink UI kit has been updated to use TNet3 a year and a half ago, so I am not sure what you're asking...
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: Sarper on June 27, 2017, 12:29:16 PM
Starlink UI kit has been updated to use TNet3 a year and a half ago, so I am not sure what you're asking...

Oh right, since your last post on this topic says it's added to the TODO list and there is a compile error on the package I thought it wasn't done yet.

  1. Assets/StarlinkUI/Scripts/Custom/Misc/GameManager.cs(234,26): error CS0115: `GameManager.OnEnable()' is marked as an override but no suitable method found to override

TNBehavior doesn't have an OnEnable method. Removing the override keyword and base.OnEnable call compiles it. Guess OnEnable got removed after updating the Starlink package.

Apart from that I get a bunch of localization warnings. I see that many widgets have UILocalize attached to them without any keys present. I'm using the latest versions of NGUI (3.11.4), TNet3(3.0.9) and Starlink UI (1.2.0) from the Asset Store.
Title: Re: UI Starter Kit: Starlink (NGUI + TNet)
Post by: ArenMook on July 06, 2017, 06:32:23 AM
NGUI has its own Localization.txt. Delete it if you're using Starlink's.