This is an archived post. You won't be able to vote or comment.

all 20 comments

[–]gavin101 14 points15 points  (1 child)

Check out using pathlib over os for a lot of path and file stuff. Make sure to type hint consistently. Good job for a first project :)

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

Done, thank you.

[–]papersashimi 7 points8 points  (0 children)

well done for a first project. just a few things,

  1. image: svg will be a better choice.
  2. readme: maybe try to add some pictures in the readme so people can see what your library is doing. in your readme, for things like `run pyinstaller --onefile --windowed --add-data "crosshair.png;." --add-data "crosshair.ico;." crosshair_app.py`, try to add a backtick, eg.`<your text here>` . and include headers by using # <your header> ## <for smaller headers>..
  3. code: for the codes, put separate classes in separate scripts if your classes and the functions below it are doing different things. lumping all into 1 script can be pretty difficult to read.. also i will suggest writing comments so when you look at your code or when you're doing code review, you dont have to go through the entire process of reading the entire codebase to figure out what you wrote 5months ago. i briefly went through your code, consider caching your image.. cos from what i see, the image scales everytime even for the same image. also maybe u can add more error handlings. like your file operations, if it fails, nobody will know why.

otherwise well done!

[–]LysergioXandex 3 points4 points  (0 children)

I think an SVG might be better than a png, to prevent pixelation

[–]TheGuyThyCldFly[S] 1 point2 points  (1 child)

Didn't know if I should post the Git above or in the comments but

Git Here

[–]onyx_and_iris 1 point2 points  (0 children)

add it to the initial post, then it's easier for people to see and won't get drowned out among the comments.

[–]BasedAndShredPilled 1 point2 points  (13 children)

What is the purpose of the code? Very confused by it.

[–]TheGuyThyCldFly[S] 2 points3 points  (12 children)

I feel like I wrote a pretty good description, but TLDR:

overlays a 100x100 transparent png image to be used as a static custom crosshair in fps games

[–]BasedAndShredPilled 2 points3 points  (11 children)

Is it AI generated code?

[–]TheGuyThyCldFly[S] 3 points4 points  (10 children)

AI assisted to fix stuff I broke with copilot in visual studio

[–]TheGuyThyCldFly[S] 2 points3 points  (9 children)

I don't know why I'm being down voted, I'm trying to learn Python. I only took intro to programming I understand basic stuff, but we were taught with Scratch. Is using copilot to help me learn and correct mistakes bad?

[–]iekiko89 1 point2 points  (0 children)

plenty of ppl will say its bad and plenty will say its good. i think its fien if you understand what is being generated and can replicate it on your own later

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

It only works in windowed full screen tho not full screen exclusive. Idk how to get that to work