Results 1 to 10 of 87

Thread: Space Shooter Game Editor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #24
    From your code I see that you are resetting your Global Animation Counter when it reches 1000. If I remember corectly your water animation has 3 pictures. So as 1000 is not dividable by 3 this creates a problem. So you should reset your counter at 999 and you should go and reset it to1 or if you have first animation picture at index 0 you should reset your counter at 998 and then reset it to 0.
    But there will be even bigger problem once you introduce animation with varios speeds and various lenghts. Why? Becouse you will need to find a right point when to reset your counter (first point when all animations would reach the starting position).
    Best way to do this is to calculate how much time each animation loop lasts (animation lenght * animation speed - where animation speed determines time between animation updates) and then find a time when all these animations will reach to starting position at the same time.
    You do this by finding first number which is dividable with all theese loop times. If my memory servews me correct there is a function in Math unit to do this. Do note that this function can be quite slow at some times.
    Workaround for this is to simply multiply all these loop times between each other as this will give you certain point in time when all these animations do get to starting position but ti might not be the first time when this happens.
    So for instance if you have three different animations first lasts two seconds, second lasts three seconds and third lasts 5 seconds you will the time when all of theese gets to starting position at the same time using 2*3*5=30. So int this case you could reset your Global Animation Counter every 30 seconds.

    I hope my explanation is understandable enough. I'm also sorry that I haven't yet prepared my programing enviroment to be able to compile your project. After about thee years I had some problems with my laptop for the first time which required some troublehunting. In the end it turned out that some files belonging to Eset antivirus software were damaged which in some ocasions caused unexpected program behavior. Also I noticed some system slowdows incase of large HDD activity but I'm not yet sure whether this is due to some software problem or it is hardware related (HDD S.M.A.R.T reports shows no anomalies or problems, but there is ocasional clickig sound coming from HDD but no Bad sectors yet).
    Best solution would be for me to buy a new disk drive probbably SSD and instal it as second drive (my laptop actually supports usage of two SATA 3 hard drives) and reinstal my whole operating system. This would alow me to keep all the old data so that incase I screw up something I don't use any data (I do have lots of important data on my Laptop and no space to make a safety backup of it). And another problem is that as I didn't had Windows 7 before my data isn't quite organized.
    Last edited by SilverWarior; 10-01-2013 at 03:36 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •