- Fri 28 Jul 2017, 18:11
It's working fine now! Thank you so much all your help
Good to know that
So, there are 3 types of variables?
Global, Scene and Object?
Global: Are kept between scenes, for example remember current level, score.
Scene: Are kept for the current scene only, for example time to finish, helper variables.
Object: Are kept inside each object instance, for example Peter the Phoenix current level.
Also, can you please explain Dampening to me?
The damping is just a multiplier, the force will be multiplied by this damping value each frame.
If the damping is = 1, the force will be multiplied by 1 every frame, i.e. it will be a constant force forever. Useful to add the force only one time, for example you create a bullet, in the same event add a force with damping = 1 and you are done.
If the damping is = 0, the force will work this frame but will disappear in the next one. If you want to move a bullet this way, you will have to add the force (damping=0) every frame.
If the damping is > 1, the force will be greater each frame, even if you apply it only one time. And the force will decrease each frame if 0 < damping < 1. Never tried damping < 0...
Regarding the audio latency issue: The audio file is 119kb wav. Yes, running on html5. Is that why?
Not sure, did you add the sound file in the resources/images manager?, I think the file will be kept in memory if you do it and will play faster. If the audio file is not in the resources manager and you have no idea how to add it, in the images manager select "Add image" and change the extensions filter to view any file, particularly the sound ones
Any good documentations to recommend?
Why do you want a documentation if I'm here?
, seriously... the GD documentation is good to start with, then you have the forum and your powerful logic brain
I should be studying now :/