Stetim94 Pokémon Program


#1

@stetim94 wrote a ridiculously awesome game of Pokemon, and it's great. I just wanted to make this topic to talk about it, (he's not on atm but probably will be tomorrow.) I figured that other people might want to test it or talk about it, but I just have stopped personal messaging for now and still wanted to bring attention to the fact that this is the awesomest. :slight_smile:


#2

but the code base still needs fine tuning, i should have used oop which is better practice for tkinter :slight_smile:


#3

I actually liked it a lot. You'll be changing it for a while, but I think it's great that you got the idea and made it happen.
But I generally prefer OOP, just because it seems very complete to me.


#4

i am currently trying to rewrite it to use classes (oop), now i have the code base, this should be fine :slight_smile:


#5

That sounds really good! I'm still going through the other one.


#6

did you ran it and play it? i haven't many any comments to the code, bad practice :stuck_out_tongue:


#7

I haven't run it yet! I will later. :slight_smile: I'm bad about adding comments to mine as well, I only really do it for knowing what brackets I'm closing in Java or JS.


#8

how can you know how awesome it is, if you haven't ran it?


#9

I followed this thread expecting the source to be linked to
So far I'm very disappointed


#10

kyleaw.txt (19.0 KB)

so far, this code requires python3 and tkinter. I am personally not happy with the code base, currently re-writing it.


#11

Would it be cleaner with game logic and graphics being separate from each other?


#12

if i was capable of doing so, yes, but so far, i am happy that it works :stuck_out_tongue:


#13

Do I get to comment on it?

I would:

  • Move the pokemon data and class into its own file.
  • Create a class for their moves
  • Create a method in the pokemon class that takes a move as input and removes a suitable amount of damage, updating its life/status (leave me alone I never played pokemon)
  • Move gui to its own file, providing functionality that accepts pokemons and draws the different views based on that
  • What's remaining would hopefully then be some kind of high-level overview that delegates the details of combat to the pokemon file and the drawing to the gui file. Reading this file would be a quick way to understand how the game plays out

#14

some cool suggestions, i will see what i can do, but it is just for sinterklaas ( a dutch holiday), but some good coding practice would be good for my skill.

make sense, i will implement it.

can you give a small example of how this should be?

this sounds like a brilliant idea, i will most certainly implement this. i think once i implemented the OOP version of this game, this will be a lot easier.

Lets hope so, i will post updated when i have them.

Thank you for taking the time to help me with this :slight_smile:


#15

I think these are really nice suggestions as well. Specifically the first one seemed really smart, because I didn't even realize this was possible until yesterday, (which is crazy.)
The rest of them were really good as well. It really makes the program more professional.

How now?!

That sounds a whole lot like "Santa Claus"

I'm excited to see what you do with it. :slight_smile:


#16

I was looking to make them a little more formal and recognised as significant things in the program, seems more suitable to write move.type than move['type'], the former says things like "this type of value has a couple of attributes that all do different things and those things are significant to the logic of the program"

So it's a style preference. You could totally keep the dicts.


#17

okay, then i will think about it. I will implant the other changes, but first i want OOP, i learned now how to do this in TK. Should be able to finish that today or tomorrow, then i will start on your suggested changes :slight_smile:


#18

hi @stetim94, are you going to let the public have access to the game?
seems fun to me...


#19

It's in a .txt file:
kyleaw.txt (19.0 KB)


#20

i am currently rewriting it it with OOP, there is a text file available with functional programming.