Sometimes its Just Necessary to Delete It and Retry
Author: | RapidFlash
|
Submitted: | 5th March, 2003
|
Views: | 4928
| Rated: |
|
|
Does this describe you: someone who will always tweak your current code and never delete it and retry? Is it because you think you just need one more line to fix it? Or is it because you're sure your code is right, just that K&P/TGF/CnC/MMFE/MMF is screwing it up? Well, if you are one of these people, keep on reading.
Most of the time, it is best to tweak your code and not delete it. A lot of times it does need only one event just to fix it. However, sometimes, no matter how much you try to fix it, it just keeps causing errors. Well, I have a solution for you: Remember how you're trying to reach the goal, then delete the code and try with a different method.
Now you just might be wondering, "Why does it matter how to know how to reach the goal?" Well, simple. For instance, I may try to create an event that makes the object spin halfway, but if I have no idea what needs to be done to cause that, you just might as well ask for help or not do that. But if you know, "Well, I'll have to change the direction, so I'll need to add/subtract # or # to make it spin etc. etc.", it will be a lot easier to see what's wrong and how to approach it again.
But why try a different method instead of continually modifying your code? Well, a couple reasons:
#1: When you try to correct your code, you usually add a bunch of lines in the process trying to counter the bugs. This creates a messy enviroment and a difficulty in understand what each thing does and what each thing has in it. Clearing the code with clear your mind and allow new ideas to pop up.
#2: Sometimes your method plain isn't right and will never work, and trying to tweak it won't slove problems. You need to clearly try a different why of performing that task. Deleting the code will get you out of your "only this method" state of mind and allow for new opportunities.
Now for a larger scale, what if your level just doesn't work? What if it has almost the exact same coding as another level, but for some reason just doesn't work right (this happens especially in TGF, but I've had it once in Multimedia Fusion)? Well, you don't want all that hard work to go to waste (dropping off motivation in the process), but you also want that level to work. What do you do? Well, it's easy. Just do the following steps:
#1: In the frame editor, press "Print Screen" to take a snapshot of your area.
#2: Paste the snapshot in paint or any other graphics editing program.
#3: Save it as a picture file (best to name it by its level name)
#4: Copy another similar level as level x (the one that didn't work).
#5: Rearrange the objects so it looks almost exactly like the old level x (you may have to do new graphics and such, but you can copy that from your picture. And if you're sure you can't draw the animation again (for one level enemies), just take snapshots of each frame of the animation before deleting the level).
#6: Most of the code should already be there because you reused a level (VERY VERY VERY useful in saving time and motivation). Add in the bits of code you don't have.
#7: TADA! You're level is complete, and 99% of the times it will not have the crazy bug that only appeared in that level.
This will hopefully help you later during your time klikking. I hoped you learned something useful. Klik out.
|
|
RapidFlashSavior of the Universe Registered 14/05/2002
Points 2712
|