.:HyPeX:. Posted November 23, 2014 Share Posted November 23, 2014 Hello everyone, today i came across radians, sin, cos and stuff, and in a start i tried to make smth like this... But in-game prototipes were awful, so keeped playing, and finished doing a function for making animated circles but with lines... (Since using circles again proved extremly laggy aswell ) I asked my friend MVM to record it for a clear demonstration of the animation... PD: This is just a test script, it contains a basic loop of the function with this: local start = getTickCount() addEventHandler("onClientRender", root, function() local duration = 15000 local now = getTickCount() local End = start + duration local elapsed = now -start local progress = elapsed / duration if progress >= 1 then start = getTickCount() end dxDrawAnimatedCircle(progress) end) I had no idea what to do with this so if it is usefull, please tell me, if you want the function pm me on skype @tsbreuer Link to comment
ChaosMTA Posted November 23, 2014 Share Posted November 23, 2014 Interesting Script, good job. Would always help the community to post your resource on the community site. Link to comment
Gallardo9944 Posted November 23, 2014 Share Posted November 23, 2014 Instead of updating it every frame, you could draw it in your render target and update it only when it actually changes. That would save some frames if it doesn't change very often. Link to comment
myonlake Posted November 23, 2014 Share Posted November 23, 2014 Interesting Script, good job.Would always help the community to post your resource on the community site. Been on Wiki for a year now: https://wiki.multitheftauto.com/wiki/DxDrawCircle Link to comment
.:HyPeX:. Posted November 23, 2014 Author Share Posted November 23, 2014 (edited) Interesting Script, good job.Would always help the community to post your resource on the community site. Been on Wiki for a year now: https://wiki.multitheftauto.com/wiki/DxDrawCircle In a start i used that to write draw the small circles in the first prototype, proved too laggy and not so good looking, so i rewrote mine down again to skip using that function Instead of updating it every frame, you could draw it in your render target and update it only when it actually changes. That would save some frames if it doesn't change very often. How so? --Deleted Edited November 30, 2014 by Guest Link to comment
Saml1er Posted November 23, 2014 Share Posted November 23, 2014 Why not render an image if this is too laggy. Link to comment
.:HyPeX:. Posted November 23, 2014 Author Share Posted November 23, 2014 Why not render an image if this is too laggy. Actually, my final code isnt laggy, tested it with some really slow PCs. The prototype was lagging becouse it was drawing ~ 100 circles wich were made of about 20 dxDrawLine themselves. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now