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.


Topics - ldw-bas

Pages: [1]
1
TNet 3 Support / Ghost RFC
« on: April 18, 2014, 08:46:46 AM »
Hi!

I have ran into an issue with TNet. In my game I have 2 network level, one lobby and the actual game. When playing the game you go back and forth from lobby to the game level. Everytime, except for the first time, I load the game level I recieve ghost RFCs. Position updates for position I have not been in that game yet. After some debugging it looks like these are position update from just before quiting the level the previous time. When I run this on my remote VPS (with pretty low latency, around 16-50 ping) this happens everytime.

To make this issue clearer I will write down a sequence of actions that I think are happening that cause this issue.

Server sends load lobbylevel
Server clears saved RFCs
Client1 send RFC
Client1 receives load lobbylevel
Client2 receives load lobbylevel
Server receives RFC
Server distributes RFC
Client2 receives RFC
Client2 store RFC in delayed calls
[just lobby level code going on]
[switch level to game level]
All clients load game level
Client2 creates object with game uid as original ghostRFC sender
Client2 executes the delayed call from the previous level leading to unexpected behaviour

I hope the explanation is clear, otherwise I would gladly clearify the issue. I can work around this issue for now but I think this is something that should be handled by TNet and not by external code.


2
TNet 3 Support / TNet.List IEnumerable
« on: February 27, 2014, 04:34:48 AM »
Hi!

I was working with the TNet.List and I figured it doesn't implement IEnumerable, while it does implement IEnumerator. IEnumerable is very useful for LINQ as you might know. From earlier post I have found that there is a disfavor against the .NET collections. Although I agree with on implementing a faster list. I do not agree on not using foreach and LINQ etc. Implementing IEnumerable on the TNet.List would not influence performance on any of the existing code. I usually prefer features before performance, I think it's better to do performance optimization afterwards. For my menu for example I don't care about performance at all. I don't think it's good to force this performance thought onto everyone by not implementing IEnumerable.


3
TNet 3 Support / DontDestroyOnLoad on TNObject
« on: February 25, 2014, 05:54:25 AM »
Hi!

I wanted to make a PlayerData object containing the team and such for the player. I had made this PlayerData an TNObject so all the persistance happens automatically. But I want to set the team in the gamechannellobby scene and keep this information when I load the actual game scene, but unfortunately all TNObjects are unloaded when the level is loaded. So is my method just not the way to go or is it a missing feature?

4
TNet 3 Support / HostChangedEvent
« on: February 21, 2014, 03:57:49 AM »
Is it an idea to implement a HostChangedEvent? I would like to show the host to the user, currently I have to check every update if the hostID is the same as a playerID I think a host changed event would be a better solution. What are your thoughts about this?

5
TNet 3 Support / udp problems behind a router
« on: February 14, 2014, 10:39:30 AM »
Hi,

I am developing a networked game using TNet. I works pretty nice, but now I have ran into a problem. I wanted to take my game outside of the LAN environment. This works fine with tcp but it doesn't work with udp packages.

Setup:
VPS running TNServer in mono.
Laptop on a home network running the game (one or multiple times)

Checks I did:
VPS is configured correctly, connecting to internet directly without router everything works fine.
Router configuration should be fine, this has been the same for ages and I have played all kind of games over internet of which some must use UDP. I didn't have to do any router configurations for those. So I guess it is a programmatical issue more than a configurational on the router side.
Client does send UDP packages that do arrive on the server.
Server only sends two UDP start package (which I guess is for the lobby)
After I had done a further code inspection it seems the server is denying udp packages because they are send from a different address than the address set on the player. Actually this is just another port, for example the UdpEndPoint for my client player is set to [externalip]:35138 and all message from the client come from [externalip]:59587 .
So my first guess to fix this would be to do the setting of the UdpEndPoint over udp instead of tcp, but I am not sure if this is the way to go or if there is a better solution to this problem.

I hope my description is clear, otherwise I would gladly clarify them.

Pages: [1]