• Content count

  • Joined

  • Last visited

  • Days Won


feudalwars last won the day on May 17 2015

feudalwars had the most liked content!


About feudalwars

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,737 profile views
  1. Just launched this week! Play free here: http://striketactics.net/play
  2. I have been unable to find good information as to the usefulness/practicality of the perMessageDeflate option/module. Suppose I have messages that are 1000 bites (the length of the text string), being sent out 10 times per second (every 100 ms), is compression worth it there? I have heard that perMessageDeflate can be a monster on CPU usage. I imagine it is not cost-effective if your messages are really small and infrequent. Anyway, does anyone have any idea what the threshold is? At what point in packet size and frequency (i.e. bandwidth) is using perMessageDeflate a smart idea?
  3. [OWN - Closed Alpha] Testers needed!

    Looks neat. nice jog Skeptron!
  4. Server-side Physics Advice

    Don't calculate physics on the server side, that is a recipe for disaster. Calculate physics on the client side - server should only be used for relaying and validating data between clients. It will be extremely difficult to hide lag if your clients are reliant upon the server for everything that happens in the game.
  5. Latency issues with Node JS game and VPS

    Yeah, if your game can't handle 20-30MS ping, you've gotta rewrite some things on the client side because 20-30MS is actually a best-case scenario. My game (Strike Tactics) is in beta and even 300+ ping will not be noticeable (got players in Germany playing players in US with no problem). Sure, it's not ideal and things aren't 100% where they should be at 300+ ping, but everything still looks the same. I've learned that the perception of perfectly mirrored simultaneous running environments is the only thing more important than actual perfectly mirrored simultaneous running environments. Also, each player is the authority of his/her units (it's an RTS game), so no matter what the ping is, the game objects which you are looking at most of the time will have zero movement lag (my networking layer is completely non-deterministic). I've not had a single person complain about lag. I'm the only one who can tell the difference between a 50MS latency game and a 300MS latency game, and that's because i know what things to look for. So the secret is interpolation and clever client-side networking code.
  6. Is Gamejolt useless

    Pretty much any website for promoting games is useless. Better to use all your time an energy on development of the game itself.
  7. What Raggar said will work - ping every server and have the player join the one with the lowest ping. It really doesn't need to be more complicated than that. If you want to get the actual location, you can do so from the IP address.
  8. Game getting only 40ish FPS on other computers?

    I realize that, which is why I qualified my post with "this is bad, don't do this." It's a dirty hack and introduces tons of problems. Believe me, I know!
  9. Game getting only 40ish FPS on other computers?

    It's more of a dirty hack than a recommended strategy :). I use a hack for now because it would require some rewrites to abstract the logic away from game loop update speed. In my RTS game (Strike Tactics), workers collect resources and move to drop resources off in silos. Seems simple, but what if the game framerate drips to 30, the worker is now moving at half speed and is much less efficient. And since I'm increasing the amount collected on every framerate (stupid, bad coding), that works against its collection speed as well. I also do a lot of complicated things with game.time.desiredFPS. Basically, constantly update desired FPS based on current framerate (how well the CPU is doing currently). This complicates things as well. It's kind of a mess right now, to be honest. But the end result after a lot of hacking is that resource collection rates are pretty much independent of framerate.
  10. Game getting only 40ish FPS on other computers?

    What i do is change my time-dependent constants based on FPS. e.g. if a constant is 5 @ 60FPS, and the FPS is 20, I will change the constant to 4 (20 divided by 5). Re: refresh rate affecting performance. Does not surprise me in the least. I have a computer which uses a giant 32-inch LED monitor with a monster graphics card that performs poorly, while my weak mac air with a crappy integrated GPU runs like a dream. I stopped trying to predict Phaser/webgl performance based on hardware a long time ago.
  11. Advanced Timing Plugin: FPS graph, meter, text

    Showing the webgl draw count ... you have no idea how long i've searched for a plugin or extension that does that.
  12. How to render a rectangle with color?

    Or just use a sprite with whatever color you want as an image texture. That would be the best from a performance point of view. If you create a graphics object, you're creating a whole new webgl call. Bitmap data would be even worse on performance than graphics as you're creating a whole new canvas object.
  13. Detect when the game change visibility

    Here's what I do to detect the actual visibility change (as the title of this thread asks): var vis = (function(){ var stateKey, eventKey, keys = { hidden: "visibilitychange", webkitHidden: "webkitvisibilitychange", mozHidden: "mozvisibilitychange", msHidden: "msvisibilitychange" }; for (stateKey in keys) { if (stateKey in document) { eventKey = keys[stateKey]; break; } } return function(c) { if (c) document.addEventListener(eventKey, c); return !document[stateKey]; } })(); vis() returns true if the tab is in focus. This is a much more reliable way than setting a boolean on pause/resume, as you might be pausing/resuming your game state in other code.
  14. Detect when the game change visibility

    there is a difference between detecting when the game is paused and detecting when the tab is no longer active (i.e. out of focus). Why is this distinction important? Suppose I pause/resume the game in many different ways. So auto pausing on visibility change is just 1 way. Therefore, there should be a way to detect visibility change without it being tied to game.paused.