News for hackers. Stuff that matters.
Re:Show HN: I wrote my own RTS game engine in C by hermitdev on Wednesday May 12, 2021 @02:39PM (#27133642)
One question I have (and please don't take this as criticism or judgement, it's purely curiosity): why Python 2 and not Python 3? Was it because of when you started working on this, or were there some architectural/design issues that prevented use of Python 3?
Re:Show HN: I wrote my own RTS game engine in C by epermyakov on Wednesday May 12, 2021 @03:39PM (#27134304)
Eh, I don't have a great justification why Python 2 should be used over Python 3. I made this choice like 3 years ago when I didn't know too much about Python. That's it. Since I wrote some code against the C API of the interpreter and made a whole bunch of scripts already, it's a massive chore to migrate. Classic story, I know. If I were to start a similar project today, I would attempt to use Python 3 first.

That being said, I did come across some discussions (ex: https://stackoverflow.com/questions/34724057/embed-python3-w...) where it is not possible to strip the standard library from Python 3. I think the use case of embedding strictly the interpreter without any "batteries" is not popular and thus has not been that well-maintained. I've not tested this in practice, however.

Re:Show HN: I wrote my own RTS game engine in C by hermitdev on Wednesday May 12, 2021 @05:44PM (#27135524)
Cool. Thanks for the response. It's definitely an interesting project. As a long-time RTS fan, I'll be following this project closely. I hope to have some time soon to come back and give it a more thorough read.
Re:Show HN: I wrote my own RTS game engine in C by Scarbutt on Wednesday May 12, 2021 @03:52PM (#27134403)
Shifting attention to keep every lib updated is a distraction from getting things done.
Re:Show HN: I wrote my own RTS game engine in C by nattaylor on Wednesday May 12, 2021 @03:20PM (#27134109)
I was curious about this too and looked around a bit. I see he has to do some inspection of python interpreter -- so maybe that, coupled with demos already within in python2 are enough inertia to stay back on version 2.