Nepeo's Forum Posts

  • is right, the pig instance is self obstructing.

    The behaviour casts a ray from it's instance to the instance your checking for. If there is any obstruction between those positions then the condition is false. As the destination position is inside an obstruction it says it can't see it. Which is kinda wrong.

    I'm not sure if this was a regression when I changed the behaviour to use ray tracing or if it's always been a limitation of the behaviour. Most of the code related to the conditions didn't actually change so I expect the latter. We already had a special rule in place to prevent the casting object from being considered an obstacle, and I think it makes sense that if you are explicitly trying to check LOS to an obstacle that it should not block itself in this scenario. So I've made a small change to allow this situation. Fun side effect is that if your checking LOS to an obstacle now you get collision information ( surface normal, reflection, etc. ).

    Now it's probably worth noting that if you didn't actually care if the piggy obstructs other piggy instances then I wouldn't recommend doing this. In the worst case situation for this game you would go from 155 collision checks per tick to ~24000 ( 155 * 155 ).

    This is a slight change to how LOS works, but I think this is the expected behaviour so hopefully won't cause any issues for people.

  • Mikal a good starting place for sharing code snippets is https://gist.github.com/. Allows you to share one or more files, with support for revisions and comments.

  • One way I have used in the past is to have gravity areas, which are actually an invisible sprite. Create a Sprite called "GravityZone" and give it a semi transparent red colour. Then add an numerical instance variable called "gravity_angle". Change the "Initially visible" setting to false for GravityZone. Now you will be able to see the zones in the editor, but not in the game.

    On your event sheet add an event with the condition "GravityZone is overlapping Insect", then add the action "Insect set gravity angle" with the expression "GravityZone.gravity_angle". Place gravity zones along your walls and change the angle for each instance to point towards the wall. Now whenever your insect is next to that wall it will be attracted to it.

    This presumes your insect is using the platform behaviour, you can probably adjust this technique to other ways of creating gravity. The transition between gravity zones can be a little awkward unfortunately, but some adjustment to the events can often smooth it out.

  • There shouldn't be any additional steps required no. I have had bugs reported in the past related to displaying rewarded video ads, but I have been unable to reproduce them. But I will take a close look at this bug, as I'm curious if there is some edge case I have missed that people are hitting.

    From what we've heard the Play Console shows a somewhat aggressive warning telling you to use an App Bundle, but it's not required.

    We use Cordova for creating mobile applications and it doesn't have support for generating App Bundles directly yet. Cordova applications don't lend themselves to the advantages that App Bundles offer, which is one of the reasons why the Cordova team haven't prioritised the work. Similarly when we looked into them we saw little advantage for us other than a small increase in maximum application archive size. We had hoped that they might resolve the larger issues around expansion APKs but they made no changes to that situation.

    If it becomes a hard requirement we might be able to workaround the issue on the build server, but we haven't looked into how feasible that is and it's an action that we'd like to avoid. In the meantime your best option is to export as an Android Studio build and export the bundle yourself. Android Studio isn't as easy to use as xcode but creating an App Bundle isn't too bad, so hopefully it doesn't cause too many issues for people. Although we are aware that it's not ideal.

    You can see the discussion on the Cordova GitHub https://github.com/apache/cordova-android/issues/610

  • While it's a little counter intuitive it's possible to use the C2 runtime within Construct 3.

    Here's a small snippet of the blog post where we announced the C3 runtime

    Rebuilding the Construct 3 editor was a huge project. To ensure it was manageable, we kept the same runtime (game engine) that Construct 2 uses, and transferred it across to Construct 3. This is one of the reasons we were able to successfully launch Construct 3 last year, first in beta, and then the full release in December. However we've always planned to replace the runtime later down the line.

    That post was over a year ago, since then we've finished the new runtime and set it as the default for new projects ( it's possible to change runtime in the advanced project settings ). However, for projects using the old runtime it's up to the developer if they wish to switch over. One of the common reasons why people are still using the old runtime is that 3rd party addons required rewriting to work with the new runtime, hence some of them are still only available in the C2 runtime. Most of the popular addons have been ported by the original maintainer, or in some cases picked up by a community member with permission and ported. There's a fairly active discussion on the addon forum about porting plugins and looking for versions that support the new runtime.

    If you need time since last run could you not just use the unixtime expression?

    The current time represented in milliseconds since Jan 1, 1970. This is the standard way time is represented on many systems, and is commonly known as the UNIX time since it originated on UNIX systems.

    System expressions

  • Fengist Looks like your on an old version of the documentation, I didn't even know there was a copy on the Scirra site. You can use safe mode to load the editor without any addons, then delete the addon using the addon menu.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey maXimum7.

    I haven't checked this so I might be wrong, but my best guess is that the plugin only supports the C2 runtime. The C3 runtime is now the default, so plugins that only have a C2 runtime implementation won't appear in the plugin list.

  • Well what I was getting at is that with short poll you have 1000 users doing brief ( maybe 50ms ) requests every 5 seconds, but at different time offsets. So you don't actually have 1000 concurrent requests at any one time. Under worse case scenario you could have 1000 concurrent for 1000 users, but all the users would have to start at exactly the same time and have the same network latency.

    The project I worked on had a cache in front of it, as the data wasn't specific to a user a proxy server/s served the same result to multiple requests for 1 second. So the proxy only had to make up to 1 request to the main server per second for polling, no matter how many users were connected. If you wanted to split users up into groups/chatrooms then you can have different end points per group, then you have up to 1 request per endpoint per second instead. I can't really remember how many users we got but for read only data that technique scales linearly with how many caching servers you have. Sending a message has to go direct to the server, but we can assume the message density will be a lot lower than the poll requests. So your requests would be (groupCount + sentMessagesPerSecond) for your caching period.

    Much of the limit your looking at comes down to how PHP works, I would presume there's a way to pool processes to reduce start up time and limit how many new processes the server has to start up. I've never worked on a commercial PHP project so I don't know much about optimisation for it unfortunately.

    As Ashley says websockets are likely to be the easiest solution, I would expect a node.js instance with the "ws" library to scale in the 10s of thousands with a single process without much difficulty. But as you say, that requires you to learn JS and pay for a VPS... I vaguely remember a few hosting providers that will give you a really slow VPS on a free intro tier, might be worth a look? Just keep an eye on your server usage, these things can rack up without you realising.

  • I haven't used server sent events before, but they look potentially useful for some situations. I had a quick look at how to implement them at a node.js level and I don't think your going to see any less system meltdown than long poll or websockets, they are very similar.

    Long poll: Client makes network request to server, server holds onto request until data comes in or request times out ( normally ~ 30s ) then responds.

    Short poll: Client makes network request to server, server responds immediately with "no change" or data.

    Server sent events: Client makes network request to server, server holds onto connection and writes data to connection when it comes in.

    Websocket: Client makes network request to server, server holds onto connection and writes data to connection when comes in, client can also send data to server.

    I've used both short poll and websockets on commercial products and can say they work very well, with reasonably minimal complexity.

    The only place I've seen long poll before is the Dropbox REST API, where you can subscribe to notifications on files changing. It's quite a pain to implement, on both client and server side as you need to prevent "stampede" situations. Responding closes the network connection so if you send a message to each client they will all close, then immediately reopen a connection causing a large bump in system resource usage.

    If I were to implement a instant chat service I would either use short poll or websockets. Websockets have obvious advantages; the server knowing when a client connects/leaves, clients can send messages to the server without needing another request, users receive messages "instantly". The biggest issue with websockets is normally the server running out of sockets for connections. Short poll allows for more users than sockets ( in theory ) as they don't all connect at the same time. Also you can avoid needing an extra request for sending messages from the client by adding pending messages to the next poll request. A poll interval of between 1 - 5 seconds should be fast enough for most situations.

  • Yes, you do not need to specify a JS origin. You do need to specify your certificate signature and package identifier though.

  • Okay dokes, so normally I navigate to the Google API console project from the Google Play console project.

    Head to https://play.google.com/apps/publish and select "Game services" on the left hand menu.

    Click on the game listing that you've created for your application.

    Scroll to the bottom and click the link under the title "API Console project". This will take you to the correct project on the API console.

    Select "Credentials" on the left hand menu.

    From here you can press the "Create credentials" button to set up OAuth credentials for the project, or you can click on the name of a client ID to edit it. You can have multiple credentials for a project of different types.We b applications require you to set up a redirect URI and Authorized JS origins. Android applications require your package name and the signature of your signing certificate.

    So if your setting up for Android then you don't need to set up JS origins or redirect origins. In Android app mode the plugin uses the native play services SDK, which doesn't normally have anything to do with browsers or JS.

  • They do tend to move things around occasionally but it doesn't look like any major changes have happened recently. Are you integrating G. Play games for web or G Play games for Android?

  • During some maintenance time today the build server has been upgraded to use Cordova 9, as well as cordova-android 8 and cordova-ios 5 respectively. As some of you may remember we had attempted this update previously but had to roll back due to an unexpected issue with some projects not building. Although the core issue has not yet been resolved by the cordova team we have a workaround in place that should resolve the problem and allow those projects to correctly build for the time being.

    You may have noticed we had some unfortunate downtime today; an additional issue was discovered during the upgrade which required some time to diagnose and resolve, we apologise for any delays this has caused you. Builds should now be working as intended, but some plugin specific issues may still appear as a result of the upgrade.

    These updates include a number of changes that may affect your project so please be on the lookout for any errors and file an issue report on our GitHub tracker here. We will attempt to resolve any new issues that appear as soon as we can, and good bug reports will speed this process up for us a lot.

    The changes that this includes for Android and iOS will hopefully allow us to resolve some long standing issues on the bug tracker, which we will return to once we have concluded that the recent changes are stable.

  • Are you still experiencing issues? The server wasn't responding correctly for a short period earlier while we were updating it.