Search found 74 matches

by Sarevok
21 Sep 2013, 12:23
Forum: Job offers and requests
Topic: Selling SmartFoxServer Pro Unlimited license (900€)
Replies: 0
Views: 10977

Selling SmartFoxServer Pro Unlimited license (900€)

SmartFoxServer Pro Unlimited license at 900€.

Contact: badurash@hotmail.com
by Sarevok
27 Jul 2012, 10:12
Forum: Job offers and requests
Topic: Selling SmartFoxServer Pro Unlimited license (1200€)
Replies: 0
Views: 10059

Selling SmartFoxServer Pro Unlimited license (1200€)

SmartFoxServer Pro Unlimited license at 1200€.

Contact: badurash@hotmail.com
by Sarevok
31 Oct 2011, 07:51
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

Move the finally block outside the for loop. You don't want to put task on queue for every exception that is thrown. Remember that you only want one task to be scheduled per scan/update execution, and you want to schedule it only at the very end of the scan/update. So you need something like this: t...
by Sarevok
30 Oct 2011, 21:44
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

Yes, because finally block always executes :)
by Sarevok
30 Oct 2011, 21:08
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

Also, be very careful to handle all exceptions inside scanning/updating methods. If any exception is not handled, method will terminate, and no new task will be added. So basically your scanning and updating will stop for that given group.

You should probably use finally block to be safe.
by Sarevok
30 Oct 2011, 21:00
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

You will not need it any more because you practically have serialized task now. They go one after another. Also, there is only one task scheduler there, but there are multiple tasks (runnables). Seems like you are mixing these terms. :) I will use your code from first post: // Schedule the task to r...
by Sarevok
30 Oct 2011, 20:01
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

if(!isScanning) { isScanning = true; // Lock This code is not thread safe because you need to remember that CPU can be given to another thread between any two instructions. In the above example, imagine that thread T1 is running this code, it compares if isScanning is true, it sees tha...
by Sarevok
30 Oct 2011, 19:18
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

Can you please show me the code where you are adding the tasks to be executed in future? As for option B) I never said you should not use task scheduler in that option :) I said you will use sfs task scheduler to add task at the end of scanning/updating method, and that will be the only place where ...
by Sarevok
30 Oct 2011, 18:19
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

Huh, I am not sure I completely understand your situation, but let me check if I understood you correctly: 1) You have different game groups 2) You need to scan and update states in rooms of some game group at fixed time intervals. 3) Your have different logic for scanning and updating different gam...
by Sarevok
30 Oct 2011, 13:39
Forum: SFS2X Questions
Topic: Multi-threaded but Dedicated Task Schedulers
Replies: 15
Views: 24366

What is the point of using task scheduler then? Can you explain why do you want it that way? What are you trying to achieve by dedicating one specific thread per room group?
by Sarevok
28 Oct 2011, 22:58
Forum: SFS2X Questions
Topic: Controlling NPCs with a host client
Replies: 18
Views: 23478

You don't even have to send complete path to clients, but you could if you want. You know how standard game loop looks like: at certain time intervals (lets say 30 miliseconds, but it depends on your needs) you loop through all your game objects, and update them according to their current actions, s...
by Sarevok
28 Oct 2011, 18:18
Forum: SFS2X Questions
Topic: Controlling NPCs with a host client
Replies: 18
Views: 23478

Well, I think that approach will hardly work. Someone must know the info about NPC and coordinate others accordingly. You can do it all on server (when server updates all NPC states in some time intervals and notify others - I explained this approach in previous post), or you can do it all on client...
by Sarevok
28 Oct 2011, 01:28
Forum: SFS2X Questions
Topic: Controlling NPCs with a host client
Replies: 18
Views: 23478

Oh I think I understand what is giving you a problem. :) You think that server calculates path and send it to clients, and then just waits? Nope, server will simulate NPC movement internally. It will move NPC from point A to point B using its current velocity vector to update its coordinates at defi...
by Sarevok
28 Oct 2011, 01:18
Forum: SFS2X Questions
Topic: Controlling NPCs with a host client
Replies: 18
Views: 23478

I understand you perfectly but it seems that you don't understand me :) I really don't know how to explain it any more. Let me try this way: a) Does server know where NPC currently is (point A)? Yes it knows. b) Does server know where NPC wants to go (Point B)? Yes it does. c) Does server know at an...
by Sarevok
27 Oct 2011, 19:34
Forum: SFS2X Questions
Topic: Warning With DefaultPlayerIDGenerator
Replies: 2
Views: 5272

How many players can your room have? Check if you set maxUsers parameter (inside CreateRoomSettings) to appropriate number when you created the room.

Go to advanced search