I am coding my first game in c ce (that does anything useful) and im very excited. Its going to be a command prompt type game, (ect. type help and get a list of commands) it will be a game where you have to try and keep a civilization alive with only chat commands. I have some ideas and I hope if I finish it you will play it!

All comments, suggestions and questions are welcome as are optimizations, keep in mind this is a work in progress.

Link to code: https://github.com/Codingguyy/Chatpopulation
You should start with the following points:

1) Always make your code readable. This is done by being consistent; do not mix tabs and spaces; use consistent indenting and variable/function naming/capitialization.
2) Don't use globals. These are variables that exist outside functions. Don't use them until you know when to use them at the very least.
3) Keep functions under 100 lines if possible.
4) Separate code into different files. For example, graphics routines in one file, input routines in another, file input and output in another, etc.
5) The first include in your source files should be the corresponding header that goes with that file. Additionally, only include headers where they are used -- you should not be including *all* the headers everywhere, just the ones needed to compile the particular file.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement