|
Post by Tag365 on Dec 20, 2014 21:51:22 GMT
Currently, drawing stuff to the screen is very slow and we can't draw very advanced graphics. Please increase the drawing speed to be four times as fast or faster.
|
|
Atom
Junior Member
Posts: 81
|
Post by Atom on Dec 21, 2014 1:38:29 GMT
I don't really think this is possible or it would already have been done. The only way to do this would be to have a better device or that the program is allowed more RAM or something like that. What you can do is to use draw.disablerefresh() and draw.refresh(). This way your graphics will only show once and it won't lose speed by drawing them.
|
|
|
Post by Tag365 on Jan 11, 2015 20:54:18 GMT
I don't really think this is possible or it would already have been done. The only way to do this would be to have a better device or that the program is allowed more RAM or something like that. What you can do is to use draw.disablerefresh() and draw.refresh(). This way your graphics will only show once and it won't lose speed by drawing them. How much speed will I gain by doing this?
|
|
Atom
Junior Member
Posts: 81
|
Post by Atom on Jan 12, 2015 0:46:51 GMT
I tried to make a drawing speed test to show you. The program draws 1000 rectangles then erases them with the two ways (with refresh and without) Then it calculates the time it takes to do it.
You can try it if you want... I had a difference between 300 and 500 milliseconds but my device is really laggy.
-- Drawing speed test
draw.setscreen(1)
draw.settitle('Dont do anything...')
-- With refresh
local time1 = draw.gettime()
for i = 1, 1000 do
draw.fillrect(0, 0, 500, 500, draw.black)
draw.fillrect(0, 0, 500, 500, draw.white)
end
time1 = (draw.gettime()-time1) * 1000
print('With refresh', time1..' ms')
-- Without refresh
draw.disablerefresh() -- Disable refresh
local time2 = draw.gettime()
for i = 1, 1000 do
draw.fillrect(0, 0, 500, 500, draw.blue)
draw.fillrect(0, 0, 500, 500, draw.white)
end
time2 = (draw.gettime()-time2) * 1000
print('Without refresh', time2..' ms')
print('––––––––')
print('Without refresh is '..math.floor(time1-time2)..' milliseconds faster than with refresh')
draw.setscreen(1)
|
|
|
Post by Admin on Jan 24, 2015 13:58:29 GMT
What is your device type? you'll notice dramatic speed enhancements when you use latest devices.
I recommend creating images of your complex drawings. then draw these images directly. as done on one of TouchLua examples.
|
|
|
Post by Tag365 on Mar 3, 2015 19:20:49 GMT
What is your device type? you'll notice dramatic speed enhancements when you use latest devices. I recommend creating images of your complex drawings. then draw these images directly. as done on one of TouchLua examples. I have an iPhone 4S and iPhone 5. Can you improve the performance of drawing images for these devices?
|
|
|
Post by Admin on Apr 29, 2015 12:43:18 GMT
What is your device type? you'll notice dramatic speed enhancements when you use latest devices. I recommend creating images of your complex drawings. then draw these images directly. as done on one of TouchLua examples. I have an iPhone 4S and iPhone 5. Can you improve the performance of drawing images for these devices? Please send me a sample code of what are you doing
|
|
|
Post by Tag365 on Nov 25, 2015 21:01:06 GMT
Since the new update the drawing functions appear to have increased the clarity of the text and drawing, but now draw speed has slowed significantly. On my iPhone 4s my games are slower than before.
Script Defender, which used to run at 30 frames per second at best, now only runs at 18 FPS max. However the text appears to be far sharper than before. My new game in progress suddenly takes twice as long to complete a frame of drawing. My three dimensional renderer renders at a far lower framerate per second.
I might suggest that you make a function that allows you to change the quality of the graphics screen. It may allow us to improve FPS for old devices such as the iPhone 4s.
You might have to make another drawing mode which uses the GPU to draw things to the screen. This may allow faster rendering of stuff on screen.
|
|
|
Post by leon26leon26 on Nov 26, 2015 9:02:58 GMT
Since the new update the drawing functions appear to have increased the clarity of the text and drawing, but now draw speed has slowed significantly. On my iPhone 4s my games are slower than before. Script Defender, which used to run at 30 frames per second at best, now only runs at 18 FPS max. However the text appears to be far sharper than before. My new game in progress suddenly takes twice as long to complete a frame of drawing. My three dimensional renderer renders at a far lower framerate per second. I might suggest that you make a function that allows you to change the quality of the graphics screen. It may allow us to improve FPS for old devices such as the iPhone 4s. You might have to make another drawing mode which uses the GPU to draw things to the screen. This may allow faster rendering of stuff on screen. I have a iPhone 5s, and ~double the draw time here too.
|
|
|
Post by Tag365 on Nov 27, 2015 18:25:22 GMT
It may be a good idea to add a new drawing mode that draws stuff as it does since this update, and make the first drawing mode one draw as it did in the 1.3.5 version. That way we can choose either to have faster drawing speed or draw stuff at higher detail.
|
|
|
Post by warspyking on Nov 27, 2015 19:42:48 GMT
draw.setquality(n)
n being a float, 1-10. Would be nice.
|
|
|
Post by Tag365 on Nov 27, 2015 20:57:15 GMT
Similar to what I said a few days ago.
|
|
|
Post by Admin on Dec 12, 2015 16:32:17 GMT
Now you can use draw.setscreen(1) for low precision drawing and draw.setscreen(2) for high precision drawing. TouchLua v1.3.7+
|
|
|
Post by warspyking on Dec 12, 2015 22:02:20 GMT
Now you can use draw.setscreen(1) for low precision drawing and draw.setscreen(2) for high precision drawing. TouchLua v1.3.7+ Question: When we swap do we keep our current screen or does it clear? It's be nice to be able to draw SOME things importantly, and the rest low quality.
|
|
|
Post by Admin on Dec 12, 2015 22:50:18 GMT
Now you can use draw.setscreen(1) for low precision drawing and draw.setscreen(2) for high precision drawing. TouchLua v1.3.7+ Question: When we swap do we keep our current screen or does it clear? It's be nice to be able to draw SOME things importantly, and the rest low quality. Currently switching clears the screen
|
|