Search found 42 matches

by Flying_Banana
22 Jul 2015, 22:39
Forum: SFS2X Questions
Topic: GUIDE: Using Java 8 with SFS2X
Replies: 19
Views: 9490

Re: GUIDE: Using Java 8 with SFS2X

I'm still having some troubles. It seems like occasionally Smart Fox will dislike Java 8 and use Java 7 on restart. So: working Java 8 extension running...I modify the JAR, replace it, restart server, then found out server didn't start. Check log, it says class loader error: Unsupported major.minor ...
by Flying_Banana
18 Jul 2015, 16:47
Forum: SFS2X Questions
Topic: Looking for a server communication example
Replies: 15
Views: 3307

Re: Looking for a server communication example

I am also interested in a quick way for different smart fox servers to communicate with each other. Connecting as a client is a little messy for me with all the server and client api getting mixed up and all that...
by Flying_Banana
14 Jul 2015, 07:48
Forum: SFS2X Questions
Topic: Server tasks: Timer v. SFS scheduler
Replies: 9
Views: 2193

Re: Server tasks: Timer v. SFS scheduler

Ahh great! I was thinking about the thread might be blocking while waiting. Just curious, what would be the maximum number of threads you would recommend, if none of them are blocking? I realise this is a very vague question that depends on server and tasks executed, but I want to have a rough estim...
by Flying_Banana
13 Jul 2015, 18:13
Forum: SFS2X Questions
Topic: Server tasks: Timer v. SFS scheduler
Replies: 9
Views: 2193

Re: Server tasks: Timer v. SFS scheduler

Not at all! But a unit timer has to fire every ten seconds until that unit's health is full! I mean the thread won't be doing much but it still takes a thread, right?
by Flying_Banana
13 Jul 2015, 11:01
Forum: SFS2X Questions
Topic: Server tasks: Timer v. SFS scheduler
Replies: 9
Views: 2193

Re: Server tasks: Timer v. SFS scheduler

I'm just wondering about how generous I should be dispatching new threads (timers). For example, I can have a periodic thread called unit health regeneration that goes through all user controlled units every 10 seconds or so, and add health to them one by one. Or I can (preferably) have each unit cr...
by Flying_Banana
13 Jul 2015, 10:56
Forum: SFS2X Questions
Topic: GUIDE: Using Java 8 with SFS2X
Replies: 19
Views: 9490

Re: GUIDE: Using Java 8 with SFS2X

Yep! It isn't actually stated in the updated interface, but in the compute function under ConcurrentHashMap it says: Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). The entire method invocation is performed atomically. Some a...
by Flying_Banana
13 Jul 2015, 08:31
Forum: SFS2X Questions
Topic: GUIDE: Using Java 8 with SFS2X
Replies: 19
Views: 9490

Re: GUIDE: Using Java 8 with SFS2X

Yes, but it is only concurrent for read and write operations. I cannot, for example, read a value, increment it and write it back atomically.

However, with Java 8, compute method is guaranteed to run an entire function atomically.
by Flying_Banana
11 Jul 2015, 12:40
Forum: SFS2X Questions
Topic: GUIDE: Using Java 8 with SFS2X
Replies: 19
Views: 9490

Re: GUIDE: Using Java 8 with SFS2X

I've recently installed Java 8, and in terminal Java -version gives java 1.8.0_u45. However when I tried to run the server with the new package built with eclipse in 1.8 compiler, I got a version problem, which disappeared when I disabled the extension that is built in 1.8. Is there a way to ch...
by Flying_Banana
11 Jul 2015, 10:42
Forum: SFS2X Questions
Topic: GUIDE: Using Java 8 with SFS2X
Replies: 19
Views: 9490

Re: GUIDE: Using Java 8 with SFS2X

I am running SFS on Mac and I can't find a jre folder anywhere...

I had no problem finding it in the Linux installation though.
by Flying_Banana
05 Jul 2015, 13:16
Forum: SFS2X Questions
Topic: Server tasks: Timer v. SFS scheduler
Replies: 9
Views: 2193

Server tasks: Timer v. SFS scheduler

I was looking into a way to execute scheduled tasks. At first I thought about the native java Timer from java.util. However, some times later I found on this page that SFS recommends its own task scheduler. I'm interested in knowing whether there is any significance difference between the two - are ...
by Flying_Banana
05 Jul 2015, 13:05
Forum: SFS2X Questions
Topic: User variables for user only
Replies: 32
Views: 7734

Re: User variables for user only

Alright, I'll check the filters and try a workaround. That being said, since this is a server thing, shouldn't it not affect users who don't upgrade though? Because servers that don't upgrade will never worry about this flag, and client api will never have to worry about the flag either because it n...
by Flying_Banana
30 Jun 2015, 15:19
Forum: SFS2X Questions
Topic: User variables for user only
Replies: 32
Views: 7734

Re: User variables for user only

I was thinking of it being just server to user really. I realised that to prevent cheating I have to filter every user input with an extension. Having private user variables as a flag could be useful to relay data easily. I have to say, by far the user variables design is the best I've worked with s...
by Flying_Banana
27 Jun 2015, 19:31
Forum: SFS2X Questions
Topic: User variables for user only
Replies: 32
Views: 7734

Re: User variables for user only

Not intentionally gravedigging but - is there progress on this? I also find this very convenient (as I'd like to sync things from server to user that other users need not to know) I'm just wondering should I leave this for later in hope that the next update will contain this feature? :)
by Flying_Banana
21 Jun 2015, 03:53
Forum: SFS2X Questions
Topic: MMORooms and NPCs
Replies: 5
Views: 1601

Re: MMORooms and NPCs

Right, what I mean is to use MMOItem to represent NPCs. I forgot there is actually no NPC class in the current architecture!
by Flying_Banana
18 Jun 2015, 02:04
Forum: SFS2X Questions
Topic: MMORooms and NPCs
Replies: 5
Views: 1601

Re: MMORooms and NPCs

Thanks Lapo that's pretty insightful! I've actually thought about both solutions. If I adapt everything on the server then I limit myself the complexity of the AI, and possibly the maps themselves (the maps most likely need to be easily reduced to 2D, in rectangles marking where map collision object...

Go to advanced search