[[ NEW ]] FPS Demo!

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Postby tpenn » 19 Nov 2010, 15:19

For what it's worth, I just started implementing UDP in my own project after updating to RC-1a.

The unity shutdown problem exists only if SmartFox.InitUDP is called. It doesn't matter if anything is actually sent via UDP, just initting it is enough for the issue to occur. If I do not init UDP, it shuts down fine.

I've noticed that although I only call InitUDP once, I am seeing the UDP_INIT event firing 2-3 times. While I wasn't using UDP before so I can't say what was normal, that doesn't seem quite right.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 17:31

When I get back from my trip, I will take a closer look at the UDP part.

Something you can do in your end for testing is to comment out the UDP.

This is done simply by commenting the InitUDP in the lobby code, and then for the networkmanager, remove the "true" boolean for transformation sending.

If that makes things non-crashy, then we found the culprit. I wont have time until next weekend to trace it deeper though. Thanks for your understanding, and test away while I'm gone!! Already several good findings that will make the example even better

/Thomas
GRIM2594
Posts: 52
Joined: 07 Nov 2010, 23:16

Postby GRIM2594 » 19 Nov 2010, 23:30

ThomasLund wrote:Something you can do in your end for testing is to comment out the UDP.


This seems to prevent the crash for me... Although more testing is needed. ;)
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 20 Nov 2010, 02:45

yes, disabled udp and works fine now.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 20 Nov 2010, 08:01

OK - thanks for quick tests. Seems I fucked up the disconnect code for UDP in the API.

Will take a closer look at that ASAP (after this weeks trip most likely)

/Thomas
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 20 Nov 2010, 09:38

enjoy the trip :)
vooood
Posts: 45
Joined: 08 Oct 2010, 09:04
Location: Croatia
Contact:

Postby vooood » 21 Nov 2010, 09:07

I don't get one thing though. Why is the player jumping when walking forward and looking up? :D
Music was my first love, and it will be my last
Music of the future, and music of the past
To live without my music would be impossible to do
In this world of trauma my music pulls me through
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 21 Nov 2010, 09:16

He thinks he is playing Tribes 2, but too dump to realize his jump pack is out of juice?

:-D
User avatar
luxe001
Posts: 4
Joined: 29 Nov 2010, 10:23
Location: Italy - PG
Contact:

Postby luxe001 » 29 Nov 2010, 10:29

Ciao Lapo sono un connazionale ;-) (per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.

...what i can do ?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 29 Nov 2010, 11:03

tpenn wrote:I've noticed that although I only call InitUDP once, I am seeing the UDP_INIT event firing 2-3 times. While I wasn't using UDP before so I can't say what was normal, that doesn't seem quite right.


Issue fixed in next release! Thanks

/Thomas
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 29 Nov 2010, 14:23

luxe001 wrote:Ciao Lapo sono un connazionale ;-) (per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.

...what i can do ?


Are you running in editor or webplayer? For webplayer did you add the Security.PrefetchPolicy? Any errors in the console?

Etc :-)

/Thomas
User avatar
luxe001
Posts: 4
Joined: 29 Nov 2010, 10:23
Location: Italy - PG
Contact:

Postby luxe001 » 29 Nov 2010, 20:41

ThomasLund wrote:
luxe001 wrote:Ciao Lapo sono un connazionale ;-) (per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.

...what i can do ?


Are you running in editor or webplayer? For webplayer did you add the Security.PrefetchPolicy? Any errors in the console?

Etc :-)

/Thomas


Well,
i' into Unity Editor, and when i go on Debug (Play) on game window i write nickname, but gam not start..... System write:

Code: Select all

UDP error:
UnityEngine.Debug:Log(Object)
LobbyGUI:OnUdpInit(BaseEvent) (at Assets/Lobby/Scripts/LobbyGUI.cs:141)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Lobby/Scripts/LobbyGUI.cs:83)
....e pur si muove !
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 29 Nov 2010, 20:43

Did you enable UDP on the server as described in the tutorial documentation?

It seems as if there is no UDP connection to the server, which could be because the server isnt UDP enabled.

/Thomas
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 01 Dec 2010, 05:51

There is a new temporary dll build, which seems to fix crashes on shutting down.

Its still not fully tested - but you can download and give it a spin here:

http://www.fullcontrol.dk/downloads/SFS ... 101130.dll

As soon as its confirmed from more people that the issue is solved, then the original demo will be repackaged with this fix.

Thanks and sorry for the trouble

/Thomas
belltzaser
Posts: 5
Joined: 03 Dec 2010, 06:39

Postby belltzaser » 03 Dec 2010, 06:45

PAX wrote:This code exists in SmartFoxConnection.cs in game scene.
Then I try to start new game, I see next screen:
Image
And console show error:

Code: Select all

[SFS DEBUG] TCPSocketLayer: General error reading data from socket: Read failure   at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.Read () [0x00000] in <filename unknown>:0


I have exactly the same screen as soon as I Join a room from any of the instances. I am running it from Windows 7.

The debug log shows the Scene "game" loading, but, I get the crosshair on top of the gui, and a countdown in gray on the top left as per PAXs' screen.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 32 guests