• Content Count

  • Joined

  • Last visited

About Oyed

  • Rank
  • Birthday November 17

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
    United Kingdom
  1. After realising Phaser.TilemapLayer is rendered individually in Game.world, I thought a good idea in order to have certain Game objects render above the Sprites was to have them inserted using addChildAt on Game.world so that they'd be rendered before the last Layer in the Tilemap. All Entities/Players in my Game were already handled by a single Phaser.Group so all I had to do was change how I created this Group: const group = new Phaser.Group(Game); Game.world.addChildAt(group, (Game.world.children.length - 2)); this._group = group; And it works. However, there is an issue. The Phaser.TilemapLayer that is being rendered over the Phaser.Group containing the Phaser.Sprite objects, it has Anti-aliasing applied to it. For example: Before: After: Is there anything I'm doing wrong? Thanks.
  2. Top-down 2D RPG Game, 60 FPS, and any amount of players, it's an openworld MMORPG @tips4design
  3. I have a Node.js Server for my real-time Game that Clients connect to via Socket.IO. The Server is Authoritative and the Game State is stored in the Server memory. I'm struggling to find a way to move the state over to something like Redis so that the Game Server can be clustered and provide much better scalability. I was thinking of a structure following this: But I have no idea how to go about getting the Game State on Redis, and how the logic will be processed if the Game Servers are split up and clustered. Does anyone have any thoughts on this structure, or an alternative? And how to go about implementing this structure?
  4. Is it possible to do a shadow for a rectangle drawn on Phaser.Graphics? I couldn't find anything in the docs. Thanks.
  5. It's a top-down game, however movement isn't point-to-click, nor is it restrained to a grid, it's free Left-Right-Up-Down movement
  6. So continue to process game logic client-side, but have checks in place server-side?
  7. This is something I've been thinking about for a while and I was wondering if anyone could help, or had some input. All of the Canvas multiplayer Socket.IO/Websocket tutorials I've seen on the web, including BrowserQuest, handle game logic locally and then send it to the server to broadcast to connected parties. This allows people, with little knowledge of JavaScript, to cheat really easily. My question is; what is the best way to overcome this? I've tried a couple things before, for example sending key presses to the server and handling logic, then broadcasting to connected parties, but it can easily lag behind with a few people online.
  8. My current setup is similar to the following; I have an array of PIXI.Graphics instances that I loop through, all of them just plain squares, and I want to update the colour of the square. So to do this, I've tried this: var squares = [ ]; // This is the Array of PIXI.Graphics Instancesfor(var s = 0; s < squares.length; s++) { squares[s].beginFill(0xFF0000, 1); squares[s].drawRect(squares[s].x, squares[s].y, squares[s].width, squares[s].height); squares[s].endFill();}But it'll only ever update the first square, none of the others. Is there an easier way to go about this, or a way to fix this? Thanks!
  9. Further testing led me to answer my own question (Should have done so before hand - sorry!) For those who're wondering, the answer is yes, it is relative.
  10. I'm working with multi-leveled containers and I'd like to know if the position of the sprite(s) inside a container is relative to the containers position? For example; var container1 = new PIXI.ParticleContainer(), container2 = new PIXI.ParticleContainer(), mySprite = new PIXI.Sprite(someTexture);mySprite.x = 10;mySprite.y = 15;container1.addChild(mySprite);container1.x = 50;container1.y = 100;container2.addChild(container1);Would "mySprite"s X and Y be rendered as 60,115 - or are the co-ordinates not relative to the container and will be rendered at 10,15? Thanks!
  11. When it reaches 0px, set the value of the index for the bullet in the Array to "null" and run this: while(YOURARRAY.indexOf(null) !== -1) { YOURARRAY.splice(YOURARRAY.indexOf(null), 1);}It will remove all instances of "null" from the Array.
  12. I want to render my Tiled Map in Chunks, and to do so, I thought of chunking sections of the map in to ParticleContainers and then having the ParticleContainers all inside of a Container to render to the player, switching each ParticleContainers visibility based on what the User can see (To save on performance). Is this possible? I've tried doing it and I get "Uncaught TypeError: Cannot read property 'baseTexture' of undefined". Either way, is this the best way to go about it? Thanks!