Closed mickfuzz closed 6 years ago
While this looks like a good solution, after looking into this but came across a problem, the set up for linking uploaded files seemed really unintuitive. https://support.glitch.com/t/easier-way-to-reference-assets/394
I'm wondering if there a work around? I guess a first thing to find out would be what happens to game assets in GH when they get imported into Glitch.
There are a couple of scenarios to test I can think of
a) Game examples for users to play, investigate, and tinker with an a simple level. b) Examples as starter templates that users fork as use as a base to build their enhanced games including adding their own assets.
Working on running an example through on Glitch.
I'm taking notes here: https://davepotts.software/2018/09/06/phaser-game-running-from-glitch/
Yes this is looking pretty good isn't it. I've done a similar test but wanted to see how images came in. first here with a complex project but it failed and the logs don't share a lot https://glitch.com/~mickfuzz-glitchtest
But then here with a project with just one image and it works well https://glitch.com/edit/#!/mickfuzz-glitchtest-1?path=index.html:1:0
I can see this working well for project which are updated via git, and which serve as a base for remixes too, as users can add assets to glitch and then copy the URL to use in the project.
After some experimentation (written up at https://davepotts.software/2018/09/06/phaser-game-running-from-glitch/ ) I'm thinking the Glitch.com asset update problem is big enough to rule them out. It is just too confusing to a beginner that they have updated an image, loaded it to Glitch.com, but the image has not updated in their app.
What do you think @mickfuzz ?
If we think of Glitch as a code playground for beginner users then I actually think this won't be too much of a problem as long as we can get the The GH --> Glitch process working well.
I'm thinking that a beginner user won't be reimporting their game back into github, and that for the kind of game contributor that might chip in to this project they would be likely to be doing their updates and development locally rather than on glitch.
The asset uploading on Glitch, while hard to get to look like a locally referenced file, if you don't worry about that, then well it's pretty straightforward, drag into the asset window, and click on it to copy the url to the clipboard, and then paste it into the right place.
This would be similar to what they might have already met doing activities like this one, which beginners were fine with at workshops I've done recently. http://write.flossmanuals.net/learn-javascript-with-phaser/jumping-right-in/
For intermediate users then I think it is worth bumping them up to local development in Brackets or similar and teaching how to use Github too.
I do think it is worth trying out a bit more some relatively complex projects to test the limits of what Glitch can work with.
So I've hit the next wrinkle in getting Glitch<->GitHub integration working: Glitch import and export won't handle sub-directories. I'm thinking this means we pull out individual games into separate git repos under a single "webgamesclubs" organisation. This probably is a good thing since it isolates any updates in the game to which they apply.
The problem in more detail is that I can't say to Glitch to synchronise with the sub-directory at edlab-gamemakers-club/games/simple-game-to-edit/
. Rather you must synchronise the whole repo in one go.
@mickfuzz what do you think about splitting games into separate repos?
About separate repos, I think that's ok. I was thinking that that was a good way to go anyway as it would allow game developers a lot of freedom
I was imagining something like using git submodule, but I don't know a lot about git submodules and this article doesn't fill me with joy about them.
https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree But we could start looking into a good way to do this which I guess would:
Although for the last one, I am imagining if we create a list of games that can be remixed then we'll probably point users to Glitch projects which can be remixed, rather than to git URLs that can be imported, as I think the former would be easier to explain, no?
And for the advantage of having a central repo that pulls in subprojects, I guess it would be to make sure there is always a copy of the game available, but it may well cause more problems than it is worth. Certainly on a code level each project is distinct, so the only issue really I suppose is that of keeping a record of where everything is. I'm not sure on this one!
My previous experience says avoid submodules. We tried them for a CoderDojo project and it was really confusing. Just simple links in documentation to other repos works much better.
Also I agree about giving links to Glitch projects rather than GitHub URLs.
I'm going to have a go making a repo for your https://codepen.io/mrmick/pen/wXMMXR game if that's okay with you. I'll port it so that it works in Glitch and I can pull together the steps for GitHub<->Glitch interaction.
Wow that was easy. I'll write up more later but for now see:
https://github.com/davegoopot/simple_game_to_edit https://simple-game-to-edit.glitch.me/ https://glitch.com/edit/#!/simple-game-to-edit
Here's my write up of how this can work. What do you think @mickfuzz ?
Is that this one? https://davepotts.software/2018/09/15/glitch-and-github-workflow/ Thanks
Oh yeah...WordPress sneaking out from behind the curtain :)
This looks great. I do think that it is very interesting that there is a chance to fork and then remerge a project using glitch. This actually could be a good introduction to the use of Git for beginners.
I'll close this and open another issue here about implementing it in documentation - #22
Proposal to use Glitch for better Git integration
https://youtu.be/aWvTqHNDi_Q