[[ 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 » 01 Nov 2011, 14:09

Is the empty SFSObject used here:
public void handleClientRequest(User u, ISFSObject data) {
In the spawn me handler? I ask this because in the spawnMeHandler the ISFSObject data is never used again, so I dont really see the point, unless its just standardized that a Request Handler must receive an Object?


Yep - its a standard interface for any handler class, and the object you sent is the "data" one on the server. So nice and easy + you can send almost anything this way and the other way similarly.

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Jackiepro
Posts: 12
Joined: 30 Sep 2011, 06:54

Postby Jackiepro » 01 Nov 2011, 22:06

Thanks for the help, its all starting to make sense to me. I just have 1 question left now, is the code
public CombatPlayer(User sfsUser, int team) {
this.sfsUser = sfsUser;
this.team = team;
this.weapon = new Weapon();
this.transform = Transform.random();
this.collider = new Collider(0, 1, 0, 0.5, 2);
}


sufficient, or is there somewhere else I need to somehow add the team aspect to what defines a combatplayer. Also
public void handleClientRequest(User u, ISFSObject data) {
int team = data.getInt("team");


Im assuming in Network Manager if I send a SFSObject with the team integer embedded in it, then I can apply the code above correct? I ask this cause after compiling and everything the game crashes upon trying to load into the world and I dont see a practical way of debugging this :(
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 03 Nov 2011, 09:16

If you extended the classes with a "int team", then should be it I would say from the code snippets.

Crashing - look in the logfiles for hints. If its the Unity client, then open the editor/player.log file - should give you the cause of crash

/T
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund
Cyborg
Posts: 11
Joined: 30 Nov 2011, 00:42

Postby Cyborg » 01 Dec 2011, 19:51

-solved it myself-

can be deleted by mod/admin
Last edited by Cyborg on 22 Apr 2012, 16:43, edited 3 times in total.
StephenShaw
Posts: 3
Joined: 03 Jan 2012, 12:25

Postby StephenShaw » 04 Jan 2012, 17:41

I am enjoying sfs2x it is great, though with all of the trouble someone like me who is a visual learner had with the tutorial (it literally took me around 8 hours just to read the thing) I would like to officially BEG for a video tutorial on the subject.
unkelo
Posts: 2
Joined: 29 Jan 2012, 20:20

After login no Lobby appears

Postby unkelo » 29 Jan 2012, 20:28

Hi,

I have installed Smartfox2x and downloaded the FPS Demo.
Have installed the Extension and have added the UDP Socketaddress on port 9933.

In the Unity Editor i can login to the Smartfoxserver.
But nothing happens then , i cant go to the Lobby where i should create a New Game.

I am thankful for advises .

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

Postby ThomasLund » 30 Jan 2012, 12:56

Hi Unkelo,

On the same page you downloaded the code there is also a link to the install PDF. There are a few small things needed to do in addition.

Otherwise try to look at server console and the Unity player console for any errors or warnings. If you get some there, you can paste them here. Enables us to help you

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund
shift
Posts: 1
Joined: 31 Mar 2012, 15:14

Re: [[ NEW ]] FPS Demo!

Postby shift » 31 Mar 2012, 15:20

Please Help Me From FPS Game, i Click Button "New Game" and not work!
Пожалуйста помогите с FPS, я жму "New Game" и ничего!
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: [[ NEW ]] FPS Demo!

Postby ThomasLund » 06 Apr 2012, 10:19

Usually that means that you forgot to install the extension on the server.

Please check the PDF file explaining how to install.

Best
Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 26 guests