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

Pages: 1 [2] 3
TNet 3 Support / Re: RFC rfcID limit
« on: June 13, 2014, 02:25:32 PM »
You know you can assign numbers to enums? So you don't have to start at 0.

  1. public enum RFCs : byte {
  2.     MyFirstRFC = 1, // don't start at zero
  3.     MySecondRFC,
  4.     MyThirdRFC,
  5.     LotsOfSpaceToAddMoreRFCsAbove = 50,
  6.     MyFiftyFirstRFC
  7. }

I like to put all third-party assets/packages into a directory to help keep my project uncluttered. But NGUI's Font Maker requires FreeType.dll to be in the Assets/NGUI/Editor directory. Why is that? The dll is still in my project folder, and it's still in the same location relative to the other NGUI files, but the entire NGUI folder is now a subdirectory of another folder and that breaks things.

Am I wrong in thinking that this shouldn't break things?

Hi folks,

Over the past couple of days I've been looking over the NGUI documentation, forum threads, video tutorials, and more trying to figure this out. I've come to the conclusion that I just need to ask because I can't find the answer anywhere else. (I'm not saying the answer isn't out there, just that I seem to be unable to find it!)

I would like to dynamically instantiate an unknown number of buttons at runtime that each correspond to an action or skill, depending on the character.

For example, if my Fighter class has 5 actions and my Mage class has 8 actions, then if I select a fighter character I'll want to instantiate 5 buttons, each one mapped to a different action. If I select a Mage character, then I'll want to instantiate 8 buttons, each one mapped to a different action.

The part I'm having trouble figuring out (though I'll gladly accept hints/tips/help with any of it) is how would I dynamically change the function that is called when the button is clicked? I mean, how do I dynamically map a button to a different skill/action?

Or am I thinking about this the wrong way?

NGUI 3 Documentation / Re: UIGrid
« on: March 03, 2014, 05:35:50 PM »
Because you have MAX PER LINE set to 1. :D
Then it makes one column, and then it starts with next. Set it to 8 or whatever and you will see the difference. (havent tried it but i am pretty sure)

Thank you. That was indeed the problem. I could have sworn I didn't mess with Max Per Line until after the problems started happening, but changing it back to 0 gives me the intended results.

Thanks again!

NGUI 3 Documentation / Re: UIGrid
« on: March 03, 2014, 04:19:26 PM »
I am really confused by the UIGrid Arrangement option. It seems to be backwards.

I'm trying to make a vertical grid (a column of items with 1 item per row, extending up and down vertically on the screen), but selecting "Vertical" makes a horizontal grid, and selecting "Horizontal" makes a vertical grid.

Is this intentional behavior? Common sense as well as your documentation would seem to indicate otherwise.

TNet 3 Support / Re: Objects Not Being Deleted after channel leave
« on: March 19, 2013, 11:55:27 AM »
OnNetworkLeaveChannel and OnNetworkDisconnect don't get called until after you have left the channel or disconnected from the server. Thus, you can't affect anything that is still in the channel or on the server after you're no longer there.

When you create the player object, pass in false as the persistence bool. e.g.:

TNManager.Create(playerObject, position, rotation, false);

TNet 3 Support / How much does TNManager.noDelay affect?
« on: March 09, 2013, 03:47:10 AM »

I was curious how much is affected when I set TNManager.noDelay to true. Does that affect the entire server (and thus, all clients that are connected, making Send requests) or just the current channel?


TNet 3 Support / Re: Gateway: None found
« on: March 08, 2013, 04:32:21 PM »
Here's another pattern I noticed: If I test some code that's using SendQuickly, by running two EXEs on this machine, but connecting to the Server that Roidz is running, SendQuickly works fine. It's only when he is connected to his own server that things seem to get messed up somehow.

TNet 3 Support / Re: Beginner with networks needs some help!
« on: March 07, 2013, 11:55:18 PM »
ArenMook, do you think people will interpret the term "Host" to mean that that person is the server instead of something like an op?

If you take the perspective of someone new, there is quite a lot going on compared to what someone might expect.
So if they simply expect: Servers and Clients
TNet actually provides: Lobby Servers, Lobby Clients, Servers, Clients, Channels, and said "Hosts"

I feel like this particular term might be a stumbling block for those trying to understand the package. Perhaps a term like "moderator", "chief", etc may be more apparent so as not to get confused with which entity is the real server. Either way, looking forward to your enhancements in the next version.

Here's how I understand these terms with regard to TNet:

Server: This is the actual backend server that manages communication between all the clients. All clients (including the person who will be the host) connect to the server.
Client: Anyone who connects to the server. The host is also a client.
Host: The client who is hosting the current channel (instance). Think of him like a party leader, or the person in charge, or whatever. He's just the guy who joined first or set up the game (depending on how your game works). Note that the host could also be running the server, but isn't necessarily. The Host is also a client, but good practice for TNet is to make the host the authority on the game, make all the decisions, run all the simulations, etc., and then send the results to the other clients using the server.

TNet 3 Support / Re: Gateway: None found
« on: March 07, 2013, 07:27:15 PM »
What doesn't work? UDP? I actually have two internet connections here -- cable, via a Netgear router (with UPnP support), and DSL via an old stock gateway device that can't do UPnP. The examples work as expected on both. On the DSL line it takes 3 seconds to connect because it first tries the external address, and without UPnP the port is blocked, so it fails. At that point it tries the internal address, and it succeeds.

Does the top left corner show "TCP+UDP" for you?

Top left corner shows "TCD+UDP" for both of us. But when we use SendQuickly, it never gets sent.

If I connect to his server with two of clients running on my own machine, then SendQuickly will work fine. But if I'm running a client on my machine connected to a server on his, and he's running a client on his machine connected to his own server, SendQuickly does not work.

EDIT: We just tried Example 3 and we don't see the cubes move as they're being dragged around. They just suddenly teleport to a new destination, probably once the other person lets go.

TNet 3 Support / Re: Gateway: None found
« on: March 07, 2013, 12:05:48 PM »
Not all routers/modems support UPnP. Apple Failport Extreme doesn't, for example. Good majority of the ones from the past 5 years do though.

SendQuickly will only function if your UDP is functional. What's your build target and have you tried testing it with the built-in examples? (3 uses it for cube movement)

I'm not sure which router my teammate is using, but I'm not using a Crapple Failport Extreme. I believe it's new this year, possibly last year. It's a Cisco DPC3825, the manual says it features "UPnP IGD 1.0"

Build target is Desktop (PC/Max/Linux). The interesting thing is that it appeared to be working for me when I ran two copies of the exe at the same time, but when my team mate and I both connect, it does not work. And it does not work at all for my team mate if he tries running two exes.

TNet 3 Support / Gateway: None found
« on: March 06, 2013, 11:17:18 PM »
Is it a problem that the gateway is never found? I can't seem to get UPnP to work with the built-in TNServer.exe. My teammate and I have tried this on multiple machines, on multiple networks. We get an error:

ERROR: (UPnP) A connection attempt failed because the connected party did not pr
operly respond after a period of time, or established connection failed because
connected host has failed to respond
Gateway:  None found

Is this bad, or will it work with this error?

I don't know if this is related or not, but we have two lines of code, the SendQuickly doesn't work, but Send does:

  1. //tno.Send("setPos", Target.OthersSaved, transform.position, transform.eulerAngles);  // this sends over tcp and works
  2. tno.SendQuickly("setPos", Target.OthersSaved, transform.position, transform.eulerAngles); // this sends over udp and doesn't work

There are no errors. SendQuickly just doesn't update the position, but using Send, the position is updated.

TNet 3 Support / Re: JoinChannel?
« on: March 06, 2013, 09:28:59 PM »
Most common case: you connected to the server using the TNet's example. It creates channel 1 with a persistent flag, meaning when you join in the future from any location, it will try to restore the state (read: load the first tutorial from TNet).

If you don't have that scene added to build settings, you will see an error instead.

Delete the server.dat file to clear this saved data.

That seems to be the problem. But I wasn't getting an error message. It was just silently failing. This was using the TNAutoJoin script.

TNet 3 Support / Re: JoinChannel?
« on: March 06, 2013, 01:24:18 AM »
Is there a reason why you can't pass 1 as the channel ID in TNManager.JoinChannel(1, "MyScene");? Trying this, it never loads that scene. But if I change the ID to anything but 1, it works. Is this a bug? Is 1 reserved for some special purpose?

TNet 3 Support / Re: JoinChannel?
« on: March 05, 2013, 01:41:03 AM »
JoinChannel creates a new channel if it doesn't exist based on the ID you provided. There is a JoinRandomChannel when you want to join an existing random channel, and thinking about it, I'm going to add CreateRandomChannel in the next update. For now just pass -1 for the channel ID and it will create a random one.

CreateRandomChannel seems a bit confusing for a name, IMO. Why would I want to create a random channel? I think I'd much rather CreateNewChannel.

Pages: 1 [2] 3