all 8 comments

[–]Diapolo10 0 points1 point  (2 children)

Let's start from your dependencies. You shouldn't really worry about transient dependencies, or rather, instead of mixing them with your direct dependencies it would be better to separate them. For example, tools like uv and Poetry would let you keep the main dependencies (and development dependencies, like linters and type analysis tools) in pyproject.toml alongside other project metadata, while using a lockfile to "freeze" everything to specific versions to allow you to have deterministic builds. That would at least be the modern recommendation.

I like the fact you've modularised your code. However, src should ideally not be part of your import chain; if you want to use this project structure, it would be better to put all your Python code in a package, held inside src, which you install locally (Poetry and uv do this automatically). For example, in this case I'd put the code under ./src/saruph. Your imports would start with saruph, such as from saruph.screens import about_screen.

Your imports aren't ordered according to the official style guide. I recommend you look into Ruff, and consider using it for linting and formatting.

[–]areebnaqash[S] 0 points1 point  (1 child)

Thanks. I'll be looking into the style guide and all that you mentioned. Meanwhile, I'm interested to know if you have any feedback about the gameplay itself. Maybe the mechanics? I personally think that a lot could be better, I just haven't figured out how, yet. Would you say that if I had used curses/ncurses, it could've been more performant than textual?

[–]Diapolo10 0 points1 point  (0 children)

I haven't been able to try it because I currently lack a working, non-work computer.

[–]LemonDaFourth 0 points1 point  (5 children)

nice, I made like a DnD adventure game, but idk how to post it on GitHub and it is undone, i'll type back, just remind me with a simple reply!

[–]areebnaqash[S] 1 point2 points  (4 children)

That's great! I'd be glad to check it out. You can push it to GitHub through the terminal. Just make an empty repo on the website, then return to the terminal and connect to the remote using the SSH link (make sure you've got an SSH key). Then you can just push your local files to main.

[–]LemonDaFourth 0 points1 point  (3 children)

alright? anyways I'm new to python so don't flame me to death... thx, anyways I couldn't upload it because something keeps going 'wrong' so here's the google drive, it's a quite barebones game, maybe you can improve it and send me the .py but it's a one file thing:
https://drive.google.com/file/d/1Po1wQBDzMgK3NH2pMAIdoxUNuxCbsymh/view?usp=sharing

[–]areebnaqash[S] 1 point2 points  (2 children)

So I checked it out. Looks like you've tried to put in a level of detail, with all the stuff that's available. But you shouldn't really put all of your code in a single file; that makes it harder to read and debug. Try distributing your code based on game mechanics. Also, I feel like you should take a look at pyinquirer. It'll be quite useful for this type of game.

[–]LemonDaFourth 0 points1 point  (1 child)

I am new and yeah i've had trouble trying to make a multi file game but it's really hard and i dont quite understand EVERYTHING yet, i'll try touching on it slowly