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

Pages: [1] 2 3
1
NGUI 3 Support / Re: [Solved] Recommendation on how set up my NGUI Root
« on: October 12, 2017, 01:59:14 PM »
Thank you Aren, that is what I did, kind of.

I added all the needed UI under my Root, which has don't destroy on load (And it is actually like a lazy gameobject, which instantiates itself when called), and I just call each window when needed, and even created some modal screens using your eventDelegate methods.


I had a problem when loading async another scene because the loading has it's own UIRoot, but I fixed it by changing one line of code and everything runs smooth as butter. I thought having a lot of UI disabled would be a lot of overhead, but it is negligible.

2
NGUI 3 Support / Re: Ngui Root shrinks after async loading...
« on: October 06, 2017, 01:59:53 PM »
For anyone having the same problem, it is indeed because of the missing reference.
I just added in UIRect 472

  1.         if (mCam == null) {
  2.             ResetAndUpdateAnchors ();
  3.         }
  4.  

3
NGUI 3 Support / [Solved] Ngui Root shrinks after async loading...
« on: October 06, 2017, 11:14:22 AM »
Ngui Root shrinks after async loading and it breaks all my anchors. I do not have any other code to modify the Root's size.

Could it be happening because the Loading has it's own root , which gets destroyed, and the "Level selection" has its own NGUI Root as well?

https://youtu.be/LjiFYA56aSw

It does not happen when I load the "Level selection first" and then I pass to a loading screen.

Edit 1:
I guess what is breaking my stuff is having two 2D UI Roots at the same time and destroying one of them (Because of the loading Async). Do any of you have suggestions on how to solve this?

Edit 2:
I am getting closer to the answer, it is really due to the double 2D UI Root. The camera gets cached by the roots... When the UICamera from the loading gets killed, which nulls the references and makes my anchors change in size to 2w, 2h.

4
NGUI 3 Support / [Solved] Recommendation on how set up my NGUI Root
« on: October 02, 2017, 07:04:16 PM »
Greetings.
I have been struggling on a good way to set up my NGUI Roots.
 I used to have an NGUIRoot prefab, but when it comes to the moment of adding other components, things get "shaky".

Additionally, lately I have found some elements I need to reuse in my main menu and in my levels, which cause this huge struggle because the "Levels" UI is a prefab, and if I nest other prefabs, then I will break the link to the original one.

This is not like a "This is the right answer" kind of question, I was wondering... What would you suggest, fellow devs?

These are the solutions I believe they could work:
> Adding all the needed UI in every place in One centralized prefab, set up any other needed stuff with code as needed. The root would not destroy on load.
> Saving all the elements in Panel prefabs and spawning them as needed on demand, Root could be a another prefab, spawned as needed.

Any suggestions?

5
NGUI 3 Support / Re: UIProgress bar position at x value
« on: May 17, 2017, 04:35:27 PM »
Thank you, that was all I needed to know.

6
Set up your camera at your UI_Root, using you "Go to" resolution, and determining if you are going to be flexible or constrained.

Basically, you can set up to some aspect ratios, make some extra space on wider or taller screens.

But then, you want some sprites to be always on the corners regardless of how wide a phone is... Then you go to your sprites and set anchors.

:)

7
NGUI 3 Support / Re: GUI Grid with pages
« on: May 10, 2017, 11:23:37 AM »
I usually create a Panel with clipping on, then I separate my "Pages" in "Widgets" (Alt+shift+W).

If set up your levels, you can use a grid; Look at the demos, while I believe they do not have a "Menu" like that, they do have examples that resemble what you want to do.

Sadly, my most recent "Level Selection" was not made with NGUI.

8
NGUI 3 Support / Re: UIProgress bar position at x value
« on: May 08, 2017, 12:53:59 PM »
This is what I mean.

I have a fillbar.
The thumb represents how many entities you have killed. Every level has a "marker" that indicates how many entities you must kill before you can pass the level.

The amount is usually 75%, but I wanted to know how to set my marker at whatever percentage of the fillbar.

9
NGUI 3 Support / UIProgress bar position at x value
« on: April 27, 2017, 12:50:07 PM »
Greetings.

I was wondering if is there any convenience method to get either the local position or the world position of where a UIFillbar would be at t value.

This is because in my game I set a minimum percentage to win, and I want to get it on start, move the sprite that marks that percent, to whatever value it would be on my fillbar.

Because, I could hack it by having the sprite childed to the thumb, setting the value to t, unchilding the line at that position, then moving the value back to 0, but I think that is not the right way to do it.

10
TNet 3 Support / Re: TNET 3 vs TNET 2
« on: August 30, 2016, 05:09:29 PM »
From big features like simultaneous multiple channel support to small but very useful features like the ability to determine which player sent each RFC packet, TNet 3 is all around better. While you could still use TNet 2, TNet 3 has more features, is more robust and stable. Check the sticky post here with the patch notes for a full list of what changed in TNet 3.0.0 onwards.

First of all, sorry for (Kind of) necroposting.

I am thinking on picking up and improving over an application that I did with TNet 2; Will my application be still (mostly) compatible after upgrading, or will I need a total rewrite?

Thank you.

11
TNet 3 Support / New TNET Project
« on: August 17, 2015, 04:24:22 PM »
My last TNet project was a huge success. (Thank you Aren...)

However; it was a WLAN game, so, I did not have to worry about servers at all.

But now, I want to try doing something to be played online. I see a lot that you mention Amazon EC2 server as a hosting solution. I would like to know, what should I look for in a server in order to have a game using TNET working on it. The load should not be too much, yet; it should be stable.

I am asking this, because we might get a Server to host our own leaderboards (We are not using neither Play Services, or Game Center) using PHP, and we would like to kill two birds with one stone. Is there anything specific I should look for in order to run TNET on the server?

Or, am I getting all tangled up?

12
TNet 3 Support / Re: App is live! Neon Dance
« on: July 12, 2015, 01:24:28 PM »
I will download it as soon as I have a chance.

13
TNet 3 Support / [HELP] Game running on local WAN?
« on: July 12, 2015, 01:12:29 PM »
Hello... I am almost done with my first TNET App...

However, I have this problem...
The app is supposed to be used at a conference, most likely a hotel room; therefore, the networks are not to be trusted... So, in order to avoid having problems with the network, I thought creating an Ad Hoc network, and everyone connecting to it would be my solution.

However, I cannot connect to my server on an Ad Hoc network... Is it possible?
This is what I am currently Doing, neither the TNET example, nor my app connects.

First I create my network in my MAC


Then I run my server using mono


Then I connect to the network.
Then I run the app... The example cannot find any servers to join... Of course I can join using localhost, but then again, iPads aren't able to connect.


Both in the example, and in my app, I keep getting this error.


And I cannot create new Servers, because a server is already running (Also, because I do not need to).




What is my best choice in order to make my game work in Unknown networks? It is supposed to be a WAN game.  Will I be able to run without internet connection, Will I be able to run it in an Ad Hoc Network?
Should I use a router? I am sorry this might be a little bit out of the scope of TNET... But I would really appreciate your help.

14
TNet 3 Support / Re: Approaching my first Tnet Project [Suggestions]?
« on: July 03, 2015, 09:29:24 AM »
It's simple... the same scene should contain both host and client's UIs. Which one will be displayed depends on whether the TNManager.isHosting is true or not. Since it's the same scene, you will have the same RFCs. Everything is simple.

That is what I figured out... (And what I am doing at the moment).

I guess I was overthinking after reading some other posts... After all, it is just a very simple app.
Thanks Aren. I have been playing with TNet, and... It is a god send compared to Unity´s (now legacy) networking.

15
TNet 3 Support / Approaching my first Tnet Project [Suggestions]?
« on: June 30, 2015, 01:44:11 PM »
I am about to start a project with Tnet.

I am wondering if I am moving on the right track using TNET... If I understand the high concept of it.

It is a "simple" (Quotes, because I have never done network code before) quiz game.
Long story short, every player "races" answering quizz questions, and the host is a display of the players´ information (like top 5 racers, race time, a display of the track, etc); it is only played on LAN.


So, my question are...

First step would be, everyone joining the same Address, right?
  1. TNManager.Connect(ent.internalAddress, ent.internalAddress);

And then, if there were to be many simultaneous races, each race would be a separate channel, right?
Because I need one host per race, because, at least in the logic I have been thinking... The host would have the display, and the clients would "play". That is what I did for my prototype using unity´s standard networking.
Edit: The answer is, yes, every race would be a separate channel.

The first person to join a channel is designated as that channel's host. Think "Operator" in IRC. Same concept. Only one player can be a channel's "host" and when the host player leaves, another one is automatically chosen.


But then... I have a problem... I was reading the thread "Using a Smartphone as a gamepad via TNet ?", and it states that two different scenes cannot have the same channel.
No. Same channel means same scene. You can still send RFCs via private messages to players elsewhere, however.


Also, Aren does not recommend (in that case, the joypads and the "view screen") sharing scenes.

I don't recommend you having them share a scene. You don't need the whole scene to send data. tno.Send with Target.Broadcast will send it to everyone. tno.Send with a player target will send a private message to that player. Either way, no need to be inside the same channel to send data. Just make sure that both places have the same TNObject ID / script.

So, I am kind of confused on how to proceed here.

(In my prototype, I really have a class in the hosts that handles the data, whom is in a separate scene, and each player plays the questionnaire scene, but they never meet each other.)


Other than that, I feel like syncing the data and displaying it should be easy, because all the data I need to send to the clients are the questions, and the clients send back their answers... based on those answers, the host processes the data and displays at the main screen.

I will also attach some pics of the prototype, so you get an Idea of what I am doing.

Main screen



Host Screen



Client Screen

Pages: [1] 2 3