Subscribe to antshockey's Blog        RSS Feed
-----

Completion

Icon 2 Comments
For the past 3 or 4 months me and my girlfriend (graphic artist) have been working on a very big project.
With this big project i have been progressing very slowly and decided it was time to make something that works, just to keep spirits high.
so we set about on making a simple game. things apear on screen the player goes and eats them. after a few hours of working on this project
we decided we needed a menu so I started to write the menu, the task seemed very daunting because I had never coded one before and
I could only imagine what work needed doing.
So as usual I dived right in, worked tirelessly for a few hours, got a system going with options and going forward and back and everything else you would expect a menu to have. I finished early hours of the morning (Once on a roll and all that).
So I came to the code the next day and I looked at how many lines I had written. 2000.
I thought, "This cant be right." :blink: So i set about finding out why. It turns out i had been writing numerous functions for each choice with stirng variables when really i needed one function and a colour variable.
within 20 mins of realising this I went from 2000 lines to 600. I could not believe it.
Anyway I have decided to write a tutorial on menus in the very near future.
Thanks for reading,
Antshockey

2 Comments On This Entry

Page 1 of 1

Martyr2 Icon

29 October 2009 - 07:39 PM
It happens to the best of us from time to time. But you know, I find it great when I can see shorter more elegant ways of doing something I wrote the night before. It just means I will have less to debug in the future and things will be great for maintenance later on. Be sure to take your breaks though every couple of hours and empty your mind. Come back with a fresh perspective and perhaps you could have realized this short quicker way earlier that same night.

But anyways, great little story. :)
0

antshockey Icon

30 October 2009 - 05:26 AM
I normally do take breaks, or at least have an nhl game on the go or something...
We all live and learn though :)
0
Page 1 of 1

December 2014

S M T W T F S
 123456
78910111213
14151617181920
21 22 2324252627
28293031   

Recent Entries

Recent Comments

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)