Trying to understand zones...

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Trying to understand zones...

Postby genar » 02 Jan 2018, 09:11

So im currently trying to understand how exactly zones are working.

Basically they represent some kind of chunk System right ?
For example if my Player is at the Unity pos : 1025, 1025 and each Zone is for example 100 Units big, than my Player is in Zone 10;10 or did i missunderstand that?
Do i Need to use Unity positions or can i also use custom ones ? (For example lat/lng coordinates).
And do i Need to set the Zone by myself in the Client Code ( When the Player enters a new chunk )?
Do smartfoxserver automaticly sends all the data to only the Player who are also in my Zone/chunk ?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Trying to understand zones...

Postby Lapo » 02 Jan 2018, 09:59

Hi,
I think this introduction from our docs would help:
http://docs2x.smartfoxserver.com/Develo ... troduction

Essentially Zones represent different apps running independently on the server, so you can host different games each running their own server side code etc...

Instead what you're referring to in your post is related to the "Area of Interest" where you define areas of a Map where users affect each other. This is a different topic, which in you can read about here:
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms

However my suggestion is to start with the articles in the doc section I linked above. Those will teach you the basics and then you can move onto move complex stuff such as MMOs etc...

If anything is unclear let us know.
Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Re: Trying to understand zones...

Postby genar » 02 Jan 2018, 12:03

Thanks for your fast answer !

So the Area of Interest is basically a chunk System right ?
And i also could use a custom unit System regarding the Area of interest ?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Trying to understand zones...

Postby Lapo » 02 Jan 2018, 14:21

I am not sure what you mean by a "chunk of System". The AoI represents a spatial area (2D or 3D) around the player where any interaction will generate events. Stuff happening outside that area will not trigger events.

Makes sense?
I do recommend reading the articles I linked for more details.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 46 guests