Phantasm

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Hey guys. Been working with phaser for a bit now, and i'm currently trying to make a minimap (overview of a fixed region in my current state). That said, there is not much documentation on how to do something like this, and I am still a newbie to phaser, so it's giving me hard time. Here are the links i<ve already read : -http://www.html5gamedevs.com/topic/14930-creating-a-mini-map-from-a-render-texture/ -http://www.html5gamedevs.com/topic/14182-creating-a-mini-map-in-phaser/ What I have tried is using a bitmap of the state's layer, and putting it in a square on the top right of my screen. Now, I am ok with the palcement, drawing, etc. I have a square with the texture inside it. The problem is, I can't get the good region to show inside the minimap. I have weird graphical glitches when I move, and it shows a 1:1 of the nearby background. Heres the snippet for the creation and update of my minimap MyGame.Hud.prototype.drawMinimap=function(){ if(this.miniMap){ this.miniMap.destroy(); } /// // Init vars /// var heightMax = 200; var widthMax = 200; /// // // /// if (this.miniMapBitmap == null) { this.miniMapBitmap = MyGame.game.add.bitmapData(widthMax, heightMax); this.miniMapBitmap.ctx.beginPath(); this.miniMapBitmap.ctx.rect(0, 0, widthMax, heightMax); this.miniMapBitmap.ctx.fill(); } else { var area = { x: 0 , y: 0 , width: 1200, height: 1200 } //testLayer is a state layer this.miniMapBitmap.copyRect(testLayer, area, 0, 0, 1); } this.miniMap = MyGame.game.add.sprite(MyGame.game.camera.width - 200, 0, this.miniMapBitmap); this.miniMap.fixedToCamera = true; This is called on player movement. Note that the area var is set to testing parameters, since I have no clue on what it should be (The other links didn't help) I'd love to have your more knowledgeable opinions on this! Thanks in advance
  2. Hey George! I will definitely read up these when I get the time. Running the whole game on the server looks interesting but I feared the cpu cost. Since you are telling me it is an industry proven technique, I will most definitely read up on it and try it! Thanks for your input. CtlAltDel, very interested in how you did your phaser project. I will read up on how to make a node version and a browser version!
  3. Thanks everyone for your opinions and explanations. I think we will be exploring other options since we are going for a very high concurrency per server (thousands of clients). That said, I might try your solution and see how it runs with many clients. Who knows, maybe it'll work!
  4. Yeah, what I meant by good practice was would I hit performance/code problems by using phaser as a physics engine in the backend. Like do you have to run one instance per client? If it is the case, i would need to run hundreds of instances at once Else I guess I could just code checks server side and simply use phaser frontend
  5. Is running ning phaser on the sever good practice? I saw posts against doing this Thank you all for your answers
  6. Hey netcell! Yes, I do get this is a client side framework and thus needs server checks. How easy is it to hook into phaser events from the backend, to check if tampering is occuring? Would performance take a huge hit?
  7. Hey guys! We are currently looking into various HTML5 frameworks to build a multiplayer game. One of our biggest questions is security and how it is handled, now specifically for physics such as arcade physics. I am asking her because I have scoured the topic and despite learning a bit of phaser, I can't yet give an educated answer to our questions. I would love to have expert opinions on the following : Can you prevent physics tampering with Phaser? While using arcade physics? Can movement be secured to prevent teleports, speedhack? Basically, how easy is it to make a multiplayer game with phaser that has server side algorithms for the easily hackable parts? Thanks, guys, I'm looking forward to your opinions and answers!