Raicuparta

Members
  • Content count

    54
  • Joined

  • Last visited

  • Days Won

    1

Raicuparta last won the day on October 19 2015

Raicuparta had the most liked content!

About Raicuparta

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    https://twitter.com/Raicuparta

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

635 profile views
  1. Phaser games on Steam

    Updated the links in the thread. You can also look at this thread for further discussion on the subject.
  2. Phaser 3 Beta 1 Released

    Is there anything for handling scaling, like the old ScaleManager? Looked around but didn't find anything. Right now I'm just using zoom to make it fit the screen.
  3. Hey, I made a quick game using your bootstrap: https://github.com/Raicuparta/square-touch Or if you want to try the game (better on mobile) http://square-touch.surge.sh I had to comment out the UglifyJS stuff from the webpack production config file, otherwise deploy would fail when it found something like this: const b = 20 const c = 30 const values = { a: 10, b, c, } Fails on the comma after b inside values, with the error: Unexpected token: punc (,) But this bootstrap really made things a lot faster, thanks!
  4. 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
  5. 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.
  6. 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?
  7. 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.
  8. 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!
  9. 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"?
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.