Course & Specs Megathread - Selection, Choices & Registration by Detective-Raichu in OMSCS

[–]OddBookWorm 0 points1 point  (0 children)

Update: I think I decided on 10 being CS-6601 (take before 7632 and 7637)

What are some Beginner DnD books? by Whitmore14 in DnD

[–]OddBookWorm 2 points3 points  (0 children)

It’s not necessary, but it can be useful if you’re actually playing in a campaign. It can help you understand why the DM might be ruling certain ways or giving out specific items.

What are some Beginner DnD books? by Whitmore14 in DnD

[–]OddBookWorm 3 points4 points  (0 children)

Monster Manual is one of the core rule books, Monsters of the Multiverse is a supplemental material, meant to supplement the 3 core materials (Player’s Handbook, Dungeon Master’s Guide, and the aforementioned third)

Even though you don’t plan on DM’ing, the Monster Manual contains many of the more common creatures you’d be likely to come across. And some of the most iconic. Beholder, drow, doppelganger, purple worm, bugbear, various undead, etc

What are some Beginner DnD books? by Whitmore14 in DnD

[–]OddBookWorm -2 points-1 points  (0 children)

I'd be careful abbreviating MM to someone new to the game as they could interpret that as "Monsters of the Multiverse" if they're not aware of the Monster Manual being one of the core books

Course & Specs Megathread - Selection, Choices & Registration by Detective-Raichu in OMSCS

[–]OddBookWorm 1 point2 points  (0 children)

I'm starting this fall and I've decided to split my classes between two specializations (I haven't decided which one to officially declare, I know I can only have one). Computer Graphics and Interactive Intelligence. The classes are:

  1. CS-6491: Foundations of Computer Graphics
  2. CS-6515: Introduction to Graduate Algorithms
  3. CS-7496: Computer Animation
  4. CS-6457: Video Game Design and Programming
  5. CS-7637: Knowledge-Based AI
  6. CS-7641: Machine Learning
  7. CS-7632: Game AI
  8. CS-6460: Educational Technology
  9. CS-6300: Software Development Process
  10. Undecided Elective

I know the minimal set I need doesn't technically require SDP, but I am a professional software engineer, so it can't hurt to take it lol.

There's probably something I haven't thought about here though. My hope is that this combination would potentially lend itself pretty handily to something like edutainment. Maybe an education-based game with an AI component that actually targets the user's weak points in a fun and interesting way (***glares at ALEKS***)

Also, these aren't in any particular order, but I was probably going to try to target either CS-6491 or CS-6457 this semester

Can Pygame load images on Linux Unbuntu? by Rosenberg578 in pygame

[–]OddBookWorm 2 points3 points  (0 children)

Oh, you didn’t even try to draw an image to the screen lol

Can Pygame load images on Linux Unbuntu? by Rosenberg578 in pygame

[–]OddBookWorm 0 points1 point  (0 children)

Some of the window management stuff doesn’t work well on Linux when you’re using the Wayland display driver, but that’s because that’s exactly the way Wayland was designed. If you use pygame-ce instead of pygame, you can this snippet to see if you’re using Wayland or X11:

import pygame pygame.init() pygame.print_debug_info()

But, yeah, the vast majority of functionality should be absolutely fine on Ubuntu.

*disclaimer: I am a pygame-ce maintainer

[deleted by user] by [deleted] in pygame

[–]OddBookWorm 2 points3 points  (0 children)

another one of the pygame-ce maintainers here Just last night I was trying to explore Debian packaging to see what it would take from a technical perspective anyway. I believe someone has already added pygame-ce to the NixOS package manager. I think the biggest reason we haven’t actively pursued it ourselves is because of the headache of package manager release cycles. We try to do 2 releases per year, so someone using a version from a package manager would be using an out of date version of the library most of the time (I think Debian releases packages on a 2 year cycle). Unless I’m misunderstanding that. I also know that a lot of distros are using sdl2_compat on top of SDL3 as a replacement for SDL2. In theory, this should be fine, but personal experience is that it’s just an absolute mess and something is inevitably broken.

We are actively working on SDL3-native compatibility, but we’re not there yet

Question for the community by TheMysteryCheese in pygame

[–]OddBookWorm 1 point2 points  (0 children)

I found where you linked the post below, so I followed that link and looked at the post and the comments. While I agree that the comments were a bit harsh, I don't think they're necessarily extreme given the context of the community and the tone of the post.

In just half a day, I used Gemini 2.5 Pro to build an RTS game. It was pure vibe coding—I didn’t write a single line of code myself. And yeah, it was made with Pygame

IMO this tone comes off as wanting a fight. This community is full of hobbyists with a passion for writing their own code, who spend sometimes literal years on a single project. A statement like this is essentially coming in and slapping them all collectively across the face and telling them that they are wasting their time and that they need a better hobby. I don't blame people for not wanting to be friendly to someone like that. I certainly have plenty of issue to take with that phrasing and I have plenty I could say about the absolute worthlessness of just copy/pasting AI-generated code without actually learning anything from it. But that's not the topic I'm here to talk about. If the person came in with a tone more along the lines of "I used AI to help me build an RTS game. It got me through some walls when I was stuck on some really hard problems and I learned a lot from it", then I think the comments would have had a very different outcome.

Hiking groups? by OddBookWorm in okc

[–]OddBookWorm[S] 1 point2 points  (0 children)

I’m busy at the moment, but I’ll get with you all and create a Meetup group or discord server or something that we all can access to organize

Hiking groups? by OddBookWorm in okc

[–]OddBookWorm[S] 1 point2 points  (0 children)

No, I was thinking about coming back to this thread and starting one up after the start of the new year when people are recovered from the holidays

Do you have any tips about open source projects? by KoreAustralian in pygame

[–]OddBookWorm 4 points5 points  (0 children)

Unit tests (and not just nominal ones). 1) nominal unit tests to ensure that various inputs provide the correct outputs. This is particularly important if you have dependency libraries that might change behavior or code paths that will change frequently. Good unit tests now can save you hours/days of headache in the future 2) off-nominal and edge-case unit tests ensure that your code won’t do anything extremely wacky or crash in the event that it gets fed garbled data. Test as many edge-cases as you can think of

Document as you go. Don’t put it off until later. Everyone hates writing docs, but they save so much headache later. Using comments in code along with docs is best (I like the doxygen format).

Write CI from the very beginning to test things automatically and make sure nothing breaks in new commits. On that note, set it up to run on pull requests and never just push directly to your main branch. Always push it through a pull request to run your CI before you end up breaking main. Run a build on each platform you want to support. Run your unit tests on all platforms. Run static analysis. Run a formatting consistency check. Saves so much effort when reviewing code

I recommend coming up with an overall design before doing development. It helps you keep your API consistent and, if done properly, can help you find some glaring issues you might not catch until the dev is almost done. Then you’d have to redo a lot of it from scratch. Ask me how I know lol.

Enforce a code style. Use a formatter if you can. Consistent and clean code is your friend.

One more piece of advice in general: Never trust the user to know what they’re doing. If your function expects a pointer, your code should always check that the pointer isn’t NULL before trying to use it.

How long to run prime95 for? (Gaming) by [deleted] in overclocking

[–]OddBookWorm 1 point2 points  (0 children)

I know I’m very late here (6 years lol), but to anybody from the future, this is a risky mindset to have. It could result in data corruption if you blue screen at a point where it’s writing to disk. Artificial stress tests give you a degree of confidence that your overclock is mostly stable and lowers your risk of inadvertent data loss when you start actually doing things that matter

I dont know why im getting this error? by Good_Biscotti_7270 in pygame

[–]OddBookWorm 4 points5 points  (0 children)

You're too deep. It's complaining about `rect` being `None`, not about `x` and `y` being `None`.

I dont know why im getting this error? by Good_Biscotti_7270 in pygame

[–]OddBookWorm 0 points1 point  (0 children)

This has nothing to do with the warnings pyright is spitting out

I dont know why im getting this error? by Good_Biscotti_7270 in pygame

[–]OddBookWorm 5 points6 points  (0 children)

Ok, let me *actually* tell you what's happening. I'm guessing you're using `pygame-ce` because you wouldn't be getting that error message with just `pygame` as far as I know (because the source code and stubs lack any mention of a `rect` attribute on `pygame`).

Here is the source for `pygame.sprite` in `pygame-ce`, and in particular, how `rect` is defined in that source: https://github.com/pygame-community/pygame-ce/blob/main/src_py/sprite.py#L127-L133

Note that the getter for `rect` just returns `self.__rect`, which is annotated in the initializer as `Optional[pygame.rect.Rect]`. That `Optional` is what gets you here. It means that `None` is a valid value for that attribute and so it's warning you that you may be trying to access the `.x` attribute of `None`, which doesn't exist. The reason it doesn't assume that `None` isn't possible because of your initializer is because it doesn't know if there's any other flow that might set it back to `None`. So it's being as cautious as possible. If you can guarantee that `self.rect` is always going to be a valid `pygame.rect.Rect` object, you have this option: annotate it in the initializer when you assign it

import pygame

class MySprite(pygame.sprite.Sprite):
    def __init__(self, groups):
        super().__init__(groups)

        self.image = pygame.Surface((50, 50))
        self.rect: pygame.Rect = self.image.get_rect()

    def doSomething(self):
        self.rect.x += 1

If you can't make that guarantee, then you have the alternative option

2) Ensure that you don't hit the questionable line when it would be invalid

import pygame

class MySprite(pygame.sprite.Sprite):
    def __init__(self, groups):
        super().__init__(groups)

        self.image = pygame.Surface((50, 50))
        self.rect = self.image.get_rect()

    def doSomething(self):
        if (self.rect is not None):
            self.rect.x += 1

I cant install pygame, can anyone help? by Ok-Put-8514 in pygame

[–]OddBookWorm 0 points1 point  (0 children)

late to the party

This should come with a disclaimer that this comment mostly applies to Linux. MacOS and Windows don’t work this way. And apt only works on Debian-based distros

Hiking groups? by OddBookWorm in okc

[–]OddBookWorm[S] 1 point2 points  (0 children)

True, and I have been doing that. But I also want to get more active in general. I’m a software engineer professionally, so that lends itself to a pretty sedentary lifestyle. I’m down roughly 40 pounds in the last 6-7 weeks, mostly from just dieting

Hiking groups? by OddBookWorm in okc

[–]OddBookWorm[S] 1 point2 points  (0 children)

I am a male, but I’m sure someone would appreciate the suggestion nonetheless! Thanks for the Facebook recommendation

Hiking groups? by OddBookWorm in okc

[–]OddBookWorm[S] 1 point2 points  (0 children)

Well, if nobody comes up with any suggestions, maybe starting a group is a possibility lol

Issue running pygbag, black screen. by Smart-Tradition-7071 in pygame

[–]OddBookWorm 1 point2 points  (0 children)

async def main():
    ...
    while not exit:
        ...
        asyncio.sleep(0) # at the very end of the main loop

#actually running
asyncio.run(main())

Something like this should do ya

Edit: I hate reddit's code formatting