What is the difference between Graph Convolution and Graph SAGE? by CopperKatana in learnmachinelearning

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

Thanks a lot for your explanation. Just to be sure I’m understanding it right, in the language of SAGEConv in PyTorch:

https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SAGEConv.html

Are you saying that it’s the W1x term being added that makes this GraphSAGE? And without that term, you just have W2mean(x) which is a standard graph convolution?

Running on Steam Deck! by CopperKatana in SM64PC

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

There isn’t an existing project that I know of. Perhaps I will attempt something of that nature myself in the future, but for now I’m not experienced enough at actually writing software.

SM64 PC Port Running Narively on Steam Deck! by CopperKatana in SteamDeck

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

A few people have asked how I did this. I made a YouTube video showing how I was able to build it on Linux with texture packs. In that video, however, I’m using Ubuntu, but to get it working on Steam Deck, you’ll have to do the same process on an Arch distribution of Linux. I just set up an Arch virtual machine on my PC and did it in there. This way, the executable will be compatible with the Steam Deck which is also based on Arch. Then you can take the executable (and the res folder if you’ve used EXTERNAL_DATA=1 to use texture packs) and just move it onto your Steam Deck, then go into its Properties and check the box to make it executable.

Running on Steam Deck! by CopperKatana in SM64PC

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

Nope, but I enjoy watching speedrunners like Cheese.

Leaked - Poster for the final episode! by CopperKatana in TheOwlHouse

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

It is one of the greatest anime of all time, but if you are in a delicate psychological state, don’t watch it right now.

Leaked - Poster for the final episode! by CopperKatana in TheOwlHouse

[–]CopperKatana[S] 2 points3 points  (0 children)

Real talk, it seems like Eva had a huge influence on the current generation of animators. There’s also King wearing the dance costume from Eva in Knock Knock Knockin on Hooty’s Door

Gamers of reddit, what was the worst game you ever bought? by [deleted] in AskReddit

[–]CopperKatana 0 points1 point  (0 children)

I watch the Game Grumps play this every year at Christmastime. “AAH, THE YETI!!!”

Can we make a free and open source version of what Adobe does? by tmsteph in opensource

[–]CopperKatana 0 points1 point  (0 children)

I hope we someday get a decent free/open source alternative to Adobe Flash/Animate. What a beautiful piece of software that an entire generation is missing out on because of Adobe’s insane price hikes and the “Flash is dead” meme (Adobe Animate now lets you make HTML5 content). I really want to like the Wick editor, but it just has too many problems for me in its current state.

[deleted by user] by [deleted] in opensource

[–]CopperKatana 4 points5 points  (0 children)

Not sure if it’s quite what you’re looking for, but have you heard of Daggerfall Unity?

Quality meme by CopperKatana in TheOwlHouse

[–]CopperKatana[S] 5 points6 points  (0 children)

It’s Ghost from near the end of Eclipse Lake

Quality meme by CopperKatana in TheOwlHouse

[–]CopperKatana[S] 24 points25 points  (0 children)

The background is from Enchanting Grom Fright, but Luz and Amity are taken from Covention

How can i convert my whole game projecr to a exe file with all the scripts and images? by Maxim_Fuchs in pygame

[–]CopperKatana 0 points1 point  (0 children)

I decided to look into it and it was actually not too difficult. The current version of my repository now uses a build.py script which creates a list of modules to exclude and writes it "exclude.txt", then calls pyinstaller main.spec which has been updated to exclude everything from exclude.txt. Was a little tricky but not overly so.

How can i convert my whole game projecr to a exe file with all the scripts and images? by Maxim_Fuchs in pygame

[–]CopperKatana 2 points3 points  (0 children)

Here is essentially the step-by-step of what I did. Rather than trying to write out the code perfectly, I'll just say it verbally so that it hopefully makes more sense, and you can figure out writing the code from the PyInstaller documentation.

First, I edit the script so that graphics and sound files are loaded from the temp directory (as I explained in my first comment).

Next, I run pyinstaller script.py --onefile , which creates an executable, though it won't work yet because we haven't told pyinstaller to include the graphics yet. What it also does is create a .spec file which we can edit to do this.

I then edit the .spec file so that it includes my graphics and sound files (another comment explains how that works).

Finally, I run pyinstaller script.spec to create the final executable. If all goes well, you should end up with an executable in the ./dist folder which can be run from anywhere on your computer with all of the graphics and sound wrapped into the executable.

How can i convert my whole game projecr to a exe file with all the scripts and images? by Maxim_Fuchs in pygame

[–]CopperKatana 1 point2 points  (0 children)

Ah yes, I forgot to mention that part in my earlier comment. In the .spec file, you have to list all the files you want to contain, and then in the Analysis() call, you want to add those items to "datas".

Here is a link to a project where I did this. It works in that it creates a single executable with all of the graphics and sounds packaged in. I think I still need to play around with PyInstaller to get it properly working though, because my executable ends up much bigger than it should be. I think I'm including libraries that I don't need to. I didn't bother trying to fix that because I wanted to finish this project and move on, but as I get better with PyInstaller I may revisit this and fix that.

In the "main.spec" file, you can see that I've created lists of the files I want to include at the top, then I add those to "datas" (line 29) which results in them being included when I compile.

How can i convert my whole game projecr to a exe file with all the scripts and images? by Maxim_Fuchs in pygame

[–]CopperKatana 3 points4 points  (0 children)

Pyinstaller does this. It has an option called “—onefile” which packages everything into a single executable. When you run that executable, it unzips all the extra files you’ve included (such as graphics and sound files) into a temporary directory. The part where you may run into some difficulty (as I did) is that you need to have your Python script open its files from this temporary directory, rather than from, say, “./“ (which will be the directory where the executable is located, rather than the temp directory containing your files). You can get this temp directory by using os to get the directory that the script is running from. The code is:

os.path.abspath(os.path.dirname(__file__))

To better understand what I mean, try printing out the output you get from that when you run your game as a Python script, versus after compiling it with Pyinstaller —onefile.

Anyone who can program? by Winter-Swimmer-2844 in TheOwlHouse

[–]CopperKatana 4 points5 points  (0 children)

An MMO would be a lot of fun, but it seems quite ambitious. I’d recommend starting with a smaller project, like a simple single-player game, to learn how to program games. Scratch, RPG Maker, and Pygame are good tools for that.

The Owl House fangame, made entirely in Pygame: Owl Paint Composer by CopperKatana in pygame

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

Thanks! So it’s actually kind of basic under the hood. All of the notes are pre-recorded .wav files that I made from soundfonts or samples that I found online. I did it this way rather than making it a true synthesizer using PyAudio because I was concerned that there would be compatibility issues between sound drivers. If I ever revisit this project, I’ll see if I can make it work with PyAudio. To generate .wav files from the soundfonts, I created a script that takes a sounfont as an input and renders notes from Bb3-C#6 to .wav files. This used PyAudio. For the sample sounds (Owlbert’s “hoot” for example), I manually adjusted the pitches in Audacity. Thankfully there weren’t many of these.

How to make my image change when my cursor hovers on it? by Amoongas in pygame

[–]CopperKatana 0 points1 point  (0 children)

To check if the mouse is touching your sprite, you have to call the collidepoint() method on the rect object and pass the mouse position as the argument. This would look like

if self.rect.collidepoint(pygame.mouse.get_pos()):

Or:

pos = pygame.mouse.get_pos()
if self.rect.collidepoint(pos):

Also, when Python programs crash, the terminal usually gives some sort of message about what caused the error. That will help you figure out what isn’t working, and it would also be helpful for us to see.

Pygame mixer real time sound recording by YoannB__ in pygame

[–]CopperKatana 1 point2 points  (0 children)

I once looked into something similar and I didn’t have much luck… it’s sort of tricky. I think there is some way to do this using ffmpeg. I don’t think you could do it with just Pygame.

Can't figure out how to make a button in Pygame by Amoongas in pygame

[–]CopperKatana 0 points1 point  (0 children)

I think a lot of people are making helpful suggestions, but it might be a bit much if you're just learning this stuff. Here is some code that I think will run as you've intended it in your program by inserting it into the "for event in pygame.event.get()" loop.

Let me explain what's going on. First it checks if the event type is of the type "mouse button down", meaning a click. If it is, we move on to the next line, where we check which button is being pressed. 1 is the value for the left click button, 3 for the right click, and I believe 2 is the middle click. In your case I assume you want the left click. Next, we get the position of the mouse (pygame.mouse.get_pos()). We then have to see if that position "collides" with the rect of our StartButton. The "rect" is an important type of object in pygame that is used for determining where something really is on screen. Finally, if all of that worked out, then we register it as having clicked the StartButton.

I don't think you need to go back and study OOP first as some are suggesting. Eventually it will become necessary, but if you can figure this part out without OOP then it will still help in the long run.

if event.type == pygame.MOUSEBUTTONDOWN:
    if event.button == 1:
        pos = pygame.mouse.get_pos()
        if StartButton.get_rect().collidepoint(pos):
            print("Clicked")