Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: What's the term for spacing computer code out?  (Read 1789 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1825
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
What's the term for spacing computer code out?
« on: May 07, 2011, 10:57:14 AM »
0
I heard someone use it in another forum, but forgot what the word was. In other words, say I have the following code:
Code: [Select]
for (i=0;i<10;i+=1){if x/16=i{y+=2;sprite_index=spr_fish;image_index=2;image_yscale=-1;flipped=true;}}What is the term for making it look like this instead:
Code: [Select]
for (i=0;i<10;i+=1)
{
     if x/16=i
     {
          y+=2;
          sprite_index=spr_fish;
          image_index=2;
          image_yscale=-1;
          flipped=true;
     }
}
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Jorge D. Fuentes

  • Boogeymen check under their beds for Julius Belmont.
  • Administrator
  • Master Hunter
  • *****
  • Posts: 15213
  • Gender: Male
  • It will always be Brinstar, dammit!
  • Awards A great musician and composer of various melodies both original and game-based. The Artist: Designs copious amounts of assorted artwork. 2015-03-3D Art Contest GOLD Award SuperOld Dungeonite: Members who have been around since the oldOLD days. ICVD Denizen: Those that dwell in the corrupted, mirror image of The Dungeon.
    • Jorge's DeviantArt Page
    • Awards
  • Favorite Game: Super Castlevania IV (SNES)
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #1 on: May 07, 2011, 11:02:53 AM »
0
Umm... indenting?
That's what comes to mind, but our resident programmers might know more about this.
You must obey Da Rulez!
Jorge's Kickass VG Radio Station Open it in Winamp/MPClassic (broadband connection preferred)
Jorge's Kickass Youtube CV Music Channel
My Personal Minecraft Server (send me your In-Game Name so that I may Whitelist you)

Offline Aridale

  • Master Hunter
  • *****
  • Posts: 4182
  • Gender: Male
  • =D
  • Awards Permanent Resident: Seems to always be around to post/reply. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • Awards
  • Favorite Game: Castlevania II: Simon's Quest (NES)
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #2 on: May 07, 2011, 07:45:14 PM »
0
making it more human readable

Aridale Noblebrook Belmont

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1825
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #3 on: May 07, 2011, 09:49:35 PM »
0
I. Am. Not. Human. But. Some. Day. Humans. May. Want. To. Read. My. Code. So. I. Want. To. Lower. My. Standards. To. Human. Levels.
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline uzo

  • Now then...
  • Master Hunter
  • *****
  • Posts: 3379
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. SuperOld Dungeonite: Members who have been around since the oldOLD days. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud. The Music Fanatic: Listens to a large collection of music, posts lyrics, etc.
    • Skylance Studio
    • Awards
  • Favorite Game: Castlevania: Symphony of the Night (PS1/SS)
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #4 on: May 07, 2011, 09:57:51 PM »
0
Formatting I suppose would be the commonly used term. Though in itself formatting doesn't necessarily mean that style, or using those conventions, but its an accepted use of the word.

A common value convention is using capitals instead of '_'. Also by prefixing the value names with their types. Example;

image_index

would be

intImageIndex

Not sure if Game Maker specified between numbers though. In this case I would use int because it is an integer. Though I myself am guilty of leaving the type off, since I usually can tell by the wording, or looking at the class. In which case the above example gets changed to simply; imageIndex
« Last Edit: May 07, 2011, 10:02:17 PM by uzo »

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1825
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #5 on: May 08, 2011, 09:01:52 AM »
0
They started using integer specifications in GM8. I personally use '_' and capitals both. Like, spr_bat and obj_Bat to specify it's a sprite of a bat (minor code) or the actual object of the Bat (major code).
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Aridale

  • Master Hunter
  • *****
  • Posts: 4182
  • Gender: Male
  • =D
  • Awards Permanent Resident: Seems to always be around to post/reply. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • Awards
  • Favorite Game: Castlevania II: Simon's Quest (NES)
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #6 on: May 08, 2011, 09:18:05 AM »
0
yeah I do that too. I name em for their use like that too like for effect graphics I name em efx_whatever for the objects. For graphics tho its either spr_ or bg_ or ts_

I reminds me I really should work on my lil project today instead of sittin around watchin ncis

Aridale Noblebrook Belmont

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1825
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #7 on: May 09, 2011, 06:06:26 PM »
0
Do both: one line per commercial break.

AND THAT'S WHY THERE'S NO CASTLEVANIA ENGINE v0.02 YET!!
 ;D
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Aridale

  • Master Hunter
  • *****
  • Posts: 4182
  • Gender: Male
  • =D
  • Awards Permanent Resident: Seems to always be around to post/reply. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • Awards
  • Favorite Game: Castlevania II: Simon's Quest (NES)
  • Likes:
Re: What's the term for spacing computer code out?
« Reply #8 on: May 09, 2011, 10:46:22 PM »
0
that would work... if there were commercials...

Aridale Noblebrook Belmont

Tags:
 

anything