alex_h

Members
  • Content count

    568
  • Joined

  • Last visited

  • Days Won

    4

alex_h last won the day on November 13 2014

alex_h had the most liked content!

About alex_h

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.alexh.org

Profile Information

  • Gender
    Not Telling
  • Location
    Plettenberg Bay

Recent Profile Visitors

1,704 profile views
  1. I'm thinking about putting some ads into a game that will be played primarily in mobile browsers but potentially also in desktop ones. I've tried doing a bit of background reading about what options are available for this but most of the info seems quite old so potentially out of date. Is there an easy solution available that will work for both target platforms? Or does anyone have up to date info about the pros and cons of the main players, or even just who they are? I've seen Leadbolt mentioned (apparently no good for desktop), Google Adsense (although I think they didn't used to be available for games?) and Admob (are they native only?). I've never implemented ads before so I don't really have much of a clue, lol - help me out here
  2. How do I package audio data for HTML5?

    You definitely want to be using webaudio not an <audio> element. I think web audio can receive a live stream: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamSource just do a google search for 'webaudio live stream' for more background info. I don't know about the server side of things I'm afraid though.
  3. How would you like the Input Manager to work?

    In my experience having all game objects fire tends to be a real pain. You virtually never want this behaviour, and in those rare occasions that you do it would be easy enough to construct a system of your own to get all the objects at the point of the click. It's much better if the engine can just fire for the front most object.
  4. Animation Library

    You probably want to ask this on the phaser specific part of the forum, but Phaser has a built in tweening animation feature. https://phaser.io/examples/v2/category/animation
  5. You probably don't want to resize the canvas, you want to scale it up using css. You might then need to adjust the width or height a bit if the aspect ratios of the game and the window don't match.
  6. rendering sprites from svg's

    Sure its possible. You'd just have to draw the svg to a canvas first: http://view-source:http://phrogz.net/tmp/canvas_from_svg.html
  7. .off() doesn't remove .on() event listeners

    .off has the same signature as .on does. So you have to pass the event id and a reference to the same function instance that you passed to the .on function. In your example code that would not even be possible because you have used an anonymous function which you defined within the call to .on itself. If you want to remove the event listener later then you definitely don't want to use that approach! You need to define the listener function elsewhere and have a way of referencing it either by name or through assigning it to a variable. Then pass that reference to both the .on and the .off calls. Pixi uses EventEmitter3 for event handling so you can easily check the source code to confirm that this is the way it works: https://github.com/primus/eventemitter3/blob/master/index.js#L236 So your example code needs to be like this: const sprite = new PIXI.Sprite(); const eventHandler = function(){}; sprite.on('pointerdown', eventHandler); sprite.off('pointerdown', eventHandler);
  8. let vs var keyword?

    You only want 'var' in the deployed code, you can use const and let in dev and then transpile with babel to convert the code to es5. Depending on which es6 features you use and which browsers you want to support it is getting to the point where transpiling may soon no longer always be necessary though
  9. App memory crash on IOS

    That doesn't seem like a realistically achievable requirement to me. To some extent this will depend on what your baseline device requirements are but you can probably only safely load about 10 or so large images at once. Navigating sets of 100 will definitely mean some loading and unloading. Unless there is some way you can anticipate in advance which ones are going to be required and preload them, while also unloading some others, then unfortunately lag is going to be unavoidable.
  10. you should be able to achieve this by including a viewport meta tag in your html header. Something along these lines: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  11. Sprite Gleaming effect in Canvas mode

    Switching texture as you suggested is the best/simplest way. Or if you wanted a 'glow' effect you could do this by showing another sprite with the glow texture either in front or behind of the main sprite. If you try to do something clever with filters etc firstly you would probably want to be using webgl not canvas, and secondly it would be less efficient than simply swapping texture.
  12. Pixi Text Style Generator ? [SOLVED]

    Nice work! One thing that might be nice is if you could exclude any parameters from the source panel that are left on their default values. That way you keep the amount of config to a bare minimum.