Jump to content


  • Content Count

  • Joined

  • Last visited

About Ralph

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Not really a bump, but since I'm curios on others thoughts still go ahead and shoot a reply if you have some input. Either way though, I've kind of already moved forward with moving everything into the loop. Some events remain but they're there now mostly for readability and simply set a flag that tells the loop to handle the event on the next tick. Just a word of advice to if anyone sees this in the future, save yourself the trouble of even attempting an event-driven game (unless your game really caters to event based logic). It will work and work great at small scales but it simply isn't pra
  2. Hey all, I'm currently in the process of re-writing my authoritative server from one that was completely event driven to one that relies heavily on a game loop and I had some questions I'm sure some people can answer. To give some insight for my question, the way the old event-based system worked was basically the client would do something, then send tell the server what it was trying to do. The server would then check if this was legal if it was, do nothing but tell other players what that client did, if not legal, would set the client back to its previous state. For example,
  3. So to preface this, I've already looked through the docs for something that could do what I want but I couldn't find anything too useful. So I'm trying to make a sprite grow cracks over time (think like in minecraft when you mine), except I don't want to have to create a spritesheet of no cracks to cracks and have to loop it for every sprite texture. I'm looking for someway to play a standard opaque animation over each item I want cracks to form on. Is there anyway to do this? The only method I could think of would be to at the time I want the cracks to appear, to spawn a sprite righ
  4. So this is basically what I have right now. The server is essentially fully handling the movement, but the client just assumes all moves are legal to remove the need for the server to send back to the client what it needs to do.
  5. The reason I went with a monitoring approach over a fully server handled movement system is that i could never drop the lag. The movement lag from the server handling movement was too annoying for me, and I couldn't reduce it by much. The server does monitor by update, not by FPS, but currently the client doesn't move by update, it moves by frames, if that makes sense? So the server is calculating distance based on updates, but the clients move based on frames. An easy fix I just haven't gotten around to (I just need to make speed the client moves at proportional with their FPS). To
  6. Sup guys, I'm back and once again working on my side project now that school is out. I recently rewrote some of my server sided code, specifically the pieces that handle anti-cheat. One problem I ran into is my anti speed hack mechanism. Prior to my rewrite (which was more of a cleanup) the way I handled movement on the server was I allowed the client to move however it liked. It would then send its new position (after ever frame) to the server. The server would then check to see how far the client moved (based on its last position which is saved on the server) and made sure that the
  7. Yeah, a few days after I posted this I fixed the issue by changing all sprites body shape. By shifting the Z offset of each sprite to negative sprite's Z value plus 1, everything was 1 unit off of the "floor" and collided properly then. The issue arises because if you set the z value of a sprite to be 0, it doesnt actually change the height, it just pushes it through the floor it seems. I ran across another issue with anchors, which i also fixed, but that required a source change that I documented on the open issues of the plugin. Overall great plugin, even with the dying support,
  8. I would recommend you change the player "object" to a single variable, and set children. That way you can modify it all as 1 object in relation to each other. Rather than 3/4 separate sprites. Also, io.socket.broadcast is a tool you can use, (I think that's the syntax, idk look it up), so you can send a socket message to all clients EXCEPT the one that caused the call in the first place, so you dont have to check ID's if you have no reason to upon receiving a message. (at the top of the very first code you posted)
  9. No need for real synchronization if actions are all standardized. For movement have your client update its position on the server every tick in the update funciton, have the server send that to all other clients, and all other clients just keep setting that players position. (Just set it, rather than set velocities and such). If you have a function to say shoot. Have the function that handle's it for your client be the same thing that handles it when another client shoots. So its all standardized and you dont ahve to worry about syncing it up perfectly. Really this question is just too b
  10. Hey all, So I recently switched my entire game over to Phaser Isometric by @lewster32 and now I keep running into an issue with collision. With just spawning a sprite in and not chaning any of its body properties, collision happens when the TOP of my player's body box reaches the TOP of the sprite's body box. This is a problem because it allows me to just walk through the sprite diagonally, which is not what I want. In fact, what I want is for collision to happen when the BOTTOM of the body boxes touch. (Sidenote: when I say body box I'm referring to the the 3d body shown through a body d
  11. My system in a nutshell is you spawn in, client is sent data of their portion of the map, the client draws it all. Its around a 3k by 2k px draw around the player using 32x32 tiles for everything drawn (except the ground/grass which is a repeating tilesprite). Then when they walk to a point where they need to see more of the map, the server sends more map data, the old map is destroyed and the new chunks are restored. The system is really fast actually, fast enough that you cant see the flicker (but you can feel it while walking, but cant visually see it), that or I made it so that it draws th
  12. Yeah I remembered after I posted that there was a way to change the shape of the phsyics body but I cant remember how. Do I need to use p2 to do it?
  13. Hey just out of curiosity, are you using the phaser isometric plugin by lewster22 on that example of the the noise map? If so, or even not so, how large is the map? Ive been trying to switch my WIP to an isometric view like that but I couldn't quite get it with the phaser isometric plugin because I have too many sprites loaded at once for it to be viable. I tried making a tilesprite that looked isometric to match with the pieces that are actually isoSprites but I couldnt get it to match up and it was pretty buggy. Any suggestions? Edit: Also to piggy-back here, I too have a perlin-n
  14. Hi there, basically Im planning on switching the tree's in my game to larger more extravagant trees and what I wanted to do was to be able to walk through the top of the sprite, giving the appearance that you are walking behind the tree, but not let them walk through the base of the tree. I couldn't think of a way to do this. I was thinking I would do it with 2 spites maybe? But i thought that was too redundant. I know other frameworks like RPGJS has this but I don't know if phaser does. Thanks for any help in advanced.
  • Create New...