r/pythonarcade • • Mar 11 '20

OSError: exception: access violation reading 0x00000028

1 Upvotes

Hi,

I'm having trouble with arcade on my laptop...

Windows 7 Enterprise

Service Pack 1

Intel Core i7-6600U CPU @ 2.60 GHz 2.70 GHz

64-bit Operating System

Intel HD Graphics 520

I've tried Python 3.7 and 3.8, both 32 and 64 bit versions and kept getting the same error.

This output is from testing an example from arcade, but the error comes up when calling arcade.open_window(600, 600, "Test")

Thanks!

>python -m arcade.examples.drawing_with_functions
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\examples\drawing_with_functions.py", line 93, in <mo dule>
    main()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\examples\drawing_with_functions.py", line 71, in main
    arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\application.py", line 541, in open_window
    antialiasing=antialiasing)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\application.py", line 71, in __init__
    resizable=resizable, config=config, vsync=False)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pyglet\window\win32__init__.py", line 130, in __init__
    super(Win32Window, self).__init__(*args, **kwargs)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pyglet\window__init__.py", line 632, in __init__
    self._create()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\application.py", line 470, in _create
    super()._create()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pyglet\window\win32__init__.py", line 265, in _create
    self.switch_to()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\arcade\application.py", line 479, in switch_to
    super().switch_to()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pyglet\window\win32__init__.py", line 328, in switch_to
    self.context.set_current()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pyglet\gl\win32.py", line 242, in set_current
    wgl.wglMakeCurrent(self.canvas.hdc, self._context)
OSError: exception: access violation reading 0x00000028


r/pythonarcade • • Dec 28 '19

Bulding Windows desktop app

1 Upvotes

So using Python 3.7 and Arcade GUI i developed full scale chess game and now my intension is to bulid it properly on Windows Desktop. There is lack of information on arcade.academy about how to do so (only few words about macOS), so i'm asking for help.

Do you have any exprience in packing/buliding arcade-based games on WinOS?

Thanks for help in advance.


r/pythonarcade • • Nov 29 '19

GPIO input with Raspberry Pi?

1 Upvotes

I currently have a working program that relies on the arcade.Window.on_key_press() interrupt for most of the functionality. However, I would like to implement my program on a Raspberry Pi and replace the keyboard with 8 GPIO buttons. Is there an easy way to implement GPIO interrupts using arcade?


r/pythonarcade • • Nov 16 '19

Changing sprite layers without tiled editor?

1 Upvotes

I'm trying to put some car sprites in front of a road sprite but the road sprite is in front of the cars. Is there a way I can put the other sprites in front of the road sprite without using the tiled editor?


r/pythonarcade • • Sep 02 '19

Using TMX object layer to define areas

1 Upvotes

Hi,

I am curious for what the object layer is meant for. Checking the implementation, it looks like an object layer processing is also returning a SpriteList.

I thought objects are meant for adding metadata, but with the current implementation it looks like I have to add tiled based objects.

What would be the right way to define an "finish" area and check if a sprite collides?

player = Sprite(...)

places = arcade.tilemap.process_layer(map, 'places')

colliding_places = player.arcade.check_for_collision_in_objects(player, places)

# check if colliding places contain the 'enfinishd' area
# -> add end game logic

r/pythonarcade • • Aug 10 '19

Locking mouse to the window

1 Upvotes

I'm making a game that relies on alot of mouse movement to control that characters, and I would like to be able to make sure that the cursor can't go past the bounds of the windows (where the user accidentally clicks and the window drops to the background.

It looks like this is possible in pygame by using the grab event, is there something similar that can be done in arcade, or perhaps something in pyglet that I could do to accomplish the same thing?


r/pythonarcade • • Jul 26 '19

Reflection Example, can this done with arcade library

1 Upvotes

Hi, I've an issue to calculate the correct object reflection and search for some help / hints.

A ball with constant speed hits a wall - target is to bounce back the object based on "law of reflection", so

angle of incidence is equal to angle of reflection. When taking a look at the attached picture, where

ball hits a rotated triangle, can this be done with arcade library and in what way?


r/pythonarcade • • Jul 17 '19

Extreme window input lag

1 Upvotes

I am using Pymunk along with Arcade on OSX High Sierra and am experiencing pretty dramatic input in the play window. When the game is loaded everything starts out working fine. I have it set up so that every mouse click will spawn a new ball into the simulation. The problem is when I try to spawn a new ball. The game registers a few clicks and then suddenly stops registering input (though the simulation in the window continues in the background) for about 10 seconds. The game then immediately dumps all the clicks at once onto the screen and then repeats the same freeze-up in a second or two. It's like the clicks are being stored in a buffer and dumped every 10 seconds. Here is my code.


r/pythonarcade • • Jul 08 '19

How do I control the height of drawn text?

1 Upvotes

I have a bunch of text that I want to display, and draw_text() works just fine so long as the lines of text are short enough that they don't wrap. If I only draw a small amount of text and allow a large area for it, there is no problem, but if I want to display a lot of text or only have a small space available, I can't find an elegant way to cut it off. What is the best way to do this?


r/pythonarcade • • Apr 05 '19

Using PyCharm and Arcade, I'm getting some errors that don't allow me to follow the 2D platformer tutorial.

1 Upvotes

EDIT: By adding

self.physics_engine = arcade.PhysicsEnginePlatformer(self.player_sprite,self.wall_list,gravity_constant=GRAVITY) 

to the setup part of the example, I was able to get the code to work.

When running the 2D platformer example, I get this error:

Traceback (most recent call last):
  File "C:/Users/Mason/PycharmProjects/untitled1/mygame.py", line 132, in <module>
  main()
File "C:/Users/Mason/PycharmProjects/untitled1/mygame.py", line 128, in main
arcade.run()
File "C:\Python37\lib\site-packages\arcade\window_commands.py", line 245, in run
pyglet.app.run()
File "C:\Python37\lib\site-packages\pyglet\app__init__.py", line 142, in run
event_loop.run()
  File "C:\Python37\lib\site-packages\pyglet\app\base.py", line 175, in run
self._run()
  File "C:\Python37\lib\site-packages\pyglet\app\base.py", line 187, in _run
timeout = self.idle()
  File "C:\Python37\lib\site-packages\pyglet\app\base.py", line 308, in idle
redraw_all = self.clock.call_scheduled_functions(dt)
  File "C:\Python37\lib\site-packages\pyglet\clock.py", line 314, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
  File "C:/Users/Mason/PycharmProjects/untitled1/mygame.py", line 120, in update
self.text
AttributeError: 'MyGame' object has no attribute 'text'
Error in sys.excepthook:

Original exception was:

Process finished with exit code 1

I've got the latest version of Arcade installed (2.0.3), and am using the most recent version of Python 3.7. PyCharm uses the installation of Python I just downloaded to interpret the code.

Is this an error on my end, or is there something weird going on with the library? I'm just trying to get started using the library, but I can't use the submoduels of arcade.

I get this issue with the csscolor, physics_engine, and sound modules too.


r/pythonarcade • • Mar 23 '19

Proposal for Particle System

Thumbnail
arcade.academy
1 Upvotes

r/pythonarcade • • Feb 17 '19

"painting" objects to the screen and flickering

1 Upvotes

noob here - I'm trying to use Arcade to code up a simple proof of concept where you can paint shapes on the screen using the mouse. The code below kind of works, but is flickering badly - I'm guessing as part of a screen "wipe" between frames of animation ? Apologies in advance if I'm trying to make Arcade do something it wasn't designed for.

import arcade
from colorutils import random_rgb

class MyGame(arcade.Window):

def on_mouse_motion(self, x, y, dx, dy):
    r = abs(dx) + abs(dy)
    arcade.draw_circle_filled(x, y, r, random_rgb())

def main():
    window = MyGame(800, 600, "Drawing Example")
    arcade.run()

if __name__ == "__main__":
    main()

I'm thinking maybe that I need to make the circles into a Class and track and redraw each instance every frame - but I'm curious is there's a way to avoid doing that and simply "turn off" screen redrawing.

Another idea I had was to use the setup part of the game loop, as believe objects added to the screen during that phase of the game loop do persist.....but setup is run only once, I presume, which makes that a no-go.


r/pythonarcade • • Dec 19 '18

How do you update the position of buffered primitives?

1 Upvotes

I assume that you use:

line = arcade.create_line(attributes) in setup to create the first instance of object

And:

line.draw() every draw command to draw the item (after first clearing the screen.)

But how do you change the attributes so the next draw command has a different result? For example the colour or location.

Additional question, what is the VertexBuffer and _Batch classes and the render function used for (they can be found in the buffered_commands module)? I can't find any references to them anywhere and cannot determine a use for them.


r/pythonarcade • • Jul 12 '18

Breakout example

1 Upvotes

Hi, I just started to use the Arcade library. For learning purpose, has someone done a breakout clone with Arcade Library and willing to share the code?


r/pythonarcade • • Jun 25 '18

Best way for play loop sound? (background music)

1 Upvotes

API documentation only has this: http://arcade.academy/arcade.html#module-arcade.sound

Thanks


r/pythonarcade • • Jun 11 '18

Compiling to Mac and iOS

1 Upvotes

I found the link to compile for Mac (http://arcade.academy/distribute_macos.html)

When I try to do this for either Mac or iOS I am getting the following error when I build the Xcode project:

2018-06-10 22:04:07.272665-0400 iOS Test[3257:416660] PythonHome is: /Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Python

2018-06-10 22:04:07.274685-0400 iOS Test[3257:416660] PYTHONPATH is: PYTHONPATH=/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app:/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages

2018-06-10 22:04:07.274924-0400 iOS Test[3257:416660] Initializing Python runtime

2018-06-10 22:04:07.406359-0400 iOS Test[3257:416660] Running /Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app/iOSTest/__main__.py

Traceback (most recent call last):

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app/iOSTest/__main__.py", line 1, in <module>

from iOSTest.app import main

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app/iOSTest/app.py", line 1, in <module>

import arcade

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/arcade/__init__.py", line 15, in <module>

from arcade.application import *

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/arcade/application.py", line 8, in <module>

from arcade.window_commands import set_viewport

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/arcade/window_commands.py", line 11, in <module>

import pyglet.gl as gl

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/pyglet/gl/__init__.py", line 100, in <module>

from pyglet.gl.lib import GLException

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/pyglet/gl/lib.py", line 143, in <module>

from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/pyglet/gl/lib_glx.py", line 50, in <module>

gl_lib = pyglet.lib.load_library('GL')

File "/Users/pcoxall/Library/Developer/CoreSimulator/Devices/DF91A2FF-8FBF-4FBD-BAB7-694842CA01A2/data/Containers/Bundle/Application/C0879D1C-758A-43B1-81B0-FF8F288F9949/iOS Test.app/Library/Application Support/com.example.iOSTest/app_packages/pyglet/lib.py", line 158, in load_library

raise ImportError('Library "%s" not found.' % names[0])

ImportError: Library "GL" not found.

2018-06-10 22:04:07.830485-0400 iOS Test[3257:416660] Application quit abnormally!

2018-06-10 22:04:07.838541-0400 iOS Test[3257:416660] Leaving

It seems to be some kind of error with an OpenGL library.

Has anyone successfully compiled to Mac or iOS?
I have successfully compiled a Toga screen using Briefcase to iOS, I just can not get it working for Arcade.

Thanks


r/pythonarcade • • Dec 03 '17

Arcade 1.2.2 has been released

1 Upvotes

Arcade 1.2.2 has been released.

Release Notes

To upgrade:

pip install --upgrade arcade

Bug Fixes

  • Issue 143: Error thrown when using scroll wheel

  • Issue 128: Fix infinite loop in physics engine

  • Issue 127: Fix bug around warning with Python 3.6 when imported

  • Issue 125: Fix bug when creating window on Linux

Enhancements

  • Issue 147: Fix bug building documentation where two image files where specified incorrectly

  • Issue 146: Add release notes to documentation

  • Issue 144: Add code to get window and viewport dimensions

  • Issue 139: Add documentation on what collision_radius is

  • Issue 131: Add example code on how to do full-screen games

  • Issue 113: Add example code showing enemy turning around when hitting a wall

  • Issue 67: Improved support and documentation for joystick/game controllers

There are also more code examples available.


r/pythonarcade • • Nov 13 '17

Arcade Library Version 1.2 Released

1 Upvotes

Version 1.2 of the Arcade Library has been released. You can install it with:

pip install --upgrade arcade

This version has several bug fixes, performance improvements, and the addition of buffered drawing commands that use Vertex Buffer Objects to speed drawing of drawing primitives.

Example code is available here.

An on-line book teaching Python using Arcade is available here.


r/pythonarcade • • Dec 04 '16

Installation instructions for the sound library on Mac OSX

1 Upvotes

How do you install the sound library? I only see Linux instructions.


r/pythonarcade • • Aug 02 '16

Using Python, Arcade, and Pymunk for a platformer

Thumbnail
youtu.be
1 Upvotes

r/pythonarcade • • Jul 22 '16

Physics Engine Code Test

Thumbnail
youtu.be
1 Upvotes

r/pythonarcade • • Jun 05 '16

Python Arcade adds type hinting and drops 2.x support.

1 Upvotes

A lot of work was done on the Python Arcade library. It was decided to drop Python 2.x support and add in type hinting. The version number is now 0.9.9 beta 1.


r/pythonarcade • • Sep 22 '26

setuptools vs nuitka

Thumbnail reddit.com
0 Upvotes

r/pythonarcade • • Nov 24 '20

Using multiple windows

0 Upvotes

Hi. I'm in the process of moving my simulation software from pygame to pyglet, then i realized i could use arcade instead. I don't need much of arcade, it will just appreciate the additional shape primitives and the userfriendly higher-level API .

However, i can't find much information about handling multiple windows (i need one for the simulation, one for the data dashboard). Can i just assume that i can use switch_to just like pyglet and call it a day ? (i assume this is how it works using pyglet but i haven't tested yet.)

edit :

Actually, it's een much easier than that in pyglet using decorator so i have no idea how i would do it in arcade

@first_window.event
def on_draw():
    ...

@second_window.event
def on_draw():
    ....

https://i.imgur.com/qLtEONY.png


r/pythonarcade • • Mar 11 '20

How do I create a physics based movement system?

0 Upvotes

I’m trying to create a platformer with physics based movement eg velocity, acceleration etc but I can’t seem to make it work.

I looked at the docs and it says that the sprite.change_x is the velocity so I tried sprite.center_x += sprite.change_x but that didn’t work.

I want my playable character to be able to gain momentum up to a certain speed then hold that speed then decelerate when the player takes their hands off the keys for a more fluid movement system.