Nightly setback

So, I currently have 2 version of my game:

Version 1:

Written like I would've written a C program, this version I mostly worked on yesterday, this version actually works fine, of course there is several things that would need fixes and adjustments, as well as more features

Version 2:

This version is written some sort of OOP fashion, sorta like how I expect a Python program to be written if it was written OOP-style (+ my own touch of failure in terms of my lacking Python knowledge). This version has major issues, mainly because, since I already had a working version from the days before, I pasted a lot of code from my previous version, and that has led to several major bugs, and design flaws.

When I rewrite code, its not as fun to write it the second time, and I get stuck in the mindset that I used when writing my first version, which is bad, and its only 3 days left of the challenge, I will have to start to really work my way through this, it is moderately stressful. So I decided I really do not have a choice, I will have to rewrite my game one more time.

I will be throwing away thousands of lines of code. And start over. Luckily my story and my artwork is there, no change in concept is present.

:(

(log in to comment)

Comments

Wow, I would have kept with the first version. I usually try to avoid any kind of major rewrite during time sensitive competitions like this! Good luck with version 3. Maybe you will luck out and the 3rd rewrite will be clean and you will whip through it and it will solve most of your problems. That does happen occasionally.
Yeah, If I'd been smart I would've done just that :(

Hopefully the 3rd time will do it, if I don't have anything 8 hours after I wake up tomorrow I'll go back to the first version and use the "unpythonic" code :(

Here is a screenshot of my first draft, Ive been sparse in uploading screenshots :P




It's often easier to start with something that runs and change it a bit at a time, rather than a wholesale rewrite.

After PyWeek, you might enjoy the book 'Refactoring' by Martin Fowler. I didn't read it when it first came out, thinking there can't be much interesting content about such a topic. When I finally did read it a couple of years ago, it had a powerful effect on me. Highly recommended.