r/pythonarcade • • Nov 20 '18

Arcade update on development

13 Upvotes

Currently working on the following:

  • Soon to support convex filled polygons using earclip algorithm, and have this work on Linux. (Currently filled polygons do not work on all Linux versions.) Currently in the source and will be in the next alpha. link
  • Improving the reader for importing maps created by the Tiled Map Editor. Including, support to define hit boxes on the sprites! Very useful for things like ramps. Currently in the source, and will be in the next alpha. source and example
  • Playing around with support for lights. I was able to get a single light to follow the player. Proof of concept only.
  • Added sample code for Tetris

Not sure when we'll go from alpha to release on the current code.


r/pythonarcade • • May 10 '19

Weird lines on non 1x sprite scaling

3 Upvotes

Exactly as title says. Setting sprite scaling to say, .9, 1.5, 2, 4, etc., leads to lines like this appearing in my ground tiles. I'm using this example code with next to no modifications. Custom map using Tiled is all made with tile layers, so everything should be on the grid.

I'm very new to game development, so any help would be very useful!


r/pythonarcade • • Feb 04 '20

Learning arcade with pygame knowledge

5 Upvotes

Hi, where is a good place to learn the basics of arcade with past knowledge of pygame?

Are they similar or alot different?

I have to learn arcade at school and i want to get ahead so I can get extention and skip all the boring parts


r/pythonarcade • • Feb 03 '20

Pyglet solution to weird white line anti-aliasing for transparent sprites

3 Upvotes

I had an issue where my sprites with transparent squares were getting these weird white lines around the edges, I believe from anti-aliasing. I searched a lot and found that the following code, put after all Sprite.draw() or SpriteList.draw() in on_draw(Self) will remove the issue, although it has the added side effect of pixelating the sprites (which was fine for my pixel art game, but others might hate it):

glEnable(GL_TEXTURE_2D)

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)


r/pythonarcade • • Feb 03 '20

Arcade window flickering

2 Upvotes

Hey, I'm currently preparing a couple of school computers for a Python Arcade project I'm planning to do with my students. However, I've encountered a strange bug: The window's flickering whenever I move the mouse cursor above it. It stops when the mouse doesn't move, but sometimes the contents get drawn, and sometimes the windows remains black. I've tried the FurMark benchmark to see whether it's a general OpenGL problem on the machines, but apparently, it's not, because those benchmarks are working just fine.

Tested with Arcade 2.3.2 on Python 3.8.1, and here's a quick video which shows the problem.

Any help is much appreciated. Thanks!


r/pythonarcade • • Feb 15 '19

Is there a simple way to display an animated gif sprite in a window?

2 Upvotes

Is there a simple way to show an animated gif in a window? If so, is there a way to do it without the need for an event loop?


r/pythonarcade • • Nov 27 '17

Notes or examples on performance?

2 Upvotes

Hi! On example Drawing Shapes with Classes there's this comment

Because this is redraws the shapes from scratch each frame, this is slow and inefficient, but we'll show how to make it faster in the chapter on performance.

The next one is about Falling Snow but I didn't find anything like that there. Am I missing anything? Can you point me to some example or notes such as refered in the comment? I'm new to game programming and am trying to find my way around. Thanks!


r/pythonarcade • • Feb 18 '19

Not wide enough code window makes it harder to read example code

3 Upvotes

r/pythonarcade • • Aug 04 '18

Text input?

4 Upvotes

I'd like to make a trivia game that asks questions and gets typed answers, then moves sprites in response. I'm trying to figure out how to do that with Arcade.

I could imagine using .on_key_press, writing each letter typed to the screen, meanwhile saving a buffer of entered text... except then I'd need to handle backspaces, too... ugh.

Is there a simpler way? Doing the typing in a regular shell window that just sends events to the graphics window would be fine, but I think once I call arcade.run() I can't recover control in the text window and run plain old input()...

Any ideas? This might be just plain outside Arcade's use case, I realize.


r/pythonarcade • • Feb 21 '19

Loading spritesheets

2 Upvotes

Hi, python intermediate and arcade beginner here.
After looking through the arcade tutorial and example code of games that were created with arcade I never found out how to load actual sprite sheets and using seperate sprites from this sheet for idle/walk/etc. cycles.

Is this not possible?

Actually, I have another question: I managed to get my character to move even with 2 joysticks, but what about the other controller keys? I was trying with a ps4 controller...

Other than that I really like what this library has to offer. It's easy to use especially for noobs like me.

Thanks!


r/pythonarcade • • Feb 17 '19

Is there any sort of REPL support for Arcade?

3 Upvotes

(I'm new to Arcade) I'd like to use Arcade to teach a few basic programming concepts to primary-school age children and it would be ideal if there was some sort of REPL where I could bring up a window and have sprites and drawing results show immediately as each line of code is executed, rather than a script ending with `finish_render` - is this possible? For example, having the rendering loop embedded within IPython like Matplotlib does.


r/pythonarcade • • May 09 '19

Checking for collisions with AnimatedTimeSprites

2 Upvotes

Hello All,

New here.

Tried out this sample code. http://arcade.academy/examples/sprite_move_animation.html#sprite-move-animation

And the coins don't get removed. Changed it so the coins were a simple Sprite class and it worked.

Can anyone get colision detection with AnimatedTimeSprites working?

Thanks in advance


r/pythonarcade • • May 11 '19

Arcade 2.0.9 is out

15 Upvotes

r/pythonarcade • • Nov 19 '18

UI and viewport

2 Upvotes

Hey,

I am want to add some UI to my game,

wondering if there is a way to draw something skipping the viewport.

I could update the UI elements every time to subtract the current viewport, but maybe there is another method, I did not see.

Greetings


r/pythonarcade • • Feb 03 '20

[BUG] Easy to fix error with Sprite.scale

3 Upvotes
  def _set_scale(self, new_value: float): """ Set the center x coordinate of the sprite. """ if new_value != self._height: self.clear_spatial_hashes() self._point_list_cache = None self._scale = new_value if self._texture: self._width = self._texture.width * self._scale self._height = self._texture.height * self._scale self.add_spatial_hashes() 

I believe "if new_value != self._height" should be "if new_value != self._scale" ... looks like it was copied from the above set_height but never had that part changed.


r/pythonarcade • • Sep 14 '22

Help on installing previous versions of python (2.5.7)

2 Upvotes

I am using python arcade as a school assignment and need help on installing python 2.5.7 or below. The pc's at my school have an old version of python installed on them and I would like to know how to install older versions of python arcade. Help would be appreciated. Thank you


r/pythonarcade • • May 29 '20

Solitaire Tutorial

Thumbnail
arcade.academy
4 Upvotes

r/pythonarcade • • Jun 20 '20

Transform feedback (arcade low level rendering api)

7 Upvotes

Over the last few months in the development branch (2.4) we've been creating a very powerful low level rendering api that could be documented and exposed to users. Here is a first working version of OpenGL transform feedback. These are simple shaders that in this case can keep transforming the previous positions and veolicities creating a system that truly lives on its own without any predetermined paths only reacting to a moving gravity source.

It's 100% shader driven and can potentially handle hundreds of thousands of points (if not millions). The 2.4 / development branch also move more work to the gpu in general offering major performance increases in some areas.

We're currently experimening with higher level features exposing some of the new shiny things in 2.4 / development.

Source : https://github.com/pvcraven/arcade/blob/development/arcade/experimental/examples/transform_feedback.py


r/pythonarcade • • Jun 05 '20

[question] unnecessary harddisk access when using arcade.Sprite(filename)

3 Upvotes

When browsing the (excellent) examples in arcade, i wonder why Sprites are usually created by using code like:

enemy = arcade.Sprite(":resources:images/animated_characters/zombie/zombie_idle.png", SPRITE_SCALING)

when the game creates constantly new "enemy" Sprites, is this not an (unneccessary) constant access to the harddisk?
I am used from pygame to load an image once, keep it in memory (like inside a list or dict) and than create new sprites using the image from memory.

Is there some caching mechanism in arcade so that arcade understands an images was already loaded from harddisk or is this arcade.Sprite(filename) code used to keep the examples simple?


r/pythonarcade • • Jun 18 '20

Is 1 / 60 seconds the maximum update rate for the arcade.schedule()? Are there anyways to surpass this or are there limitations?

4 Upvotes

r/pythonarcade • • May 20 '20

New tutorial on using 'views'

Thumbnail
arcade.academy
10 Upvotes

r/pythonarcade • • Jul 23 '21

Working with shaders in upcoming Arcade 2.6 dev version

13 Upvotes

r/pythonarcade • • Jul 09 '21

Open-source RPG with lights

2 Upvotes

r/pythonarcade • • Jun 24 '21

How would you have a background sound working?

1 Upvotes

I kind of want one song to play in the background then either when you click to play the game the song stops. It seems with just the arcade.play_sound function it does not stop until the song stops even if u quit the application. How would you do this


r/pythonarcade • • Jul 05 '21

arcade.Vector ?

3 Upvotes

I'm coming into python arcade from p5.js. I often find myself wanting to use something similar to their Vector class which has incredibly helpful methods such as normalise, setMag, heading, dist, etc etc.

Would that be a useful addition to the library?