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.
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?
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?
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 "\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! :)
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 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?
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.
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.
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.
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.
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?
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.
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?