Skip to content

Commit 3316b1a

Browse files
authored
Merge pull request #77 from gaorkl/mac-debug
mac debug
2 parents e0ab57e + c4b7431 commit 3316b1a

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

examples/agent_ball_no_shaders.py

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import arcade
2+
3+
from spg.agent import HeadAgent
4+
from spg.element import Ball, TiledAlternateColorWall
5+
from spg.playground import Room
6+
from spg.view import HeadAgentGUI
7+
8+
# import arcade
9+
10+
playground = Room(
11+
size=(500, 200),
12+
background=(23, 23, 21),
13+
wall_cls=TiledAlternateColorWall,
14+
use_shaders=False,
15+
)
16+
17+
ball = Ball()
18+
ball.graspable = True
19+
20+
playground.add(ball, ((200, 0), 0))
21+
22+
ball = Ball()
23+
ball.graspable = True
24+
playground.add(ball, ((200, 40), 0))
25+
26+
ball = Ball(color=(23, 184, 13))
27+
ball.graspable = True
28+
playground.add(ball, ((-200, 40), 0))
29+
30+
ball = Ball(color=arcade.color.AMETHYST)
31+
ball.graspable = True
32+
playground.add(ball, ((-200, 0), 0))
33+
34+
ball = Ball(color=arcade.color.CYAN)
35+
ball.graspable = True
36+
playground.add(ball, ((-200, -40), 0))
37+
38+
39+
agent = HeadAgent()
40+
playground.add(agent)
41+
42+
gui = HeadAgentGUI(playground, agent, draw_sensors=True)
43+
gui.run()

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
setup(
1616
name="spg",
17-
version="0.1.5",
17+
version="0.1.6",
1818
description="Simulator for Reinforcement Learning",
1919
author="Michael Garcia Ortiz",
2020
author_email="[email protected]",

src/spg/view/gui.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ def run(self):
6464

6565
def on_draw(self):
6666

67-
self.update()
67+
self._playground.window.clear()
6868
self._fbo.use()
69+
self.update()
6970

7071
def on_update(self, _):
7172

0 commit comments

Comments
 (0)