Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How do you set the alpha of a color???
Post: RE: How do you set the alpha of a color???

I was trying to overlay the image onto rectangles I drew with draw.rect. I was trying to find an alternate way to lighten and darken colors that didn't cause colors such as orange to shift to another ...
xBlackHeartx Game Development 7 7,210 Jan-15-2020, 04:21 AM
    Thread: How do you set the alpha of a color???
Post: RE: How do you set the alpha of a color???

I didn't get an error message this time, but it still didn't change anything.
xBlackHeartx Game Development 7 7,210 Jan-15-2020, 03:42 AM
    Thread: How do you set the alpha of a color???
Post: RE: How do you set the alpha of a color???

I entered that, and it told me I had an 'invalid color' error. This is the code I'm trying to get to work: import pygame pygame.init() block=100 winH=block*5 winW=block*5 screen=pygame.display.set...
xBlackHeartx Game Development 7 7,210 Jan-15-2020, 01:57 AM
    Thread: How do you set the alpha of a color???
Post: How do you set the alpha of a color???

When I enter in the alpha value for a color, nothing changes no matter what I set it to. I don't even get an error message. My program just acts like I haven't set a fourth value in the rgba tuple.
xBlackHeartx Game Development 7 7,210 Jan-15-2020, 01:11 AM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

In version 3, I decided to encourage the two-color blocks into the three-color rows. All I had to do was rework the functions a bit, change the positions of everything, and add in a grey-scale line. ...
xBlackHeartx Game Development 11 5,728 Jan-13-2020, 03:53 PM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

I re-did the two-color functions, and now I no longer have an infinite loop. Also, the functions are far simpler this time since I based them off the single-color ones. import pygame pygame.init() b...
xBlackHeartx Game Development 11 5,728 Jan-13-2020, 06:16 AM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

I can make no sense of that code. Also, it imports two modules I've never even heard of. At this point, I'm thinking I need to just re-do the functions for the two-color blocks before moving on. Besi...
xBlackHeartx Game Development 11 5,728 Jan-13-2020, 05:06 AM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

Doing that change doesn't fix the issue. Nor does removing the gb=True line in the main loop. What? Did making those global in the main loop mess up something?
xBlackHeartx Game Development 11 5,728 Jan-12-2020, 10:13 PM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

Strangely enough, I already tried to do that after I posted my last comment, but for some reason they won't print, even though the thing is printing the rgb values fine (I did that earlier to make sur...
xBlackHeartx Game Development 11 5,728 Jan-12-2020, 09:51 PM
    Thread: Why do I have an infinite loop?
Post: RE: Why do I have an infinite loop?

Uh, what are you talking about? The drawRG function sets its variable to true on line 104, and that variable is set to global on line 91. In my program, I have those variables set to false if the func...
xBlackHeartx Game Development 11 5,728 Jan-12-2020, 08:37 PM
    Thread: Why do I have an infinite loop?
Post: Why do I have an infinite loop?

I'm developing a program that will simply generate all the possible colors if I restrict the rgb values to multiples of 51. Its working out so far, but right now some of my functions generate an infin...
xBlackHeartx Game Development 11 5,728 Jan-12-2020, 05:53 PM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

As for my self-playing snake program, I just decided to lower the fps to try and fix the rendering issue. Still had the issue. Turns out, there's something wrong with my algorithm that has nothing to ...
xBlackHeartx Game Development 19 8,488 Dec-07-2019, 05:03 AM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

(Dec-06-2019, 10:31 AM)metulburr Wrote: (Dec-06-2019, 03:27 AM)xBlackHeartx Wrote: And by 'next semester', I actually meant next summer. This site really needs to let you edit your own posts so yo...
xBlackHeartx Game Development 19 8,488 Dec-07-2019, 12:03 AM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

A typo? Well, that explains a lot... Either way, this thread has gone way off topic. I want to know if its a good idea to be drawing sprites the way I am. Of course, as I stated, I don't really have ...
xBlackHeartx Game Development 19 8,488 Dec-06-2019, 03:27 AM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

I did try to put everything into one loop, but I haven't been able to get the thing to run (when I press enter at the start screen, it just freezes and I have no clue why). That's why the version I ac...
xBlackHeartx Game Development 19 8,488 Dec-06-2019, 02:53 AM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

Actually, my game doesn't lag anymore. As for the lag part, I found it was because of a list I was using to draw the snake's tail. Every time the snake moves (which is does every second about), it fir...
xBlackHeartx Game Development 19 8,488 Dec-06-2019, 02:04 AM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

(Dec-05-2019, 07:41 PM)nilamo Wrote: I'm on python 3.7.0, pygame 1.9.4. But that shouldn't matter, white wasn't defined anywhere (just doing a ctrl-f on this page verifies that). Oh, whoops. I was a...
xBlackHeartx Game Development 19 8,488 Dec-05-2019, 11:28 PM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

(Dec-05-2019, 06:11 PM)nilamo Wrote: Your code above, as written, does not run. What? How? It runs fine on my computer. Are we running different versions of python? I'm running python 3.6.2 and pyga...
xBlackHeartx Game Development 19 8,488 Dec-05-2019, 06:47 PM
    Thread: I found a way to generate sprites without .blit. Is it effecient?
Post: RE: I found a way to generate sprites without .bli...

Honestly, I'm now wondering if I really should be worried about this when I'm making such primitive games mainly for practice. The only reason I'm considering the system requirements of my games at al...
xBlackHeartx Game Development 19 8,488 Dec-05-2019, 03:23 AM
    Thread: Beginners to share pygame project?
Post: RE: Beginners to share pygame project?

I have yet to figure out how to do menus. For some reason, I keep having issues with getting 'button press' menus to work. Right now my snake game only takes keyboard inputs. Either way, this sounds l...
xBlackHeartx Game Development 4 3,082 Dec-04-2019, 06:42 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020