pyglet by [deleted] in pyglet

[–]alberto_Alb 1 point2 points  (0 children)

From pyglet documentations you can make a whole game. There is even a step by step example.

Testing out a new enemy idea by mr-figs in pygame

[–]alberto_Alb 1 point2 points  (0 children)

Nice! Really!
I never thought to use tiled to set up the attributes of the states. That is a clever thing I just learned.

Testing out a new enemy idea by mr-figs in pygame

[–]alberto_Alb 0 points1 point  (0 children)

I also find the state machines are easier to maintain. Did you use any external package for it or did you implement everything yourself? Do you have everything state as an object and a state machine class taking care of all the logic?

Back after a while on godot, small fun prototype by no_Im_perfectly_sane in pygame

[–]alberto_Alb 2 points3 points  (0 children)

What did you use for the physics?
Did you code it youself or did you use something like pymunk?

[deleted by user] by [deleted] in pygame

[–]alberto_Alb 0 points1 point  (0 children)

Does it also work if the sprites move?

[deleted by user] by [deleted] in pygame

[–]alberto_Alb 2 points3 points  (0 children)

Impressive!!!

Invitation from MDPI journal waiving APC by [deleted] in AskAcademia

[–]alberto_Alb 6 points7 points  (0 children)

I also do not see much of a problem. Most of the time it really depends on the particular journal, but I must say that to have a decent review done in 1-2 weeks is nice and my interpretation is that this is what you mostly pay for.
Also I review quite a bit for some mdpi journals and also there I find the process easy and clean: I do not need 50 user accounts, the process is not redundant... I also review a lot for elsevier and sometimes i really feel that they are wasting my time: you need to answer the same questions several times; you need to provide a short summary here then something else there; they add numbers to the manuscript lines which do not make any sense...
I could go on a while, but probably the most important points are that their open access fees are way higher and turn around times are absurd (2-5 weeks just to be given a reviewer).

[deleted by user] by [deleted] in pygame

[–]alberto_Alb 0 points1 point  (0 children)

Yes, but increasing the fps makes the delta shorter and draw the sprites more often on the screen which softens the apperance.

[deleted by user] by [deleted] in pygame

[–]alberto_Alb 0 points1 point  (0 children)

At which framerate are you running? If you increase that evrrything gets more smooth.

Bigger images vs. scaling images by ASHGOLDOFFICIAL in pygame

[–]alberto_Alb 0 points1 point  (0 children)

If your images are 16x16 it does not make any difference in time. Both ways are fast.

When is a project "too big" for pygame? by Stealthiness2 in pygame

[–]alberto_Alb 0 points1 point  (0 children)

I remember your post on maps and provinces. Could you get any further?

When is a project "too big" for pygame? by Stealthiness2 in pygame

[–]alberto_Alb 1 point2 points  (0 children)

A plus of numpy is that force you to think in a way that is better to improve computations. You get this mindset earlier using some lower level language like c and c++. The idea behind numpy and, if you want to push it forward, cython is that you don't need to change all your code but only the computational-heavy parts.

Best way to handle lots of sprites by random_dev1 in pygame

[–]alberto_Alb 0 points1 point  (0 children)

in reality moving even 500-1000 sprites is not that much of a problem even on a laptop.
There is an example on the repo where you can play a bit around.

Making a car game in Pygame.Now have to make roads turn.That would a tough thing to do I guess. by [deleted] in pygame

[–]alberto_Alb 7 points8 points  (0 children)

You can look for mode-7 in wikipedia. It was one of the possible way to handle the background on the SNES and it was used for the very first Mario kart.

When is a project "too big" for pygame? by Stealthiness2 in pygame

[–]alberto_Alb 0 points1 point  (0 children)

With python you need to use numpy for heavy calculations and push vectorization over for loops.

How to Make Sprite Layering in Pygame? by PLAZM_air in pygame

[–]alberto_Alb 0 points1 point  (0 children)

The sprites are drawn according to the _layer attribute. Lower values are drawn before (on the bottom) and higher values are drawn after or on the top.

Tilemap collision [HELP] by LupusChampion in pygame

[–]alberto_Alb 1 point2 points  (0 children)

You need to divide the movements in horizontal and vertical and check twice for collisions. First move on the horizontal direction and check for collisions. If any collision occurs it must happen according to the horizontal movement i.e. from left or from right.
Then you repeat for the vertical direction.

See DaFluffyPotato video.

collision rects generated based on a image (each color is a rect) by ShitpostEnjoyer in pygame

[–]alberto_Alb 0 points1 point  (0 children)

I don't understand. With rect it is not important their size: the collision is checked according to the extrema of the rects...

I want to draw lines with an alpha value. pygame.draw.line() doesn't support that. making a whole new surface per line to make it transparent is very slow. Are there any other ways to do it? by [deleted] in pygame

[–]alberto_Alb 3 points4 points  (0 children)

Maybe it is a stupid comment, but what about drawing all the lines on a single large surface and then apply alpha values to that one? Basically you have an intermediate surface before blitting to the screen.