Skip to main content
gamedev.net
🔒 Locked

Extensible Programming

Started by logicpill Aug 3, 2002 at 10:02 PM 2 replies 150+ views
Original Post
logicpill
logicpill
I was thinking about my next project, and there are tons of things that I know I''d like to possibly add to it one day. Right now, the project is still just one paper though. Before I begin coding, I''d like to have the design down, so that the game itself and coding for it will be as extensible as possible. Do you guys know any good tips, advice, or resources on extensible coding? KTHXDIE
kuphryn
kuphryn
For games and most applications in C++, you will always your programming is extensible. C++ is extensive.

I am not sure what you want. Are you looking for specific solutions or design ideas?

Kuphryn
Cedric
Cedric
Easy tip: avoid magic numbers and magic types. Make constants for the numbers and typedefs for the type.

Other than that... Code clean. If it''s a tar ball, you''re going to be afraid to go back and extend it.

Use the STL, be a good C++ citizen. It''s hard to give some advice without a specific problem in mind.

Cédric
logicpill
logicpill
Well, the best situation I can think of as an example would be a very dynamic MUD base. I know that most coders of MUD bases make huge efforts in making their bases as extendable as possible.

By a dynamic MUD, I mean things like allowing rooms to move around, allowing people to be put into other peoples backpacks (or even eaten), allowing a room to be in a suitcase, and all the other things that a ''typical'' base would be hard pressed to do. I''ll assume that one of the major goals here is to keep ''special'' coding for certain objects/rooms/characters to a minimum.

So, when they are designing something such as a MUD base, what kinds of techniques and patterns do they use to keep everything in a working, but extendable state?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.