Jump to content


Photo

online platform moveing boat


  • Please log in to reply
4 replies to this topic

#1 _217186

_217186

    GMC Member

  • New Member
  • 9 posts

Posted 22 July 2011 - 03:06 AM

ok so im working on a online game and it has a moving boat
iv try ed many codes many different ways to make the player stand and walk around the boat
but the others online are not properly synced

ok so i need a code that will make the player see the other player also walking on the boat

Information about object: Player

Sprite: spr_stand
Solid: false
Visible: true
Depth: 2
Persistent: false
Parent: <no parent>
Mask: spr_mask

Information about object: Dummy

Sprite: spr_stand
Solid: false
Visible: true
Depth: -2
Persistent: false
Parent: <no parent>
Mask: spr_mask

ps i hope this is the right section
becouse it sounds like i need advanced online gml
  • 0

#2 Scythix

Scythix

    GMC Member

  • GMC Member
  • 71 posts

Posted 22 July 2011 - 04:01 AM

Maybe something you could try is to have a variable or something that keeps track if you are on the boat or not that is synched with the server. When you are on the boat, it could send a position relative to the boat instead of the normal x and y values you would be sending. When the client receives a position update from a player that is also on the boat, all you would have to do is draw the player relative to the boat on your screen. I hope this is making sense!
  • 0

#3 _217186

_217186

    GMC Member

  • New Member
  • 9 posts

Posted 22 July 2011 - 06:27 AM

Maybe something you could try is to have a variable or something that keeps track if you are on the boat or not that is synched with the server. When you are on the boat, it could send a position relative to the boat instead of the normal x and y values you would be sending. When the client receives a position update from a player that is also on the boat, all you would have to do is draw the player relative to the boat on your screen. I hope this is making sense!



no not really id need some kind of example im not to sure
  • 0

#4 gamma

gamma

    GMC Member

  • GMC Member
  • 123 posts

Posted 22 July 2011 - 12:37 PM

How do you tell the other players if you moved or not when they move using keys/mouse?
  • 0

#5 Myhijim

Myhijim

    .-* The Flying Fox *-.

  • GMC Member
  • 334 posts
  • Version:Unknown

Posted 22 July 2011 - 02:46 PM

Hm you need a server and with each key press it needs to send a packet to the server, which, then sends back the all the other clients. In short alot of code for very little
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users