I tend to use a double-CR between procs and types, single CR's where appropriate within procs, and usually name my variables using the Java-style StudlyCaps technique (occasionally I'll use single capital letters for vars if it's a short proc where the meaning is obvious -- e.g., T for text, M for a mob, etc.). So it ends up looking like this:

mob/player
var/evil = 0


proc/DoSomething(mob/player/otherPlayer)
if(otherPlayer.evil > evil)
world << "Yikes!"
else
world << "I am the EVIL MASTER!"

var/averageEvil = (otherPlayer.evil + evil) / 2
evil = averageEvil
otherPlayer.evil = averageEvil


verb/say(T as text)
world << "[src]: [T]"
In response to Deadron
Deadron wrote:
Kunark wrote:
  • I NEVER EVER use comments in my games;
    In the words of the host of Hollywood Squares when someone makes a dumb move: Maybe that'll work out for you...

    There is one case where this can make sense, though -- namely, if the code is comprised of many brief procedures with useful, descriptive names. In other words, the author can take the position that "if a block of code needs a comment, it should be in a separate proc." If that's the case, then the code is essentially self-commenting (though there will still be cases where it's appropriate to add clarifications).
I don't use brackets. I tend to go leave a blank line whenever I go back a level or more of indentation. Outside of the declaration of variables within procs, I tend to indent rather than use slashes.

The thing that probably stands out the most with my code is that I don't use underscores or mid-word capitalizations. If I have a world-builder proc, it'll get named Worldbuilder(), not World_builder or WorldBuilder.

I can't think of much else. I guess the most distinctive part of my coding isn't in how I code, but in the layout of screen elements and the user interface.

Z
In response to Gughunter
Gughunter wrote:
Deadron wrote:
Kunark wrote:
  • I NEVER EVER use comments in my games;
    In the words of the host of Hollywood Squares when someone makes a dumb move: Maybe that'll work out for you...

    There is one case where this can make sense, though -- namely, if the code is comprised of many brief procedures with useful, descriptive names. In other words, the author can take the position that "if a block of code needs a comment, it should be in a separate proc." If that's the case, then the code is essentially self-commenting (though there will still be cases where it's appropriate to add clarifications).

    This is true but rarely does a game of any complexity not have a larger system that should be explained, as well as the various cases.

    The main point is the idea that "Only I'm going to look at my code so I don't need comments" is a pretty big joke on yourself. When you come back to the code 6 months, a year, 5 years later (which has happened to me), you ARE the other person!
Well, my style is how it goes.

<l>
  • Seperate .dm files for almost every different thing to be done.

    Here are Evolution of Eternitys current files;

    Administration.dm
    Battle System.dm
    Beta Testers.dm
    Equipment.dm
    Mobs.dm
    mygame.dm -- I never knew the name for this project until later on.
    NPCs.dm
    Objects.dm
    Sounds.dm
    SpuzzumAddons.dm -- This is when he was mapping the game, he needed additional scripts.
    Turfs.dm
    Verbs.dm
    World.dm
  • I organise things into their own folders.

    IE;

    .DMI files go into a "DMI" folder.
    Images such as PNGs, BMPs and so on go into the "Images" folder.
    Sounds and musical files go into the "Sounds" folder.
    Text documents like notes and stuff go into a "Text" folder.

    As for .dm files, they stay where they are with the .rsc file and the .dmb file.
  • I often use comments, only on certain things I think I may forget in the future.
    </l>
    That is more or less what type of style I use... I listen to music while programming though, but, I need motivation to start programming, otherwise I cannot program anything.

    --Lee
In response to Lazyboy
Your in college yet you cant even spell it?
In response to Foomer
If his eyes were as bad as mine hed understand white space.
Page: 1 2