• Content Count

  • Joined

  • Last visited

About ylluminarious

  • Rank
    Advanced Member
  • Birthday March 17

Profile Information

  • Gender
    Not Telling

Contact Methods

  • Twitter
  1. RT @wojtha: Eager to try this when I have some spare time! #Opal-Phaser framework for writing #Canvas or #WebGL #games in #Ruby https://t.c…

  2. Cool, I don't often use the html5gamedevs chatroom, but I'll look for you there when I do
  3. Hi all, I'm 15 years old and have been developing software for roughly 5 years now. I've been developing a library called opal-phaser since late 2014. Essentially, it lets you write Phaser code with Ruby. It does this by using the Opal source-to-source compiler and, of course, by using Phaser. I created this project because I really like Phaser and I prefer the expressiveness and readability of the Ruby language. You might be wondering if this is a toy project, but it’s not. I have already created multiple games with opal-phaser and reworked a decent amount of the example suite from the official Phaser Examples. I also created the site for opal-phaser with opal-phaser and the Volt web framework (another very interesting and useful project that uses Opal to great advantage). A few of the games which I have created and contributed to are: Flutterjump, a fan-made game about Fluttershy from MLP:FiM The official demo, which is directly from the "Making your first Phaser game" tutorial There are also a few games that have been made by others than myself: A pong clone Tankgame These are just some examples of things that I've seen people do with opal-phaser; there are more. It is also being used to create a large scalable platform by a new startup. I see a lot of potential for opal-phaser and would like to request that others from the community who are interested in Ruby, or alternative browser languages in general, throw some additional support and feedback in this direction. I'd also love to see more people make projects of their own with opal-phaser and we’ll definitely be happy to support you in such endeavors! Thanks
  4. Bummer. So it seems that folks have already discussed this problem thoroughly on StackOverflow: Autoplay audio files on an iPad with HTML5. One fellow suggested a fix similar to the one I proposed above with the only real difference being that he triggered click events in the browser (which work as well as touch events). Unfortunately, it appears that such solutions no longer work and that real touch input is the only way to fix this problem, since iOS is probably needing to detect an interrupt so that input can't be faked in the browser. However, I'm open to suggestions and will leave this post open in case anyone does have a solution for this.
  5. So, I've tried yet another approach for this: event = new Event();event.initEvent("touchstart", true, true);eventAlert = function(){ alert("event detected"); intro_music.play();}window.addEventListener("touchstart", eventAlert);document.body.dispatchEvent(event);As you can see there, I explicitly put the play event inside the event listener, but it still doesn't work unless you actually touch the screen. I wonder, is there perhaps an interrupt request at play here that is required for the browser-level touch event to register?
  6. So, I've been researching how to trigger types of events in the browser, and came across this way of doing it: event = new Event();event.initEvent("touchstart", true, true);eventAlert = function(){ alert("event detected");}window.addEventListener("touchstart", eventAlert);document.body.dispatchEvent(event);intro_music.play();If you run that in iOS, you'll see an alert showing that a touch event was triggered, even before you touch it. However, it seems that another touch event is still required for the music to play, which is very weird (you might want to comment out the section where the alert is fired so that you don't have an alert for every touch event). I'd appreciate it if someone could explain this odd behavior and offer a solution to this tricky problem. Btw, here's a demo app: http://cl.ly/0H3s1G3k1j2W. And here's the source code for it: var game = new Phaser.Game(800, 550, Phaser.AUTO, "game", {preload: preload, create: create, update: update});function preload () { intro_music_key = "title_music"; intro_music_path = "title_music.m4a"; game.load.audio(intro_music_key, intro_music_path);}function create () { game.add.text(320, 100, "Audio Test", {fill: "white"}); intro_music = game.add.audio(intro_music_key); event = new Event(); event.initEvent("touchstart", true, true); eventAlert = function(){ alert("event detected"); } window.addEventListener("touchstart", eventAlert); document.body.dispatchEvent(event); intro_music.play();}function update () { num = 1 console.log(num); num += 1}
  7. Hi all, So, this question stems from this question: Problems with a certain M4A file in iOS with Phaser. So, I have an intro song that I want to play on my game right when the game starts. Obviously, this works fine on desktop and other systems, but not on iOS since iOS needs a touch event before it plays any sound. Unfortunately, I don't want my user to have to click / touch the game first before the intro song starts. What I'm hoping to be able to do is to trigger the touch event so that it registers with iOS. I've tried setting `game.sound.touchLocked` to false, but to no avail: this.game.sound.touchLocked = false;this.myGame.audio.titleMusic.fadeIn(INTRO_MUSIC_FADE_DURATION);Does anyone know how to register a touch event on iOS with Phaser?
  8. Thanks for offering the help, Rich. As mentioned above, it turns out to be a problem with iOS needing a tap event.
  9. Ok, so it turns out that this is a problem with iOS needing a tap event to play sound. Thanks!
  10. Hi all, I'm having a problem playing a certain M4A file in iOS with Phaser. When I play this file in Phaser, it works just fine on OS X in Safari, and even Chrome and Firefox. However, when I try to play this file in iOS with Phaser, it simply doesn't play. It's very weird since it works fine in Safari on OS X, but fails in Safari on iOS. Also, no errors are thrown in the console on any platform. Upon inspecting the file in TextMate and Sublime Text, the only thing that I see that could potentially be wrong is that there are a lot of null characters in the beginning of the file, but I'm no audio expert, so that could be perfectly normal. I also wonder if I am having this problem because I get a lot of my audio files by running them through http://audio.online-convert.com. Does anyone have an idea as to what's wrong with my file that makes it not play in iOS? Here is the file in question: http://cl.ly/2c3g2B0B2q3x. Here is a demo: http://cl.ly/0h2C0I0F3Q2z.
  11. Thanks, I got rid of it. That seems to have solved the problem
  12. I have two sounds that I'm trying to play in a game of mine. They're both using the MP3 codec, but one of them is inexplicably not playing in Safari 9 or Firefox 41.0.1 (Mac OS X 10.10.5). It plays just fine in the most recent version of Google Chrome, 47.0.2522.0 dev, but not Safari 9 or Firefox 41.0.1. I'm not sure why one MP3 sound would play while another wouldn't, when they both load just fine and there are no errors thrown, except in Firefox where it complains about not being able to use a given encoding (which doesn't make sense since it plays one of the MP3 sounds). Here is the sound that plays just fine: http://cl.ly/3u1p3Y3v0X1cThis is the one that doesn't play in Firefox and Safari: http://cl.ly/420O3P2r1P04Here is a demo of both sounds playing: http://cl.ly/231I320F053D. When you open it with Safari 9 or Firefox 41.0.1, you can only hear the jump sound. Any ideas as to what's going wrong here? EDIT: Btw, here's the source code for the demo: var game = new Phaser.Game(800, 550, Phaser.AUTO, "game", {preload: preload, create: create});function preload () { intro_music_key = "intro_music" intro_music_path = "intro_music.mp3" game.load.audio(intro_music_key, intro_music_path) jump_key = "jump" jump_path = "jump.mp3" game.load.audio(jump_key, jump_path)}function create () { game.add.text(320, 100, "Audio Test", {fill: "white"}); intro_music = game.add.audio(intro_music_key); intro_music.play(); jump = game.add.audio(jump_key); jump.play();}
  13. @Raiper34 You mean with phaser-rails or opal-phaser?
  14. If you folks are interested in working with Ruby and Phaser, you might like the opal-phaser gem, which allows you to write Phaser games in Ruby.