Adam's Lair Forum

game development and casual madness
It is currently 2019/09/15, 22:10

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 2015/04/02, 23:26 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
After reading a post by Adam on using SVN to keep some sort of souce control of your games, I decided to go full in it and create this plugin that would make it easy for users.

What is it?
It is a plugin that turns your current Duality game directory into a Git repository. At every editor reload, your progress is saved and then committed.

If you need to revert changes you've made, just navigate to the game directory, find the commit you want to revert to using git log, and then reset to it using git reset --hard commit-id.

It also supports custom authors, all you need to do is go to Git -> Settings.
Image


Plugin Info

Any feedback is appreciated! Found any bugs? Just tell me!

_________________
I only know the basics of C#. I have no advanced knowledge.


Last edited by RockyTV on 2015/12/28, 18:23, edited 3 times in total.

Top
 Profile  
 
PostPosted: 2015/04/03, 17:40 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
This is kind of neat - you're getting better at this stuff ;) There's definitely room for improvement and I haven't really tested this thoroughly at all (just a quick glimpse), but I'll try to give some feedback from my first impression:

  • You definitely need to allow users to specify when to commit. Auto-commit is generally not a good thing, because it makes each commit more random and less meaningful. I usually commit after I've implemented a feature or fixed a bug - not whenever I save my project or close it.
  • You definitely need to .gitignore certain files and folders by default:
    • Source/Packages
    • Source/Code/.../bin (Any folder in Source/Code that is named bin)
    • Source/Code/.../obj (See above)
    • Backup
    • In general, every file that belongs to a Duality package, because they will be auto-installed anyway. The ones that area really needed are the ones you get when extracting that .zip file of a fresh Duality download. I don't really have a great idea on how to do this perfectly, but maybe just provide a solid default and allow users to customize?
  • Well done: Nice package icon, and in-editor window icon. It's not something you can't do without, but it certainly improves how users perceive your plugin!
  • The Settings window doesn't really react to being resized. Not important, but seems a bit sloppy. Users notice that kind of stuff without noticing it.
  • Proper tags and dependencies in the NuGet package - easy to forget, but it seems like you've got it right the first time. ^^
  • Maybe you could somehow get the file status of Resources from that Git library and allow the user to see in an extra window which files have been changed since the last commit? And maybe allow to revert or ignore some of them before committing? I guess that belongs to the first point of letting the user decide when to commit - could be the same dialog!

All in all, there could be a lot of potential in this - and although I'm a bit skeptical about using Git for game assets (you know.. big binaries and all that), experimenting with version control integration can't hurt. One thing you should also keep in mind is: What exactly will be the scope of your plugin? What will it provide that an external Git client like SourceTree won't? And what will it explicitly not provide, because it's none if its business?

  • Lightweight utility for more artsy and less technical developers / an "easy mode" for simple Git commit workflow?
  • A full-fledged Git UI?
  • A minimal, but specialized Git UI that knows what exactly Duality needs in version control? That shows version control status directly in the editor?
  • Something else?

Anyway - looking forward to seeing how things will evolve from there :)

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/04/03, 18:59 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Adam wrote:
This is kind of neat - you're getting better at this stuff ;) There's definitely room for improvement and I haven't really tested this thoroughly at all (just a quick glimpse), but I'll try to give some feedback from my first impression:

  • You definitely need to allow users to specify when to commit. Auto-commit is generally not a good thing, because it makes each commit more random and less meaningful. I usually commit after I've implemented a feature or fixed a bug - not whenever I save my project or close it.
  • You definitely need to .gitignore certain files and folders by default:
    • Source/Packages
    • Source/Code/.../bin (Any folder in Source/Code that is named bin)
    • Source/Code/.../obj (See above)
    • Backup
    • In general, every file that belongs to a Duality package, because they will be auto-installed anyway. The ones that area really needed are the ones you get when extracting that .zip file of a fresh Duality download. I don't really have a great idea on how to do this perfectly, but maybe just provide a solid default and allow users to customize?
  • Well done: Nice package icon, and in-editor window icon. It's not something you can't do without, but it certainly improves how users perceive your plugin!
  • The Settings window doesn't really react to being resized. Not important, but seems a bit sloppy. Users notice that kind of stuff without noticing it.
  • Proper tags and dependencies in the NuGet package - easy to forget, but it seems like you've got it right the first time. ^^
  • Maybe you could somehow get the file status of Resources from that Git library and allow the user to see in an extra window which files have been changed since the last commit? And maybe allow to revert or ignore some of them before committing? I guess that belongs to the first point of letting the user decide when to commit - could be the same dialog!

All in all, there could be a lot of potential in this - and although I'm a bit skeptical about using Git for game assets (you know.. big binaries and all that), experimenting with version control integration can't hurt. One thing you should also keep in mind is: What exactly will be the scope of your plugin? What will it provide that an external Git client like SourceTree won't? And what will it explicitly not provide, because it's none if its business?

  • Lightweight utility for more artsy and less technical developers / an "easy mode" for simple Git commit workflow?
  • A full-fledged Git UI?
  • A minimal, but specialized Git UI that knows what exactly Duality needs in version control? That shows version control status directly in the editor?
  • Something else?

Anyway - looking forward to seeing how things will evolve from there :)


Thanks for the feedback!

Allow users to specify when to commit is already in the plans. I just have to get a quick sketch done then I'll add it. And instead of the default "Editor reload, saving repository" commit message, I'll look onto adding the changed files into the commit message, so it's more informative.

Now, I have a question: is the .pdb file required? Or not? I added it to my .nuspec file, but nuget didn't package it.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/04/03, 19:08 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
RockyTV wrote:
Now, I have a question: is the .pdb file required? Or not? I added it to my .nuspec file, but nuget didn't package it.


You mean, are you required to add the .pdb file to your Duality package? Nope. :) It doesn't contain any vital information. However, in case something crashes, the .pdb file will allow Duality to provide more detailed error information that will help you to track down the problem.

Think of it as an optional part of your release.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/04/03, 23:19 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Version 0.0.2 was released!
Code:
[Additions]
- Create a .gitignore file when the repository is initialized. This .gitignore file is formatted and commented.
 
[Tweaks]
- Renamed GitSettings form to SettingsWindow.
- The plugin will now only commit when something has been altered, and include the reason it has been altered in the commit message.
- The Settings form controls will now resize according to the form.
 
[Fixes]
- Fixed a bug where the plugin would crash on load if the current working directory wasn't found.
- Fixed a bug where the plugin would crash if no changes were made.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/04/10, 00:07 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Version 0.0.3 was released!

I was thinking about how Duality handles the editing of the AppData and DefaultUserData files, and then I found it out. I decided to implement that "usage" on my plugin, because I thought that having an empty window containing controls to only change some less, but not least, important data was useless.

I also decided to allow users to specify when they want their changes to be committed. It's still WIP, the Manual option needs to be done. It basically works like the autosave works.

Code:
- Cleaned the code a bit.
- Allow users to specify when they want to commit their changes.
- Completely removed the SettingsWindow form.
- Settings editor now uses Duality's ObjectSelection


EDIT: you may find it listed as version 0.0.4. I had to push a new version just to fix the dependencies of the version.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/10/20, 18:37 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
I've began porting the plugin to Duality 2.0, and, I'm thinking of bumping the version.

Now, I'd like to get input from you guys that use Duality: if there was a good source control plugin for Duality, what features would you like it to have?

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/10/20, 18:40 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
RockyTV wrote:
I've began porting the plugin to Duality 2.0, and, I'm thinking of bumping the version.
Now, I'd like to get input from you guys that use Duality: if there was a good source control plugin for Duality, what features would you like it to have?
I don't think it needs many features, so I suggest to keep it simple.

That said, it would be nice to have a Resource preview where applicable. For example, comparing an earlier version of a Pixmap with the current version.


Top
 Profile  
 
PostPosted: 2015/10/20, 19:40 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
hsnabn wrote:
RockyTV wrote:
I've began porting the plugin to Duality 2.0, and, I'm thinking of bumping the version.
Now, I'd like to get input from you guys that use Duality: if there was a good source control plugin for Duality, what features would you like it to have?


Very important: It shouldn't ever commit or push on its own, but simply show what has changed and offer to do a commit or push.

Also important: It should let me select what to commit and allow to revert other files.

Thinking about it, maybe all an editor integration for version control would need is a status display and convenience functions, because after all, the commit-and-push stuff is what I'd do in my external Git client anyway. That way, you wouldn't do what other software (such as SourceTree) specializes in, so there would be no pressure to do it "better" - rather, you would provide functionality that only you can provide, such as in-editor status icon overlays or comparisons of what changed.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/10/20, 20:57 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
hsnabn wrote:
I don't think it needs many features, so I suggest to keep it simple.

That said, it would be nice to have a Resource preview where applicable. For example, comparing an earlier version of a Pixmap with the current version.

Something like what GitHub has, that allows you to see what changed in the image? It would be a bit tricky to add, but I can try.
Image


Adam wrote:
Very important: It shouldn't ever commit or push on its own, but simply show what has changed and offer to do a commit or push.

I was thinking of nuking the commit triggers, let the user choose when to commit, and let him write his own message if he wants to. A shortcut, something like, Ctrl + Shift + C would bring up the commit dialog, show you want files changed, and you could choose whether write a different message or not.

The default message would be something like Add X files, modify Y files, remove Z files (following this git commit message tutorial).


Adam wrote:
Also important: It should let me select what to commit and allow to revert other files.

I think this functionality is included in each Git client, no? Anyways, I think it would be good to allow you to choose what files can be committed.


Adam wrote:
Thinking about it, maybe all an editor integration for version control would need is a status display and convenience functions, because after all, the commit-and-push stuff is what I'd do in my external Git client anyway. That way, you wouldn't do what other software (such as SourceTree) specializes in, so there would be no pressure to do it "better" - rather, you would provide functionality that only you can provide, such as in-editor status icon overlays or comparisons of what changed.

I guess you are right :).

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group