How to make a map?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
n3rdygamer
Posts: 2
Joined: 22 Jan 2012, 09:29

How to make a map?

Post by n3rdygamer »

I was wondering how to make a map?
Im using Smartfoxserver As2 avatar chat..
Like a 'WORLD MAP'
For example- If you are at 'Town' and you want to get to the beach quicker, you press on the map then press on beach to get there quicker.
How can i do this? Please help :D?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

Hi.

In SFS1x there are Rooms, which can represent several things, such as games, map areas, etc. So you will need to have Rooms for each of those "map areas". Then, to switch between these areas, you just have to join the specified room and leave the previous one.

That's the server-side part. On the client-side, you have to show the correct graphics for that Room, based on, for example, the room's name or a Room Variable which says to which map does it refer. For example, if you call a room Beach_1, you can filter that name and then check that it belongs to the Beach area, so you just have to load the according map.

It's advisable for you to load these maps as external swfs, as this way you don't need to have all the maps in the Main swf, saving lots of space and improving performance.

Again, I suggest you to read the docs at http://www.smartfoxserver.com/docs
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

This message is not related to OpenSpace (and actually not much to SFS too). Moving to another forum.
Paolo Bax
The SmartFoxServer Team
Post Reply