Hi,
HTML5 version of game runs well everywhere except for [About] staff screen scroll screen.
Trying to optimize so that above is full speed.
You can play the current HTML5 version of game at below URL link:
http://fallenangelsoftware.com/stuff/files/PixelArtist/PA110-HTML5/index.html
You can enter Secret Code: "2777" in [Options] screen to see Frames Per Second.
Any help would be appreciated, thanks!
Jesse
Staff screen source code is below:
//------------------------------------------------------------------------------------------------------------
function DisplayAboutScreen( )
if ScreenFadeStatus = FadingFromBlack and ScreenFadeTransparency = 255
SetDelayAllUserInput()
ClearScreenWithColor ( 0, 0, 0 )
if (GameWon = false)
SetSpritePositionByOffset( TitleBG, ScreenWidth/2, ScreenHeight/2 )
else
Story1 = CreateSprite ( 50009 )
SetSpriteOffset( Story1, (GetSpriteWidth(Story1)/2) , (GetSpriteHeight(Story1)/2) )
SetSpriteDepth( Story1, 4 )
SetSpritePositionByOffset( Story1, ScreenWidth/2, ScreenHeight/2 )
endif
NextScreenToDisplay = TitleScreen
SetupAboutScreenTexts()
AboutScreenTextFrameSkip = 0
ScreenIsDirty = TRUE
endif
if AboutTextsScreenY[NumberOfAboutScreenTexts-1] < -25 or MouseButtonLeft = ON or LastKeyboardChar = 32 or LastKeyboardChar = 13 or LastKeyboardChar = 27
ScreenFadeStatus = FadingToBlack
if AboutTextsScreenY[NumberOfAboutScreenTexts-1] > -25 then PlaySoundEffect(1)
SetDelayAllUserInput()
endif
if (ScreenFadeStatus = FadingIdle)
index as integer
indexTwo as integer
textMovement as integer
for index = 0 to (NumberOfAboutScreenTexts-1)
if AboutTextsScreenY[index] > -50
if (30 / roundedFPS) = 0
textMovement = 3
else
textMovement = 3 * (30 / roundedFPS)
endif
if ( index = (NumberOfAboutScreenTexts-1) ) then dec AboutTextsScreenY[NumberOfAboutScreenTexts-1], textMovement
textScreenYTemp as integer
for indexTwo = 0 to 25
if GetTextExists(StartIndexOfAboutScreenTexts+(index*26)+indexTwo)
textScreenYTemp = GetTextY(StartIndexOfAboutScreenTexts+(index*26)+indexTwo)
dec textScreenYTemp, textMovement
if (index > 0)
SetTextPosition( StartIndexOfAboutScreenTexts+(index*26)+indexTwo, 180, textScreenYTemp )
else
SetTextPosition( StartIndexOfAboutScreenTexts+(index*26)+indexTwo, GetTextX(StartIndexOfAboutScreenTexts+(index*26)+indexTwo), textScreenYTemp )
endif
endif
next indexTwo
endif
next index
endif
AnimateStaticBG()
if ScreenFadeStatus = FadingToBlack and ScreenFadeTransparency = 254
if (GameWon = TRUE)
CheckPlayerForHighScore()
if (PlayerRankOnGameOver < 10)
if (OnMobile = TRUE)
NextScreenToDisplay = NewHighScoreNameInputAndroidScreen
else
NextScreenToDisplay = NewHighScoreNameInputScreen
endif
else
NextScreenToDisplay = HighScoresScreen
endif
elseif (GameWon = FALSE)
NextScreenToDisplay = TitleScreen
endif
GameWon = FALSE
endif
endfunction
//------------------------------------------------------------------------------------------------------------