shukra's Forum Posts

  • How do add a UIi library to the Skirra project?

    -TAUI

    https://developer.tizen.org/development ... dvanced-ui

    • YUI Library

    http://developer.yahoo.com/yui/

    or other...

    It is needed do with Plugin, how I can understand

    May be someone have some example ( plugin)?

  • store it in an Array bro.... than set your text to the array's specific row & column(basically load the stored text in the array)!

    Hope it helps. That's what i do in my games

    donald Cela

    Could you make for us example please.

    I can not understand you exactly.

    Are you talking about something like Sprit efont?

  • I have a plugin by REX for text in which you can change font in css .

    The question is, if i want use my font ( not arial only), In which place put ttf it in the project, so that it could be works with plugin ( css)

  • > If you check in the browser console on the device if AudioContext.prototype.suspend is available, that would identify the issue.

    >

    Have you checked this yet? This is the most important thing to check.

    Yes, you are right AudioContext.prototype.suspend is not available.

  • Ashley

    When it suspends it has to stop playing audio otherwise the audio processing is still working, which is exactly what uses power.

    Of course I understand this. I thought so.

    But the results and many attempts make me think that the Audio plug-in stops the sound, but somehow and for some reason it will consume energy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    . If the browser doesn't support suspending or resuming the audio context, the problem is with the browser, not C2 - C2 will use these to optimise battery life if they are available, but if they're not available there's not much choice other than to leave the context running idle in the background.

    I will ask on tizen forum about browser and supporting Audio suspend.

    But I must add - that when suspend work - sound or music doesn't work

    when Resume - then it works again.

    I chek my music app in Emulator for GearS2 S3 ... and logs shown that Media suspend works....

    That time the music file is playing ( folder Music)

    I need add this about tizen browser - I have NO such problem with another Tizen device ( Geas S, Mobile Tizen Z devices).

    So... It is pitty, but i must use background mode..

  • Ashley

    I'm make the web app for wearable devices that needs to save energy while pausing - it's not just a hidden state or background but also a screen state off (pause).

    The app with sounds and music (both folders).

    It's not the first year that I've been refused acceptance of such apps because of the energy excess during the pause (the screen state off), although other applications without music and sounds have never had such a reason and problems.

    And also, I certainly add this into code file index.

    // 2Pause and resume on page becoming visible/invisible
    		function onVisibilityChanged(previousState, changedState) {
    			console.log("Screen state changed from " + previousState + " to " + changedState);
    			if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden || changedState=="SCREEN_OFF")
    				cr_setSuspended(true);
    			else
    				cr_setSuspended(false);
    		};
    		
    		document.addEventListener("visibilitychange", onVisibilityChanged, false);
    		document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);
    		document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);
    		document.addEventListener("msvisibilitychange", onVisibilityChanged, false);
    
    		 // Sets the screen state change listener.
    		 tizen.power.setScreenStateChangeListener( onVisibilityChanged);
    
    [/code:1wgs9fb9]
    
    Console is shown  when screen is off – Suspend always on. Conversely – screen on – app resume
    
    And while the screen is off -  everything is suspended -
    
      Since I do not have a tool to measure virtually the energy, etc. during the app pause, I asked one kind guy (he has the opportunity and knowledge) to see what is happening with app during the pause.
      Here is his answer.
    
    [i]“I have found the problem that causes your app HIGH current.
    
    Sound and music should be paused when your app is paused
    because the api for sound/music will work even if your app is in background.
    
    Actually I don’t know what api to pause sound/music but you would know that.”[/i]
    
    Next, I tried to Unload all the audio during the suspend time. It did not help.
      
    
    At C2 editor after suspended events :
    
    "Play in background" always [b]No[/b]
     Index file with suspend behavior - see  first code above
    
    Anyway -Current consumption is too high on sleep mode.
    
    [b]Standards are
    Min current: 33.6 mA, Average current: 42.712 mA
    [ul]
    	[li]Samsung Gear S3 standard current consumption[/li]
    [/ul]Average current: 10 mA[/b]
    
    Video is not very good in quality.
    
    [b]Test start time – start 17-25[/b]
    
    [b]Time when the screen is off (pause) 17-27 -36[/b]
    
    [b]
    Sound and Audio somehow works after suspend[/b]
    
    I'm sure it's an audio plugin. [b]I need to understand what can be done with this[/b], because I like music applications, I work with music too.
  • Ashley

    "Play in background" always No

    Now i'm ill

    tomorrow with video and logs I hope I will tell you and post here why I decided that the matter in the audio plugin...

    this is top and tema is not closed

  • Hello, I need help in creating or modifying the Scirra Audio plugin so that it does not consume a lot of energy on devices like smart watches during the application is suspended.

    During time pause audio plugin application consumes more energy - I have no doubt (it's a long story)

    How to do it?

    What is fix in this plugin ( runtime.js)?

    May be this is piece of code ( Audio Plugin - runtime.js)

    C2AudioInstance.prototype.setSuspended = function (s)
    	{
    		switch (this.myapi) {
    		case API_HTML5:
    			if (s)
    			{
    				// Pause if playing
    				if (this.isPlaying())
    				{
    					this.resume_me = true;
    					this.instanceObject["suspend"]();
    				}
    				else
    					this.resume_me = false;
    			}
    			else
    			{
    				if (this.resume_me)
    				{
    					this.instanceObject["play"]();
    					this.resume_me = false;
    				}
    			}
    			
    			break;[/code:22gpri46]
     Unloading all - does not help.
     I understand that the audio plugin pauses during the suspension, and it is necessary to stop it.
     What can you advise?
     Thank you in advance
    
    @Ashley
  • If you don't need the full capability of google maps, and just need the user's location plotted on a static map, use pode's html pack and google's static map function.

    plugins-pode-html-pack_t69356

    https://developers.google.com/maps/docu ... taticmaps/

    Iframe - it's not work for me on mobile

  • First, is there a specific feature you have not been able to duplicate in Constructs event system? The only reason to create a plugin is because there is something you want to do that the events can't or, to create an enhanced version of a given behavior. If you are having trouble getting something to work, you may get help from the forums here to solve it.

    Second, BlueJ is primarily a Java dev learning tool, not Javascript. Those are not the same thing although they may sound like it.

    Third, when you create your event/actions you are basically programming with an image based language so, you really can't say making a plugin is the only way to program.

    Forth, if you do need to write a plugin, the environment in which you write it does not really affect how it interacts with Construct. You could write it in a full Javascript development environment, or just in a basic text editor like notepad and the script will work the same in the end. There doesn't need to be any compatibility between the software you write it in and Construct as long as the script you write follows Constructs format and implements its framework.

    Just a little background, I currently work as a software developer using Java for server side code and Javascript for the client side. I have used Construct for more than 3 years. In all that time, I have not found a reason to write my own plugin and I have even found many current plugins others have created to be completely unnecessary. The event system is more than powerful enough to handle most things you want to do.

    May i ask you, how do you prefer organize your work if you must get LSB app (Tizen or ANDROID)

    through C2 ( or another way).

    "Many current plugins others " Google Map or OSM are not work (all - i don't know why - may be problem in export from C2) and on another side you have work ( emulator) app framework and google map api in xdk.

    ?

  • Aura

    It might be better to show map on a canvas object, so that it could be place behind other sprites.

    You might make a behavior to draw map on rojo's canvas plugin.

    Could you tell to us how do it in detail?

  • all map plugin in scirra on mobile device give just a black screen

  • Hello,

    We have a problem with integrating Google or OSM API in Web Tizen project ( mobil 2.3).

    The project i did in C2

    In preview and in debug mode in C2 everything fine

    When we export in Tizen SDK Or just make HTML5 project for XDC we see that

    Tizen SDK - The Result on Simulator and Emulator

    What's wrong?

    XDK

    Config file with only location and internet privilege

    Index. html or http://pastebin.com/QF8ApN6d

    File Logs (TIZEN SDK) on Emulator