Strange artifacts...
J-Gamer

I noticed that there is a Python port, so I decided to test it out(since we've just finished our Python course at uni).

I made a little Pong game, but there are some rendering issues... When drawing the paddles, there seems to some tearing with the blending. Here's my paddle drawing code:

def draw(self):
        # Fill
        al_draw_filled_rounded_rectangle(self.x, self.y, self.x + self.w, self.y + self.h, 6, 6, self.color)
        # Highlight
        al_draw_filled_rounded_rectangle(self.x+2, self.y+2, self.x + self.w/2, self.y + self.h-5, 6, 6, al_map_rgba_f(0.2,0.2,0.2,0.2))

Here's my current output:
{"name":"605076","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/8\/a83044138b031d1b775b0f0c6f3f844e.png","w":800,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/8\/a83044138b031d1b775b0f0c6f3f844e"}605076

Any ideas why this is happening?

SiegeLord

The width of your rounded rectangle is smaller than the sum of the radii of the rounds. Here's a blowup of what is happening:

{"name":"605078","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9ab6bf8d8ebbcaf59133c3e206e3b2c.png","w":404,"h":330,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9ab6bf8d8ebbcaf59133c3e206e3b2c"}605078

I'd just decrease the radius of the rounds (to like 5 or 4 or something).

J-Gamer

Thanks, that fixed it!

Thread #608774. Printed from Allegro.cc