Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411590 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 07, 2024, 04:12:06 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Overall code organisation
Pages: 1 [2]
Print
Author Topic: Overall code organisation  (Read 4175 times)
J.G. Martins
Level 2
**


AKA anvilfolk


View Profile WWW
« Reply #20 on: January 23, 2009, 11:40:56 AM »

I just noticed this link in my favourites that I'd forgotten about.

It explains quite a few design patterns, which seems like a great way to start organizing your code!

I quite liked the State pattern, although I'm not quite so sure it has the expressiveness needed. I mean, you're pretty much stuck with information about your character, period. No accessing much else. Then again, it might be possible that all the information you need can be accessed through your character's sensors, but still.
Logged

Gold is for the mistress -- silver for the maid --
Copper for the craftsman cunning at his trade.
"Good!" cried the Baron, sitting in his hall,
"But iron, cold iron, is the master of them all."
--- Rudyard Kipling
nihilocrat
Level 10
*****


Full of stars.


View Profile WWW
« Reply #21 on: January 23, 2009, 12:44:45 PM »

I quite liked the State pattern, although I'm not quite so sure it has the expressiveness needed. I mean, you're pretty much stuck with information about your character, period. No accessing much else. Then again, it might be possible that all the information you need can be accessed through your character's sensors, but still.

The more you restrict what information can be contained where, and the means by which it can travel, the more predictable you can make your program and thus the easier to work with and less bug-prone. This trade-off is used in lots of programming patterns, as well as the entire functional programming paradigm and any other stateless programming system.
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic