Suggestion: decouple object names and file names

0 favourites
  • 1 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • I just recently started playing with C2 to see what it can do. I'm using Subversion for source control and noticed that renaming objects like sprites also renames file system folders.

    For example, I added a sprite to a layout with its default name 'Sprite' and added some animation frames to it. I then checked in the entire project to the repository.

    Later I realized that I didn't want to name the sprite 'Sprite' but 'Character' - I made the change but this also changed the name of an already source-controlled folder.

    This, unfortunately, defeats the purpose of source control entirely: I now have an orphaned folder (with subfolders and files) in SVN and I have an entire subtree on disk that's not under source control.

    I'd suggest to add a new XML element PATH that'd describe the file / folder path of an item. For example (excerpt from layout XML):

    <instances>
      <instance type="Sprite" uid="6">
      <font color=blue>[b]<path>C:\project\sprite1\</path>[/b]</font>    
        <properties>
          <initial-visibility>Visible</initial-visibility>
          <initial-animation>Default</initial-animation>
          <initial-frame>0</initial-frame>
    

    The PATH element describes the folder used for the sprite. Animations would have their own PATH element to describe the folder name of each animation.

    If the PATH element is missing, C2 could fall back to the current behavior where the object name is used to form the path. If PATH is present, then that's where the files are, regardless of what the object name is.

    This would solve the problem with source controlled items and old, existing projects would continue to work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)