Nepeo's Forum Posts

  • I had a look at your event sheet and I think you have your events in the wrong order. On layout start you are:

    1. Creating a Dictionary and Array

    2. Saving the Dictionary and Array to the filesystem

    3. Checking if the file exists

    So you will always overwrite the file, even if it exists, before trying to read from it. Instead you should:

    1. Check if the Array/Dictionary exists on the filesystem

    2. If it does then read it and use that data

    3. Otherwise use your default data

  • Internally there is an array of achievements which you can reference by index. It's just the order from the achievement buffer object. It could be alphabetic or sorted by when you created it. I'm not sure how they decide. There's an expression for getting the ID from an index, you can use this to create a lookup dictionary. The only reason why it works by ID is compatability with the older C2 version of the plugin and the web API, we actually have an internal map of ID to achievement which could easily be accessed by an expression. But then we'd have to duplicate the expressions, and that gets a bit messy... I might bring it up with Ash, see what we can come up with.

    In terms of your other question, if your offline the Play games service still works I believe. It will deal with syncing unlocked achievements and leaderboards when the device is reconnected. I wouldn't be surprised if it still told the user when the achievement was unlocked, even without network, provided it had already synced the initial achievement data.

    By the sounds of it your doing some sort of "if ( userscore > achievementThreshold ) then unlockAchievement" you can substitute this for the Steps style achievements so that you don't have to save the user score somewhere. The steps style requires you to set a target value in the console, then you can interact through 2 actions SetSteps and IncrementSteps. Increment adds to the current counter ( useful for "user has played x many games" ) and SetSteps sets the remote value ( useful for "user has scored higher than" ). Again all this stuff is controlled and synced by Play Games without you having to worry about internet.

  • we haven't discussed it internally, we already use it with built in plugins and there's no additional security concerns. All we needed was an interface added to the public SDK, which I've now written. The interface may need some additional work after Ash has reviewed it, but there's a good chance it will make it into the next beta release.

  • The plugin itself doesn't do any checks, as it doesn't keep track of the achievement data. I'm going to describe what the Android version does here, you didn't mention if you were using the web variant or not so I'm going with the more common one. The web one just fires the request off to the server

    Here's the docs for the underlying API the plugin uses AchievementsClient#Unlock

    When you use these methods your basically talking to the Play Games app on that device, which decides what it needs to send to the server and when. Generally it tries really hard to avoid talking to the server, and will show you local copies of the data instead. It's the same in reverse, so it won't send changes until it has to. The API has some methods to force it to sync ( anything with the "Immediate" label will force a sync of all recent changes ) but we generally try to avoid these.

    I expect the app is sensible enough that if you call unlock with something that's already unlocked it won't actually do anything. However, the documentation doesn't say if it does or doesn't. You should probably just test it. When you open the achievement dialog it will normally pause slightly as it opens to sync if it needs to, but will be nearly instant if it doesn't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Gadgetkk as I said it's a condition of Tile Movement, so it's only available on objects with the tile movement behaviour.

  • eonian it's not something I had originally considered for it, but it's possible yes.

    As I was interested in how possible it was I gave it a go, you can check out the project below.

    https://www.dropbox.com/s/ucsl7dh63h055i1/animated%20radial%20gradient.c3p?dl=0

    It works in a similar way to the other gradients I did except per pixel it calculates the angle between the pixel and a given position ( in this case {x: 127, y: 127} ). The angle can then be fed into the gradient expression to get a radial gradient.

    I've tried animating it by adding an increasing value to the angle and wrapping it to the 0 - 360 range. Which works, you can probably do something more exciting by transforming the angle with some cool maths though. As you can see it's using waaaaay too much CPU to be practical unfortunately, hence the poor framerate ( I get about 8FPS ) normally this sort of thing is done on the GPU which is optimised for doing complex per pixel maths like this.

    You may have more success writing a custom effect, as that would be run on the GPU and the maths is much the same just written in shader language (GLSL). You would have to write your own gradient system, but interpolating colours is easier in GLSL thankfully. Only downside is that you would likely have to hardcode the gradient values into the effect.

  • If your game is tile based then you could use the "Can move to" condition of Tile Movement. Internally it already has to check if it can move into a cell before starting the movement animation, I just exposed that method for users ( seemed handy ).

  • Gillis this topic is pretty old, and a little out of date. We've since added ranged copy/paste to the data editor. So you can move data to and from excel or sheets pretty easily. Additionally if you really want CSV data then the copy format is TSV ( tab separated values ) which should be quite easy to convert to CSV. Some CSV importers will likely directly understand TSV without you needing to convert it.

  • You can just type the value in, the limit is only when using the input controls. The editor is pretty good at staying responsive even with a massive table, but your chances of a out of memory crash go up a fair bit once you exceed 10 mil cells. The 1000 x 1000 soft limit is supposed to make it harder for users to do this... So just be careful changing those dials, an out of place zero can crash the tab and ruin your day.

    At some point in future I may update how the editor works, if we made the table structure sparse then it be able to cope with tables with dimensions in the trillions. Provided they were mostly empty. Although it would be impossible to serialize it to JSON at that size ( as the JSON array format isn't sparse ). This would be a pretty massive change though, and likely increase the code complexity level quite a bit.

    If you need really big arrays then file a feature request, it would be an interesting project to work on but we cannot commit the time for it unless we know it's actually something that needs solving!

  • Hey LukeW

    If you have your computer set up for Android development you can use Chrome developer tools for an attached device and view webviews for debug applications and Chrome pages.

    You can see a guide on it here

    developers.google.com/web/tools/chrome-devtools/remote-debugging

    Depending on the device you may need some additional set up, Samsung devices seem to require you to start a "ADB" session with the device first. I normally do this by opening Android Studio with a random project and selecting the "logcat" tab ( which is like the console for the Java side of your apps code ).

    In terms of audio files some audio decoders don't like very short files, I'm not sure what audio format your using but .m4a .aac and .mp3 files have historically been problematic ( but mostly solved now I believe ). If you can find a good way of reproducing this issue then we would like to take a look.

  • The signature is a string that is unique to your signing key.

    When you set up an application to use Google Authentication ( sign in with google account, only used for Google Play Games at the moment ) they provide you with an application key which is unique to your app, and you provide them with the signature for your signing key.

    Then in your app when it attempts to use that application key the sign in service checks the signature of the key which was used for the APK, if it doesn't match the sign in window doesn't appear. It's a pretty solid security system, but one that can be awkward.

    If you use their signing service, then your application has been signed with a different key that you don't have so the signature doesn't match. I believe they provide you with the signature for the key, so you can change the signature to match. However, it does mean that you cannot produce a working build without at least publishing it via an alpha channel.

  • App bundle is cool, but I'm not sure it has many advantages for Construct yet. App signing is good if your worried about losing your keystore or access to it, but that can be solved by good backup strategies. It also has the downside that you still have to have a keystore for signing ( they check that it was you that signed the APK then resign it ). Also your key signature will be different, making testing anything to that uses Google Auth ( Play services for instance ) awkward.

  • sachos345

    Thats nice to hear! Yup, i read that link yeasterday, i unpacked the APK with 7zip but i did not find any "lib" folder, from what i understand that means that the App is architecture independent correct?

    That's correct yes. APKs are architecture independent unless they contain code for specific architecture, which will be placed in a lib folder. So no lib folder is a good sign!

    Below is a diagram showing how your game is executed on an Android device. The C3 runtime is written in JavaScript, and addons are written in a mixture of Java and JavaScript. Java is needed to access some Android features.

    Anything that runs directly on the processor has to be the specific architecture for that CPU. As you can see Construct runs via the Dalvik VM and the V8 VM. These are already on the device and using the correct architecture, so you don't have to worry about those. Java was specifically designed to be platform independent so programmers didn't have to worry about architecture differences.

    Game/rendering engines that compile directly to machine code are often architecture dependant, such as unity and unreal.

  • We're looking pretty good for all the first party addons. I haven't looked at any third party ones, that's up to the individual developer. I would imagine they, like us, will be fine. You can check out the document that they posted https://developer.android.com/distribute/best-practices/develop/64-bit which tells you how to identify if your APK is architecture agnostic or not.

    We only use Java code on Android, and if you try looking at the APK in an archive viewer like they suggest you will see no compiled library folders. So all good!

  • TheScythe we need to publish a new release to disable webgl 2 on Android properly ( probably Monday ), if you know what you are doing it's possible to modify a cordova project export so that it only uses webgl 1. There is a older forum thread talking about doing this, which probably includes instructions.

    Just to be clear this issue only happens when published as an Android app, on devices using mali GPU's ( mostly samsung devices ) and using release 137+. If possible just publish using r136 if you need to do it urgently, or if your comfortable working with a cordova project you can modify the runtime as I mentioned before.