Jump to content
  • Advertisement
Sign in to follow this  
daniel_i_l

Messy code

This topic is 4728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am in the middle of writing a new game and now it is working exactly as I want it to - the problem is that the code is very messy. So far it's taken about 3 months (I don't have a lot of time to program) and I've learned a lot of new things in the mean while. Probably if I started from scratch I could make much better code but then it might take a very long time to finish the game. What do you guys sudgest? Should I just finish this project, experiment with the knew ideas, and start a new one based on the new things I've learned. Or since I'm still in the middle of the project maybe it would be better to implement the better code and start over? Also I have a more general (and urgent) problem, sometimes I really want something to work right, and I don't have a lot of time, so I start to quickly write lots of junky code and in the end I get it to work but... This problem makes all of my code look disorginized, it probably isn't as fast as it could have been, memory problems... Is there any way to fix this problem? Also, are there any tutorials that show how to write good code? I'm self taught and most of my projects endup having tons of files containing classes with long lists of funcs and variables, externs, weird loops, lots of arrays... Could someone Please Help!?!?! Thanks A lot!

Share this post


Link to post
Share on other sites
Advertisement
Also, try using external resources as much as you can so your code doesn't contain a bunch of information that could be loaded from a file.

Share this post


Link to post
Share on other sites
Another angle you might look at is, what impact will reorganizing your code have on the project? What I mean by this is, where is the benefit to the project? Is it going to be something that just adds another road block to completing your project or will it increase productivity? Also, is this code "your eyes only" or something you would like to share with others? If it is just for you, worry about finishing your project. Once complete, you can always clean house later. Just try not to add more obstacles to finishing your project; it is hard enough to follow through as it is.

Just my thoughts.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!