Nepeo's Forum Posts

  • Diepther I can sympathise, the behaviour of the Google Auth API is frustrating to work with. I've tried my best to streamline it, but there is no useful output from it to give to the developer here.

    Last time I had to debug an issue with the API I found myself unable to get past this point for most of a day. The issue in the end was that we had changed to a new test account for our devices, I believed I had added the account to the test users for the application but had placed it on the wrong application.

    Resolving issues with this basically falls to trail and error, so all I can do is give suggestions. Sometimes the auth API will print kind of useful information to logcat in Android Studio, but you will have to sift through a huge amount of superfluous information from your device and jump through the correct hoops for getting Android Studio to produce a signed debug build.

  • Adding the key isn't enough, you also need to register the signature for the key with Google. You are given the option to provide a signature during the creation of an "app" on the Play Console, but it is optional. Without the signature your application will not connect to Google Play Services. You can edit the signature on the Google APIs website, there you will find an API entry for your application that was created via the Play Console website. Under the credentials section you can edit the signature and the package identifier associated with your application. The page looks like this:

    When opening the sign in dialog Google Play verifies that the certificate used to sign the app matches the one for the API, if it doesn't the dialog closes. As debug builds are signed with a special debug certificate they cannot use the Google Play API unless you resign the APK with the correct certificate.

    You can find a link to your API console project under "game details" in the Google Play console. It is at the very bottom of the page.

  • The Mobile Advert plugin does not have any configuration option for the position of the banner advert, and it's not hidden away somewhere. We create a layout with the banner at the bottom, over the top of the webview. Attaching it to the bottom or the top generally isn't as easy as toggling a flag, and the process is different on Android and iOS. It's probably possible to edit an Android Studio/xCode project export to change how the banner is positioned, I haven't looked at the code responsible for quite awhile so I'm not sure how difficult it is.

    We consider this to be an enhancement to the plugin, not a bug. If you think it is important please let us know using the ideas platform, so we know how to prioritise it.

    https://construct3.ideas.aha.io/ideas?project=C3

    Also as a reminder

    https://www.construct.net/en/forum/general/open-topic-33/forum-community-guidelines-141035

  • Hi Diepther

    When the dialog vanishes like this is typically means that Google Play services has decided that the app is invalid, it's not a very developer friendly way to fail but I believe they do it this way for security reasons.

    A couple of things for you to check:

    - Have you added the signature of your signing certificate to Google Play services?

    - Have you added the google account your using on the device to the testing user list on Google Play services?

  • There's no time limit on the free version, some features are locked out though. Most of them won't effect you with your first couple of projects. You can see the limits here:

    construct.net/en/make-games/buy-construct-3/personal-plans

    I recommend giving the beginners tutorial a go, you can do the whole thing in the free version and it walks you through building a game for the first time.

    https://www.construct.net/en/tutorials/beginners-guide-to-construct-3-1

    Have fun!

  • Hi pirx

    Check out https://www.construct.net/en/make-games/manuals/construct-3/tips-and-guides/performance-tips

    I recommend running your code in debug mode and seeing what is using up your CPU time. It can be easy to use up your CPU budget, particularly with a large number of objects on screen. I expect your event sheet is probably using the most time.

    Without seeing your project it's hard to diagnose it. There's a large number of skilled users in the community who are probably better at optimising projects than I am, but they will still need to see at least part of your project to help you.

  • Hi wolf7,

    quite often the Construct 2 tutorials will be fine to follow in Construct 3. However, you are likely to find some changes, often differences in user interface.

    As your new to Construct, and multiplayer is quite a complex topic, I would advise you to at least complete a couple of Construct 3 tutorials first. This will help you get a feel for how Construct works, and hopefully if you find something that doesn't match up in the C2 tutorials you will know how to work around it.

    You may also find it useful to look at the multiplayer example projects, you can find them under the "advanced examples" tab on the start page.

  • You might want to check out Ash's post about optimising events with function binding, he talks about a strategy used in the expression compiler for constants.

    https://www.construct.net/en/blogs/ashleys-blog-2/optimising-events-with-function-binding-964

  • I can think of 2 ways to do this, both are quite mathmatically simple.

    First option is to add a random number to your target value.

    target + (random(1) - 0.5) * (100 - precision)

    For the above it assumes precision is in the range 0 to 100, and gives an output between target ± 100 and target ± 0. If you want 100% precision to not match exactly then you can do

    target + (random(1) - 0.5) * (100 - precision * 0.95)

    target ± 100 to target ± 5

    If you want a larger range

    target + (random(1) - 0.5) * (100 - precision) * 4

    target ± 400 to target ± 0

    Second option is to generate a random number and do a linear interpolation towards your target value.

    lerp(random(100), X, precision * 0.01)

    target ± 100 to target ± 0

    If you want to change the range then just modify the number given to random, if you want 100% to not be exact try

    lerp(random(100), X, precision * 0.0095)

    target ± 100 to target ± 5

    One thing you can do with this one is change the probably curve, by performing a power on the precision value like so

    lerp(random(100), X, (precision * 0.0095) ^ 2)

  • This might be a little processing intensive but you could do it with cellular automaton. There's an interesting article at http://www.jgallant.com/2d-liquid-simulator-with-cellular-automaton-in-unity/ where they simulate water, including things like pressure and gravity. I've been meaning to try it out in construct for awhile. If you ignored the gravity sections (or limited it somehow) it would give you a gas simulation. This is how the old "falling sand" games worked.

    I imagine this could be done by with 2 2D arrays ( or a 3D array with a depth of 2 ). You read from one array, apply the rules then write to the second. You can then apply that to a tilemap. On the next simulation tick you swap the 2 arrays over. The swapping trick is so that you don't modify the data you are reading from.

    Another method is that you could have a number of "gas" sprites that are both attracted and repelled by each other ( based on distance ). The attraction will hold them loosely together, but the repulsion will cause the gas to expand. I haven't read into this too much but there is a method here https://peeke.nl/simulating-blobs-of-fluid

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As Psynaptik says you can use the tween plugin, which is pretty easy. Create a white sprite and set it's color property to red, add the tween behaviour to it and then add a tween single property action ( property: color, value: yellow, duration: 5 seconds, etc. ).

    Alternatively if you want to manually control each color step you can use gradients from the AdvancedRandom plugin. Define a gradient with color stops (0: red, 10: yellow). Keeping a variable as a counter, each time you want to take a color step increase the counter then use the AdvancedRandom.Gradient method with the counter to sample from the gradient and set the sprites color property. You can use that technique for more complicated color gradients as well, but the transition is always linear ( unlike the tween plugin ).

    You can read about the tween plugin in the documentation here https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/tween

    For more information on color gradients check out the tutorial I wrote about the AdvancedRandom plugin here

    https://www.construct.net/en/tutorials/getting-started-with-the-advanced-random-plugin-30 the section on color gradients is towards the end.

  • If you just want to perform an operation with 2 parameters it's pretty easy, have the 2 parameters as number variables and the operator as a string variable. Then create a function per operator, called something like "operator_+". Then when you want to execute an operation call the function "operator_" & opString with the 2 parameter variables.

    Here's an example with live evaluation

    Doing something more complicated than that, say taking a piece of text containing any number of operations then it's going to be a pain. You could potentially just execjs like R0J0hound says, but it's a bit of a security risk ( users could evaluate anything... ). You would need a proper expression parser, like what R0J0hound implemented in his calculator project ( which is super impressive BTW ). But that's probably way more complicated than you were hoping. It requires breaking a piece of text into tokens, then creating a recursive parser that respects the precedence of your operators.

    You might be able to implement reverse polish notation instead, which would be simpler to evalutate but users wouldn't understand it. The simplest correct option ( if you know JS ) is to write a small plugin that evaluates a string and returns the output value.

  • Now that the C3 runtime is properly released we're trying to increase the frequency on Stable releases. So hopefully you won't be missing out on new features for too long by staying on the stable channel.

    Saying that, it is appreciated having more users on the beta channel. We're trying to wind up to stable release right now so if you hadn't noticed this it would have probably got into the next stable!

  • It depends on the included libraries, if you export a barebones project ( Space blaster for instance ) it only includes Java code, which compiles to a single DEX file. DEX is an architecture independent bytecode, so that project will work on any Android device. Only APKs which include "native" libraries will be architecture dependant, and I'm not aware of any first party plugins which include those. Same rule applies for third party plugins.

    So I believe we're fine. I might do some more reading on the subject though.

  • Thanks for letting me know LuisCGForte I will check this out. For future reference it's better to file issues on GitHub when you find a problem.