I'm trying to recreate the ShadowOfTheBeast parralax scroller in Hollywood but...
I've recreated the scroller itself but it wasnt so smooth as expected...
I'm trying to compare the hollywood code against the PortablE one...
I attach the code I used if anyone would try it simply download the SOTB like scroller archive from:
http://cshandley.co.uk/portable/examples/index.html#ex5
Than simply copy the gfx and mus directories in the place you lauch the code below and look at it...
The Scrolling I created in Hollywood wasnt so smooth as in the PortablE example so...
Was something I've done wrong or was an Hollywood limitation/problem?
Thank you!
Code: Select all
@DISPLAY 1, {Title = "ShadowOfTheBeastSCroller", Color = $ffff00, MODE = "FullSCreen"}
x = 2 ; varaibile che fa scorrer le immagini...la metto a 1 così al primo calcolo ha il valore giusto :)
LoadBrush(0, "gfx/bgd1_ciel.jpg")
LoadBrush(1, "gfx/bgd2_montagnes.jpg")
LoadBrush(2, "gfx/bgd3_sol1.jpg")
LoadBrush(3, "gfx/bgd4_sol2.jpg")
LoadBrush(4, "gfx/bgd5_sol3.jpg")
LoadBrush(6, "gfx/sprite_nuages1.bmp")
LoadBrush(7, "gfx/sprite_nuages2.bmp")
LoadBrush(8, "gfx/sprite_nuages3.bmp")
LoadBrush(9, "gfx/sprite_nuages4.bmp")
OpenMusic(0, "mus/B-TITLE.MOD")
PlayMusic(0)
FOR LOCAL i = 6 TO 9 DO SetBrushTransparency(i, $000000)
BeginDoubleBuffer()
EscapeQuit(TRUE)
Function p_Scroll()
x = x - 2
x2 = x2 - 3
x3 = x3 - 4
x4 = x4 - 5
x6 = x6 - 6
x7 = x7 - 5
x8 = x8 - 4
x9 = x9 - 3
IF x <= -640 THEN x = 0
IF x2 <= -640 THEN x2 = 0
IF x3 <= -640 THEN x3 = 0
IF x4 <= -640 THEN x4 = 0
IF x6 <= -640 THEN x6 = 0
IF x7 <= -640 THEN x7 = 0
IF x8 <= -640 THEN x8 = 0
IF x9 <= -640 THEN x9 = 0
DisplayBrush(0, 0, 0) ; questo è il cielo che resta fermo...
DisplayBrushPart(1, -x, 0, 0, 199, 640 + x, 220)
DisplayBrushPart(1, 0, 0, 640 + x, 199, -x + 1, 220)
DisplayBrushPart(2, -x2, 0, 0, 419, 640 + x2 + 1, 10)
DisplayBrushPart(2, 0, 0, 640 + (x2), 419, -x2 + 1, 10)
DisplayBrushPart(3, -x3, 0, 0, 429, 640 + x3 + 1, 20)
DisplayBrushPart(3, 0, 0, 640 + x3, 429, -x3 + 1, 20)
DisplayBrushPart(4, -x4, 0, 0, 449, 640 + x4 + 1, 30)
DisplayBrushPart(4, 0, 0, 640 + (x4), 449, -x4 + 1, 30)
DisplayBrushPart(6, -x6, 0, 0, 0, 640 + x6 + 1, 82)
DisplayBrushPart(6, 0, 0, 640 + x6, 0, -x6 + 1, 82)
DisplayBrushPart(7, -x7, 0, 0, 83, 640 + x7 + 1, 38)
DisplayBrushPart(7, 0, 0, 640 + x7, 83, -x7 + 1, 38)
DisplayBrushPart(8, -x8, 0, 0, 120, 640 + x8 + 1, 18)
DisplayBrushPart(8, 0, 0, 640 + x8, 120, -x8 + 1, 18)
DisplayBrushPart(9, -x9, 0, 0, 138, 640 + x9 + 1, 10)
DisplayBrushPart(9, 0, 0, 640 + x9, 138, -x9 + 1, 10)
Flip() ; mostro cosa ho disegnato fin'ora...
EndFunction
Scroll = SetInterval(Nil, p_Scroll, 1000/50)
Repeat
WaitEvent
Forever