Not so smooth scrolling...any help?

Discuss any general programming issues here
User avatar
Tuxedo
Posts: 225
Joined: Sun Feb 14, 2010 12:41 pm

Re: Not so smooth scrolling...any help?

Post by Tuxedo » Thu Mar 17, 2011 6:22 pm

I do some tests today and...
I get weird things:

1 - Making a:

Repeat
p_MyRoutine()
Forever

Where p_MyRoutine() have a BoubleBuffered display dont give me 100% cpu usage but only about 80%

2 - Using the doubleBuffer display seems to dont give a smooth display at all...some sort of not always same speed...

I also tryed to check the speed with a StartTimer--GetTimer from start to end of the routine and never get same result...

3 - I tryed to change the DoubleBuffer---Flip method with:

...
...
...

CreateBrush(100)

Function p_MyRoutine()

SelectBrush(100)

...
...
...

EndSelect()
DisplyBrush(100, 0 ,0)

EndFunction

...
...

And seems to get a more precise scroll...at least at sensation...
The above on point 2 checkspeed also seems faster but the cpu used time(seed on cpudocky) seems bigger also if the Timer result was smaller and really much constant(almost the same every time)...

At this point I cant figure what's the problem at all...
However seems that Hollywood cant give a nice scroll without scattering...

Maybe I've to do some more tests...

Or maybe to try a new type of scrolling to see if the problem persist...

I'll check...
Simone"Tuxedo"Monsignori, Perugia, ITALY.

ArtBlink
Posts: 437
Joined: Mon Nov 01, 2010 10:37 am
Location: Albert - France
Contact:

Re: Not so smooth scrolling...any help?

Post by ArtBlink » Thu Mar 17, 2011 11:26 pm

I see the same problem if i insert function between Repeat... Forever.

Normaly, Cpu use would be at 100%, but not, we loose 20% of time CPU. Well in window format, why not? but in fullscreen!!!


I try gfx test and you right :shock: Displaybrush execution speed are slow... and i can say more, too slow. But, i try to modify my scroll prg, i change tiles format, i change dimension, so tiles in 64x64 are speeder because i use less displaybrush command.

User avatar
Tuxedo
Posts: 225
Joined: Sun Feb 14, 2010 12:41 pm

Re: Not so smooth scrolling...any help?

Post by Tuxedo » Fri Mar 18, 2011 1:01 am

Well...
I think now an Andreas comment was needed...
Simone"Tuxedo"Monsignori, Perugia, ITALY.

ArtBlink
Posts: 437
Joined: Mon Nov 01, 2010 10:37 am
Location: Albert - France
Contact:

Re: Not so smooth scrolling...any help?

Post by ArtBlink » Fri Mar 18, 2011 12:18 pm

Yes,

Because i no longer understand the operation of hollywood graphics command...

ArtBlink
Posts: 437
Joined: Mon Nov 01, 2010 10:37 am
Location: Albert - France
Contact:

Re: Not so smooth scrolling...any help?

Post by ArtBlink » Fri Mar 18, 2011 6:03 pm

@Andreas:

How can we use 100% cpu usage and how can we make to speed up GFX ?

Do you add in future Fast access memory commande?

User avatar
Tuxedo
Posts: 225
Joined: Sun Feb 14, 2010 12:41 pm

Re: Not so smooth scrolling...any help?

Post by Tuxedo » Thu Mar 24, 2011 12:19 am

@Andreas

maybe that forum problem "hides" that topic, but I htink that was pretty important so...

PLZ tell we something...I tryed to do some nice orizontal shooter but with that scroll problem that was really complex and annoying...
Simone"Tuxedo"Monsignori, Perugia, ITALY.

ArtBlink
Posts: 437
Joined: Mon Nov 01, 2010 10:37 am
Location: Albert - France
Contact:

Re: Not so smooth scrolling...any help?

Post by ArtBlink » Thu Mar 24, 2011 9:06 am

Hello tuxedo, i can make for you nice horizontal scroll, you can download in french forum my multidirectionnal scroll to see on your machine if it good.

You just give me the size of screen (320x200 or others) the depth of screen (16 or 32 bit) and give me tiles to display, and i can make you the scroll engine in few time ;-)

ArtBlink
Posts: 437
Joined: Mon Nov 01, 2010 10:37 am
Location: Albert - France
Contact:

Re: Not so smooth scrolling...any help?

Post by ArtBlink » Thu Mar 24, 2011 10:14 am

If you want make game in 640x480 you must use 64x64 pixel size tile, if you want to use 320x200 screen, you must use 32x32 size tile. I prefer use 640x480 screen size for ANG game ;-)

Be careful if you want table for ennemies, shoot, map, define in the start of you're script table by Dim command.

In reality, Global variable is speeder than table access, so, i think it is more judicious to use a lot of global variable than table, but use table is more simply.

If you want help to you're shoot them up, i can help you ;-), create topic about you're game and i think you will be not alone to create your game. And at more guys, we are more idea and if all participate at your game, we can learn a lot about this langage newbie like expert

User avatar
Tuxedo
Posts: 225
Joined: Sun Feb 14, 2010 12:41 pm

Re: Not so smooth scrolling...any help?

Post by Tuxedo » Thu Mar 24, 2011 9:30 pm

Thank you for help :)
However at that point I'm jhoking only with the scroll(simply trying to replicate the Portable/DarkBasic Shadow Of The Beast scroller) nothing really more...
In meantime(when I've time since I restarted coding on LoView), I'll try your suggestion of the 64x64 tile scroller...
However I tryed your last ecample of your driving demo and althought was really nice the scroll wasnt so smooth imho...

Maybe(only maybe) the Hollywood timing routine have to be improved a bit imho...

What do you think? Also the difficulty to use all the cpu power was really odd and since Hollywood(and our AmigaLike systems) wasnt so fast we need all the power we can use/get...

Thank you for all :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.

User avatar
Tuxedo
Posts: 225
Joined: Sun Feb 14, 2010 12:41 pm

Re: Not so smooth scrolling...any help?

Post by Tuxedo » Thu Mar 24, 2011 9:47 pm

I've found the problam it seems...

Was AmigaOS4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I compiled the example for MOS and tryed under it and no scatter!
If I try with -usewpa under OS4 the scroll was really slower...

Dunno how to think...seems that something in the Hollywood OS4 timing was wrong...

I'm sad :(

Anyone that can try the example on anther OS4 hw to test if maybe was a PEgasos2 related problem only?

Than kyou!
Simone"Tuxedo"Monsignori, Perugia, ITALY.

Post Reply