This program is running fine right now,
[lua]
local physics = require (“physics”) --Starting Physics
physics.start(true)
physics.setGravity(0,9.8)
bg = display.newImage(“bg.jpg”) --displaying a background image
bg.x = display.contentWidth/2
bg.y = 350
rect = display.newRect(100,100,200,25) --Displaying a new rectangle
rect:setFillColor(100,10,255)
rect.x = display.contentWidth/2
rect.y = display.contentHeight
ball = display.newCircle(10,100,20) --Displaying a new circle
ball:setFillColor(255,10,100)
ball.x = display.contentWidth/2
ball.y = display.contentHeight/2
physics.addBody(ball,“dynamic”,{density = 5,bounce = .75}) --Converting to physics bodies
physics.addBody(rect,“static”)
gamegroup = display.newGroup() – Making group
gamegroup:insert(bg)
gamegroup:insert(rect)
gamegroup:insert(ball)
function screenMove( event ) --Moving screen as ball moves
distanceY=display.contentHeight/2-ball.y
gamegroup.y=distanceY
end
Runtime:addEventListener(“enterFrame”,screenMove) --Calling function on every frame
[/lua]
And for the record, this is the background file :
However, as soon as I turn on Anti Aliasing in config file, the circle gets converted to square. Unable to figure it out.
EDIT
I dont understand why these <p> and </p> commands are being displayed in the code. Must be something with the lua tags.