Colludium's Recent Forum Activity

  • russpuppy, I have had very poor ad fill rates for the last 10 days or so, with cjs 1.4.7 - I have no idea what changed or how to improve it. Luckily I'm making pennies so a fraction of not a lot is not much of a change in revenue!

  • It depends as well on when you create each object - you can't pin what's not there yet. I'm guessing you're using global objects for this in the belief that they will transfer over; I've also found global objects to be inconsistent this way so I start my common event sheet with a bunch of create object commands instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Black screens are often caused by memory problems. How much memory does c2 say your app will use and how big are your images?

  • 1. I am also being consistently logged out after just a few minutes of inactivity.

    2. On the forum pages listing the various thread topics, the column titles 'views' and 'last post' are swapped!

  • Yes it does.

  • I consider it an honor to be able to help the man who made Spriter!

    Right click on the project folder in the XDK and select Show in OS. For some reason the XDK elected to name my project folder www in this example....

  • OK,

    I have reached the limit of my understanding (it didn't take very long).

    I am looking to add a share feature to one of my apps - currently available on Android and iOS and compiled using Phonegap. I know, Phonegap is so yesterday - but I haven't been able to get Ejecta to work with it yet and Crosswalk offers way too massive a file size (and is android only). So far I have successfully implemented a Browser URL redirection in CocoonJS so the user can go to a Facebook or Twitter link to share some game info - which is great and a reasonable backstop position. However, for this small app the CocoonJS wrapper isn't ideal because of the dreaded splash screen and the long list of permissions.

    Unfortunately, when I use the go to URL browser command in Phonegap, the app creates a browser window within itself and I have not found a way to open the default mobile browser instead (my understanding of this InAppBrowser Plugin is that it's just to enable the creation of a browser within the app, rather than to open the system default browser - I could be wrong!). Not good..

    I have found this Phonegap Social Sharing Plugin that works on the Build service. My understanding is that when it's called it will open a default share function and give the user the option of picking which means of sharing they wish to use depending on the apps and linking profiles available - like Facebook, Twitter, email, text etc - and it sounds like it might be perfect for my needs.

    So, my questions to you, dear community, are:

    1. Is what I'm hoping for here even possible - can I call this plugin by executing some JavaScript through the Browser object?

    2. If the answer to 1 is yes, does anyone have any advice on how I should call this function (aside from spending the next 2 years trying to learn JS!!)? I'm guessing that I will need to add a function that will be called from the Browser object (in the index.html file or somewhere else?) and then that will subsequently call the Phonegap Plugin.

    If you are a JavaScript expert, please accept my apologies for my ignorance!

  • Try this:

    Let's assume you want to rotate an object "Stick".

    Give Stick a boolean: Stick.Rotating and set it to false.

    Declare variable Stick.Rot_Time = x (where x is the time you want the stick to take to rotate 360 degrees).

    Declare Stick.Start_Angle = Stick.Angle (the starting angle, in case it's not zero).

    Then, when you want to rotate the Stick, set Stick.Rotating = True and use the following code:

    If Stick.Rotating = True:
    

    Trigger once: Set Stick.Start_Angle to Stick_Angle

    Set Stick.Angle to Stick.Angle + (360 * dt / Stick.Rot_Time) -- this will rotate clockwise, use a minus to rotate anti-clockwise

    If Stick.Angle is within 2 degrees of Stick.Start_angle -- this stops the stick at 1 rotation**

    > Set Stick.Rotating to False

    > Set Stick.Angle to Stick.Start_Angle[/code:3ddx4l2r]

    ** It won't work if you want it to rotate in less than 1.5 seconds because that is 4 degrees per tick at 60 fps. If the rotation rate is any faster and/or the framerate drops then it could miss this check window and carry on spinning. If that happens, just use a wider window...

    An alternative would be to have a look at the plugins - you could use Rex's Rotate To plugin for this as well.

  • If you want to be able to call the native Facebook app from your game (wrapped in CocoonJS / Ejecta / Crosswalk etc) then, as far as I know, that is not possible using C2. However, using the browser object, you can link to a URL that will open a popup window in the mobile your game is being played on.

    Have you searched the tutorials? Have you searched this forum? Those 2 links should contain all of the answers you need. Regarding the URL encode technique in the tutorial - you don't need to do that - follow the answer in the thread for a non-coder friendly way of doing it. Good luck!

    Edit - I just re-read your question. If you're looking for help on how to fill out the Facebook app page - sorry I can't help. It's a mystery to me as well!

  • Excellent news! I will give this a go later today....

  • hollowthreat - thank you for the offer of help! However, it seems that a night's sleep and a fresh look at the problem has helped me to solve this on my own. In case anyone else is looking for a solution to this problem, I used the following tool to get this to work (no need to do the conversion inside C2):

    This simple URL Encoder / decoder quickly does the job of converting a URL.

    It was just a case of substituting each URL in the browser go-to string with its converted URL. Simple!!

  • First of all can I say a big thank you to juannn91 for this excellent tutorial showing how to make posts onto Twitter and Facebook using the Browser object. The guidance in the tutorial required some modification to be made to the Browser object's js and, frankly, I stopped following at that point. I have managed to post to Twitter on iOS and Android and to Facebook on Android using an standard Browser object, but iOS requires the URL to be encoded somehow.

    hollowthreat pointed out in a comment that URLencode(str) could be used to encode the string instead. My problem is I don't know which part of the URL needs to be encoded. I've just spent a few hours trying to get this to work, by encoding all of the URL or just the last part after 'uri=', removing spaces and replacing etc and I've registered my app on Facebook and it works in Android... The best I have achieved using the URLencoder is a new Facebook window opening with the following error message:

    The dialog has passed a bad parameter

    API Error Code: 100

    API Error Description: Invalid parameter

    Error Message: redirect_uri URL is not properly formatted

    But at least it was in a new facebook window! So, I'm close but I can't think of what to do to get this last step to work. Any advice would be very welcome!

    Thanks.

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies