mmcs

Members
  • Content count

    32
  • Joined

  • Last visited

  • Days Won

    1

mmcs last won the day on October 11 2014

mmcs had the most liked content!

About mmcs

  • Rank
    Advanced Member

Recent Profile Visitors

660 profile views
  1. Fog of War - Best Implementation Method

    Hi, Blur is very expensive operation to use. - As far as implementing the graphical part of the fog (client-side). Here is a approach that works something like this: 1 - create a layer for the fog of war. 2 - cache a version of the world map (or sections) image(s) with a black+alpha rectangle applyed to it, also you can apply a blur filter in this stage. (gray and blur the world map ) 3 - create a mask for the cached world map or one for each section image(s). 4 - for each agent update position tick on the client: 4.1 - locate the section the agent it corresponds and get the mask. 4.2 - draw a filled circle (agent sight) to the mask centered by the agent position. - Now to scale this to a multiplayer game you need to create a simplified fog of war in the server to avoid sending to the client agents that are not visible. (avoiding hacks) 1 - Create a image with a filled color (ex: black) in memory. 2 - for each agent update position in server: 2.1 - draw a circle filled with other color (ex: red) in that image. 3 - when creating the query of agents that exist for a particular player to send to the client-side test if the agents positions in that image have a red pixel Hope I have helped somehow. I have implemented a similar algorithm for a simple (single-player) flash game some years ago: http://www.indiesparkgames.com/iwar.html Regards
  2. Pulsar

    Hi erubio0, that project is interresting, you should mention some supported gamepad hardware. Another question is if this extention is supported in some smart tv?
  3. Hi, testing phaser and using RenderTexture.render with a Phaser.Matrix and found a bug on the Phaser.Matrix constructor code: Phaser.Matrix = function (a, b, c, d, tx, ty) { a = a || 1; b = b || 0; c = c || 0; d = d || 1; tx = tx || 0; ty = ty || 0; ... } when passing 0 value to args it evaluates as falsy in the || expression changing the value to 1 on "a" and "d" argument. I would expect to be possible to pass a matrix something like: new Phaser.Matrix(0, -1, 1, 0, 50, 50) It should be something like this I guess: a = (a != null & a != undefined) ? a : 1; Regards,
  4. Phaser Flash Asset Exporter

    Released Version 0.3.6. Changelog: - Changed shapes to be generated as cached bitmapData. - Support linear fillColor (may have some bugs). Regards
  5. Phaser Flash Asset Exporter

    Hi guys, I use flash alot to generate assets to createjs and I was in need of a more robust game framework for html5 games. Since I'm still learning alot about Phaser I have created a Phaser Flash Asset Exporter inspired by Photon Storm jsfl script: http://www.photonstorm.com/phaser/flash-to-phaser-jsfl-script How it works: Looks in the library for linked symbols and their dependencies and generates a spritesheet for referenced bitmaps. Generates Phaser Asset document with document properties and symbols. Supported features: Generate atlas and metadata with linked symbols and their dependencies bitmaps. Generate linked symbols and their dependecies. Generate Shapes. Generate Texts. Generate scale and rotation transformations. Not Supported features: Shape oval gradient fillColor Shape bitmap fill Timeline animations Please feel free to give some feedback about it. Github project: https://github.com/mmcs85/PFA-Exporter Regards, mmcs
  6. You are using the prototype object "container" instead of the instance object "this" inside constructors and methods to affect the properties. Resulting in all the instances having the same x, y properties. (You can check this debuging on the browser) change "container" to "this" inside the constructor functions and class methods when using properties, example: function ChestManager() { this.Container_constructor(); this.addChest(640,100,1,1,"topClosed"); this.addChest(1100,360,1,1,"sideClosed"); this.addChest(640,620,1,1,"bottomClosed"); this.addChest(180,360,-1,1,"sideClosed"); }
  7. Absolute Web Security

    I agree with kahootbird. If you send the encryption key to the client is always possible to use it by looking at the decryption function result. The only utility I find for encrypting and sending info to client (without decrypting it) is to do stateless user information transference between requests securely.
  8. OS Windows 10 Test devices Huawei G7 Development environment Visual Studio 2015 Community Visual Studio Online (TFS) Windows Azure MVC.NET Createjs MongoDB Adobe Photoshop CC Adobe Flash CC
  9. Isometric map rendering

    Hi Gugis, If you only need to find the upper left tile of your isometric map then according to the way you generate it by intuition it will be the (0, 1000). If you need to hit test a point to a tile, the fastest way i know off is to use the barycentric coordinate system (https://en.wikipedia.org/wiki/Barycentric_coordinate_system) using the two vectors (-32,16) and (32, 16) created by the tile(0, 0). Here is a example code (not tested) function dot(v1, v2) { return v1.x * v2.x + v1.y * v2.y; } function getTileFromPoint(p) { // Compute vectors var vAC = {x:-32, y:16} var vAB = {x:32, y:16} var vAP = p; // Compute dot products var dot00 = dot(vAC); var dot01 = dot(vAB); var dot02 = dot(vAP); var dot11 = dot(vAB); var dot12 = dot(vAP); // Compute barycentric coordinates var invDenom = 1 / (dot00 * dot11 - dot01 * dot01); var u = (dot11 * dot02 - dot01 * dot12) * invDenom; var v = (dot00 * dot12 - dot01 * dot02) * invDenom; return {row: Math.floor(u), col: Math.floor(v)}; } Tell-me if it works. Regards
  10. Firefighter Pinball

    Great game, you should put it in google play educational section. Also i love the art. Keep it up!
  11. create.js CPU high load

    If I'm right the tween interpolates the scaleX of the square for 9 seconds. The CPU is spending is time on stage.update painting the whole stage 1920 X 5 at each tick. createjs.Ticker.addEventListener("tick", stage); 1 - Option: Depending on your requirements you could increase the delta time you do the stage.update using: var handler = setInterval(function(){stage.update();}, 1000); (update / second) and remove the handler when not needed. 2 - Option: Reduce canvas width at the same time you tween the square, in teory you are reducing the painting area, and reducing the cost over time for the stage.update();
  12. Parody GREXIT game

    Ahaaha so fun!
  13. Is not resolved yet, they are rewriting their api and there is no ETA. I have given up to implement Clay.io In-app...
  14. Createjs - FunFlurry

    Check out Facebook page and game: https://www.facebook.com/pages/FunFlurry/721183197962557 Have fun!!
  15. Hi all, recently been having some issues trying to implement the payments system. Concretly the addItem function that does nothing anymore and does not fire the callback for successeful adding an item to the cart. Tryed to contact them with no luck. Im here asking if someone has the same problem or is just me? I also tryed the sandbox and seems to be having the same issue. I realy enjoy this api and this is just frustating.