Questions tagged [lance]

Lance is an open source JavaScript platform for real-time multiplayer game development. Its primary scope is physics networking and smooth coordination of game object position and attribute for multiple remote players.

Lance is an open source JavaScript platform for real-time multiplayer game development. Based on Nodejs, its aim is to enable game developers to build real time online javascript multiplayer games without worrying about implementing net synchronisation code. It strives to provide buttery smooth experience for both developer and player regardless of lag.

Resources:

19 questions
5
votes
1 answer

Sending "secret" data to individual players in Lance Game

I'm wondering if there is an easy way in lance-gg to send player specific data to each player only, rather than emitting all data to all players. I wish to have create a poker game, and don't want the data around what each player is holding…
Mike Fitzbaxter
  • 461
  • 2
  • 12
4
votes
1 answer

Is it necessary to include GameObjects whose physics are deterministic in worldUpdate?

In order to reduce data transfer size and the computational time for serializing world objects for each worldUpdate, I was wondering if it is possible to omit syncs for objects whose physics can be entirely, faithfully simulated on the client-side…
4
votes
1 answer

What is the best way from grabbing information from a listener and getting it to the game engine?

[Lance] What is the best way from grabbing information from a listener and getting it to the game engine? Currently trying to make the Spaaaceship follow my mouse. I have made a MouseControls.js that listens for mouse movement and records the X and…
Dem
  • 41
  • 2
4
votes
1 answer

Can I make a multiplayer Phaser game using Lance?

How do I take an existing Phaser game and make it multiplayer? Can I use the Lance library for this purpose? Both libraries control their own game objects so I don't know how to use the two frameworks together in the same game.
Gary Weiss
  • 668
  • 5
  • 12
3
votes
1 answer

Lance.gg in multiplayer html5 game does not sync

I'm trying to make a multiplayer game in HTML5. I found lance.gg and play around. I modified the Pong game like this. remove Paddle (only Ball left) set gravity to (0, 0.1) set Ball.velocity.y = -3 each time keyboard input space bar And here is…
boygiandi
  • 630
  • 10
  • 20
2
votes
1 answer

Aframe component can't reference el from event handler

I am trying to write a game using lance-gg library. I tried to implement a simple aframe component, that print entity's object3D position and rotation in world space. The problem is that I cannot access this from within the component event…
2
votes
1 answer

Tile-based movement with Lance game engine?

I'm using Lance for a game where the gameplay area is a tiled map. When a player presses the left-arrow key, their character should move one tile to the left, etc. I tried two approaches, see below, but got neither to work. Could either approach be…
Martin Omander
  • 3,223
  • 28
  • 23
2
votes
2 answers

Lance GG : Is it posible to activate game pause?

Is it possible to add pause function to the game. Without setting all DynamicObject velocity to 0. E.g. the pong game.
Mark
  • 17,887
  • 13
  • 66
  • 93
2
votes
1 answer

Lance JS library: Spaaace tutorial unresponsive to touch input on mobile

Started trying out the Lance JS library for building multiplayer games. I can't get the Spaace tutorial to accept input on my Android device, a Pixel 2 XL running Android 8.1.0. The game works fine on my laptop. When connecting my phone to my laptop…
Martin Omander
  • 3,223
  • 28
  • 23
2
votes
1 answer

How do I move objects side to side with lance

Can someone help me make the paddles in the ponggame demo move sideways? I've added the keybinds: this.controls = new KeyboardControls(this); this.controls.bindKey('up', 'up', { repeat: true } ); this.controls.bindKey('down', 'down', {…
dwib
  • 583
  • 4
  • 19
2
votes
1 answer

Best way to communicate server-generated map to client

I am starting out with lance-gg and am building a game in which a new game map is generated every few minutes. The client game engine needs to receive the generated map. Currently I am registering the map as a serializable object and adding a new…
Alfred Young
  • 397
  • 1
  • 3
  • 15
2
votes
1 answer

What is the proper way to bound an object to another?

I want to have an object that stay at one side of an actor, and so its physics don't need to be computed, and the prediction can be done with the actor itself. How do I do this properly ?
Louis M.
  • 21
  • 1
2
votes
1 answer

Lance Game Engine pong tutorial gets syntax error

In the Lance Game Engine when I try to run their pong tutorial I type: sudo yarn start I get this error: /var/nodes/lancegame/node_modules/lance-gg/src/ClientEngine.js:125 connect(options = {}) { ^ SyntaxError: Unexpected…
dennis
  • 153
  • 2
  • 9
1
vote
1 answer

How does lance-gg know whether to load the client

I am trying to write a unit test for a Renderer subclass from lance-gg // test/client.js const lance = require('lance-gg'); console.log(lance); { GameEngine: [Function: GameEngine], GameWorld: [Function: GameWorld], P2PhysicsEngine:…
ejang
  • 3,982
  • 8
  • 44
  • 70
1
vote
1 answer

Lance-gg game socket.io failed to load resource on digital ocean

My lance-gg game works on localhost, but now that I have tried to deploy on digital ocean the site seems to be hosting but I can't connect the socket.io. The error in the client browser is: [Error] Failed to load resource: The request timed out.…
J. Doe
  • 77
  • 1
  • 6
1
2