Hollywood speed question...
Hollywood speed question...
Hi there!
As described on the topic:
viewtopic.php?f=10&t=219
I tryed to port on hollywood the DarkBasic/PortablE example:
http://cshandley.co.uk/portable/examples/index.html#ex5
I get some weird speed and fluidity problems under AmigaOS4/Pegasos2 with my test...
I tryed the Hollywood test I do under AmigaOS4 and get the problems described above than I tryed compiling the same program for MOS and it works fine(also tryed the OS4 one with os4emu and works fine too) so...
Why under AmigaOS4 natively I get that weirdness? maybe there was some AmigaOS problems, but why the PortablE exe works fine? Seems that PortablE and Hollywood approach at system differently but in that case PortablE approach well...
Any idea?
Maybe Andreas can tell us something?
Thank you!
PS under AmigaOS seems like if the timing routines have some timing problem not so much a speed problem but much like a problem that cause the program to refresh not always at same time...
PPS I tryed also to run the test with the -usewpa argument but was really slower in that way...and however wasnt constant neither in that way the scroll speed...
As described on the topic:
viewtopic.php?f=10&t=219
I tryed to port on hollywood the DarkBasic/PortablE example:
http://cshandley.co.uk/portable/examples/index.html#ex5
I get some weird speed and fluidity problems under AmigaOS4/Pegasos2 with my test...
I tryed the Hollywood test I do under AmigaOS4 and get the problems described above than I tryed compiling the same program for MOS and it works fine(also tryed the OS4 one with os4emu and works fine too) so...
Why under AmigaOS4 natively I get that weirdness? maybe there was some AmigaOS problems, but why the PortablE exe works fine? Seems that PortablE and Hollywood approach at system differently but in that case PortablE approach well...
Any idea?
Maybe Andreas can tell us something?
Thank you!
PS under AmigaOS seems like if the timing routines have some timing problem not so much a speed problem but much like a problem that cause the program to refresh not always at same time...
PPS I tryed also to run the test with the -usewpa argument but was really slower in that way...and however wasnt constant neither in that way the scroll speed...
Simone"Tuxedo"Monsignori, Perugia, ITALY.
- airsoftsoftwair
- Posts: 5933
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hollywood speed question...
I need a very small example script that demonstrates the issue 
Re: Hollywood speed question...
Here 3 examples, or better same example modified for 3 questions:
Example 1:
That's standard scrolling example with standard timing Repeat/WaitEvent/Forever loop...
Running that especially on OS4 gave me scattered scroll(on MOS was better but also here not perfect)...
[EXTRA QUESTION]
Why the:
;SetBrushTransparency(1, $FF0000)
line give me problems if uncommented? seems to conflict with DoubleBuffering but wasnt the BGpic...or yes?
[/EXTRA QUESTION]
Example 2:
Here I try to get 100% cpu time but cant...
I get only a bit more cpu usage than on timing example but not so much(about 75% against about 65% on OS4 and MOS too) and the scroll speed too wasnt so bigger than on ex1...
Why?
Example3:
Finall yhere I get 100% cpu time usage and fast scroll...
Naturally here I dont have DoubleBuffering so no really usefull but just to reach 100% cpu usage...
That's all...
Hope that you can explain me why so weird things, also because semms to me tht the scroll issues was due a weird timing like if the time measured wasnt always the same so it scatter...
See you and sorry if made stupid questions...
Example 1:
Code: Select all
x, y, z = 0, 0, 0
CreateBrush(1, 64, 64, $FF0000)
SelectBrush(1)
SetFillStyle(#FILLCOLOR)
Polygon(0, 0, {0, 64, 32, 0, 64, 64}, 3 , $00FF00)
EndSelect()
;SetBrushTransparency(1, $FF0000)
BeginDoubleBuffer()
Function p_Scroll()
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - x, 150)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - y, 214)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - z, 278)
Next
Flip()
x = x + 1
y = y + 2
z = z + 3
IF x = 64 THEN x = 0
IF y = 64 THEN y = 0
IF z >= 64 THEN z = 0
EndFunction
EscapeQuit(TRUE)
Scroll = SetInterval(Nil, p_Scroll, 1000/50)
Repeat
WaitEvent
Forever
Running that especially on OS4 gave me scattered scroll(on MOS was better but also here not perfect)...
[EXTRA QUESTION]
Why the:
;SetBrushTransparency(1, $FF0000)
line give me problems if uncommented? seems to conflict with DoubleBuffering but wasnt the BGpic...or yes?
[/EXTRA QUESTION]
Example 2:
Code: Select all
x, y, z = 0, 0, 0
CreateBrush(1, 64, 64, $FF0000)
SelectBrush(1)
SetFillStyle(#FILLCOLOR)
Polygon(0, 0, {0, 64, 32, 0, 64, 64}, 3 , $00FF00)
EndSelect()
BeginDoubleBuffer()
Function p_Scroll()
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - x, 150)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - y, 214)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - z, 278)
Next
Flip()
x = x + 1
y = y + 2
z = z + 3
IF x = 64 THEN x = 0
IF y = 64 THEN y = 0
IF z >= 64 THEN z = 0
EndFunction
EscapeQuit(TRUE)
Repeat
p_Scroll()
Forever
I get only a bit more cpu usage than on timing example but not so much(about 75% against about 65% on OS4 and MOS too) and the scroll speed too wasnt so bigger than on ex1...
Why?
Example3:
Code: Select all
x, y, z = 0, 0, 0
CreateBrush(1, 64, 64, $FF0000)
SelectBrush(1)
SetFillStyle(#FILLCOLOR)
Polygon(0, 0, {0, 64, 32, 0, 64, 64}, 3 , $00FF00)
EndSelect()
;BeginDoubleBuffer()
Function p_Scroll()
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - x, 150)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - y, 214)
Next
For LOCAL i = 0 TO 10
DisplayBrush(1, 640 - (i * 63) - z, 278)
Next
; Flip()
x = x + 1
y = y + 2
z = z + 3
IF x = 64 THEN x = 0
IF y = 64 THEN y = 0
IF z >= 64 THEN z = 0
EndFunction
EscapeQuit(TRUE)
Repeat
p_Scroll()
Forever
Naturally here I dont have DoubleBuffering so no really usefull but just to reach 100% cpu usage...
That's all...
Hope that you can explain me why so weird things, also because semms to me tht the scroll issues was due a weird timing like if the time measured wasnt always the same so it scatter...
See you and sorry if made stupid questions...
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Re: Hollywood speed question...
Normaly if we use double buffer, the programm is speeder!!!!
Re: Hollywood speed question...
Have you tried the above examples?
In what program type was speeder?
In what program type was speeder?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Re: Hollywood speed question...
YEs, The 3rd exemple is the faster...
Re: Hollywood speed question...
did you get also the scattering problems?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
- airsoftsoftwair
- Posts: 5933
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hollywood speed question...
I can confirm the scattering problems. I'll try to optimize the double buffered drawing routines for the next version.
Re: Hollywood speed question...
Very good news for the next version..
But meantime no possibility to made decent orizontal shooter than...
Well..I've really much work to do on LoView and few time so no prob but...any ETA for the next version?
GOOD WORK!
EDIT: the DB routine uses already the hw acceleration on AmigaOSes? I forgot
EDIT2: The SetBrushTransparency problem was also due to the DB routines or my fault?
But meantime no possibility to made decent orizontal shooter than...
Well..I've really much work to do on LoView and few time so no prob but...any ETA for the next version?
GOOD WORK!
EDIT: the DB routine uses already the hw acceleration on AmigaOSes? I forgot
EDIT2: The SetBrushTransparency problem was also due to the DB routines or my fault?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Re: Hollywood speed question...
Whoops 
Forgot the EDIT2 question was my stupid fault... sorry
Forgot the EDIT2 question was my stupid fault... sorry
Simone"Tuxedo"Monsignori, Perugia, ITALY.