Mar-13-2020, 04:46 PM
Hello!
Made a game in the genre of rts, space. Ready for 80%. Wrote over 12,000 lines of code. Unfortunately, I did everything with a procedural language, without using classes. Used pure python + PIL.
[attachment=799]
Now I'm starting to get confused in the code, but I still have to do it further))). I want to translate all the graphics into classes, but I don’t know how to distribute them. All the graphics I have done on canvas. In total I used (in the galaxy menu) 4 canvas, the rest of the graphics are made on 2 canvas. I don’t know - how to divide all the graphics into classes? Each button in the game is a new picture and everything in this menu is located. Do classes on the menu buttons? I also have a pixel animation (one ship is one pixel). Ships, fleet - do classes also have to be done? Which parent, which child class?
Questions, questions, questions ...
In the procedural style, everything works great, but I never wrote classes, so I don’t understand how to divide everything into classes. I would be grateful for any help!
p.s. The game is made in Russian, but to make it clear to you - all the menu buttons have been translated into English. Now I am writing a small review on my game - this is a link, but in Russian.
I am almost 50 years old, I am engaged in farming, writing a game in my free time - a hobby. Maybe that's why I take classes in programming hard ...
Made a game in the genre of rts, space. Ready for 80%. Wrote over 12,000 lines of code. Unfortunately, I did everything with a procedural language, without using classes. Used pure python + PIL.
[attachment=799]
Now I'm starting to get confused in the code, but I still have to do it further))). I want to translate all the graphics into classes, but I don’t know how to distribute them. All the graphics I have done on canvas. In total I used (in the galaxy menu) 4 canvas, the rest of the graphics are made on 2 canvas. I don’t know - how to divide all the graphics into classes? Each button in the game is a new picture and everything in this menu is located. Do classes on the menu buttons? I also have a pixel animation (one ship is one pixel). Ships, fleet - do classes also have to be done? Which parent, which child class?
Questions, questions, questions ...
In the procedural style, everything works great, but I never wrote classes, so I don’t understand how to divide everything into classes. I would be grateful for any help!
p.s. The game is made in Russian, but to make it clear to you - all the menu buttons have been translated into English. Now I am writing a small review on my game - this is a link, but in Russian.
I am almost 50 years old, I am engaged in farming, writing a game in my free time - a hobby. Maybe that's why I take classes in programming hard ...