1

I am having difficulty getting a simple python Arcade app to work on my Win10 machine. I think the issue is with the "start_render" function not taking effect. I have the following issues:

  • the screen does not "redraw", i.e., all existing sprites remain on the screen and are never removed. if I run some of the builtin code samples I get the character redrawn on the screen 100s of times as it moves
  • the background color is never drawn on; it always remains black
  • Using the "finish_render()" method in the on_draw() method does not work either; it creates a constant flickering and not a stable view

The sipmle code I'm running is below.

import arcade

class TestUI(arcade.Window):
    def __init__(self, width, height, title):
        super().__init__( width, height, title)

    def setup(self):
        arcade.set_background_color(arcade.csscolor.BLUE)


    def on_draw(self):
        arcade.start_render()
        arcade.draw_circle_filled(100,100,50,arcade.csscolor.TEAL)

def main():
    app = TestUI(1200,800,"Test game")
    app.setup()
    arcade.run()

if __name__ == '__main__':
    main()

This gives me a Teal circle on a full black background. If I run one of the code examples

python -m arcade.examples.sprite_moving_platforms

I get the constant redrawing (see screenshot)enter image description here

I am running the following versions:

  • Python 3.7.4
  • Arcade 2.5.7

On a Windows 10 machine

Any pointers on what could be going wrong?

Thanks!

bambinoh
  • 63
  • 1
  • 6
  • Not reproducing to me. Try to update to latest Python/Arcade versions. – Alderven Aug 29 '21 at 07:42
  • This is the latest arcade version if I'm not mistaken. Will try updating Python itself. Right now I'm using a workaround to just draw a filled square on every call of draw_update()... – bambinoh Aug 29 '21 at 14:18

1 Answers1

0

In function on_draw you need add at first self.clear()

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
User
  • 1