Anarya
said
:
Jack Flac
said
:
Basic data management at first, which was okay. It's what's pythons built for. But I ended up having to force build a game engine with it, which really wasn't fun. The libraries are there, but past a certain point, you're basically fighting with it to get it to do anything.
I don't know. 100-200 lines of code, for something I can write in c++ or c# in just 10-20, I can do it, but it isn't really fun.
Fair enough. Games engines definitely fall in the category of things I wouldn't touch with a 10 foot pole in Python. When runtime is critical, it's probably good to reach for something lower level.
Also, I really, truly, genuinely hate to be that guy, but you might want to look into list comprehensions. You could probably rewrite your spritestrip program into ~15 lines of code if you used them instead of hard-coding all those crops, renames, and loops.
https://docs.python.org/3/tutorial/datastructures.html?highlight=comprehension#list-comprehensions
Yeah, I don't want to really get into it, but having someone who's obviously learning the language for the first time talk about "how many more lines Python takes to do things than other lower level languages" is pretty silly.
Icy Spring
said
:
Don't take this the wrong way, but your code is clearly written by a novice. Duplicated effort (compileRows recomputes work done in makeSprites), two for-loops doing a single task instead of a single for-loop doing two tasks, manually enumerated for-loops (1*width, 2*width, ..., name1, name2, ...), and having your Animation class take a billion arguments seems like an awkward design.
Do you have any C++ code for comparison? Also, it's kinda unfair to make generalizations about a language based on your experience with some random game engine's interface...
compileRows and makeSprites have different functions.
makeSprites is strictly for interacting with the game engine. Ren'py has some odd built in commands you have to incorporate at times to get it to work.
Leader of
The Enemy
||
The opposite of Justice is simply another Justice. What is Evil is subjective to each person.
Puppy Fren
said
:
Anarya
said
:
Jack Flac
said
:
Basic data management at first, which was okay. It's what's pythons built for. But I ended up having to force build a game engine with it, which really wasn't fun. The libraries are there, but past a certain point, you're basically fighting with it to get it to do anything.
I don't know. 100-200 lines of code, for something I can write in c++ or c# in just 10-20, I can do it, but it isn't really fun.
Fair enough. Games engines definitely fall in the category of things I wouldn't touch with a 10 foot pole in Python. When runtime is critical, it's probably good to reach for something lower level.
Also, I really, truly, genuinely hate to be that guy, but you might want to look into list comprehensions. You could probably rewrite your spritestrip program into ~15 lines of code if you used them instead of hard-coding all those crops, renames, and loops.
https://docs.python.org/3/tutorial/datastructures.html?highlight=comprehension#list-comprehensions
Yeah, I don't want to really get into it, but having someone who's obviously learning the language for the first time talk about "how many more lines Python takes to do things than other lower level languages" is pretty silly.
Lets see. I've spent at least two years in python, and nearly a year now in C#. Have also spent the past 3 months with C++.
Leader of
The Enemy
||
The opposite of Justice is simply another Justice. What is Evil is subjective to each person.
Anarya
said
:
Jack Flac
said
:
Basic data management at first, which was okay. It's what's pythons built for. But I ended up having to force build a game engine with it, which really wasn't fun. The libraries are there, but past a certain point, you're basically fighting with it to get it to do anything.
I don't know. 100-200 lines of code, for something I can write in c++ or c# in just 10-20, I can do it, but it isn't really fun.
Fair enough. Games engines definitely fall in the category of things I wouldn't touch with a 10 foot pole in Python. When runtime is critical, it's probably good to reach for something lower level.
Also, I really, truly, genuinely hate to be that guy, but you might want to look into list comprehensions. You could probably rewrite your spritestrip program into ~15 lines of code if you used them instead of hard-coding all those crops, renames, and loops.
https://docs.python.org/3/tutorial/datastructures.html?highlight=comprehension#list-comprehensions
Python 2 versus Python 3.
Leader of
The Enemy
||
The opposite of Justice is simply another Justice. What is Evil is subjective to each person.