Problem With Antialias

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.

First thing you want to do is add radius = 20 to line 16 so that your ball has a circular physics body.

physics.addBody(ball,"dynamic",{density = 5,bounce = .75,radius = 20})&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;--Converting to physics bodies

Alright thanks, but that didn’t solve the problem.

Hi @sarthakmadan96,

The “antialias” feature has been disabled for the time being because it was causing rendering issues on various devices (possibly what you’re seeing). We might revisit this setting in the future, but for now, you should remove that setting entirely from “config.lua”.

I’m also checking into this <p> thing in the code bits. This shouldn’t be happening and hopefully it will be resolved soon.

Regards,

Brent

Alright thanks Brent. Hoping everything gets fixed soon.

First thing you want to do is add radius = 20 to line 16 so that your ball has a circular physics body.

physics.addBody(ball,"dynamic",{density = 5,bounce = .75,radius = 20})&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;--Converting to physics bodies

Alright thanks, but that didn’t solve the problem.

Hi @sarthakmadan96,

The “antialias” feature has been disabled for the time being because it was causing rendering issues on various devices (possibly what you’re seeing). We might revisit this setting in the future, but for now, you should remove that setting entirely from “config.lua”.

I’m also checking into this <p> thing in the code bits. This shouldn’t be happening and hopefully it will be resolved soon.

Regards,

Brent

Alright thanks Brent. Hoping everything gets fixed soon.