3
\$\begingroup\$

While we develop games, then we have utilize several external resources, for example

  • Image
  • Sound
  • Animation
  • Sprite Sheet

Is there any good naming convention regarding these external resources?

\$\endgroup\$
3
  • \$\begingroup\$ Aren't file extensions sufficient? \$\endgroup\$ Oct 3, 2012 at 12:02
  • \$\begingroup\$ @Byte56 Please help me to write the question in currently worded. \$\endgroup\$ Oct 3, 2012 at 15:02
  • \$\begingroup\$ Sorry Mahbubur, I'm not sure how it would be reworded. \$\endgroup\$
    – House
    Oct 3, 2012 at 15:32

3 Answers 3

8
\$\begingroup\$

I have a folder for my sources, i call it src and a folder for assets called assets which looks like:

- Assets
    - Images
    - Sounds
    - Scripts
    - Animations
    - Config (for property files etc.)
    - ... (maybe others regarding the game i'm working on)

EDIT: And regarding naming conventions for those resources

  • Use a period to separate the base file name from the extension in the name of a directory or file.
  • No white space
  • Do not end a file or directory name with a space or a period.
  • For long file name use hyphen(-)
  • Any other character that the target file system does not allow.
\$\endgroup\$
4
  • \$\begingroup\$ +1 for good resource. Can you add naming conventions in your answer? \$\endgroup\$ Oct 3, 2012 at 15:26
  • \$\begingroup\$ @MahbuburRAaman i don't have naming conventions? Not sure to understand what you mean, feel free to edit the answer :-) \$\endgroup\$
    – nathan
    Oct 3, 2012 at 20:49
  • \$\begingroup\$ I mean the Images for example, backgroundimage.jpg or backGroundImage.jpg or background-image.jpg. Naming conventions for images and other external resources. \$\endgroup\$ Oct 4, 2012 at 4:07
  • \$\begingroup\$ Ok. I have edited your answer. \$\endgroup\$ Oct 4, 2012 at 4:17
3
\$\begingroup\$

You can take help from Microsoft's File,Stream,Path and Namespace resources

Also following resource

\$\endgroup\$
1
\$\begingroup\$

I am a fan of object-oriented folder structures.

- Gui
   - HealthBar.png
   - ManaBar.png
   - Layout.xml
- Creatures
  - Elves
    - Elf Sharpshooter
      - Definition.txt
      - Sprite.png
      - Script.as 
    - Elf Fighter
      - Definition.txt
      - Sprite.png
      - Script.as

Make sure that the paths are case-sensitive else you will run into problems with everything not windows.

\$\endgroup\$
1
  • \$\begingroup\$ Well, if you open up 3 files by the name of "Definition.txt", that's a recipe to get confused quickly, because most IDEs/text editors will just display the file name. I like to tell which file is which by just looking at the filename. \$\endgroup\$
    – Liosan
    Oct 4, 2012 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .