Discord
Login
Community
DARK THEME

Help me to make multiplayer pls

init = function()
  Quick.init()
  map = Quick.addMap("map", 1000, 0, 2000, 20)
  map.solid = false
  minecartinit()
  playerinit()
end

update = function()
  Quick.update()
  playerupdate()
  minecartupdate()
end

draw = function()
  Quick.draw()
end
minecartinit = function()
  minecart = Quick.addSprite("cart", 5, 0, 36, 24)
end

minecartupdate = function()
  if minecart.y != 0 then
    minecart.y = 0
  end
  
end
playerinit = function()
  player = Quick.addSprite("player", 0, -50, 20, 26)
  speed = 1
  
end

playerupdate = function()
  if keyboard.UP or gamepad.UP then
    player.y += speed
  end
  
  if keyboard.DOWN or gamepad.DOWN then
    player.y -= speed
  end
  
  if keyboard.RIGHT or gamepad.RIGHT then
    player.x += speed
  end
  
  if keyboard.LEFT or gamepad.LEFT then
    player.x -= speed
  end
  
  if keyboard.SPACE then
    speed = 2
  elsif not keyboard.SPACE then
    speed = 1
  end
  
  
  Quick.camera.move(player.x, player.y)
end

i dont know how to make multiplayer

see the codes here! :)

  1. Suitable for smartphones https://microstudio.dev/i/gilles/multinogame/

  2. Suitable for PC https://microstudio.dev/i/microstudio/microverse/

https://microstudio.dev/i/tchene/protectcrystals/

Good luck developing the bro! ;)

You can replicate all dynamic objects to all players using a client-server model with the networking features. The basic idea is just to update the object positions, but it can be jumpy due to latency. For a smooth multiplayer game in real-time, see Fast-Paced Multiplayer. You can also opt for a simpler solution, like how Multiplayer No Game just smooths out the player movement. What kind of multiplayer game are you trying to make?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community