Page 1 of 1

OpenSpace == AS3. Server Extensions == Java

Posted: 04 Feb 2009, 20:34
by dalanchoo
I have a question about how to use OpenSpace to setup an NPC.

Now it seems obvious to me that an NPC has to be created on the sever in a server side extension. I have a server side extension that creates an NPC via a call to createNPC. This seems to work fine and I am able to broadcast a public message and have it received by the client. It also seems obvious to me that the server should be the one responsible for issuing commands to the NPC to tell him to go somewhere and this information should be propogated to each client.

My extension is written in Java, and it looks like OpenSpace only supports AS3. How do I use OpenSpace from my server side extension? Is it wrong for me to want the server to move the NPC around? Is open space only set up to work with the client? Do I need to do something roundabout to get this to work?

If there is no easy way to do this, then the combination of the languages supported is frustrating. If the server only supports AS1 and java, and OpenSpace only supports AS3, then this seems to be incompatible. I have scanned the server side extension development forum, and their advice is to port any AS3 code to Java.

Any help would be appreciated.
Thanks

John Lawrie

Posted: 05 Feb 2009, 19:07
by Bax
dalanchoo,
there's a little confusion on programming languages in your post.
There's no relationship between client-side and server-side coding: the SmartFoxServer API take care of exchanging messages between client and server and convert them in native objects for the proper language. OpenSpace is a client-side only component, so you don't have to worry on how you could use it on the server-side, as you really can't!

About creating NPCs, please read this post.