• Content count

  • Joined

  • Last visited

  • Days Won


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

Profile Information

  • Gender
    Not Telling
  • Location
    Plettenberg Bay

Recent Profile Visitors

2,326 profile views
  1. How to render a HTML page inside Phaser?

    stick an iframe in front of the game canvas and load the HTML into that.
  2. catching audio load errors

    Audio loading is an asynchronous process. So the error won't necessarily be thrown from the initial call to, it may be triggered later on. Hence try / catch not working here.
  3. Easy 3D render

    I'm preparing assets for a reskin of a 2D game, and for one of the sprites I need to create the texture by rendering a 3D model and exporting to png. The model is in .fbx format with accompanying materials as .png. I need to create 9 cameras at various angles at a fixed radius around the model and render a png from each of them. Can anyone recommend what would be the simplest application to do this from? I have very limited experience with 3D software so I'm worried this is going to be a massive time sink for me. I had a brief look at Blender once before for something similar but I seem to remember I found it quite a steep learning curve so ended up abandoning the approach. I just need something that will be easy for me to figure out how to control my point of view within the 3D space, easy to correctly place the cameras, and then easy to choose render parameters. Any suggestions? Cheers!
  4. which audio format do you use for mobile?

    I use my own audio player that I wrote before Howler existed. But Howler should be fine to use, yeah.
  5. which audio format do you use for mobile?

    I can't think of a case where uncompressed audio would be required for web. If you mean in terms of memory it would depend on what devices you want to support. It usually ends up being a bit of trial and error, but I normally start to worry if my audio sprites get longer than a minute and a half or so. You'll know when its too long because the page will keep reloading automatically on iOS. Handy tip is to keep your files mono because that takes half as much memory as stereo once loaded.
  6. which audio format do you use for mobile?

    Not being able to play is more likely to be a result of the audio format than from using audio sprites. Also on Android there is the stock browser which didn't used to support web audio, which will have a big impact on audio experience for your users. I've always taken the approach of generating audio in two formats, .ogg and .m4a. Then load .ogg when its supported as the file size is smaller, otherwise use the .m4a. I put all the audio into as few audio sprites as possible, and never have had any complaints about it not working on Android, except for those cases where web audio was not supported by the browser, in which case I normally prepare a slimmed down audio sprite that will work better for HTML5 audio. Still the same two formats though.
  7. Alphabet Training Game for 3-4 year olds

    There are plenty of apps that already do this.
  8. Sound doesn't loop in Internet Explorer

    Oh yeah, I didn't see your post about different response headers from different hosts. Do you see the same effect on those two hosts if you use other audio formats, ie .ogg and .m4a? If not then maybe avoiding the mp3 format is a good way to work around the issue? {Edit} ok I also just noticed Ozdy above says the same thing happened with .ogg too... doh!
  9. Sound doesn't loop in Internet Explorer

    IE doesn't support web audio, it has to use HTML tag audio playback instead, hence not looping.
  10. Proper way to animate sprites

    When you say 'change the texture of my sprite each frame in the gameloop' don't forget that you also need to consider what your desired frame rate is, and hence how long each frame should be displayed for in milliseconds. Eg, if your animation is meant to play at 25 frames per second, your milliseconds per frame is 1000 / 25, which makes 40. Within the update method of your animation sprite you need to monitor how many milliseconds have passed since the last change of texture, and only once that has reached the threshold of your required frame duration (40) should you then change to the next texture and reset your time counter (subtract 40 from it, not set to zero, otherwise it will drift).
  11. Audio Debugging

    A compressor could also be a good idea, it really depends on what the sound content is. If the waveform has a few peaks that are much higher than the others then using a compressor would be a good way to level those out, they could be potential causes of runtime pops and clicks. But I would still suggest doing so via using a wave editor like adobe audition to modify the source audio file, rather than Web audio processes at run time. You'll likely get better sounding results as well as avoid using up additional cpu cycles unnecessarily.
  12. Audio Debugging

    Yes, a hi pass filter would be ideal. Filter out as much as you can without compromising on the overall character of the sound. You should see the amplitude of the remaining waveform ends up much smaller. If its the summed volume of all your simultaneous sounds thats causing problems then that is a good thing!
  13. Audio Debugging

    It could still just be that you are playing too many loud sounds at once, maybe try reducing the volume in the source audio files rather than reducing it in code. Another common cause of cracking/popping sounds is loops that don't quite loop properly, or have their start or end cut at non-zero amplitude. This is particularly noticeable with low frequency sounds, so as well checking they really do loop cleanly one trick is to eq a lot of the low frequency signal out of your source sounds. I did this just the other day one a game I've been working on to help eliminate pops I was hearing when the game ran on the iPad mini and it worked really well. You wouldn't really hear the low frequencies over the built in device speaker anyway. You might also consider what audio format you are using, I realise you didn't specifically say that loops are a cause of the issue but if that were the case then maybe you are using mp3s? They don't loop properly and will sound glitchy due to inherent flaws in the format, switching to .ogg and .m4a will eliminate that particular problem.
  14. Tiling Sprite artefacts

    Actually there were some other sprites in the same atlas that did need to be scaled at times to lower than 0.5. So in the end I found the best solution was to just remove the tile textures from the atlas.
  15. Tiling Sprite artefacts

    point taken