Could you help me on some code, if you could?

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

Moderators: Lapo, Bax

CinergyStudios
Posts: 9
Joined: 26 Mar 2007, 07:01

Could you help me on some code, if you could?

Postby CinergyStudios » 29 Mar 2007, 11:51

Hey you might just tell me to piss off cause im a noob but i thought i would try asking for help..
I was wondering for a multiplayer platform like game how you would implement gravity into the server?
like i know how to program a gravity engine in actionscript but how would you do that mulit-user... i begain basing it off of the maze sample but i want it to get where theres gravity and a jump function?

i thought of being able to use gravity with actionscript on the avatar itself, because as long as the x and y of the avatar is being sent out to the server it shouldnt matter if the gravity is in the players side or the servers.. but anything i try to code in regular actionscript doesnt seem to work.. how would i go about doing that?

PLEASE help if you can i really need help on this.. thanx for help!!!
CinergyStudios
Posts: 9
Joined: 26 Mar 2007, 07:01

Postby CinergyStudios » 30 Mar 2007, 04:26

...anyone?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 31 Mar 2007, 10:25

It's not clear why to implement gravity on the server side. If you send the coordinates of the avatar continuously, then your client-side approach is correct: manage gravity on the client side, and keep sending coordinates.
A little different approach would be if you send moves instead of coordinates. But again, if you move over a tile on which you are supposed to fall down, then you just send the move, and the other clients will display the falling animation. No need for the server to simulate gravity.
Paolo Bax
The SmartFoxServer Team
CinergyStudios
Posts: 9
Joined: 26 Mar 2007, 07:01

Postby CinergyStudios » 01 Apr 2007, 05:37

ya thats kinda what i was saying.. the thing i need help with is using the actionscript to code the client side of things? like when ever i try to use something with just action script on a sprite it does nothing not even on the client side of thigs?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 01 Apr 2007, 18:01

Then probably your request is quite off-topic in this forum, because it's not related with multiplayer programming. I suggest you to write a post in the gotoAndPlay() forum: you will find a lot of developers who can help you.
Paolo Bax
The SmartFoxServer Team

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 40 guests