stiepan's Forum Posts

  • 15 posts
  • Thank you for the explanation, when attached to a touch event it works.

    Now I'll have to rethink the iOS version of my game based on this limitation (forget sound on start of layout, change sound volume on some action and other "sophisticated" features), but something is better than nothing!..

    Hopefully this can be solved in an upcoming Phonegap and/or C2 release!

    Do you think the restrictions with audio might be related to this: github.com/callback/callback-ios/pull/8 ?

  • One noob question... how do I enable PhoneGap API audio? I just exported an app for PhoneGap with R66, but still could not get the audio to work with my android phone. I know I must have missed something.... <img src="smileys/smiley5.gif" border="0" align="middle" />

    Same here (Android 2.3.4, HTC Flyer); anyways, you can get sound working without limitations (excepted for the poor quality...) on Android using HTML5 and Firefox mobile!

    Ashley: What interests me is iOS - does sound work now on this platform?

    I did some testing with Phonegap 1.1.0 and 1.2.0, but neither seem to play sound, though 1.2.0 is better at displaying my game fullscreen in the iPad simulator; is it possible that sound only works when using the online Phonegap build service requiring a valid iOS developer certificate?

  • Has anybody got sound to work at all on iphone and iPad?

    mammoth: were you able to get sound to work on iOS with the new release?

    P.S.:

    Apparently, Pode got it to work somehow even before the update - scirra.com/forum/phonegap_topic44335_post285877.html . Maybe I wasn't patient enough to wait for the sound to begin playing at a random moment hehe

    <font color="red">Update</font>: sound works on iOS when you tie it to a touch event - see http://www.scirra.com/forum/topic45940_post287823.html#287823.

    Now figuring whether pre-loading it to avoid a delay is possible on this platform.

  • Ashley: Nice, and sorry for pressing you a little on this issue, but sound is really essential for a game to be successful, especially when designed for small children who obviously cannot read text, which is the case of the game I'm developing!

    One sound at a time should be more than enough for most simple games, provided a new sound correctly replaces another if an event launches it while the first sound hasn't yet finished playing.

    Regarding sound formats, Ogg doesn't play yet natively on Android (at least not on 2.3.4), but m4a files do play natively when renamed to aac or mp4 (*), which are the "proper" (**) extension names for this type of files.

    So basically, it should work on Android too with minor tweaking; else we'll still have Firefox mobile for sound-enabled Android HTML5 webapps and/or mp3 as a last resort.

    *though the latter is recognized as video even if it only contains sound

    **non-Apple specific

  • I think that I've read about Construct 2 for the first time on appmobi's website, where it was listed first in the free HTML5 game engines/editors category.

    Glad I heard about it before losing more time with other solutions, which to my opinion are all (both free and commercial) inferior to C2 for simple & rapid cross platform point-and-click/touch game development!

    One suggestion though:

    Since it is still beta as all HTML5 stuff is, you should make it at least partly opensource (maybe via a higher-priced "partner" license with access to source code), so that it can be improved by advanced users/developers based on their needs without having to wait on a new release for a specific feature to be added.

    I'd be between the first to buy it, if the price remains accessible.

    Hi,

    I'd be interested in porting Construct classic to Linux and Mac OS X using a wine wrapper; were there already intents to do that, and how realistic do you think this is?

    (Please see my "introduce yourself" post or PM me for more details about my background)

    Kind regards,

    Stiepan

  • If you bought Construct 2, drop us an email with your username and transaction ID and you can get a star on your avatar :)

    Kamalakar, have you seen this tutorial? It details touch:

    http://www.scirra.com/tutorials/43/making-an-ios-web-app-with-construct-2/page-1

    Hi there,

    Bought an early adopter licence ca. 1 month ago and replied to the message containing the license a few weeks later, asking for the procedure which should be followed to link my license with the account I created in the meantime, but didn't get any reply; assuming the mailbox issuing licenses is a "noreply" one, what is the correct e-mail address I should write to?

    Besides that, I'd best describe myself as an IT all-rounder who dove into HTML5 and now 2D game development after having touched the latter for the first time at the very beginning of college, using C++; happy with Construct 2, I will buy the more expensive business license immediately when it supports sound on iOS!

    Keep up the good work,

    Stiepan

    P.S.:

    Regarding touch interaction on iOS, would it be possible in the future to have an option which would automatically check onclick and ontouch conditions for an object, instead of having to select both separately? This is a small detail, but would still be a great time-saver when developing a touch- and click-enabled game where mouse click and touch on an object have the same effect.

  • mammoth: a simple google search would lead you to community.phonegap.com/nitobi/topics/phonegap_build_ios_ad_hoc <img src="smileys/smiley2.gif" border="0" align="middle" />

    Besides that, I have some news:

    -The recent release of the HTML5-oriented MobiUs browser (advertised as a "web app browser") for iOS made me full of hope that it would work at least as good as Firefox for Android with C2 games - that is, support sound, even if not perfectly - but still no luck; didn't try my mp3 workaround there, as I doubt it would change anything...

    -It will be quite difficult to use Fennec as a wrapper to make a sound-enabled native Android app from a C2 project, as there is no xulrunner (Mozilla's thing to enable such things easily) available for Android (yet).

    So for now, a web-app requiring the user to install Firefox is the only realistic option for providing sound to Android users.

    Let's hope that the current situation will improve soon!

  • Update: sound - Ogg this time - works with a few glitches in FireFox for Android.

    So for webapps, the problem is kinda already solved; kind of, because the glitches are really annoying, and with the current beta of FireFox for Android it isn't better.

    Now for native Android, a wizard could use fennec source code to build an Android wrapper for c2 games, but I fear not to be that one...

    Ashley?

  • I wanna try this... sounds really cool.

    Just found a simple workaround to enable local mp3 support without negative side-effects on existing functionality:

    in the exported project's media subfolder, batch-convert all m4a to mp3 with the software of your choice, or for better quality, start with the uncompressed sound files (wav) if you have them.

    Then open c2runtime.js with a text editor, search for "m4a" and replace it with "mp3".

    That's it!

    The project will still have sound enabled in all currently supported browsers, using mp3 instead of m4a for Safari and IE 9.

    Unfortunately, it doesn't enable sound on mobile webkit - be it Apple's or Google's version - so there's no point to do this as of now, because it will only slightly increase the project's size due to mp3 compression being generally weaker than m4a and additionally it might put you at risk with the format's license restriction for games.

    Ashley:

    Probably the method used to create/initialize the audio object in c2runtime.js doesn't play well with those mobile webkit flavors (in fact I even think this was already discussed here or in another thread) - could you use a method that outputs the same html code as in the w3schools html5 sound example I posted, which does work correctly on all mainstream html5 browsers, including the one in Android 2.3?

    This should solve the sound issue on iOS and Android, for the latter provided that it supports ogg or m4a (who knows, anyone can change, even Google!..) in an upcoming version; in the meantime, my mp3 workaround would give Android in-game sound to the reckless <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • Oh, maybe they updated to support MP3, or that particular model of phone adds support. However, we're kind of waiting for Android 4 to come out anyway - it has a hardware accelerated canvas, so Android versions before then are probably too slow to play HTML5 games well.

    Didn't see the new replies when posting the above - please provide us with a workaround in the meantime, for instance by extending the ajax object to allow audio streaming of an arbitrary format, at the risk of the publisher (both technical and legal).

    Many people (like me <img src="smileys/smiley17.gif" border="0" align="middle">) still have 2009 1.5/1.6 phones and even more have 2.x, so 4.0 looks like too far in the future when talking about mainstream adoption.

    Additionaly, as another user mentioned in a thread talking about iPhone support, simple point-and-click HTML5 games made with C2 run fine on existing smartphone hardware (say Android 2.x with armv7), except for sound; it would be too bad to loose that market segment just because of a <img src="smileys/smiley35.gif" border="0" align="middle"> codec issue!

    <font color="red">Update</font>: Tried a pure html5 audio example from w3schools on my Flyer running 2.3.4 (which is what I should've tried in the first place instead of opening an audio file), and it worked!

    Link: http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_audio_all

    So until Google gives us real Chrome alongside with browser ogg support on our Androids, Ashley, please allow us the sin of using mp3 - temptation is too big to resist! <img src="smileys/smiley2.gif" border="0" align="middle">

  • I didn't mean that as a workaround to avoid the license issue, but simply as an acceptable compromise for you to allow external media support without encouraging directly use of mp3, or another patent-encumbered format.

    Still, external media support would render possible the streaming of audio from a server located in a country with decent broadband where there is no licence issue with patent-encumbered formats in the US and/or EU (Russia?), but this is out of scope and not even directly related to C2, so I will not further elaborate on that matter here.

    Regarding Android browser support for HTML5 audio, I conducted further tests and came to the following conclusion:

    2.3.x on a real device (HTC Flyer) mimics in-browser support for mp3 only, giving the choice to the user between saving the file to sdcard or playing it in a compatible streaming app, while 4.0 has true support for embedded audio, sadly also only mp3 as of now.

    See the following emulator screenshots -

    http://tinyurl.com/6x4nx4q

    and

    http://tinyurl.com/6yn6kta .

    Didn't test with 3.x as is doesn't seem so relevant since it is reserved to tablets.

    As for Safari mobile, yes it is supposed to, but from what I have seen with both my iPhone 3G running the latest available iOS 4 for armv6 devices and a client's iPad2 supposedly running a newer iOS 4 version (didn't check), it doesn't support the aac outputted by C2 on Windows 7, much like iOS doesn't play any mp4 video, only those that are recognized as compatible by iTunes when syncing with the iDevice.

    Note that I still didn't test with iOS 5 (or at least not knowingly...) - now downloading the sdk on my mac - hopefully it will work!

    Anyways, thank you for taking this issue seriously, and let's cross fingers so that you can solve it in the next update <img src="smileys/smiley1.gif" border="0" align="middle">

    <font color="red">Edit</font>: tested embedded HTML5 sound with Android 3.2 in emulator after being demotivated by the fact that iOS 5 doesn't solve the sound issue we have, and it works <img src="smileys/smiley4.gif" border="0" align="middle"> - see http://tinyurl.com/6gv7bwo !

    (Assuming it really uses HTML5, since Flash doesn't seem to be present on the emulator: tinyurl.com/6hdey48)

    Too bad only mp3 is supported...

    Google, please do something about that!

  • Thank you for replying so quickly and sorry for reviving a relatively old thread, but the issue of sound not playing on Android and iOS (at least until version 5 - didn't have the time to try it yet) is still there as of now, so I thought that it was ok to reply here.

    Nevertheless, please feel free to move my post to a new thread if you deem it necessary.

    Regarding the royalties issue, I am conscious it concerns only me (or any other game publisher) - not you - and that is why I am asking for the freedom to take this risk!

    With that said, I have found a quick and (very) dirty workaround to play any sound format supported by the browser, but not available in C2 as an export format (*):

    On some condition, go to sound file url in new window -> alert "something" on the main window, so that the user doesn't leave the main window.

    Works with both file:// and http:// protocols in Chrome, provided you choose the corresponding preview mode and popup blocking is disabled in the browser.

    Didn't try it yet on Android's mobile version of chrome, but it should definitely work, although I would not recommend using such a trick in production, due to obvious aesthetic reasons...

    Support for Iframes would be a much more elegant way of achieving the same goal - could it be a "politically correct" solution to enable this (and way more)?

    Also, can we somehow use the existing ajax object to play remote sound files in any browser-supported format?

    (*not necessarily mp3, as wav is also in that case and might be useful for enabling small sfx files to play on iOS)

  • Hi, have you had the time to test sounds since then?

    <font color="red">Edit</font>: tried with the iOS 5 simulator, and sound doesn't work... However this should be solved soon - see bottom of this thread's page

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Android browser does support sound from Android 2.3.x, but only mp3...

    Please add optional mp3 support in the next update - I am 100% willing to take the risk of being asked royalties for using that format, which should already be in the public domain given its popularity and age!

  • 15 posts