Author Topic: UI Starter Kit: Starlink (NGUI + TNet)  (Read 92719 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
UI Starter Kit: Starlink (NGUI + TNet)
« on: June 03, 2013, 07:51:53 AM »

* 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:
  • Window transition framework
  • Options window with working features
  • Leaderboard visualization
  • Download & display news
  • Saved player profile and options
  • Full/Lite version functionality
  • Game chat window
  • Many other useful scripts
  • Fully localized
Optional TNet Networking integration adds:
  • Server, channel and player lists
  • Internet/LAN/Direct Connect
  • Multiplayer chat
  • Other stuff™
Sounds interesting? Here is the ReadMe doc that comes with it.

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
TNet Version: Windows, Mac, Android











« Last Edit: June 27, 2013, 05:46:11 PM by ArenMook »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #1 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.

littleallred008

  • Guest
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #2 on: June 03, 2013, 09:18:09 PM »
I can't wait! Can we know what the price will be yet?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #3 on: June 03, 2013, 09:26:35 PM »
$45

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #4 on: June 06, 2013, 03:26:28 PM »
This sounds very interesting indeed.  I like the look at those new functions in this kit :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #5 on: June 07, 2013, 08:33:27 PM »

Burletech

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #6 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #7 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.

iwishash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #8 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.

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #9 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #10 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.

danreid70

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #11 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!

danreid70

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #12 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...

_Daniel_

  • Guest
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #13 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Starter Kit: Starlink (NGUI + TNet)
« Reply #14 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.