Jump to content

  • Log In with Google      Sign In   
  • Create Account

how to design code


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 Chris F   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 January 2000 - 10:02 PM

I just want to know the best way to design the code for a game? Alot of the time i miss out things that should of gone in the code design and have to recode alot of stuff. Any suggestions. Later.

Sponsor:

#2 Erick   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 January 2000 - 10:39 PM

Well

First of all you need a goal, else you WILL be coding in circles. Have a design document completed so that you will be able to foresee potential obstacles that you may encounter. Know what you want the game to do, and before you start coding, know how you will code it.

Obviously you cannot cater for all issues, but then just integrate seperate modules ( ideas ) to gather a finished product.

Hope this helped a bit

Erick


#3 I-Shaolin   Members   -  Reputation: 138

Like
Likes
Like

Posted 23 January 2000 - 11:15 PM

Have you ever read "Code Complete" by Steve McConnell. This is a must read for any programmer. It''s not a game book, but it can give you an entirely different outlook on programming and software design.

ALso, Erick was right on the money with design documents. You just can''t imagine how much they help until you actually complete one and use it.

#4 MikeD   Members   -  Reputation: 158

Like
Likes
Like

Posted 24 January 2000 - 12:20 AM

I''ve just got to the design treatment stage of my game design. This is only a 4-5 page document outlining the very basics of the game but it amazes me how much it focuses your mind onto what you''re actually trying to achieve.
Try going to the resources section of this sight and searching for design documents in the design section.

#5 Chris F   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 January 2000 - 04:02 AM

Thanks, I''ll place an order for code complete. Later.

#6 Delisk   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 January 2000 - 04:17 AM

Here the best way.

Make plans before you start programing. More your plans are complete (have a good idea on how your engine will work) less chance you forgot something, is something don''t work as you plan (thing always work better on paper) correct your plans.

also try to make a "To do list" ans place the items in order. so you will have a good idea on wath is done. Organization is the key to succes.

#7 mussepigg   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 02:54 AM

Hey Chris..
Delisk is absolutely right about organization. That''s the main thing, since as long as you keep everything well organized so that you have a clear idea about the whole document, you will have no problem writing it. But if it starts to get unorganized and little bit fuzzy it slowly renders to unmaintenable and in the end it''s just too complicated to understand. And then it becomes too difficult to finish it, and usually most people get frustrated and quit doing it.

And when actually writing it, it''s best to first take a broad view and describe everything generally. Not going into any details. General description will later on give you a good view of what you are actually trying to accomplish.
Then you can get a bit more specific and separate different modules for the game and how they interact, and what are their main functionalities. Then when you have this described, you actually have almost half-finished design. Since all you need to do is to go through every functionality for every module you have described, and detail it so that it becomes clear how it should be actually implemented.

But keep each section well separated from each other so that the document is nicely organized.

Well.. Hope this helped. Btw, I have Code Complete too. It''s a very good book, everyone writing complex applications should read it..

#8 Chris F   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 06:17 AM

Hi marko, yeah i just recieved code complete yesterday havent read much though ive got so many books i need to read, thanks for the help, later.

#9 mason   Members   -  Reputation: 128

Like
Likes
Like

Posted 27 January 2000 - 09:25 AM

If you''re serious about doing high-level code design, you might want to investigate a standard called UML (Universal Markup Language). It''s a method of communicating all sorts of detailed designs via drawings (without using code).

UML is used in many professional projects... I''m not sure how many games use it, but where I work it''s very valuable.

Mason McCuskey
Spin Studios - home of Quaternion, 2000 GDC Indie Games Fest Finalist!
www.spin-studios.com

#10 Chris F   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 01:39 PM

Im not serious about high level designI was just wondering what the best way was to design the code for my little projects, thanks, later.

#11 mussepigg   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 11:17 PM

for small games, game design isn''t probably even necessary. you can just think of how to do it, and then do it

with game designs though, one important thing is that you can''t reach your goal before you know what it is.. what i''m saying is that the more clear picture you have about what you''re trying to accomplish, more likely you''re going to get there. but if you''re goal is a little bit fuzzy and you''re not absolutely sure of what direction you should be heading to, then it''s likely that you get lost on the way..

it''s not important to do the design exactly by the book. u know, your goal is not even to make a perfect design. your main goal is to get the game finished and working, and when you''re doing the program design your goal is to get the program working.. so think about things that you need to describe in order to make that happen.

#12 Mr_Black   Members   -  Reputation: 131

Like
Likes
Like

Posted 27 January 2000 - 11:54 PM

I'm doing a Bsc In S/W Engineering and I've used a number of development methodoligies. Now I'm not saying use SSADM, as that wount help much with game development, but I have found some stuff like flow charts useful. Also make sure your data structures are solid. Also if you are using OO well designed classes will prcactically write the program itself (not litrally, I'm affraid I've yet to find the OO gnomes who appear in the middle of the night and write the code for me ). Also I know that you said that you didn't want to use any high level documentation as you projects are too small but it's a whole lot easier to learn how to use tools like flowcharts and stuff properly on smaller programms than with huge programms also it gets you into the habbit of doing it, and gives you chance to create your own 'flavor' of the methodology.

Sorry if that was a little to long winded.

Edited by - Mr_Black on 1/28/00 5:58:14 AM




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS