Nepeo's Recent Forum Activity

  • The Audio Scripting example provides a thin layer on top of the browser Audio APIs in the form of the AudioManager.js script. The browser API has no concept of tags. Tags are an abstraction to make it easier to control multiple forms of audio in the event sheet, where audio objects cannot be placed in variables or collections.

    You need to store the references and called the required method with the reference to stop it. If you want to use tags then you can implement it yourself by adding the functionality to the AudioManager class. The AudioManager class in this example plays audio using 2 different methods: WebAudio and HTML Audio Elements. Both have different advantages, and different methods to manipulate them.

    WebAudio API

    HTML Audio element

  • It's unlikely to, but that of course depends on how much data each dictionary contained. 1000 items isn't very much though.

  • Yup this is totally possible. You can add multiple Dictionary, Array, Binary Data and JSON objects to a project. You can use these in any combination to compose complex types through serialization.

  • All the inbuilt movements are framerate independent, that is they will move at the same speed on 2 devices with different frame rates.

    You may see some other minor variances caused by larger timesteps.

  • I would recommend storing the values in a dictionary, then placing it into a singular local storage entry with the dictionary.AsJSON expression. This allows you to store other things in local storage, and index your information easier.

    You might want to consider if you want to store other information about the level ( score, time, etc. ) in which case you might be better off using the JSON or Array plugin instead. Again storing it in local storage by converting it to a JSON string.

  • If you take a look at the developer tools you will see the request is failing because you haven't set any cors headers for your PHP script, and preview.construct.net is a different domain to yours.

    Also that script is firing a network request every tick, you probably want to do it less often than that...

  • StefanN If you could provide a project, then I'm happy to test for you. I know relatively little about PHP. I've used it before and generally found it frustrating to be honest, but I can help with the JS parts.

  • I don't seem to be having any issues with the server right now, is this still persisting for you? I'm interested in that crash report as well, I'm not aware of any crashes in the build upload so I would like to resolve that.

  • It's difficult to tell the exact reasoning behind the rejection. From what I've heard they tend to be quite cryptic with the reasoning even if they have definite reason for it.

    I would recommend that you read the section on performance in the app store guidelines as they have said and consider if any part of your application doesn't meet them.

    We're not aware of any issues related to publishing games to the app store with Construct itself. If you cannot find anything obvious in the guidelines then I would recommend trying to open a dialog with the app store review team and trying to get more detail. If it does turn out to be an issue with the runtime itself or one of our plugins please file an issue on our bug tracker.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Asmodean is probably right here, try sticking a breakpoint on the first action of "on start of layout" and the first sub condition of "tiles on created" to see when and how often those are being triggered.

  • I expect it just hasn't been implemented yet. Ashley would have written that code, so I don't know if there is some reasoning why it didn't make it into the first version or if he just forgot.

  • I used to know the maths, been awhile since I've studied kinematics but I can probably guess most of it.

    If I'm visualising the arc correctly you have 2 variables ( angle and initial velocity ) as well as the position of the player ( which is technically constant in this situation ). As there are 2 variables you end up with effectively infinite combinations, so it can't be solved easily. If you pick an arbitrary value for the angle ( say 45 degrees ) and just vary the power there should only be 1 solution, so we can solve it.

    I tried to work out a way to do it if the player is on a different height to the enemy, but couldn't figure it out ( guess I'm a bit rusty ).

    Consider vertical movement to the top of the arc ( where the vertical velocity will be 0 and acceleration will be negative g )

    0 = u + ( -g ) * t
    u = g * t
    t = u / g
    

    We also know that as there is no air resistance that no horizontal declaration occurs, hence when considering the distance travelled initial and final velocity are the same

    s = u * t
    

    As the angle is 45 degrees the initial horizontal and vertical velocity are the same. The arc is symmetrical so we know that t to the top of the arc is exactly half the total time. So let's combine the equations.

    s = u * (2 * (u / g))
    s = 3 * u / g
    s * g = 3 * u
    u = (s * g) / 3
    

    Little g is a constant, and we can calculate the horizontal displacement trivially so you can figure out the initial velocity quite easily. I'm not sure how your actually simulating this, so you might have to fudge the math a little to match up. Changing the target elevation relative to start break the symmetry of the arc, which makes things more complicated to work out.

    I think my math is right, but it's untested and I haven't done much like this for around a decade

Nepeo's avatar

Nepeo

Member since 8 Mar, 2016

Twitter
Nepeo has 583,792 followers

Trophy Case

  • 8-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies

Blogs