• Content count

  • Joined

  • Last visited

  • Days Won


Raicuparta last won the day on October 19 2015

Raicuparta had the most liked content!

About Raicuparta

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

556 profile views
  1. I'm making some BitmapData squares, and painting each individual pixel randomly, like this. It works like 90% of the time, but for some reason, some times, it generates something like this. The code that generates the BMD: generatePattern (size) { let pattern = this.game.make.bitmapData(size, size) for (let x = 0; x < size; x++) { for (let y = 0; y < size; y++) { let color = this.randomColor() pattern.setPixel(x, y, color.r, color.g, color.b, true) } } return pattern } I then use the generated BMD as textures for my sprites with Phaser.Sprite.loadTexture() I know it's not a problem with the way I'm generating the color, since even if I try to just set the RGB values to 255 255 255 (skipping my randomColor function), the problem persists. So it seems to be something related to the setPixel function. Using Phaser CE 2.8.0
  2. Documented steps on getting a Phaser game on Steam

    Thanks for the heads up, guys. We had set up the redirect to prevent this but apparently it doesn't work with the articles, only the main blog page. I edited the main post so the links should work there now.
  3. Documented steps on getting a Phaser game on Steam

    Sorry for the late response. Yes, I ended up not working on Part 5, I should probably edit that out. Is there anything in particular you'd like to read about?
  4. Curvatron (Phaser game) now out on Steam!

    I wrote a bit about that. Other than what I already talked about there, I guess the biggest problem I had was not being able to get the Linux and Mac versions working properly. Valve takes 30% of all the sales made through Steam.
  5. Curvatron on Steam We have finally released our first game on Steam. Some of you may know, I have documented the steps I took to have it working on Steam. I'll probably write a new blog post about the whole thing, in the end it was quite a bit of effort and there were a lot of problems, but we're finally done. I'm still not 100% sure but I think this is the first Phaser game to be released on Steam (although there are a bunch of other HTML5 games there). So yay!
  6. How do I actually remove an audio file from memory?

    No idea why I didn't try the most obvious one in the first place, but it doesn't seem to be making any difference... I'm just looking at the memory usage in the Windows task manager, should I not be doing that? Not sure how to read the Chrome timeline thing, should I be looking at the "JS Heap"?
  7. I tried all of these: this.music.stop() this.game.sound.remove(this.music) this.music = null this.game.cache.removeSound('level_music') this.game.sound.removeByKey('level_music')They don't seem to do any difference. Every time I load a new music (with this.game.load.audio()), the memory usage goes up by a pretty big amount (some times more than 100MB) and it never goes back down, even after calling all of those functions. Also, it seems like loading the music isn't actually the main problem, playing it is what causes the memory usage? It's hard to tell.
  8. Recording inputs for replays - problem with delay

    This seems to have worked! Thank you! Now I don't have to add those 15ms manually, which could probably result in failures in the replays.
  9. Recording inputs for replays - problem with delay

    How do I know if I'm doing this? I thought using time instead of frames would prevent that kind of problems.
  10. The game in question only uses one key, so the cheapest way to save a replay would be by storing the input times. What I'm doing is something like this: totalTime = 0inputTimes = []replaying = falsefunction update () { totalTime += game.time.physicsElapsedMS if (replaying && totalTime >= inputTimes[0]) inputTimes.shift() keyPresed()}// called on key pressfunction keyPressed () { if (!replaying) inputTimes.push(totalTime) // also player movement, etc...}function setReplay (times) { inputTimes = times replaying = true}I try recording a session, the passing the resulting array to the game, but there's always a little delay. It seems to be always exactly the same delay though. When the replay is playing, it always plays exactly the same way, but always a little bit different (not even sure if it's late or early) than the moves I made. Is there a better approach to this? Am I doing something obviously wrong? EDIT: after some testing it seems the delay is about 15ms (or exactly 15ms), not sure why. Adding 15 to totalTime when checking the inputTimes array seems to make it perfect, couldn't make it fail so far. I doubt it is actually perfect, though.
  11. After defining onInputOver event, it seems like it is only called when the mouse is moved. For instance, if I just changed states and the mouse was already on top of the button, the even won't be triggered. Is there a way to manually force this check so it is triggered if the mouse is there? The only way I can think of is actually checking the mouse position but that's pretty dirty, I'd much prefer a cleaner alternative. EDIT: Actually just disregard this, I was blocking the input myself so it wasn't Phaser's fault.
  12. Documented steps on getting a Phaser game on Steam

    Just added the 4th part - Steamworks. Thanks for the feedback so far everyone, this has become more popular than I anticipated.
  13. Not really sure where to post this in this forum... Take this example from Game Mechanic Explorer. Some times I can clearly see a framerate drop, yet the counter is always at 60 (some times 59) FPS. I've notice this happening in pretty much all of my games.
  14. [Guide] Phaser auto completion in Atom with tern-phaser

    I eventually got it running. Honestly, this doesn't feel like it helps productivity that much, not for me anyway. It just suggests stuff that's anywhere in the Phaser framework, and doesn't depend on context at all. But I suppose anything more complicated would probably be hard to pull off in javascript.
  15. BMD/Graphics for drawing every frame - which one is faster?

    I am working on a new version of the game to publish in Steam. The new version looks much better and you won't notice any aliasing on resolutions up to 1080p! That actually is relevant to this thread, as if I remember correctly it only happens when I try to draw lots of sprites on the BMD. And about the multiplayer, I'm very interested in implementing online multiplayer in the future, but there's still a lot to be done before I even start looking into that.