sv3nxd
Member
Hey,
I'm currently working on an open-source project in which you can create a textbox with one single command.
I've been working on it for a long time now, trying to improve it in every way I could.
(https://github.com/Sven98/ezBox)
I was wondering if the way I am doing it right now is efficient or not.
Let me walk you through:
-> We create a surface
-> We take an input and generate a list of words
-> We generate a formatted string with the given words
-> Every counter-tick we add a letter of a word to our surface
-> We draw the surface
Performance
Without any rendering happening I average ~22.000 FPS
With the textbox open I average ~11.000 FPS
That's a loss of 50%. I tried it on my laptop, which is not as high-end and the percentage is the same.
Is that an acceptable rate of performance-loss? Is it too much?
Code
This code executes every counter-tick
Is there anything you would change? Would you use something other than surfaces?
Thanks for your time!
I'm currently working on an open-source project in which you can create a textbox with one single command.
I've been working on it for a long time now, trying to improve it in every way I could.
(https://github.com/Sven98/ezBox)
I was wondering if the way I am doing it right now is efficient or not.
Let me walk you through:
-> We create a surface
-> We take an input and generate a list of words
-> We generate a formatted string with the given words
-> Every counter-tick we add a letter of a word to our surface
-> We draw the surface
Performance
Without any rendering happening I average ~22.000 FPS
With the textbox open I average ~11.000 FPS
That's a loss of 50%. I tried it on my laptop, which is not as high-end and the percentage is the same.
Is that an acceptable rate of performance-loss? Is it too much?
Code
This code executes every counter-tick
Is there anything you would change? Would you use something other than surfaces?
Thanks for your time!