Welcome, Guest. Please login or register.

Author Topic: PLUGIN: Git Saver  (Read 2734 times)

allisonTopic starter

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1208
  • I make video games sometimes
    • View Profile
    • Alek Fleischer
PLUGIN: Git Saver
« on: May 29, 2016, 12:33:44 PM »
A common practice when collaborating on levels is the revision system: One person works on adding stuff to the level at a time. This system is inefficient for one obvious reason: Developers who don't have the next revision reserved are basically sitting around twiddling their thumbs.

Seemingly the best solution to this problem is using version control software such as git/GitHub to manage merging edits to the level. However, there's one big problem with this solution: Version control software cannot handle merging different edits within a line. VVVVVV level files store tiles and scripts in one massive line each. This makes merging such edits impossible.

In order to solve this, I created "Git Saver", a Ved plugin that adds the ability to save levels in a special ".gggggg" format that introduces line breaks between tiles and script lines and alphabetizes scripts, allowing for effective use of version control on projects! Simply use Ctrl+G to save your level in this new format, then move it from your default levels folder to your repository. (Of course, you can also load .gggggg files by placing them in the levels folder.) Although it was designed for git/GitHub (as the name implies), it should be useful for other types of version control software as well.

Install it by placing the zip in Ved's plugins folder. More detailed usage instructions are available in the plugin description (viewable in Ved).

Get it here!
« Last Edit: May 29, 2016, 02:56:57 PM by crazya02 »

Kiwi Alexia ♡

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1351
  • Wii Homebrew and 3ds CFW is easy.
    • View Profile
    • VVVVVV Resource
Re: PLUGIN: Git Saver
« Reply #1 on: May 29, 2016, 12:44:28 PM »
Speachless.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1590
    • View Profile
Re: PLUGIN: Git Saver
« Reply #2 on: May 29, 2016, 06:29:28 PM »
Nice! :viridian:

Shiny K

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1091
  • 6.28318530717958647692528...
    • View Profile
Re: PLUGIN: Git Saver
« Reply #3 on: May 30, 2016, 01:33:58 PM »

Kiwi Alexia ♡

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1351
  • Wii Homebrew and 3ds CFW is easy.
    • View Profile
    • VVVVVV Resource
Re: PLUGIN: Git Saver
« Reply #4 on: May 30, 2016, 04:10:25 PM »

Shiny K

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1091
  • 6.28318530717958647692528...
    • View Profile
Re: PLUGIN: Git Saver
« Reply #5 on: May 30, 2016, 04:11:30 PM »
xddddddddd

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: PLUGIN: Git Saver
« Reply #6 on: June 8, 2016, 12:38:48 PM »
Thanks, this will prove useful if I get around to working on VVVVVV levels in the future. :)

Kiwi Alexia ♡

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1351
  • Wii Homebrew and 3ds CFW is easy.
    • View Profile
    • VVVVVV Resource
Re: PLUGIN: Git Saver
« Reply #7 on: June 24, 2016, 10:09:56 AM »
Don't use this until crayza provides a new version.
Reasons:
I tried to load Trapped by typing in "Trapped", and it says:
http://prntscr.com/bkjx5w
Next, I get an error trying to save normally.
Finally, from Dav (really minor):
Dav999: I also found a glitch in the compare levels load screen
Dav999: Apparently you can't tab/arrow keys to load a level there
Dav999: Confirmed
Dav999: If you try to tab/arrow to a level, it'll reset the list to all levels and then try to load the first level or whatever you select while the dialog is active
Dav999: Including the .vvvvvv extension, breaking it

The compare levels screen is CTRL + D BTW

allisonTopic starter

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1208
  • I make video games sometimes
    • View Profile
    • Alek Fleischer
Re: PLUGIN: Git Saver
« Reply #8 on: June 24, 2016, 02:57:33 PM »
When loading a level with this plugin installed, you have to specify the extension (so that it can differentiate between the different file types). It looks like the transition to this is incomplete, which causes the other bugs. I'll try to fix it.

f̛̞̺̞͍͍̯̱̜͋͊̚r̸͈̜̝̯̉͂͌̾̿ͯ̚͟͡a̐̍҉͖̖͍̘̹̩Z̥̠͊̋͡0̛͈͔ͧ̀ͫ̍̍ͦ͋̽͋Rͤ

  • tOLP2 Tester
  • Captain
  • *****
  • Posts: 451
  • HITTING A BLOCK FOR 416 YEARS CRASHES fraZ0R?!
    • View Profile
Re: PLUGIN: Git Saver
« Reply #9 on: June 24, 2016, 04:08:50 PM »
Looks good.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1590
    • View Profile
Re: PLUGIN: Git Saver
« Reply #10 on: July 15, 2016, 01:12:39 PM »
Just a heads up, this plugin will break in the upcoming Ved b9 because of some changes, but the fix is easy, this find/replace will need to be done in drawlevelslist instead of main2:

Code: [Select]
{
find = [[state6load(v:sub(1, -8))]],
replace = [[state6load(v:sub(1, -1))]], --Extension is no longer removed
},

allisonTopic starter

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1208
  • I make video games sometimes
    • View Profile
    • Alek Fleischer
Re: PLUGIN: Git Saver
« Reply #11 on: July 15, 2016, 04:12:35 PM »
Just a heads up, this plugin will break in the upcoming Ved b9 because of some changes, but the fix is easy, this find/replace will need to be done in drawlevelslist instead of main2:

Code: [Select]
{
find = [[state6load(v:sub(1, -8))]],
replace = [[state6load(v:sub(1, -1))]], --Extension is no longer removed
},
Thanks for letting me know!

Info Teddy

  • Ultra Captain
  • ********
  • Posts: 3134
    • View Profile
Yes, someone is actually using this seriously, for once.
« Reply #12 on: April 22, 2017, 05:50:06 PM »

Info Teddy

  • Ultra Captain
  • ********
  • Posts: 3134
    • View Profile
Hope upstream will merge these patches.
« Reply #13 on: April 23, 2017, 02:59:38 PM »
So I fixed these plugin errors in my attachment. There’s still the bug of being unable to simply click on level names to open them, but tabbing through and pressing ENTER, or simply typing out their full filenames works just fine.

allisonTopic starter

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1208
  • I make video games sometimes
    • View Profile
    • Alek Fleischer
Re: Hope upstream will merge these patches.
« Reply #14 on: April 23, 2017, 06:28:24 PM »
So I fixed these plugin errors in my attachment. There’s still the bug of being unable to simply click on level names to open them, but tabbing through and pressing ENTER, or simply typing out their full filenames works just fine.
Sorry, I haven't been keeping this updated since nobody seemed to be using it. I merged these into the repository.

M3TR0

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 220
  • And Now
    • View Profile
Re: PLUGIN: Git Saver
« Reply #15 on: April 23, 2017, 06:54:27 PM »
nobody seemed to be using it.
I use it sometimes. I just don't publically declare it.