hiya all im new to this Lua thing and cant get my 1st program running
help me or i may give up
pls
System.usbDiskModeActivate()
GameHeart = true
screenWidth = 480
screenHeight = 272
Blue = Color.new(0,0,255)
Background = Image.load("Background.png")
function Game()
screen:blit(0,0, Background, false)
screenrint(screenWidth/2, screenHeight - 20, "Bouncing Demo!!!", Blue)
end
while GameHeart do
screen:flip()
if Controls.read():start() then
break
end
end
If you defined a function you have to call it to run it.
You don't have any Game() in your script.
It is also good to call the screen:waitVblankStart() before the screen:flip()
Also or you call the screen:blit function with 3 parameters (0,0, Background) or with all of them (0, 0, Background, Background:width(), Background:height(), false).
Instead of the break in the
if Controls.read():start() then
break
end
It would be nicer to set the GameHeart to false.
I'm also not a Lua master so....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks