Tilde

Members
  • Content count

    115
  • Joined

  • Last visited

About Tilde

  • Rank
    Advanced Member

Contact Methods

  • Twitter
    WillTheSixth

Recent Profile Visitors

1,361 profile views
  1. Maximising game viewport?

    So this is weird, but my current solution doesn't even use scaling options, because I want my game to put certain elements relative to the edges of the screen. So I ended up with this in the update loop: if (game.width != window.innerWidth || game.height != window.innerHeight) { this.resizeScreen(); } And that looks like this: resizeScreen: function() { game.scale.setGameSize(window.innerWidth, window.innerHeight); game.world.setBounds(-game.width / 2, -game.height / 2, game.width, game.height); game.camera.focusOnXY(0, 0); game.scale.refresh(); console.log('Screen resized: ' + game.width + 'x' + game.height); /* this.test = game.add.sprite(0, 0, this.solidRectBmd); this.test.anchor.setTo(0.5); this.test.width = 100; this.test.height = 100; this.test.tint = 0; */ }, Just as valid hopefully?
  2. Maximising game viewport?

    Currently working on this myself. The margin is because HTML bodies have a natural margin you have to get rid of: body { width: 100%; height: 100%; margin: 0; padding: 0; background-color: black; } #container { width: 100%; height: 100%; margin: 0; padding: 0; } Beyond that, RESIZE doesn't actually resize for me. EXACT_FIT does, but that also stretches the elements, which we don't want.
  3. Why does this happen On Phaser Tiled example code?

    The link is missing!
  4. onMarkerComplete has been broken since 2014.

    I'll probably do that from now on instead of my current strategy of commenting "god damn it, Rich" everywhere I use audio
  5. game.bgm = game.add.audio('southSide'); game.bgm.addMarker('start', 0, 11.748, 0.7); game.bgm.addMarker('loop', 11.748, 110.769, 0.7, true); game.bgm.play('start', 0, 0.7, false); game.bgm.onMarkerComplete.add(function() { // This will only fire once, and the sound will NOT loop after heading into the loop section under any circumstances if (game.bgm.volume != 0.0) { console.log('yes'); game.bgm.play('loop', 0, 0.7, true); } }, this); I did a search on this and it turns out it's just never been fixed!
  6. The gamepad buttons do not respond with the game on pause

    Adding gamepad support to my game, and I'm pretty sure this is still a problem.
  7. I cannot for the life of me figure out why it turns into a giant, thinly-stretched column upon exiting frame 1. Even if I set its initial frame to 4 or something and I tell it not to update frames and then apply the filter, it works fine. I also can't figure out how to get the texture to cleanly connect to its edges in the same way before I used a bmd...but at least this is closer.
  8. Thanks for the info! I'm trying and getting some weird results, no luck yet with a direct transfer. My backgrounds have blank backgroundImage, backgroundTileSprite, and backgroundBmdImage objects that I load textures onto depending on the encounter. Here is what the battle background object looks like: create: function(gamestate) { // Shader by Kali (https://www.shadertoy.com/view/4dfGDM) // I slightly modified it! ~Tilde var fragmentSrc = [ "precision mediump float;", "uniform float time;", "uniform vec2 resolution;", "uniform sampler2D iChannel0;", "void main( void ) {", "vec2 uv = gl_FragCoord.xy / resolution.xy;", "uv.y *= -1.0;", "uv.x += (sin((uv.x + (time * 0.5)) * 10.0) * 0.1) + (sin((uv.x + (time * 0.2)) * 32.0) * 0.01);", "vec4 texColor = texture2D(iChannel0, uv);", "gl_FragColor = texColor;", "}" ]; gamestate.backgroundImage.loadTexture('mother3BG', 0); gamestate.backgroundImage.x = gamestate.world.centerX; gamestate.backgroundImage.y = gamestate.world.centerY; gamestate.backgroundImage.anchor.setTo(0.5); gamestate.backgroundImage.scale.setTo(3.6); gamestate.backgroundImage.fixedToCamera = true; gamestate.backgroundImage.visible = false; gamestate.backgroundImage.animations.add('natural'); gamestate.backgroundImage.animations.play('natural', 7, true); var gray = game.add.filter('Gray'); var customUniforms = { iChannel0: { type: 'sampler2D', value: gamestate.backgroundBmdImage.texture, textureData: { repeat: true } } }; var filter = new Phaser.Filter(game, customUniforms, fragmentSrc); filter.setResolution(900, 600); gamestate.backgroundBmdImage.filters = [filter, gray]; }, getFilters: function() { return null; }, update: function(gamestate) { gamestate.backgroundBmdImage.filters[0].update(); gamestate.backgroundBmd.draw(gamestate.backgroundImage); },
  9. I modified the sine wave filter from the examples ( http://phaser.io/examples/v2/filters/sinewave ) to create the background for this battle: http://www.hardmodeorders.com/vandal/vandal.php It works great, but that 256x256 texture originally comes from a sprite sheet, which I wanted to animate as it was being warped by that. Obviously, when you add more frames to the image, it's no longer a power of two, and it breaks the filter. Is there a way to reconcile this? What you see: What I want to use:
  10. Phaser 2.5.0 Released

    Thanks!
  11. New typewriter effect script

    This is great, the new update really helps. I'd love to see a feature where text can take a special character to "pause" like you see in RPGs. Like... "Well, (PAUSE) I guess I'll see you later." (END LINE)
  12. Do you generally develop for mobile or desktop?

    Needless to say, I disagree. I like HTML5 and javascript as a canvas for designing and developing games, and I find Flash cumbersome both on the developer end and the user end. Plus, there are many situations where you just want the device inputs of a keyboard and mouse. Of course, you seem to be talking more as an entrepreneur while I'm talking more as an artist. I'm currently developing a game that downright cannot legally be sold, so that colors my perspective a bit.
  13. Phaser seems like a mostly-mobile-oriented tool, but I like to make browser games on desktop, where I don't feel too burdened by performance issues. I'm curious what real the ratio is!
  14. Phaser 2.4.7 is released

    I've been coding in camera shake myself, and these controls are way better than what I had. Thanks!
  15. Adjusting a sprite's brightness via Sprite.tint

    I actually had to eliminate tweens for the sake of performance! But it is noteworthy that I can tween from a color to black to maybe affect brightness. Although every time I've tried something like that, it flickers through colors like crazy because it's reading a 3-part hex value from a decreasing integer amount.