GLBasic forum

Main forum => GLBasic - en => Topic started by: djtoon on 2010-Sep-24

Title: srooling box2d world
Post by: djtoon on 2010-Sep-24
hi
im making a throw ball game for the iphone

my level is twice as big as the landscape mode in the iphone

im a flash programer and in flash i could create an "holder" object and move that where all the scene other art was as child object of that world

is there an someting difrent in glbasic or is there a way to set screen scroll x,y?

10x
Title: Re: srooling box2d world
Post by: Cliff3D on 2010-Sep-24
You could use CREATESCREEN (http://wiki.just-do-i-t.com/index.php?title=CREATESCREEN) to create a virtual screen twice the size of the HW screen, USESCREEN (http://wiki.just-do-i-t.com/index.php?title=USESCREEN) to paint to it, then USESCREEN (http://wiki.just-do-i-t.com/index.php?title=USESCREEN) -1 to switch back to the main screen. Use POLYVECTOR (http://wiki.just-do-i-t.com/index.php?title=POLYVECTOR) to copy a "window" from the virtual screen/sprite to the main screen.
Title: Re: srooling box2d world
Post by: djtoon on 2010-Sep-24
well i think i just did it with viewport :)
dony know if it works on the iphone but ill cheak
Title: Re: srooling box2d world
Post by: Cliff3D on 2010-Sep-24
Ah, viewports does less than I thought you wanted - but if it works that's great :D