TheLoneJedi Posted February 2, 2018 Share Posted February 2, 2018 The project I am working in is a multiplayer node.js game using socket.io to communicate where the renderer will be node.js. In order to correctly import my dependencies to the browser i am using browserify. I am trying to use the Entity-Component architecture to design my game and in doin g so wanted to have a "render component" on each game object. The problem is that I cannot use PIXI code on the server side of node.js This is something what i wanted my architecture to look like. A GameObject with multiple components (ex: PhysicsComponent, RenderComponent) in order to follow the Entity-Component architecture and design this game well. In my eyes the code should be able to run on the server and the client so that way the server can be authoritative in the state of the game. The problem is that PIXI code cannot be run on the server side of node.js because a window object is not defined. So here is the question : How am I intended to write gameObject rendering Code using Pixi.js? Is it supposed to be purely client side, and if so how am I supposed to handle GameObject specific rendering and such? I have been searching for several days and can find no answers. Any help would be greatly appreciated. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.