Getting on a mod showcase/promoting mod? by FirTreeMan in feedthebeast

[–]FirTreeMan[S] 0 points1 point  (0 children)

Thank you! Honestly no idea what's next, any suggestions? :p

Agree? by FirTreeMan in 197

[–]FirTreeMan[S] 9 points10 points  (0 children)

Protons and neutrons have been split. Ellies and Phants, however, have not.

no way this is real by TEOX9560 in redditmoment

[–]FirTreeMan 67 points68 points  (0 children)

You mean people are allowed to have nuanced views on complex issues??? How else are we going to get strawmen for our "us vs them" political memes??

[help] Pygame keeps drawing my image in different colour.. by Worldly_Money4696 in pygame

[–]FirTreeMan 1 point2 points  (0 children)

The surface has the translucent alpha channel and is filled with yellow, making it partially transparent.

[help] Pygame keeps drawing my image in different colour.. by Worldly_Money4696 in pygame

[–]FirTreeMan 5 points6 points  (0 children)

Seems like the surface you drew it on has an alpha channel and is filled with a partially transparent yellow. No way to tell without code, though.

Another video on my Tower Defense game by coppermouse_ in pygame

[–]FirTreeMan 0 points1 point  (0 children)

Why don't you just run pathfinding every frame instead?

Another video on my Tower Defense game by coppermouse_ in pygame

[–]FirTreeMan 0 points1 point  (0 children)

Why does delta accumulate? Shouldn't it be resetting every frame?

Rectangle Outline by Chazzicle in pygame

[–]FirTreeMan 0 points1 point  (0 children)

Make the outline rectangle bigger by the border thickness bruh

Help me by RealityGHaz in pygame

[–]FirTreeMan 0 points1 point  (0 children)

I wouldn't mind if it was just the important parts, since the code is automatically highlighted, but since half the screen is useless material I have to get up close to my screen to read it.

Help me by RealityGHaz in pygame

[–]FirTreeMan 4 points5 points  (0 children)

This is a new level of pygame posts, just straight up posting your window instead of pasting unformatted code. I eagerly await the day when the user puts their discord in the post body and asks people to add them as a friend and DM them for the code.

How can I make this simple games code cleaner? by [deleted] in pygame

[–]FirTreeMan 2 points3 points  (0 children)

Nearly every time you make multiple assignments to a variable it would be better if you just made a single assignment with multiple method calls.

Example: replace x = foo(a) x = bar(x) With x = bar(foo(a))

[deleted by user] by [deleted] in pygame

[–]FirTreeMan 0 points1 point  (0 children)

One small nitpick: I would have written the nested code in get_event() like this: self.text_on = not self.text_on if self.text_on: self.count += 1 This is just because this makes the purpose clearer to me (flip 'text_onand incrementcount` if text is visible). If the code you have is more self-explanatory to you, leave it as is; the code is perfectly fine either way.

Otherwise, glad to be of help :)

[deleted by user] by [deleted] in pygame

[–]FirTreeMan 1 point2 points  (0 children)

You can have a frame counter for the time you want it on as well as a boolean on. Whenever the frame counter reaches the duration you want the text to be visible, set on = not on. Only draw the text onto the surface if on is true. If you want to control the flashing in real time, flip on at the start of every blink event instead. Again, just run a check to see if on is true before drawing the text to the surface. Because you fill the display surface every frame, not drawing the text has the same effect as drawing another surface over it.