Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Ability/Item cooldown

Author
Message
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 15th Mar 2014 11:34 Edited at: 15th Mar 2014 11:35
As a first draft, it is at least working - but some optimizations are needed. For example it would be possible to generate a series of images from this and output as animated sprite.. that would immensely increase performance (I think).

Anyway, maybe it will be useful to someone.



IS that a game, a program, or 3 year old drawing.
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 15th Mar 2014 12:50
Here is same thing but using animated sprite. On my pc that is a 2x performance gain (1500fps -> 3200fps)



Sadly I did not keep in mind a higher frame count than 64 frames. So were you to change the frames on animations to, let's say 32 frames, then you need to change calculations for time offset yourself.

IS that a game, a program, or 3 year old drawing.

Login to post a reply

Server time is: 2024-11-23 07:58:39
Your offset time is: 2024-11-23 07:58:39