Nepeo's Forum Posts

  • There's 3 easy ways that come to mind, which one works best will depend on your situation.

    1. Create an event sheet function that gets the value. This works because you can set the return value of the current event sheet function from JavaScript using runtime.setReturnValue.

    2. Create an event sheet function that sets the score label. You can call event sheet functions by name from JS using runtime.callFunction passing in your variable.

    3. Assign the value to a event sheet variable. It's possible to read/write the local variables of an event sheet from and event sheet script block, and the projects global variables from any script type.

  • I don't we've changed anything which could cause issues. The login state is a little weird, and tends to be preserved across installs which doesn't help diagnosis. If a new user is able to download your game and login then I would say it's fine.

    There's a pending update I've been meaning to look at which resolves a login state desync. It was briefly published but we ended up pulling it for further testing after a bug report came up for the new version. The change is a defensive one though, for a rare bug where a device had somehow ended up logged in without the app being aware of it.

    KENYONB on the version you are testing is it a debug APK or did you download it from the store? As a reminder unless the APK is signed correctly you won't be able use the Google login.

    Mikal There's an excellent breakdown of the financials of PWAs vs native apps on Smashing Magazine which is well worth a read. It's not specifically about games, but it's common to both really.

  • Maybe try add a second instance variable called TargetDistanceTravelled which is initially 150. Compare DistanceTravelled to TargetDistanceTravelled and then when it exceeds the target increase TargetDistanceTravelled by 150.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What plugins are you using? Sounds like it's related to Android X support.

    EDIT: ah apologies I hadn't realised you were using Phonegap Build. PGB does not currently support Android X, which is required to use the current versions of the Google Services libraries ( such as Admob, Play Games, In App Billing ). There isn't anything we can about this unfortunately. We advise that developers should either use the Construct Build Service or the Cordova CLI. The Phonegap Desktop app may also work, but we haven't tested it. In practise it should work the same as Cordova CLI, but be easier to use.

    antonymarc it is possible to get the users location and send notifications with a PWA, so that's not that much of a consideration.

    There are an awful lot of companies who think they need "an app". Similarly users will search specifically for a native app to provide some function they want, because that's the mindset. In reality a PWA, or just a normal website can provide what they need. A PWA tends to take up a fraction of the storage space of a native application, and a website will use nothing ( or very little ). It's an attitude I personally find frustrating, and hope that it can change. But it will be slow if it does.

    The downsides of web apps generally comes down to monetisation. It's generally easier to get people to pay for a product in the app/play store than for a web app. So your left with the likes of advertising and voluntary user support ( patron or similar ). Companies like Brave are working on alternative means for web apps and content creators to earn money, but it still early days.

  • I think a contributing factor is if you press esc to try and close the autocomplete window it will also close the script editor. Frustratingly it doesn't look like codemirror passes the event object to the handler for the autocomplete handler, so it cannot prevent the event from bubbling to the script view.

  • Glad I could help.

  • I found your issue. You have a variable called "TimeStartLayout" but you are not using it. You use the "time" expression, which returns the number of seconds since the game started. In the "on start of layout" event set "TimeStartLayout" to the value of "time", then before updating the clock do "time - TimeStartLayout". This will give you the actual duration.

    Here is your project with the fix

    send.firefox.com/download/e11e8d269006292f

  • I'm still having issues opening your project. I think the link you are giving me only works for you, try using "share" and then "copy link".

  • Yup I can confirm the esc key behaviour is frustrating... I personally try to only have function calls in the event sheet script blocks, and put the actual function declarations in a script file. Minimises this issue for the most part, and the text editor itself is more practical for large chunks of script anyway.

    As for the external editor there isn't currently a way to open an external editor from the browser. If your using the experimental local folder saves for projects you should be able to open and edit script files in your project quite easily. One caveat of this is that C3 won't be aware that the project is being edited, so you shouldn't have the project open in C3 at the same time or you might lose the edits you made in the external editor. This is something that might improve in the future, but the ability to read/write local files from the browser is very new.

  • Perhaps you should check what Chrome version they are using, there is a known issues with Chrome 79 that it is causing data loss for WebViews. Apparently it migrates profile data to a new location, but due to poorly written tests they didn't realise that they also needed to move localstorage, indexeddb, etc. After the update the data is still in the old location, but Chrome looks in the new one and hence assumes there is no data. I imagine at that point most apps would assume that it's a new users and create new data. Here is the issue on the Chromium bug tracker, it's caused a fair bit of drama for obvious reasons. They appear to be taking it seriously, but it's a bit of an awkward situation because anyone who has experienced this problem now has 2 sets of conflicting data. So it's not clear which data to preserve.

    I believe they halted the rollout on Friday so it won't be affecting all users, but the estimate is around 10% got the update... All a bit of a mess really.

  • Sounds like you basically want a static host for your blog posts and files. There are plenty of providers for this, I'd encourage you to look somewhere other than Dropbox though. They are a service for keeping documents on the cloud with access for specific users, not a static web host. On a slight tangent this reddit post about misusing Dropbox might interest you.

    You can use the AJAX plugin to request files from a server easily enough. You should be aware that unless the server is set up with the correct "access-allow-origin" header you will not be able to request files from it if your web app is running on a different domain. For instance if you had web app on myblogapp.org and the files on blogstorage.org, then blogstorage.org will need to add the header "access-allow-origin: myblogapp.org" to all requests it serves. This can of course be solved by keeping the app and the data on the same domain.

    GitHub pages is an example of a free hosting provider which could allow you to implement something like this, I don't think they offer configuration for HTTP headers so you would have to host the data and the app on the same domain.

    Another option is AWS. The service itself is quite complex to find your way around, but last I checked there was a quick setup button on the AWS console homepage for creating a static web pages using S3, CloudFront and Route 53 ( storage buckets, CDN routing and domain name services ). On AWS you pay for usage, not a flat fee. For a low traffic site your probably looking at less than £1 a months for hosting and £8 a year for your domain name.

    I've heard netlify is also quite good, and easy to set up. But I don't have any experience with them.

  • Thanks for the feedback!

    The data editor doesn't currently do line wrapping or respect newline characters when rendering a cell. If you want to insert an actual newline into the cell then you can use shift+enter to add one. But you can only see them when your editing that cell.

    It's something we could potentially implement, but hasn't been considered important so far. Perhaps if you could post this on our feature request platform construct3.ideas.aha.io/ideas we could gauge how important people think this is?

  • I wasn't able to match with another player to try that game properly unfortunately.

    Using a separate object for the camera is a pretty useful technique. For instance it could normally follow your character, but when another player gets close enough it could center halfway between that player and yours. I'd implement this by searching for players within a certain distance of your character, then averaging the position of the players to find a common center. Then smoothly move the camera to that position. I imagine the radius around the player would ideally be min(height, width) / 4 so that there is some space around the players.