I am a programmer but have just recently ventured into the realm of graphics programming using Python; what I have learned so far is fascinating. It is so thrilling to see a coded design appear on the screen in full color. But, I find, making an image appear is one thing while making that image fully functionable is quite another.

I began a seemingly simple project in Python a couple of months ago. It takes the form of a card-like game (chosen to not only deal with GUI image rendering but with the logic, randomness behind the GUI); initially I had nice results (printing the image to the screen!) but I quickly found that manipulating the image to be rather tricky. I had researched and studied resources (Python, Tkinter, etc) until I literally ran out of resources to read (it seemed). I shelved this project but as of tonight decided to open up and try to finish what I started. I detest unfinished work.

I looked through my files of the build. It makes me have a lot of thoughts on the project and actually areas I may have overlooked and neglected originally.

I assumed that it would be wise to build the GUI before I wrote the actual game logic (the game logic is in my head and in notes-- it would be simple to insert and edit it after the interface was working). I struggled with the GUI for weeks then shelved it.

Is it correct to design and build the GUI before worrying about the functional game logic, or is it better to finish the actual game logic first then build the GUI in accordance (around) it?

I am determined to finish this little project, but I will need some help with the GUI in the near future after I look the current code over carefully.

Thank-you in advance for reading this long post and for any thoughts you may share about this.

sharky_machine

Recommended Answers

All 2 Replies

Depends where you have to learn the most. If you are familiar with the game logic and new to GUI coding, test out the GUI with simple examples that mimic your game. Once that works, flesh out your GUI code with the game logic.

Vegaseat:

Thank-you for both of your replies.

I think the first example works the best for me:


"If you are familiar with the game logic and new to GUI coding, test out the GUI with simple examples that mimic your game."


This is the way I have been doing it.

Thanks again.

sharky_machine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.