Source control and adventuron?

Hi, I’ve just started programming in adventuron, and I wanted to keep at least some Source control track of the changes and progress I made.

My current method is to click control a and cut and paste to notepad, and then put that local file in source control. This works and is more than acceptable, but is there any way to do things even quicker? Or will this have to do?

I think you can ‘save file’ from the menu in the editor and it will save it as a .txt file (rather than having to copy and paste), but I think that’s about as good as it gets. Looking back, it seems I have 443 separate text files of Faeries of Haelstowne, saved at the end of each coding session; would be interested to know if there indeed a more efficient way.

2 Likes

@ChristopherMerriner is correct. (Welcome back, by the way.) Click the Menu button, then select Save File from the shortcut menu. You will have to compile your game first by clicking the Save and Execute button. I presume this is to ensure that you can only save a valid (i.e. compilable) file.

When you save a file, Adventuron defaults to a file name with the current date and time appended. I trust myself to just overwrite the previous file, so I only ever have one source code file. If you don’t trust yourself, then you can end up with a hell of a lot of files, as Christopher demonstrated, and that won’t work well with a source control system like GitHub or GitLab, as they expect different versions of the same file to have the same file name.

2 Likes

Thanks! I must have missed that. Sometimes if I see a solution, I will kind of hone in on it, even it’s it seems a bit awkward, because I am grateful there is just anyone. Not having to cut and paste is really huge.

An online editor doesn’t seem to mesh well with quick source control, but all the same, your experience Echoes mine with a rolling original. I simply didn’t want to lose 500k of text, so I had a bunch of files named by date, like story 2016 0801.

Source control means you don’t have to do that, and I think even just putting the source into a repository without any changes would be pretty big for you end a good exercise. It will give you peace of mind that the source won’t be lost, at the very least.

Any serious integration with Source control seems like way too much to ask, given Adventure on web interface and given that there’s really only one developer. I think at times like this it’s quite useful to have a way that gives 95% of what I want, and what you and Gary mentioned does that.

I guess my solution would be to save the file with the time stamp in its name over to a main file, like main.adv, and put it in source control. That way a ton wouldn’t be floating around. Thanks to you both. There are still a lot of big questions I have, although the tutorials have been very helpful at letting me know, hey, this is how I would do that one thing I saw in that one game I really liked.

2 Likes

I don’t know what’s required from a programming point of view, but it wouldn’t be unreasonable for Adventuron to support source control. According to Wikipedia, Git is a de facto standard used by 95% of source control systems such as GitHub, GitLab Bitbucket et al. Try raising a change request and see what @adventuron says.

1 Like

When using Twine + git, what I do is:

  1. Have a terminal window with the git workspace as current directory
  2. Change something in the Twine editor tab and export the project
  3. On the terminal, do mv ~/Downloads/MyFile.html . (usually up-arrow + enter)
  4. File is ready for git status, diff, commit, etc.

Moving the file each time helps to avoid the scattered (1), (2), etc versions

2 Likes

Good thinking … I use tweego so it is a lot easier to make changes and commit.

Slapping together some minimal git support into something like Adventuron seems like it shouldn’t be too hard, especially if you’re willing to tie it to one forge such as GitHub and use their REST APIs. But doing it well would be a bigger project than the rest of Adventuron, because it would mean implementing an entire git porcelain in the browser, including a UI for resolving merge conflicts and so forth.

I think it was a big architectural mistake to design Adventuron as a monolithic web app rather than factoring it into a downloadable backend that can run in Node and then wrapping an optional browser-based frontend around that. It means being forced to reinvent the wheel for all your editor features rather than being able to piggyback on general-purpose IDEs like VS Code.

1 Like