[[ NEW ]] FPS Demo!

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

Moderators: Lapo, Bax

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

Postby ThomasLund » 19 Nov 2010, 05:42

How annoying :-)

But thats what release candidates are for - finding the stuff one didnt have issues with yourself.

Lets try to crack this one over here: viewtopic.php?p=37464#37464 (just to move debug talk over to a non-announcement thread)

Thanks!!

/Thomas
vooood
Posts: 45
Joined: 08 Oct 2010, 09:04
Location: Croatia
Contact:

Postby vooood » 19 Nov 2010, 07:24

Exiting the FPS demo client (testing inside Unity) crashes Unity. My version is 3.0.0f5 (51258). I might tell more about the problem once I create my own client using these guidelines, but for now I have no idea what might be wrong...
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 07:36

Right - so there is definitely something fishy on exit. Deja vu - some connection not being closed properly. We had that thread already somewhere.

No time to debug right now though for me - going on a 1 week business trip with limited internet access now Sunday.

So keep posting and I'll give it all a spin when I get back.

Great that the UDP problem was solved though. Thanks Daniel.

/Thomas
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 19 Nov 2010, 07:55

Ah.. that screenshot reminds me of counterstrike (good old days). You guys should host that demo (once it's ready) somewhere so that we can try it out online. And since there are mostly programmers (a.k.a problem solvers) here, I'm sure they'll give you some good battle 8)
Smartfox's forum is my daily newspaper.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 07:58

Yeah - I hope that Marco find room for it somewhere on his public servers once the kinks are ironed out.

:-)

/Thomas
tmada
Posts: 9
Joined: 30 Oct 2010, 06:01

Postby tmada » 19 Nov 2010, 08:10

ThomasLund wrote:Right - so there is definitely something fishy on exit. Deja vu - some connection not being closed properly. We had that thread already somewhere.
/Thomas


Kicking the player out of a game (so he's forced back to the Lobby login) works without falling over, so the problem may not be exiting the Game (unless the Game is failing to close it's connection?). Closing/Stopping the app on the Lobby screen at this point will also freeze the standalone app/Unity.
PAX
Posts: 4
Joined: 19 Nov 2010, 08:15
Location: Russia, Ryazan
Contact:

Postby PAX » 19 Nov 2010, 08:29

Unity 3.1 freeze on stop debuging and run debug again. Net Threed not killed?

And I'm can't start created game:

Image

And i can't to close Unity after. Only by Task Manager.
stevets
Posts: 60
Joined: 11 Jul 2010, 12:22
Location: USA

Postby stevets » 19 Nov 2010, 08:47

Does adding this code to the lobby scene and game scene solve the problem?

Code: Select all

public void OnApplicationQuit()
   {
      smartFox.Disconnect();
       
   }
PAX
Posts: 4
Joined: 19 Nov 2010, 08:15
Location: Russia, Ryazan
Contact:

Postby PAX » 19 Nov 2010, 09:11

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
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 09:11

So - besides the trouble of shutting down + UDP firewall blocking.

Had time to look at the code itself? Makes sense to all and is valuable as a learning tool? Any improvements or changes or unclear things?

Personally I am not too happy about how shot results are reported back. In hindsight I think we should have done a shotHit, shotMissed instead of sending back health update only. But code can always be improved :-D

/Thomas
stevets
Posts: 60
Joined: 11 Jul 2010, 12:22
Location: USA

Postby stevets » 19 Nov 2010, 09:17

@PAX I found that I had to put the code in the scene file and not in the smartfoxconnection.cs. When I stop the game in the editor the OnApplicationQuit does not fire in the smartfoxconnection.cs. At leats for me.

@Thomas I hope to be able to look at the code in more detail this weekend. I know you have a lot in there :) thanks
PAX
Posts: 4
Joined: 19 Nov 2010, 08:15
Location: Russia, Ryazan
Contact:

Postby PAX » 19 Nov 2010, 09:25

I simply install server and open client in Unity 3.1. No code changes (only upgrade to RC1a). And I still could not run the demo :(

@stevets I will try... UPD: nothing changes :(
stevets
Posts: 60
Joined: 11 Jul 2010, 12:22
Location: USA

Postby stevets » 19 Nov 2010, 09:35

PAX
Posts: 4
Joined: 19 Nov 2010, 08:15
Location: Russia, Ryazan
Contact:

Postby PAX » 19 Nov 2010, 09:44

stevets wrote:@PAX did you add this to the lobby

Yes, to all scenes.



I start socpol.exe with --all flag. On first screen all connections are ok. And my app is not wab oriented. Its standalone.

And Chat works:
Image

Windows can't normaly close standalone app. Is a Threed bug i think.
Robbilie
Posts: 190
Joined: 04 Sep 2010, 19:48
Location: Ratingen, Germany
Contact:

Postby Robbilie » 19 Nov 2010, 11:46

GREAT!!!! :)

the new demo! that means happy coding :D

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 11 guests