-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom renderers #75
Comments
Let me also follow the tutorial, that might help... |
That's a very good question, and I really appreciate your help in starting a meaningful discussion :) There are two "levels" of renderers - let's call those "Infrastructure renderers" and "game-title renderers". Infrastructure renderers included renderers like the Pixi.js renderer and the Three.js renderer. They're the connecting glue between Lance (networking) and display (drawing pixels on the screen). They don't actually implement the drawing put themselves, but they're used to hook up Lance to a an actual drawing API and take care the basic needs of multiplayer game rendering. These include things like object creation, object destruction and object updating. Lance itself takes care of "easing" the pain caused by communication latency and syncing (prediction, like you mentioned). The "game-title renderers" are those implemented by game developers using Lance - they use the APIs provided by Lance to implement their own game title. So any game-specific rendering required for their game will go there. So requirements for a "renderer" in the Lance case would be to make sure the corresponding display-objects for each game object are created, updated, and destroyed. "Updated" could mean gameplay-specific property updating (like position, which powerup is active) or cosmetic updates (a character's shadow, or idle animation - the arguably that would probably be implemented in the game-title renderer). This gets further complicated by the fact that a game object could consists of sub-render objects. Imagine a tank game object. It's rendering objects and sub-objects could consist of the tank body, wheels, independently rotating turret, smoke particle emitter, and fire particle emitter as it fires. Does that make sense? btw infamous.io looks really neat! |
lance/src/render/ThreeRenderer.js
Lines 6 to 12 in 78e91bc
I saw your comment there.
I have my own tool that I use for rendering: https://infamous.io
But I suppose that I need to somehow hook it up with Lance in order to take advantage of the client-side prediction of player position, to mitigate network lag, etc. (if I understand correctly, this is what Lance does)
What are requirements for making a renderer? I mean, I see the
Renderer
source, but some actual guides would be better. Maybe this discussion can be a starting point for that.The text was updated successfully, but these errors were encountered: