r/pythonarcade • • Jan 15 '20

Arcade 2.2.4 is out

13 Upvotes

Arcade 2.2.4 is out. Main improvement is a 20% efficiency improvement in the time to move, rotate, scale, color a sprite through the use of array.array instead of numpy.

Numpy may be removed as a dependency in the future.


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 • • Jul 11 '18

Culling offscreen objects

3 Upvotes

Frustum Culling

Is there a way that I can easily cull offscreen objects efficiently? My code currently will try to render 1000s of extra textures that it doesn't need. I don't see any documentation on it, and it seems like arcade doesn't do it automatically.

If there isn't any, does anyone have any advice on how to efficiently build one?

Edit: this is my first experience with using a game engine, apparently this is called frustum culling, wondering if Arcade has this built in?


r/pythonarcade • • Jan 24 '19

Tiled map problems

3 Upvotes

Hello guys!

I am not a veteran in any means with python, but I decided to do a school project in it, but I am stuck atm. The problem I have is that - with the example in "working with tiled map" everything is fine. The program can read that map, but not my own. I played around with it for a while now and i noticed everything is fine until the tiles are 128x128 in size. My map contains tiles that are 32x32 in size. :( the error message that I am getting every time -

File "game.py", line 95, in load_level

my_map = arcade.read_tiled_map("untitled.tmx", SPRITE_SCALING)

File "\site-packages\arcade\read_tiled_map.py", line 231, in read_tiled_map

grid_location.tile = my_map.global_tile_set[key]

KeyError: '235'

What could cause the problem? Anyone had similar problems with it maybe? Tell me if you need more information, and thank you very much for the help! :)


r/pythonarcade • • Jan 17 '20

Intro to the Arcade Framework on Real Python

Thumbnail
realpython.com
11 Upvotes

r/pythonarcade • • Apr 22 '19

Arcade 2.0.6 is out

8 Upvotes

Improvements around mp3/ogg sound support on Mac and tile map loading. Please report problems.


r/pythonarcade • • Jun 27 '23

Python Arcade/Pyglet controller support

4 Upvotes

Hi as the title suggests I need help getting Arcade to detect when I want to use a controller (Specifically Xinput). I am using python3.10 with Arcade 2.6.17 and Pyglet 2.15.9.

I followed the example code on https://api.arcade.academy/en/latest/index.html for both Game Controller/Joystick and Dual Stick Shooter. Neither file could detect my controller.

After some testing, I saw that Pyglet could detect and get values from my controller with this script from the Pyglet Github: https://github.com/pyglet/pyglet/blob/master/examples/input/controller.py

I found this on Stack Overflow where this person managed to get the values needed using Pyglet and have Arcade use them.

The problem I'm having is struggling to understand what it is doing. Understanding where it belongs and when it should be called.

Any explanation or another solution to implement controller support would be very appreciated.

Sorry if this is a stupid question I am quite new to this.


r/pythonarcade • • Dec 13 '17

Tower defense game using Arcade

2 Upvotes

This is a fun tower defense game created by a first-year college student using Python and the Arcade library.


r/pythonarcade • • Sep 05 '16

Finding the Arcade library in PyCharm

3 Upvotes

I have followed the installation instructions for the Mac (http://pythonhosted.org/arcade/installation_mac.html) and would like to run a test project. I get ImportError: No module named 'arcade' when running. How do you point PyCharm to find the Arcade Library that was previously setup in the virtual environment?


r/pythonarcade • • Dec 21 '17

Arcade 1.2.3 has been released

Thumbnail
arcade.academy
4 Upvotes

r/pythonarcade • • Feb 27 '25

Setting background color of Text object

1 Upvotes

Apparently, there is no 'background' attribute for a Text object. I can use 'draw_debug()', but then I get the anchor point showing also.

Is there a way to change the color of the background and the outline of a Text object?


r/pythonarcade • • Jan 04 '22

This is the sixth birthday of the Python Arcade library!

16 Upvotes

Our new demo video, in honor of this event:

Arcade is a fast, powerful, easy-to-use 2D graphics game library.

Our website: https://arcade.academy

Over the last six years we've had:

  • 4,280 check-ins

  • 93 people contribute to the project

  • 1,100 GitHub stars

Click here for our book on how to learn using Python and video games.


r/pythonarcade • • Jan 21 '22

Best practices and good examples

3 Upvotes

Hello, is there a good tutorial or example project covering best practices for the arcade library? I feel like there are a bunch of ways to do things and the tutorials seem all over the place. Trying to make a top down 2D game.


r/pythonarcade • • Jan 18 '22

Creating maps with arcade

4 Upvotes

Hello, I am a big fan of cartography and I would like to know if I can generate maps with arcade, and if I can where should I be looking to do this?


r/pythonarcade • • Jan 31 '22

Platformer tutorial

3 Upvotes

I'm working on the "Platformer" tutorlal and everything was going smoothly until I ran into this error.

"raise KeyError(f"Scene does not contain a layer named: {key}")

KeyError: 'Scene does not contain a layer named: Platforms'"

# Create the 'physics engine'

self.physics_engine = arcade.PhysicsEnginePlatformer( self.player_sprite, gravity_constant=GRAVITY, walls=self.scene["Platforms"]

Platformer Gist

under setup(self), I've compared my code with the source and I'm not finding what I did wrong. I've scanned the code for typos and syntax error etc and I'm not finding what I've done wrong.


r/pythonarcade • • Jan 29 '22

Arcade 2.6.10 is out

13 Upvotes

Release notes: https://api.arcade.academy/en/latest/development/release_notes.html

2.6.10

Released 2022-Jan-29

  • Sprites

    • Collision checking against one or more sprite lists can use the GPU via a ‘transform’ for much better performance. The arcade.check_for_collision_with_lists() and arcade.check_for_collision_with_lists() methods now support selection between spatial, GPU, and CPU methods of detection.

    • Added clear() for resetting/clearing a spritelist. This will iterate and remove all sprites by default, or do a faster O(1) clear. Please read the api docs to find out what version fits your use case.

    • SpriteList now supports setting a global color and alpha value. The new color, color_normalized, alpha and alpha_normalized will affect every sprite in the list. This global color value is multiplied by the individual sprite colors.

    • The Sprite initializer now also accepts None
      value for hit_box_algorithm
      in line with the underlying texture method.

    • Fixed a bug causing sprites to have incorrect scale when passing a texture during creation.

    • Removed the texture transform feature in sprites. This feature no longer makes sense since arcade 2.6.0 due to the new texture atlas feature.

  • Tiled Maps

    • Fixed issue #1068 (#1069) where loaded rectangular hit box was wrong.

    • Add better error for infinite tile maps

    • Added SpriteList.properties
      and properties from Image and Tile layers will automatically be loaded into that when loading a Tiled map

  • General

    • Window.current_camera
      will now hold a reference to the currently active camera. This will be set when calling arcade.Camera.use(), if no camera is active then it will be None
      .

    • Window.clear
      can now clear a sub-section of the screen through the new optional viewport
      parameter.

    • arcade.Window.clear() can now take normalized/float color values

    • The new arcade.View.clear() method now clears the current window. This can be used as a shortcut arcade.Window.clear() when inside of a View class.

    • Add support for custom resource handles

    • Add support for anisotropic filtering with textures.

    • Clearing the window should always clear the entire window regardless of camera / viewport setup (unless a scissor box is set)

  • Documentation

    • Change examples so instead of arcade.start_render()
      we use self.clear()
      . The start render function was confusing people. #1071

    • Fix a bunch of links that were incorrectly pointing to old pvcraven instead of pythonarcade. #1063

    • Update pyinstaller instructions

    • Various documentation improvements and updates

  • arcade.gl

    • Fixed a bug were out attributes in transforms was not properly detected with geometry shaders

    • Fixed a bug were specifying vertex count wasn’t possible with transforms when the vertex array has an index buffer bound.

    • The Query object now allows for selecting what specific queries should be performed

    • Fixed a issue causing the wrong garbage collection mode to activate during context creation

    • Viewport values for the default framebuffer now applies pixel ratio by default

    • Scissor values for the default framebuffer now applies pixel ratio by default

  • arcade.gui

    • UIBoxLayout supports now align in constructor (changing later requires a UIBoxLayout.trigger_full_render()).

    • UIBoxLayout supports now space_between in constructor.

    • UIManager fix #1067, consume press and release mouse events

    • UIManager add() returns added child

    • UILayout add()
      returns added child

    • UIWidget add() returns added child

    • New method in UIManager: walk_widgets()

    • New method in UIManager: get_widgets_at()

    • New method in UIWidget: move()

Special thanks to Cleptomania, einarf, eruvanos, nrukin, Jayman2000, pvcraven, for their contributions to this release. Also, thanks to everyone on the Pyglet team! We depend heavily on Pyglet’s continued development.


r/pythonarcade • • Jul 23 '16

Demo with Python Pymunk library, and the Arcade library

Thumbnail
youtu.be
2 Upvotes

r/pythonarcade • • Jul 22 '16

Pinball using new Arcade physics engine

Thumbnail
youtu.be
2 Upvotes

r/pythonarcade • • Apr 01 '18

New examples for procedural dungeon generation

4 Upvotes

Two new examples for showing procedural dungeon generation. These examples also show using repeating textures to reduce the number of sprites in a scene to improve performance.


r/pythonarcade • • Jul 22 '16

Physics Engine Code Test

Thumbnail
youtu.be
1 Upvotes

r/pythonarcade • • Apr 01 '18

Arcade 1.3.1 has been released

4 Upvotes

PyPi now has Arcade 1.3.1. Release notes will be here once the cloud updates.

If you have a Mac, I'm particularly interested to hear if sound works for you. Sound is dependent on the PyObjC library.


r/pythonarcade • • Mar 25 '20

Issue with is_on_ladder

4 Upvotes

The image below shows some captures from my game, with the hero sprite's hitboxes drawn in red. The first two are consecutive frames where is_on_ladder is returning True - even though the hitbox isn't touching the ladder pixels, nor are any sprite pixels. The third capture is from another point in time where is_on_ladder returns False. The sprite's pixels, but not the hitbox, are touching the ladder in that capture.

In my player's __init__() I have "self.is_on_ladder = False" and the only other place in my code where is_on_ladder is set is in MyGame.on_update()

if self.physics_engine.is_on_ladder():

self.hero.is_on_ladder = True

self.hero.jumping_needs_reset = False

else:

self.hero.is_on_ladder = False

If I remove my hitbox code and use the sprite's pixels - self.set_hit_box(self.texture.hit_box_points) - the issue can still occur.

Can anyone give me some insight into why the above is happening? Or any ideas on how to fix or avoid such a situation?


r/pythonarcade • • Jul 17 '19

Physics engine to go alongside Arcade

5 Upvotes

I am looking to start tinkering with Arcade in a 2d setting and am looking for a physics engine to go alongside it. Was just wondering if anyone had any suggestions for libraries that work well with Arcade. I have been learning Pymunk, but the two don't quite go hand in hand. All of my Pymunk shapes need to be properties of my game window so they can be used by both the setup and draw functions. I'm thinking of fiddling around and trying to get a custom class to work between them soon, but I'd like to avoid that if another library works better.


r/pythonarcade • • Mar 31 '20

How to create User Interface (configure options)

4 Upvotes

Hi there. I created my version of Pong and it runs pretty smoothly. I even have an AI capable of playing well enough it is challenging but does not win alwazs. So far only one one game is supported and I want to ramp it up to matches.

Now looking at https://arcade.academy/examples/index.html#user-interface I added menu screen, instructions, game over and a setup screen. On the setup screen I'd like to choose user input for left and right user (it could come from keyboard, mouse or one of the game controllers, even AI) and the length of a match.

But apart from Button and DialogBox there seems to be nothing I could use. Even worse, the dialog box does behave by far unlike dialog boxes in other GUI frameworks (from the example I saw the developer needs to take care for modality). It also took me ages to understand when to pick TextButton and when SubmitButton.

Finally I am able to operate the menu using SubmitButtons using the mouse, not the keyboard. However at some later time I'd actually have just game controllers for operation. How to add such support?

Are there some more concise examples for menus and configuration screens? Or is there some room for improvement and someone would like to join forces?


r/pythonarcade • • Mar 28 '20

Enemy not moving on level 2

3 Upvotes

I've delved into the python docs and decided to make a second level for my game, all works perfectly except the enemy list won't move.

It loads, animates and attacks but the x axis won't move along a predetermined patrol path.

I'm using the same code that I did in the first level and can't understand why it won't work on the second level.

Here's a link to the github: https://github.com/clearhead09/mindump/blob/master/Enemy%20not%20moving