Not sure but i think conda can actually build/ship stuff like c/c++ modules for speed up for critical python code. Example: https://www.pymc.io/ i used for mcmc stuff. Installing on windows without conda is practically impossible.
On linux (or wsl for that matter) if you have gcc or other compilers installed it works via pip with no issue.
I love ASCII/terminal games. The creativity involved with creating a graphical game in something that was only ever meant to display lines of text is super interesting to experience for yourself. This project far surpasses my own personal library for terminal games, well done.
With the Windows terminal stack just now merging Sixel support and good clients available on other platforms quick cross platform but graphically heavy terminal games/apps/hacks could get real interesting soon.
> There is little protections against messing up with the internal. This is on purpose, I want the kids to learn to use the API not mess up with the internals of every single class.
I don’t understand the reasoning; you’d add protections if you wanted them to learn to use the APIs. You’d remove them if you wanted them to mess with the internals of each class.
That's a bad strategy. The reason people are tempted to mess with internals is that it works most of the time. Unless the library has some way of punishing people who use them, then they'll just do it without regard for, as far as they're concerned, arbitrary toothless restrictions. Sure, some stuff will break, but that's true even if they're respecting the API boundary too, especially for a beginner. There will be zero learning about API boundaries in particular.
I think it's fine to encourage beginners to engage with the internals of an API and do things that are unwise. The goal is educated pupils, not successful or maintainable projects. Let them play in the mud and get dirty. I think the idea that code is something that can be experimented with is one of the most valuable lessons, and breaking things is frequently the path to learning how they work.
Maintainability is one of the finer points that can come later.
Games are notorious for vendoring a dependency and never upgrading it again. If you use an internal API, it is not like you are forced to be on the upgrade treadmill where the sands suddenly shifted and the secret API does something different.
They mean that their code is written with strong assumption everything is written the way it is. If you make modifications to the internal or push an unexpexted type in it, they expected it to fail. There's no guardrail that everything is in a right state.. well, standard internal code.
If pygamelib interests you, you might also be interested in Pyxel:
https://github.com/kitao/pyxel
+1 for Pyxel, recently used it for a couple of hours to create a tiny project [1] and loved how intuitive it was.
[1] https://github.com/abhishekbasu/minesweeper
This is very cool!
As an aside, I find it frustrating how different Python packaged want to be installed in different ways. Pip this, conda that, and now… pipx?
I worry about how all these systems will interact and conflict.
In by far most cases you can still find the package on pypi.org and install it through pip.
pipx is not a different packaging system. It uses pip.
Conda is mostly used by data science people for some reason.
Not sure but i think conda can actually build/ship stuff like c/c++ modules for speed up for critical python code. Example: https://www.pymc.io/ i used for mcmc stuff. Installing on windows without conda is practically impossible. On linux (or wsl for that matter) if you have gcc or other compilers installed it works via pip with no issue.
I love ASCII/terminal games. The creativity involved with creating a graphical game in something that was only ever meant to display lines of text is super interesting to experience for yourself. This project far surpasses my own personal library for terminal games, well done.
With the Windows terminal stack just now merging Sixel support and good clients available on other platforms quick cross platform but graphically heavy terminal games/apps/hacks could get real interesting soon.
MS-DOS games revival, I guess.
There are also a handful of 3d terminal/ASCII engines out there like this one: https://github.com/sephirot47/AsciiEngine
Arguably less useful than something like pygamelib, but still pretty fun.
If you don't want people to use the internals, why not make them `__private`?
Cool project!
> There is little protections against messing up with the internal. This is on purpose, I want the kids to learn to use the API not mess up with the internals of every single class.
I don’t understand the reasoning; you’d add protections if you wanted them to learn to use the APIs. You’d remove them if you wanted them to mess with the internals of each class.
They want people to learn not to mess things up. You learn not to mess up by trying things out and messing up.
That's a bad strategy. The reason people are tempted to mess with internals is that it works most of the time. Unless the library has some way of punishing people who use them, then they'll just do it without regard for, as far as they're concerned, arbitrary toothless restrictions. Sure, some stuff will break, but that's true even if they're respecting the API boundary too, especially for a beginner. There will be zero learning about API boundaries in particular.
I think it's fine to encourage beginners to engage with the internals of an API and do things that are unwise. The goal is educated pupils, not successful or maintainable projects. Let them play in the mud and get dirty. I think the idea that code is something that can be experimented with is one of the most valuable lessons, and breaking things is frequently the path to learning how they work.
Maintainability is one of the finer points that can come later.
Games are notorious for vendoring a dependency and never upgrading it again. If you use an internal API, it is not like you are forced to be on the upgrade treadmill where the sands suddenly shifted and the secret API does something different.
Oh, certainly. That's much more reasonable than what this project claims to be trying. :)
Yeah, you learn valuable lessons like “don’t mess with the code this guy makes, he puts traps on it”
They mean that their code is written with strong assumption everything is written the way it is. If you make modifications to the internal or push an unexpexted type in it, they expected it to fail. There's no guardrail that everything is in a right state.. well, standard internal code.
"I left this shotgun here, kids need to learn that shooting yourself in the foot really hurts."
This is parenting 101 for anything non-permanent. For a piece of software it's basically common sense.