I had an amazing epiphany (sp?) last night. My number one hinderance in making a game with AGS is my increasing knowledge. I know that may sound crazy, but the fact is, I don't know everything about AGS and I certainly don't know everything about programming.
So basically, the problem is, I'm still learning, and when I learn something new, I look and my scripts and realize, they work, but:
1. They are very sloppily coded.
2. There is a more productive/efficient way of completing the same task.
So, to fix the problems, I start over re-writing the same code. If I find a problem that I really can't figure out, I won't look at it for about a week, and then by that time I'll have learned a new way of looking at the problem.
You wouldn't believe the number of times this has happened, and it will almost definitely happen again. So, I guess I'm writing this to ask, does anyone else feel the same hinderance posed by their increasing knowledge? Or am I just completely insane?
[probably the latter]
haha, yeah...
same thing with me, only it's with the plot and the graphics instead of with the programming
with the coding, just try to stay modular...so that when you change things, you don't have to start all over.
:D Well the problem is that I usually see how much crap I have written and am amazed that it actually works, and then realize that I have to recode several parts to do something else, and I usually find it easier just to start over... ::) I know how you feel about the plot though because back in the seventh grade I decided I was going to write a book. It never got anywhere, pretty much for the same reasons. My writing style has evolved a lot over the past four years... I understand completely how you can write something, think it's good, then come back and look at it the next day and want to tear it to shreds...
well, just try to break problems down into smaller problems and write functions for them
that way when you want to change something, you usually only need to change a couple functions...and all you have to do is make sure that the pre and post conditions are satisfied and you know the entire program will still work from this change
if you notice any of your functions are getting longer than about 15 lines of code, you probably should be using more functions
Quote from: stuh505 on Sun 22/05/2005 03:24:45if you notice any of your functions are getting longer than about 15 lines of code, you probably should be using more functions
Hah! Well for code that is only executed once per function call creating a separate function wouldn't make much sense. And a lot of times I re-use leftover variables (use the same variable for indexes and things). It's a nice suggestion but if the code would only be executed from the function in question creating a new function wouldn't necessarily be the best option. At least IMO.