feudalwars

Members
  • Content count

    516
  • Joined

  • Last visited

  • Days Won

    2

feudalwars last won the day on May 17 2015

feudalwars had the most liked content!

3 Followers

About feudalwars

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.feudalwars.net

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,293 profile views
  1. So I have a bit of a problem and its a relatively simply one. Suppose I have a series of chained tweens. After each tween completes, the next one in the chain is fired, like this: https://phaser.io/sandbox/edit/AXvVUVzn This works great, except you can see there is some choppiness. If you look closely at the example, you can see the sprite stops for a split second after each tween. I think this caused by there being some small increment of time between each chain. Tween 1 fires, completes, 10 milliseconds pass, then tween 2 fires, completes, 10 milliseconds pass. You get the point. I want to get rid of that 10 milliseconds, so there transitions are seamless. It doesn't necessarily have to be with chained tweens. I just used chained tweens to make the case simpler. The actual code i'm trying to acheive is movement with a quick succession of teens. The sprite moves from point A to point B with a tween, and then another tween moves it somewhere else. Well, that works great except the movement isn't seemless because of that slight delay in between tweens (wether they are chained or fired one after another manually using the tween on complete event).
  2. Thanks god. I don't think anyone uses Disqus so it's probably not worth the extra overhead. If people want to start a conversation, they should post to the forum instead. No on ever sees the Disqus comments.
  3. that's a tilted camera so the objects that are farther away appear smaller. You can accomplish this by skewing/warping the image - not supported in phaser by default, but you can modify the internal updateTransform method for display objects so the x and y axis is skewed appropriately. Or do what samme suggested and perform the transforms on a separate canvas with a bitmap data object. See this thread: You could also go with a more practical camera view such as isometric. In which case, you could simply rotate the image -45 degrees and reduce the height (y axis) by 50%. You end up with something like this:
  4. Thanks! 1 - Interesting idea. The map has to end somewhere so I'm afraid this is a problem everyone runs into. However, I think the black serves a purpose in RTS games and that is to give you a clear picture of where the map ends. I've played it a lot without the black space and it just feels claustrophobic. The camera gets to the edge of screen and you're wondering why it doesn't keep going. Oh, that's the end of the map. Much better to have a visual que (black stuff) so the user isn't left confused. 2 - Ah, that particular unit has the ability to turn at an instant (it's the only aircraft with that ability), but I see what you're saying, it might seem tacky. I can easily implement some code to cause it to turn super fast but not instantaneously - perhaps i will do that.
  5. It's just me working on it. I hire contractors to do the art.
  6. Today I recorded 3 pre-alpha games of Strike Tactics, the HTML5 RTS I've been working on (built in Phaser). I discuss each game on my devblog here: http://striketactics.net/devblog/pre-alpha-gameplay-videos Enjoy! Any feedback is welcome.
  7. Never mind. Turns out, these were bugs with my code - render textures do in fact, render filters and children.
  8. Does anyone know of any way to include the filter effects on the sprite when drawing it to a render texture? Also, I noticed rendering a sprite to a render texture (using render x/y) does not include the children of the sprite. I can find workarounds (drawing each individually) but is this intended?
  9. The only thing i ever see in any of the phaser examples for the past 3 months.
  10. A mask is only going to give you a rectangular shape and it will only show the parts of the graphics object that are inside the mask. But what I want is the opposite, to only show the negative space (making the pixels inside the mask area transparent). So yeah, a mask is not the solution. A reverse mask that allows shapes other than rectangles would be.
  11. just store the coordinates on the sprite object when it moves. sprite.goingToXY = [goingX,goingY]; I recommend reading up on some elementary javascript (storing variables) - it will make your life much easier.
  12. Using jquery mouseenter and mouseleave events seems to do the trick. It will turn input off if the mouse enters an element, even if that element is in front of the game canvas with z-indexing: $("#game").mouseenter(function() { game.input.enabled = true; }); $("#game").mouseleave(function() { game.input.enabled = false; }); #game being the id of your game canvas HTML element. Hopefully this will help someone out who runs into the same problem.
  13. okay I figured it out ... hopefully. onBlur and onFocus is triggering when it's not supposed to. Because the input element is overlayed on top of the canvas (z-indexed), it is being triggered whenever something is typed in and the input manager is turned back on. So in theory, turning off input should work just fine, just be careful you don't have your input element overlayed on top of the canvas (like it is with most UI). If that's the case you might need to figure out a different way to tell if the game is in focus/blur because game.onBlur is not reliable.
  14. Never mind. That only works sometimes. I have no clue what is going on here. Sometimes I will type: game.input.keyboard.enabled = false; into the console and it works. Other times, I will need to type both: game.input.keyboard.enabled = false; game.input.enabled = false; And it works. Other times, I type both and it doesn't work. I really have no clue.
  15. Problem solved. I think this thread was just old info. game.input.enabled won't control keyboard event delegation but game.input.keyboard will. This works: game.onBlur.add(function() { game.input.keyboard.enabled = false; }); game.onFocus.add(function() { game.input.keyboard.enabled = true; });