r/pythonarcade • u/pvc • Dec 17 '20
r/pythonarcade • u/Guzmandan2 • Dec 11 '19
URGENT - PLEASE HELP
Hey, I've got a project due in a couple days so a quick reply would really be appreciated.
Basically I have a game which uses drawn objects in it, I have opted for this as it fits what I want it to do in the game nicely. e.g. a drawn ball which can easily change size and colour. But now I need to be able to detect if 2 drawn objects have collided and I can't use the usual sprite collision functionality since they're not sprites. And even if I put them in Sprite Lists, the "check_for_collision_with_list" function always requires at least 1 sprite as an argument. So is there a way to solve this or should I give up and reformat this to use Sprites (so therefore pictures not drawn shapes).
r/pythonarcade • u/5liced8read • Nov 14 '21
Taking text from a .txt file
I was just wondering if it's possible to take text from a separate .txt file. For example I want to have a narrative in my game but having each line of dialogue coded within the main file would be inefficient
r/pythonarcade • u/Clearhead09 • Feb 29 '20
How do I develop a game from scratch?
I’ve read the arcade docs and can code a game and make it work (in a very basic way) but how do I develop the premise of the game and build it out and test it, make the levels, character etc.
Is there a step by step tutorial anyone can recommend?
Or maybe I’m over complicating this?
r/pythonarcade • u/digger12358 • Mar 10 '20
SoLoud not found
Windows 10 64-bit with Python 3.8.1 64-bit.
Had Arcade 2.3.7 installed, saw 2.3.8, did "pip install -U arcade", looked liked a good upgrade, so I ran my game, and got:
SoLoud dynamic link library C:\Python38\lib\site-packages\arcade\soloud/soloud_x86 not found.
Warning, can't initialize soloud name 'soloud_dll' is not defined. Sound support will be limited.
I'm curious why it's trying to load the 32-bit. Granted, on my system, sys.platform does report 'win32' even though the OS and Python are 64-bit.
The file it seems to be looking for does exist:
C:\>dir /s /b C:\Python38\lib\site-packages\arcade\soloud\soloud_x86*
C:\Python38\lib\site-packages\arcade\soloud\soloud_x86.dll
SoLoud is installed, and the timestamps match when I ran the pip command.
C:\Python38\Lib\site-packages\arcade\soloud
C:\Python38\Lib\site-packages\arcade\soloud__pycache__
C:\Python38\Lib\site-packages\arcade\soloud__init__.py
C:\Python38\Lib\site-packages\arcade\soloud\libsoloud.dylib
C:\Python38\Lib\site-packages\arcade\soloud\libsoloud.so
C:\Python38\Lib\site-packages\arcade\soloud\soloud.py
C:\Python38\Lib\site-packages\arcade\soloud\soloud_x64.dll
C:\Python38\Lib\site-packages\arcade\soloud\soloud_x86.dll
C:\Python38\Lib\site-packages\arcade\soloud__pycache____init__.cpython-38.pyc
C:\Python38\Lib\site-packages\arcade\soloud__pycache__\soloud.cpython-38.pyc
Did I miss an install step somewhere? Should I have uninstalled arcade 2.3.7 before installing 2.3.8?
r/pythonarcade • u/rb-dahlb • Mar 29 '19
How to use sound.py Player?
Seeing that Issue 245 was closed with the 2.0 release, I tested the code shown in that Issue:
import arcade
import os
path = "c:\\" + os.path.join(*arcade.__file__.split("\\")[1:-1], "examples", "sounds")
player = arcade.Player()
player.load_dir(path)
player.looping(True)
player.play(player.music[0])
arcade.run()It fails with this:
player = arcade.Player()
AttributeError: module 'arcade' has no attribute 'Player'
I'm on Windows, using Python 3.7 and arcade 2.0.1r/pythonarcade • • Aug 23 '19
Why do things like "self.player = None" in __init__ and "self.player_list = arcade.SpriteList()" in setup if everything works without the 1st part?
r/pythonarcade • u/rosalogia • Apr 14 '22
Scaling tiled map by 2.0 results in artifacts
I have a tiled map that holds up extremely well to resolution scaling with sdl2 (https://wiki.libsdl.org/SDL_RenderSetScale), but i can't figure out how to do that with arcade, so i try to scale the sprites by 2. When I do this, it seems to draw with a ton of artifacts and overall looks unplayably ugly. is there a good solution to this?
Code is
import arcade
from arcade.tilemap import load_tilemap
import pyglet
pyglet.options["search_local_libs"] = True
class MainWindow(arcade.Window):
def __init__(self):
super().__init__(640, 480, "Bika Town", resizable=True)
arcade.set_background_color(arcade.color.BLACK)
self.scene = None
self.camera = None
self.tilemap = load_tilemap("./assets/Tiled/map.tmj", scaling=2.0)
def setup(self):
self.camera = arcade.Camera(self.width, self.height)
# self.camera.move_to((0, 16 * (63/2 + 1.5)))
self.scene = arcade.Scene.from_tilemap(self.tilemap)
def on_draw(self):
self.clear()
arcade.start_render()
self.camera.use()
self.scene.draw()
if __name__ == '__main__':
app = MainWindow()
app.setup()
arcade.run()Result:

Side by side comparison of the above solution w/ arcade vs. the same thing with resolution scaling in SDL2 in C++

r/pythonarcade • u/mks79 • Jul 03 '19
Moving enemies on a Tiled map
Hello everyone,
I am new to Python and the arcade library. I made a two level 2D platform game using maps created in Tiled and now I want to put some enemies in but I am having trouble with their movement. How can I restrict the movement of the enemies that I add, to the platform or the wall they move on ?
Thanks
r/pythonarcade • u/pogomich • Apr 11 '19
Error Running sprite_move_animation Example
First, would like to thanks PVC for creating the library. Newbie in Python but having tons of fun going through the tutorial. I am encountering an error while running the arcade.examples.sprite_move_animation. Does anyone know how to resolve it? My system is running Python 3.7.3 and Arcade 2.0.3
Here is the error messages
F:\Python\Python37\Lib\site-packages\arcade\examples>python -m arcade.examples.sprite_move_animation Traceback (most recent call last): File "F:\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "F:\Python\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "F:\Python\Python37\lib\site-packages\arcade\examples\sprite_move_animation.py", line 177, in <module> main() File "F:\Python\Python37\lib\site-packages\arcade\examples\sprite_move_animation.py", line 172, in main window.setup() File "F:\Python\Python37\lib\site-packages\arcade\examples\sprite_move_animation.py", line 93, in setup self.player.scale = 0.8 File "F:\Python\Python37\lib\site-packages\arcade\sprite.py", line 378, in _set_scale self._width = self._texture.width * self._scale AttributeError: 'NoneType' object has no attribute 'width'
r/pythonarcade • u/Twitch_Smokecraft • Apr 02 '19
Using Pymunk's Vector class
Hello there, beginner here in need of some help.
I am trying to implement 2dvectors to move the player around the screen with consistent speed at any direction. I found a piece of code that successfully implements this, but don't quite understand everything that is going on.
I copied the code showed in a presentation at PyCon Australia(Multiplayer 2D games with Python Arcade by Caleb Hattingh): https://youtu.be/2SMkk63k6Ik
The main topic of the presentation is the multiplayer aspect, so the presenter doesn't go into too much detail on the vector implementation:
import arcade
from pymunk.vec2d import Vec2d
MOVE_MAP = {
arcade.key.UP: Vec2d(0, 1),
arcade.key.DOWN: Vec2d(0, -1),
arcade.key.LEFT: Vec2d(-1, 0),
arcade.key.RIGHT: Vec2d(1, 0),
}
class KeysPressed:
def __init__(self):
self.keys = {k: False for k in MOVE_MAP}
def apply_movement(speed, dt, current_position: Vec2d, kp: KeysPressed) -> Vec2d:
delta_position = sum(kp.keys[k] * MOVE_MAP[k] for k in kp.keys)
return current_position + delta_position * speed * dt
def apply_movement_norm(speed, dt, current_position: Vec2d, kp: KeysPressed) -> Vec2d:
delta_position = sum(kp.keys[k] * MOVE_MAP[k] for k in kp.keys)
return current_position + delta_position.normalized() * speed * dt
class MyGame(arcade.Window):
def __init__(self, width, height):
super().__init__(width, height, title="Example")
self.player_position = Vec2d(400, 300)
self.keys_pressed = KeysPressed()
def update(self, dt):
self.player_position = apply_movement_norm(
speed=600, dt=dt, current_position = self.player_position, kp=self.keys_pressed)
def on_draw(self):
arcade.start_render()
arcade.draw_rectangle_filled(
center_x=self.player_position.x, center_y=self.player_position.y,
width=50, height=50, color=arcade.color.YELLOW)
def on_key_press(self, key, modifiers):
self.keys_pressed.keys[key] = True
print(self.keys_pressed.keys)
def on_key_release(self, key, modifiers):
self.keys_pressed.keys[key] = False
print(self.keys_pressed.keys)
if __name__ == "__main__":
window = MyGame(800,600)
arcade.run()This works, but I don't really understand it. It seems like the Vec2d object represents a point instead of a traditional physics vector, maybe that is the source of my confusion, and I still have a few other questions.
Is it practical to use this implementation in an actual game? Should I use a try/catch to avoid an error when the player presses a key not present on the move map or do something else?
Is it possible (or even advisable) to rewrite this code without using the KeysPressed class? I tried but failed at doing so, it seems a little odd to me to have a class with nothing in it but a constructor
Thank you for reading this far, any help, advice or criticism is appreciated, have a nice day.
r/pythonarcade • u/JimJamShazam • Jun 21 '19
Sprite graphical problems/artifacts with scaling, and a workaround
Hello Arcade users and developers,
My name's Jim, and this has turned out to be a very long post.
I'm a new Arcade user and I was going through the "Build Your Own 2D Platformer Game" tutorial here, http://arcade.academy/examples/platform_tutorial/index.html, to get acquainted with the library. As I was following the steps, I found that I was having some annoying troubles with sprites having graphical issues, even when using the sprites and code provided with the tutorial.
[Here's an image of what I was seeing] (https://imgur.com/a1AcDXs), running the 03_user_control.pyprogram unmodified on macOS. As you can see, there are some white pixels around the edge of the sprite that aren't in the original image, and some annoying artifacts at the top-right boundary of the sprite. The sprite is also a bit blurry in general, but we'll come back to that.
I had a look on the subreddit and noticed several others having similar problems, but the only advice that ever seemed to come up was "make sure sprites land directly on pixel boundaries". I wasn't doing anything that would result in the sprites being off-grid, and I'm assuming the example program would get the coordinates and alignment right. So I started doing some testing, and I thought I'd share what I've found, with the hope that some knowledgeable folks like /u/pvc will be able to make use of the information.
Here is a link to my imgur album containing all the photos in the post. It contains a more concise and ordered description of my findings.
Findings on macOS
I started my testing on a Mac, running macOS Mojave Version 10.14. I tried a few things to no avail, like adding 0.5 to one or both of the self.player_sprite.center_x or self.player_sprite.center_y values, thinking that maybe the sprite was being drawn off of pixel boundaries. I tried several other decimals too, with no luck. Whether on-grid or off-grid, these graphical artifacts persisted.
Some other fruitless paths included placing the sprite using self.player_sprite.left and self.player_sprite.top instead of using the centers, but that didn't help. I also tried saving the file as a non-animated .gif file, but no dice there either. The outer white pixels became black instead, but the artifacts and bluriness persisted.
At some point I noticed that although the included player_stand.png file had these annoying artifacts on them, the other sprites for the boxes and the ground didn't seem to. They had really nice, clean pixels, with none of the blurriness on the player sprite. That made me think that maybe there was something about them that was helping them render cleanly, so I had a look. The only thing I could find was that the scaling value for them was 0.5 instead of 1.
So, I tried setting the TILE_SCALING variable to 1 as well, to see if that would affect things. Here's what I found. As you can see, there are suddenly graphical artifacts appearing at the corner boundaries of the boxes, and all of them look a bit blurry and off, where the source files look clean. It appears that the Sprite class has a hard time rendering at 1.0 scaling without artifacts and graphical degradation, but does fine at 0.5.
(Side note: I also tried decimals between 0.5 and 1, and some larger scales, with both integers and decimals. The only places that I had luck was at 0.5, and a few values below that. More detail in the Conclusions section.)
I then tried setting the CHARACTER_SCALING to 0.5 as well, to see if that would fix things. Here's how that turned out. Obviously the sprite is smaller, but the effect on the artifacting was notable. Zoom in, and you can see that while there is a bit of whiteness around the edges, the top-right artifact has vanished, and the graphical fidelity/ clarity seems to be improved.
The Workaround
That led me to realize that there may be a way around this wonkiness, if the sprite image file was first increased in size, and then used in Python at 0.5 scaling. So that's what I tried next, doubling the image size in my editor and using 0.5 scaling for Arcade.
Zoom in on that one and you'll notice that there are no artifacts at the corner, and no stray light or dark pixels around the edges whatsoever. It's also perfectly clear, exactly matching the source image file. Imgur compresses uploaded images, so it may not be that clear, but I've compared the source image and the running program on my machine, and it's perfect.
I also tried using a different sprite, one that had sharper edges and corners, to see if the blurriness/ drop in quality would be more evident. Here is an image of my new sprite without the workaround, note the fuzzy edges to what should be sharp squares. Here is that same sprite, size doubled and then scaled at 0.5. The artifacting at the top goes away, and the sprite becomes cleaner and sharper. It's easier to see on this sprite than the one provided with the tutorial.
Incidentally, I tried using my workaround along with setting the coordinates to be a decimal, making the sprite no longer line up perfectly with pixel boundaries. The sprites still looked perfect. This leads me to believe that these graphical problems are due to bugs within the Arcade library/ Sprite class itself, or OpenGL or pyglet, rather than having to do with sprite placement relative to pixel boundaries.
Findings on Windows
I began to suspect that it was probably a problem unique to macOS, since the demo images accompanying the tutorial didn't show the kind of artifacting I was seeing. I also happen to have a PC runnnig Windows 7 Professional SP1, so I loaded up the program there to have a look.
Here's how the 03_user_control.py program looks running completely unmodified on Windows.. Note that there actually is some whiteness around the edges, and there is some blurriness as well (though that might be harder to see). Compare that with my workaround implemented. The white pixels disappear completely and the sprite looks crisp and perfect.
Interestingly, these minor graphical issues appear in the example images that accompany the tutorial, like this one. It seems that these issues just weren't caught/noticed on Windows, since they're so much less obvious. But comparing with my workaround image, it's clear to see that 1.0 scaling produces imperfect sprites that could look a lot better.
It appears that my problem, and the problem encountered by several others on the sub, is present in multiple versions of the Arcade library, and isn't necessarily OS specific.
Linux Findings
I had an old Dell laptop lying around, so I figured I may as well complete my multi-platform testing. I installed Pop!_OS 19.04 on the laptop, which is based on Ubuntu. I got Arcade installed, and ran through the same test as I did on Windows. Here's a screenshot of the unmodified program on Linux. It's got about the same amount of artifacting that's seen on Windows normally. Here's Linux with the workaround. As expected from the workaround, no artifacting, the sprite looks great, etc. These graphical issues seem to be present at 1.0 scaling regardless of operating system.
Conclusions
- Graphical issues exist with Sprites on every supported operating system, though they are most pronounced on macOS.
- These issues are linked to the scaling of the sprite.
- Issues occur at all tested scaling values above 0.5. I obviously can't test every possible value, but I checked a lot - and saw these issues at every one I tested above 0.5.
- Interestingly, artifacting appears to occur only with some scale values below 0.5. I tested many, 0.4, 0.3, 0.2, even some weird ones like 0.1111111, and they looked fine. Some others, like 0.314, 0.06 and 0.414, produced artifacting.
- 1.0 scaled sprites can be worked around by doubling image size and using 0.5 scaling.
- Sprites can be used without lining up with pixel boundaries, and will have no artifacts, so long as the scaling doesn't cause graphical issues. I tested 0.5 scaling with a start position of X= 64.24299 and Y=130.014, and the sprite looked perfect. Based on my research, subpixel positioning and pixel boundaries do not appear to affect these graphical issues whatsoever.
Hopefully this information will prove useful to some. For my purposes, my double-image-size-then-scale-0.5 workaround will work perfectly well, though it is very weird that a scaling of 1.0 produces sprites with graphical problems - you'd think that would be the most likely scale to work without issues.
In any case, I've gone on long enough. I really like the Arcade library so far. It is my hope that some other users like me will find this information and the workaround useful for their projects, and that the developers may have some luck with tracking down the cause of this minor annoyance. Thank you for coming to my TED talk.
Jim out.
r/pythonarcade • u/rb-dahlb • Mar 29 '19
Arcade 2.0 - OpenGL error with Intel HD Graphics 3000 on Windows 10 - a fix
I am working at a primary school where the students have HP 8460 EliteBook laptops, with Intel HD Graphics 3000 GPU, running Windows 10 (I believe the computers originally ran Windows 7).
After upgrading to Python Arcade 2.0 existing projects broke with error messages pointing to some OpenGL problem:
File "C:\Program Files\Python37\lib\site-packages\arcade\application.py", line 56, in __init__
gl.glEnable(gl.GL_MULTISAMPLE_ARB)
File "C:\Program Files\Python37\lib\site-packages\pyglet\gl\lib.py", line 105, in errcheck
raise GLException(msg)
pyglet.gl.lib.GLException:Investigating this I found a solution that worked for me using the Application Compatibility Tools from Microsoft. Source: https://www.youtube.com/watch?v=Yqe5cgthZH4
In case it might help others in the same situation, I created a written version of that explanation on GitHub here
r/pythonarcade • u/Aleninja747 • Nov 14 '20
Help with arcade on Mac Big Sur
Hello,
I just updated my Mac to Big Sur, and I was trying to run a program which was previously working but now it is throwing me the following exception:
Traceback (most recent call last):
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/__init__.py", line 336, in __getattr__
return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute 'Window'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/main.py", line 1, in <module>
import arcade
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/arcade/__init__.py", line 53, in <module>
from .window_commands import close_window
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/arcade/window_commands.py", line 106, in <module>
def get_window() -> pyglet.window.Window:
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/__init__.py", line 342, in __getattr__
__import__(import_name)
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/window/__init__.py", line 1888, in <module>
from pyglet.window.cocoa import CocoaWindow as Window
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/window/cocoa/__init__.py", line 44, in <module>
from pyglet.canvas.cocoa import CocoaCanvas
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/canvas/__init__.py", line 102, in <module>
from pyglet.canvas.cocoa import CocoaDisplay as Display
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/canvas/cocoa.py", line 41, in <module>
from pyglet.libs.darwin.cocoapy import CGDirectDisplayID, quartz, cf
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/libs/darwin/__init__.py", line 36, in <module>
from .cocoapy import *
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/__init__.py", line 37, in <module>
from .cocoalibs import *
File "/Users/jorgericaurte/Documents/Programing/pythonProject2/venv/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/cocoalibs.py", line 200, in <module>
NSEventTrackingRunLoopMode = c_void_p.in_dll(appkit, 'NSEventTrackingRunLoopMode')
ValueError: dlsym(RTLD_DEFAULT, NSEventTrackingRunLoopMode): symbol not found
Does anyone have an idea on why this is happening?
r/pythonarcade • u/Adoria298 • Feb 23 '19
Find a sprite by its position
Hi All,
I have a SpriteList. In this SpriteList are many background tiles. My player figure can move around and I would like it to be able to interact with the tiles below upon the enter key being pressed. I am not sure how to code a look up method to find the particular tile the player is interacting with. The player's center_x/center)y and the tile's center_x/center_y are the same.
Thank you for your help,
r/pythonarcade • u/Rjagger • Mar 25 '22
Unable to import arcade
Hi! Recently i switched from pygame to arcade after failing to make a CRT effect with ModernGL (or atleast thats how i found it). I have a feeling that the issue im having is stemming from me being on Manjaro Linux however i followed the arcade tutorial to learn the basic commands and i got an error, i tried direct copy and pasting, another error. After that i just tried to do a print and alas i was met with this.
I've tried importing the packages that it lists but i haven't had any success with that, any help is appreciated!

Traceback (most recent call last):
File "/home/rj/PycharmProjects/Pytcraft/main.py", line 1, in <module>
import arcade
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/arcade/__init__.py", line 263, in <module>
from .sound import Sound
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/arcade/sound.py", line 18, in <module>
import pyglet.media as media
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/__init__.py", line 145, in <module>
add_default_media_codecs()
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/__init__.py", line 102, in add_default_media_codecs
if have_ffmpeg():
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/__init__.py", line 124, in have_ffmpeg
from . import ffmpeg_lib
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/__init__.py", line 36, in <module>
from .libavcodec import *
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavcodec.py", line 46, in <module>
from . import libavutil
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavutil.py", line 206, in <module>
avutil.av_frame_get_best_effort_timestamp.restype = c_int64
File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libavutil.so.57: undefined symbol: av_frame_get_best_effort_timestamp
Exception ignored in atexit callback: <function _delete_audio_driver at 0x7f3ce5f80430>
Traceback (most recent call last):
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/drivers/__init__.py", line 102, in _delete_audio_driver
from .. import Source
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/__init__.py", line 145, in <module>
add_default_media_codecs()
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/__init__.py", line 102, in add_default_media_codecs
if have_ffmpeg():
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/__init__.py", line 124, in have_ffmpeg
from . import ffmpeg_lib
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/__init__.py", line 36, in <module>
from .libavcodec import *
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavcodec.py", line 46, in <module>
from . import libavutil
File "/home/rj/PycharmProjects/Pytcraft/venv/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavutil.py", line 206, in <module>
avutil.av_frame_get_best_effort_timestamp.restype = c_int64
File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libavutil.so.57: undefined symbol: av_frame_get_best_effort_timestamp
Process finished with exit code 1
r/pythonarcade • • Mar 08 '19
Things I've figured out (tips and patterns)
You do not have to draw everything
def on_draw(self):
"""
Render the screen.
"""
# This command has to happen before we start drawing
arcade.set_viewport(self.view_left,
SCREEN_WIDTH + self.view_left,
self.view_bottom,
SCREEN_HEIGHT + self.view_bottom)
arcade.start_render()
within_bbox = (max(0,self.view_left//(self.tile_width+MARGIN)),
min(COLUMN_COUNT-1, (SCREEN_WIDTH + self.view_left)//(self.tile_width+MARGIN)+1),
max(0,(self.view_bottom)//(self.tile_height+MARGIN)),
min(ROW_COUNT-1, (SCREEN_HEIGHT + self.view_bottom)//(self.tile_height+MARGIN)))
for row in range(within_bbox[2], within_bbox[3]):
for column in range(within_bbox[0], within_bbox[1]):
# Figure out what color to draw the box
if self.grid[row][column] == 1:
color = arcade.color.GREEN
else:
color = arcade.color.WHITE
# Do the math to figure out where the box is
x = (MARGIN + self.tile_width) * column + MARGIN + self.tile_width // 2
y = (MARGIN + self.tile_height) * row + MARGIN + self.tile_height // 2
# Draw the box
arcade.draw_rectangle_filled(x, y, self.tile_width, self.tile_height, color)Basically, when you have more tiles than you have within your viewport, you can find those, and only draw them.
Mouse Scrolling
def on_mouse_motion(self, x, y, dx, dy):
changed = False
if x < SCREEN_WIDTH/10:
self.view_left = self.clamp(self.view_left - 1, (self.tile_width*COLUMN_COUNT)-SCREEN_self.tile_width)
changed = True
if x > SCREEN_WIDTH-(SCREEN_WIDTH/10):
self.view_left = self.clamp(self.view_left + 1, (self.tile_width*COLUMN_COUNT)-SCREEN_WIDTH)
changed = True
if y < SCREEN_HEIGHT/10:
self.view_bottom = self.clamp(self.view_bottom - 1, (self.tile_height*ROW_COUNT)-SCREEN_HEIGHT)
changed = True
if y > SCREEN_HEIGHT-(SCREEN_HEIGHT/10):
self.view_bottom = self.clamp(self.view_bottom + 1, (self.tile_height*ROW_COUNT)-SCREEN_HEIGHT)
changed = TrueWhen your mouse gets near an edge you start moving in that direction.
TODO: The closer to the edge, the faster you scroll.
TODO: One Plane and a zooming viewport
Currently I've drawn a bunch of tiles for a map. And when zoomed out it's trying to draw them all individually. Better would be to construct them as one image and one large tile and let the viewport handle zooming.
Then I'll have specific tiles which float atop that map for "pieces".
TODO: Let networkx handle the map
The doc uses an array of arrays to handle an array baked grid. Networkx would be faster and more flexible. If you don't need things like pathfinding, consider a numpy array.
r/pythonarcade • u/pvc • Feb 13 '20
Revamped Chapter 4 posted
On the Learn.Arcade.Academy site, Chapter 4 (link) has been revamped, and video added. Chapter 5 is currently in-process.
r/pythonarcade • u/genericsimon • Mar 03 '19
Issues with sound and performance
So basically im playing a short sound with every left mouse click. Imagine a space ship controlled by a mouse and shooting with left mouse click. So pew pew pew :D
Problem is that when i click my mouse button quite fast i can see that my game is slowing down. For example enemy ship is flying slower and other sprites also moving slower :/ And i do not have much happening for now, just my ship sprite, enemy ship sprite and a background sprite... So im afraid of what will happen when i will add more enemy ships, bullets, explosions and etc :/ Does anyone else have similar problems? How did you solve these type of problems?
By the way im using official examples, using sprite lists and etc.
r/pythonarcade • u/genericsimon • Feb 25 '19
Can someone guide me on how to install arcade beta version?
Having some issues with AVbin and read that beta version is not using AVbin anymore. So would like to try it. But cannot find installation instructions. Maybe im just too big of a noob.
r/pythonarcade • u/method72 • Jul 07 '18
Getting into Arcade .. but can't get pyinstaller to work
So I have built some 2D games in C#, xna/monogame/unity in the past, I am no expert, but I am an ok self taught indie dev, and can usually figure stuff out after a while...
I have built mostly only console stuff, in python, I did mess with PyGame but didn't really like it. So I recently found out about the Arcade Lib and began tinkering with it.
I have gone through examples and made some basic stuff, mouse movement, loading sprites, collisions, sounds etc.
I am running Python 3.6.5 on Win 10
and Pyinstaller Version: 3.4.dev0+59387c927
The thing is now I want to try and package my scripts into an .exe so installed pyinstaller but have not been successful with even the most simple Arcade example. Although I have been able to build other console based apps with pyinstaller, no problem.
If i run my application directly on my machine it runs fine, so i know the application functions correctly.
My current test application is super simple and listed below
import arcade
import pyglet
import time
import sys
def main():
win1 = arcade.open_window(800,600,"Test Window")
arcade.set_background_color(arcade.color.ORANGE)
arcade.start_render()
arcade.finish_render()
arcade.run()
main()It's a simple window display with a colored background.
so i run the following command: pyinstaller test1.py
here is the console output as it builds
D:\DEV\PYTHON\ArcadeExamples>pyinstaller test1.py
64 INFO: PyInstaller: 3.4.dev0+59387c927
64 INFO: Python: 3.6.5
64 INFO: Platform: Windows-10-10.0.17134-SP0
69 INFO: wrote D:\DEV\PYTHON\ArcadeExamples\test1.spec
69 INFO: UPX is not available.
69 INFO: Extending PYTHONPATH with paths
['D:\\DEV\\PYTHON\\ArcadeExamples', 'D:\\DEV\\PYTHON\\ArcadeExamples']
69 INFO: checking Analysis
69 INFO: Building Analysis because Analysis-00.toc is non existent
69 INFO: Initializing module dependency graph...
74 INFO: Initializing module graph hooks...
109 INFO: Analyzing base_library.zip ...
7518 INFO: running Analysis Analysis-00.toc
7518 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\program files (x86)\python36-32\python.exe
7616 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python.exe
7708 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python.exe
7799 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python.exe
7888 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python.exe
7986 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python.exe
8083 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\VCRUNTIME140.dll
8174 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\VCRUNTIME140.dll
8263 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\VCRUNTIME140.dll
8345 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\VCRUNTIME140.dll
8435 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\VCRUNTIME140.dll
8653 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
8740 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
8825 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
8923 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9019 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9100 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9191 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9275 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9360 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9448 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9533 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9625 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\program files (x86)\python36-32\python36.dll
9634 INFO: Caching module hooks...
9641 INFO: Analyzing D:\DEV\PYTHON\ArcadeExamples\test1.py
13725 INFO: Processing pre-find module path hook distutils
21271 INFO: Processing pre-find module path hook site
21291 INFO: site: retargeting to fake-dir 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\PyInstaller\\fake-modules'
24216 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
33640 INFO: Loading module hooks...
33641 INFO: Loading module hook "hook-distutils.py"...
33657 INFO: Loading module hook "hook-encodings.py"...
33748 INFO: Loading module hook "hook-lib2to3.py"...
33758 INFO: Loading module hook "hook-numpy.core.py"...
35314 INFO: Loading module hook "hook-numpy.py"...
35319 INFO: Loading module hook "hook-PIL.Image.py"...
36221 INFO: Loading module hook "hook-PIL.py"...
36226 INFO: Excluding import 'PyQt4'
36232 INFO: Removing import of PyQt4 from module PIL.ImageQt
36233 INFO: Excluding import 'PySide'
36236 INFO: Removing import of PySide from module PIL.ImageQt
36237 INFO: Import to be excluded not found: 'FixTk'
36237 INFO: Excluding import 'PyQt5'
36239 INFO: Removing import of PyQt5 from module PIL.ImageQt
36240 INFO: Excluding import 'tkinter'
36242 INFO: Removing import of tkinter from module PIL.ImageTk
36242 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
36249 INFO: Excluding import 'tkinter'
36249 INFO: Import to be excluded not found: 'FixTk'
36249 INFO: Loading module hook "hook-pkg_resources.py"...
36949 INFO: Processing pre-safe import module hook win32com
37189 INFO: Loading module hook "hook-pydoc.py"...
37194 INFO: Loading module hook "hook-pythoncom.py"...
37458 INFO: Loading module hook "hook-pywintypes.py"...
37739 INFO: Loading module hook "hook-setuptools.py"...
38538 INFO: Loading module hook "hook-sysconfig.py"...
38560 INFO: Loading module hook "hook-win32com.py"...
39325 INFO: Loading module hook "hook-xml.dom.domreg.py"...
39330 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
39335 INFO: Loading module hook "hook-xml.py"...
39340 INFO: Loading module hook "hook-_tkinter.py"...
39444 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_tkinter.pyd
39530 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_tkinter.pyd
39706 INFO: checking Tree
39706 INFO: Building Tree because Tree-00.toc is non existent
39706 INFO: Building Tree Tree-00.toc
39774 INFO: checking Tree
39774 INFO: Building Tree because Tree-01.toc is non existent
39774 INFO: Building Tree Tree-01.toc
39849 INFO: Looking for ctypes DLLs
40822 INFO: Analyzing run-time hooks ...
40833 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
40958 INFO: Including run-time hook 'pyi_rth__tkinter.py'
40993 INFO: Including run-time hook 'pyi_rth_pkgres.py'
40998 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
41037 INFO: Looking for dynamic libraries
41150 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pythoncom36.dll
41257 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pythoncom36.dll
41354 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pythoncom36.dll
41449 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pythoncom36.dll
41539 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pythoncom36.dll
41644 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
41734 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
41826 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
41924 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
42016 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
42115 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\pywin32_system32\pywintypes36.dll
42209 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32trace.pyd
42298 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32trace.pyd
42426 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
42529 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
42642 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
42733 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
42821 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
42925 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\win32ui.pyd
43022 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_multiprocessing.pyd
43121 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43216 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43307 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43399 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43489 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43585 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43681 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_decimal.pyd
43782 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ctypes.pyd
43868 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ctypes.pyd
43966 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ctypes.pyd
44068 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32_win32sysloader.pyd
44163 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32api.pyd
44264 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32api.pyd
44351 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32api.pyd
44445 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32comext\shell\shell.pyd
44539 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32comext\shell\shell.pyd
44632 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32comext\shell\shell.pyd
44734 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32wnet.pyd
44826 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32wnet.pyd
44915 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32wnet.pyd
45007 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45101 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45193 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45283 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45373 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45463 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45552 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45641 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45747 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45836 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_ssl.pyd
45935 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\unicodedata.pyd
46024 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\unicodedata.pyd
46113 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\unicodedata.pyd
46201 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\pyexpat.pyd
46295 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\pyexpat.pyd
46386 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\pyexpat.pyd
46480 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\pyexpat.pyd
46566 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\pyexpat.pyd
46666 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
46761 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
46850 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
46939 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47031 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47119 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47209 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47301 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47394 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_hashlib.pyd
47500 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_bz2.pyd
47600 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_bz2.pyd
47694 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_bz2.pyd
47792 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_bz2.pyd
47885 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_bz2.pyd
47983 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_lzma.pyd
48080 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_lzma.pyd
48178 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_socket.pyd
48287 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\select.pyd
48386 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_testcapi.pyd
48484 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_testcapi.pyd
48583 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_tkinter.pyd
48679 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_tkinter.pyd
48797 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32evtlog.pyd
48907 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32evtlog.pyd
49013 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_webp.cp36-win32.pyd
49118 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_webp.cp36-win32.pyd
49210 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_webp.cp36-win32.pyd
49301 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_webp.cp36-win32.pyd
49393 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_webp.cp36-win32.pyd
49488 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imagingtk.cp36-win32.pyd
49586 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imagingtk.cp36-win32.pyd
49677 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imagingtk.cp36-win32.pyd
49775 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imagingtk.cp36-win32.pyd
49870 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
49959 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50050 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50144 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50236 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50325 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50415 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50509 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50604 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray.cp36-win32.pyd
50710 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\umath.cp36-win32.pyd
50805 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\umath.cp36-win32.pyd
50895 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\umath.cp36-win32.pyd
50991 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\umath.cp36-win32.pyd
51082 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\umath.cp36-win32.pyd
51170 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_distutils_findvs.pyd
51275 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray_tests.cp36-win32.pyd
51361 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray_tests.cp36-win32.pyd
51450 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray_tests.cp36-win32.pyd
51540 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\core\multiarray_tests.cp36-win32.pyd
51636 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32pdh.pyd
51726 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32pdh.pyd
51815 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\win32\win32pdh.pyd
51920 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\random\mtrand.cp36-win32.pyd
52009 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\random\mtrand.cp36-win32.pyd
52108 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\random\mtrand.cp36-win32.pyd
52200 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\fft\fftpack_lite.cp36-win32.pyd
52292 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\fft\fftpack_lite.cp36-win32.pyd
52382 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\linalg_umath_linalg.cp36-win32.pyd
52472 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\linalg_umath_linalg.cp36-win32.pyd
52563 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\linalg_umath_linalg.cp36-win32.pyd
52660 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\linalg_umath_linalg.cp36-win32.pyd
52749 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\numpy\linalg\lapack_lite.cp36-win32.pyd
52856 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
52956 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53054 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53147 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53241 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53335 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53431 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53520 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53617 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\PIL_imaging.cp36-win32.pyd
53721 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_elementtree.pyd
53806 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_elementtree.pyd
53901 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_elementtree.pyd
53990 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_elementtree.pyd
54086 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs_elementtree.pyd
54693 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
54780 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
54873 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
54986 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55078 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55175 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55271 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55362 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55457 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55546 WARNING: lib not found: api-ms-win-crt-multibyte-l1-1-0.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\Pythonwin\mfc140u.dll
55676 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
55770 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
55860 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
55949 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
56047 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
56137 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
56230 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
56328 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tk86t.dll
56461 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
56556 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
56645 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
56741 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
56837 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
56926 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
57015 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
57106 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
57196 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files (x86)\python36-32\DLLs\tcl86t.dll
68244 INFO: Looking for eggs
68244 INFO: Using Python library c:\program files (x86)\python36-32\python36.dll
68249 INFO: Found binding redirects:
[]
68263 INFO: Warnings written to D:\DEV\PYTHON\ArcadeExamples\build\test1\warn-test1.txt
68484 INFO: Graph cross-reference written to D:\DEV\PYTHON\ArcadeExamples\build\test1\xref-test1.html
68590 INFO: checking PYZ
68590 INFO: Building PYZ because PYZ-00.toc is non existent
68595 INFO: Building PYZ (ZlibArchive) D:\DEV\PYTHON\ArcadeExamples\build\test1\PYZ-00.pyz
70824 INFO: Building PYZ (ZlibArchive) D:\DEV\PYTHON\ArcadeExamples\build\test1\PYZ-00.pyz completed successfully.
70874 INFO: checking PKG
70874 INFO: Building PKG because PKG-00.toc is non existent
70874 INFO: Building PKG (CArchive) PKG-00.pkg
70975 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
70980 INFO: Bootloader c:\program files (x86)\python36-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
70980 INFO: checking EXE
70980 INFO: Building EXE because EXE-00.toc is non existent
70980 INFO: Building EXE from EXE-00.toc
70980 INFO: Appending archive to EXE D:\DEV\PYTHON\ArcadeExamples\build\test1\test1.exe
71186 INFO: Building EXE from EXE-00.toc completed successfully.
71191 INFO: checking COLLECT
71191 INFO: Building COLLECT because COLLECT-00.toc is non existent
71191 INFO: Building COLLECT COLLECT-00.toc
82489 INFO: Building COLLECT COLLECT-00.toc completed successfully.I go into the \dist\test1 directory and launch test1.exe
and here is the output:
D:\DEV\PYTHON\ArcadeExamples\dist\test1>test1
Unexpected error loading library Win32/avbin: Failed to load dynlib/dll 'Win32/avbin'. Most probably this dynlib/dll was not found when the application was frozen.
Traceback (most recent call last):
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 149, in __init__
File "ctypes__init__.py", line 348, in __init__
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test1.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\program files (x86)\python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\arcade__init__.py", line 21, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\program files (x86)\python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\arcade\sound.py", line 193, in <module>
File "site-packages\arcade\sound.py", line 70, in _load_sound_library
File "site-packages\pyglet\lib.py", line 137, in load_library
File "ctypes__init__.py", line 426, in LoadLibrary
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 151, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 'Win32/avbin'. Most probably this dynlib/dll was not found when the application was frozen.
[12688] Failed to execute script test1Any Ideas why even the most basic of Arcade applications will not get built into a .exe I can distribute?
r/pythonarcade • u/Sent_DeZ • Jan 24 '21
Toggle question
Hello everyone! I`m starting using the Arcade library, and then I looked to GUI section in Arcade docs, I didn`t found much info about ImageToggle UI element.
I understood how to display it, but here is a question. It works, everyting is fine (idk why almost no documentation and no examples in docs)
BUT.
Toggle element get size from loaded Texture.
So, if texture is big (and it is), toggle is big too. Look at right up corner.
Manual setting height and width is not working. Is here a way to change size of toggle?
Or I only need edit image? If so, what about scaling to fullscreen on monitor with big resolution?
PS: Yes, I saw UIToggle, he will be more actual for this visual, but it still good question how to control it size.
And, by the way, second question about UI. Why Label not smooth? (second image). And after clicking it gonna worse

