shawn's blog

Some Git and some Unity (and a little Redmine too)….(Deux)

Posted in Other, Unity by Shawn on March 27, 2012

Last time, new Unity project was started, as well as an initial commit, and a few extra ones. Now to add a remote repository!

Remotes are great for a number of reasons. If you’re working with other people, you can add their repository as a remote, and pull in the changes that they made to their project into your own project. It’s more common, however, to have one remote repository, and have members push & pull from that repo to share work. There are a few caveats that people need to be aware of (trying to fix merge conflits), but it’s generally painless, unless you and your coworker(s) are completely out of synch.

So, now to set up a simple remote repository. We’ll want to do this somewhere, well, remote, and not on the local machine. Redundancy is useful, especially if a local machine decides to crash, and you have another machine that you can work on. Also, the aforementioned working as a team; quickly pulling in changes is nice. What I’m going to do, is set up my remote repository within Redmine directory, for reasons I will explain later. Currently, I use Lindoe, and it’s been great to me so far. So, let’s say I’m in my online Redmine folder, and want to create a new remote repo:

[shawn@remote ~]$ cd Redmine/gitRepos/testRemote/
[shawn@remote  testRemote]$ mkdir testRemote.git
[shawn@remote  testRemote]$ cd testRemote.git/
[shawn@remote  testRemote.git]$ git init --bare
Initialized empty Git repository in /home/shawn/Redmine/gitRepos/testRemote/testRemote.git/
[shawn@remote testRemote.git]$ ls -al
total 40
drwxrwxr-x 7 shawn shawn 4096 Mar 26 21:20 .
drwxrwxr-x 3 shawn shawn 4096 Mar 26 21:20 ..
drwxrwxr-x 2 shawn shawn 4096 Mar 26 21:20 branches
-rw-rw-r-- 1 shawn shawn   66 Mar 26 21:20 config
-rw-rw-r-- 1 shawn shawn   73 Mar 26 21:20 description
-rw-rw-r-- 1 shawn shawn   23 Mar 26 21:20 HEAD
drwxrwxr-x 2 shawn shawn 4096 Mar 26 21:20 hooks
drwxrwxr-x 2 shawn shawn 4096 Mar 26 21:20 info
drwxrwxr-x 4 shawn shawn 4096 Mar 26 21:20 objects
drwxrwxr-x 4 shawn shawn 4096 Mar 26 21:20 refs
[shawn@remote  testRemote.git]$

This is the same thing done to set up the local repo, except, it’s bare. Within the local repo, there’s a folder called ‘.git’. When a bare repo is created, you’re basically creating a repo with only the contents of the .git directory. You’ll want to set up a bare repository for your remote repo. I also could have cloned my local repo, but made a bare clone, then copy that to the remote machine.

Now, to tell our local machine about this repository. To do this, you can run ‘git remote –add’, with a few more details after ‘add’. The command is git remote add “remoteName” [URL]:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git remote add mainRemote shawn@remote.org:/home/shawn/Redmine/gitRepos/testR
emote/testRemote.git

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git remote -v
mainRemote      shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
(fetch)
mainRemote      shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
(push)

The remote name, is what we’re going to call this remote, and the URL is the path to the .git folder. Git remote -v shows the remote repositories that have been set up. We can see that the newly set up remote is on that list. Time to push the local repo to the remote:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git push mainRemote master
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (21/21), 11.30 KiB, done.
Total 21 (delta 9), reused 0 (delta 0)
To shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
 * [new branch]      master -> master

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$

(We had to specify the master branch for this first push. Later on, we can just say ‘git push remoteName‘ and be done with a push)

So, now, we have a remote repository which has everything we did locally. Fun times. Now, if someone wanted to, they could clone the remote repo onto their machine using ‘git clone‘. I’m to clone the remote repo on my Desktop:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ cd ..

shawn@SHAWN-PC ~/Desktop
$ git clone shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
Cloning into testRemote...
remote: Counting objects: 21, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 21 (delta 9), reused 0 (delta 0)Receiving objects:  61% (13/21)
Receiving objects:  71% (15/21)
Receiving objects: 100% (21/21), 11.30 KiB, done.
Resolving deltas: 100% (9/9), done.

shawn@SHAWN-PC ~/Desktop
$

I had to specify the URL of the online repo, ending the URL in .git. Let’s take a look at the log for this clone repo:

shawn@SHAWN-PC ~/Desktop
$ cd testRemote/

shawn@SHAWN-PC ~/Desktop/testRemote (master)
$ git hist
* [45bcf31] 2012-03-26 (HEAD, origin/master, origin/HEAD, master) | Another Great
Update
* [21adf6e] 2012-03-26 | Initial Commit

shawn@SHAWN-PC ~/Desktop/testRemote (master)
$

It’s the same history for the original repository that was set up! It would make more sense if I cloned this onto a different computer, of course. Also, when you clone a repository, it automatically the source URL as a remote repository called origin.

shawn@SHAWN-PC ~/Desktop/testRemote (master)
$ git remote -v
origin  shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
(fetch)
origin  shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
(push)

You can rename this if you would like, using git remote rename [old name] [new name]. You can also make changes here, push to the remote repository, then have other people pull the changes that you pushed. Now, this is being oversimplified, and for a better understanding of some of these features, I strong suggest sources such as Git Immersion and Pro Git.

With Redmine, you’re able to add a repository for a specific project to track. You can do this within the Settings –> Repository section of your project within Redmine. Remember that url for the bare repo I created? Let’s get that, and add it to the page:

Adding the remote to a project

(Note: The repo needs to be within the actual Redmine directory on the machine with Redmine. For more info, check out this page). Now, we have a new tab next to Settings called “Repository”. On that page, we’ll see the repository’s details, such as the Assets and Project Settings Folder. Clicking on the folder, or the corresponding “+” icon, will show you the contents of that folder.  Now, anytime someone pushes changes to this remote repository, the changes will be reflected on this page.

On the repository page

On the repository page

As others probably know, Unity does come with its own Version Control System, the Asset Server. It is a very nice tool, and definitely useful. I’ve used it during game jams, and the speed of the asset server is wonderful. For something fully integrated into Unity, you’d expect it to be that good. However, there are some things that I do find useful about using other version control systems over the Asset Server (at least, for now).

For example, you can’t really use the Asset Sever in any type of way outside of Unity. As far as I know, there aren’t many project management tools you can use with Unity, which are also integrated (however, this one looks very good). I can, however, easily use Unity and Git and Redmine together, without too much of a drop in the workflow, compared to just using the Asset Server.

For example, within Redmine, I can create a task (called issues in Redmine), something along the lines of “Make Project Great!”. After creating this issue, Redmine will assign it a number. I now have task “Issue #277: Make Project Great”.

Making the project great

So, now to Unity. After ‘x’ hours, I’ve made a bunch of changes to my project, all of them related to issue #277. So, I save my work, and commit this to my local repository. But, let’s make the commit look like this:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   Assets/Example.cs
#       modified:   Assets/ExampleScene.unity
#
no changes added to commit (use "git add" and/or "git commit -a")

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git add .

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git ci -m "Did really cool things; refs #277"
[master 1b2b47e] Did really cool things; refs #277
 2 files changed, 4 insertions(+), 6 deletions(-)

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$

The ‘ref #277’ does what one may assume it does. It references issue #277 in Redmine. Rather, it will, once I push it to the remote repository. So….

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git push mainRemote
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.58 KiB, done.
Total 5 (delta 2), reused 0 (delta 0)
To shawn@remote.org:/home/shawn/Redmine/gitRepos/testRemote/testRemote.git
   45bcf31..1b2b47e  master -> master

And after pushing, let’s take a look at our repository page in Redmine again:

Changes on the Repository page

The commit message shows up, and the ‘#277’ is linked. If we click on it, we’re brought directly to the issue we created beforehand. And now, we can even see this commit show up on that page:

Changes on #277

This can turn out to be very useful for larger projects, or projects which see a good number of updates a day. It’s relatively easy to lose track of a project, and if something goes wrong, there’s a lot of visual feedback to help track down which commit caused the problem, and what part of the project someone was working on when that specific commit caused the problem. Of course, it’s only as good as the people using the tools. If no one keeps track of what they are doing, then it’ll be a bit more difficult to track down bugs and similar negative issues. There are other ways to interact with your issues through commits, such as close issues through commit messages as well — git commit -m “Made game great!; closes #24” , then push your changes to the server — which will close the task, and let everyone know that you’re finished making the game great if they were to look at the task.

Now, of course, there are a number of things that you need to be aware of. While Redmine is free/open source, you do need to set it up on a machine. This means man hours with trying to set it up, and money for a machine to host it. It all depends on what you’re willing to sacrifice!

That’s it for this 2-parter. What I covered is really just the surface. There’s a lot more to be uncovered, and definitely things that could be made better/more optimized/etc. But hopefully someone finds something here useful to some degree.

Comments Off on Some Git and some Unity (and a little Redmine too)….(Deux)

Some Git and some Unity (and a little Redmine too)….(Uno)

Posted in Other by Shawn on March 21, 2012

Quite often on this blog, I talk about the tools that I use, those tools being Redmine, Git, and Unity 3D. I do mention how I use them together, but never in detail. Today, I’m going to talk a bit more about some of these things. With each of these areas, it’s quite easy to get lost in a world of features, so I’ll going to be a bit broader in this post. Maybe, in the future, I’ll go into more detail about a specific aspect.

Disclaimer: I am not a pro at Git, Redmine or Unity. I just like them all a lot.

So, one of the first things that I should probably mention is how cool version control really is. Regardless of whether you are working with a team, or on your own, version control is something worth looking into. Bundled with the fact that a lot of these are freely available, there really shouldn’t be too much of an excuse as to why you aren’t using version control (in my opinion, of course). My choice for a vcs is Git. I learned how to use Git from my day job, and I’m glad I did. I don’t know too much about the other options, so I’m not going to say anything like “Git is better than ‘X’ for reasons 1, 2, etc”. I’ll leave that job to sites like this one.

Previous version of Unity did not allow users of the free version of Unity to use external version control. However, that changed with the latest release of Unity 3.5. This was a positive for me, as I had a few projects that I just decided to stick entirely in version control. Now, nothing major went wrong, since I was working along, and I was able to do some funky things (like downgrade a project!), but since 3.5 allows non-pro users access to an external vcs, a lot of weight has been lifted off of my shoulders. And I’ve been talking more with others about working with a team, as we would be able to share files without odd hacks.

If you want to grab Git, you can do here. Again, I’m not planning to go into too much detail with how to use Git. Which is super easy to use, and strikingly fast. For a quick, but useful crash course on Git, check out Git Immersion. For more details about Git, and some of the crazy things you can do with it, I’d recommend Pro Git. As a side note, I’m also going to do things on the command line.

Let’s set up a local repository. I made a new Unity project, which only has one example script, and a blank scene. What we want to do is initialize the repository. So, let’s change directories, and do just that.

shawn@SHAWN-PC ~
 $ cd Desktop/TestProject/
shawn@SHAWN-PC ~/Desktop/TestProject
 $ git init
 Initialized empty Git repository in c:/Users/shawn/Desktop/TestProject/.git/
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Cool, we now have a repo! Time go branch, merge, cherry-pick, stash, log, etc, right? Unfortunately, no. Let’s take a look at what’s in this current repo.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 #
 # Initial commit
 #
 # Untracked files:
 #   (use "git add <file>..." to include in what will be committed)
 #
 #       Assets/
 #       Library/
 #       ProjectSettings/
 #       Temp/
 nothing added to commit but untracked files present (use "git add" to track)
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Git status’ will show me the current state of my working directory. Let’s also change the directory, and take a look under the Assets Folder.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ cd Assets/
shawn@SHAWN-PC ~/Desktop/TestProject/Assets (master)
 $ ls
 Example.cs  ExampleScene.unity
shawn@SHAWN-PC ~/Desktop/TestProject/Assets (master)
 $

I have a couple of files that are currently untracked, waiting to be put into version control. However, we don’t want to commit anything just yet. If you’re going to use Git (or any external vcs for that matter), and Unity, you’ll want to do is to enable external version control. To do this, we want to go to Edit –> Project Settings –> Editor. The inspector tab will reveal a few options. Change the first option to “Meta Files”. Once you do this, your project will automatically generate the proper .meta files that need to be ‘versioned’.

Enable Meta Files

Now, let’s take a look again at the files under the Assets Folder.

shawn@SHAWN-PC ~/Desktop/TestProject/Assets (master)
 $ ls
 Example.cs  Example.cs.meta  ExampleScene.unity  ExampleScene.unity.meta
shawn@SHAWN-PC ~/Desktop/TestProject/Assets (master)
 $

We can see now that we have a few new files, ending with .meta. These files are important, and will definitely be stuck into the version control system. Basically, when you add/create a new file in Unity (and have external version control enabled), Unity will generate the corresponding .meta file.

Okay, so we’re almost there. Let’s commit our files. We only want to commit two sets of things. Everything under the folder ProjectSettings, and everything under the Assets Folder (unless your workflow demands otherwise). Everything else, we can ignore. There are a few ways to go about this. The first would be to move everything to the staging area. To do this, we would run ‘git add .‘. The ‘ . ‘ specifies that we want to add everything. So, doing this (after changing back to the main project folder) would result in:

shawn@SHAWN-PC ~/Desktop/TestProject/Assets (master)
 $ cd ..
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git add .
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 #
 # Initial commit
 #
 # Changes to be committed:
 #   (use "git rm --cached <file>..." to unstage)
 #
 #       new file:   Assets/Example.cs
 #       new file:   Assets/Example.cs.meta
 #       new file:   Assets/ExampleScene.unity
 #       new file:   Assets/ExampleScene.unity.meta
 #       new file:   Library/AnnotationManager
 #       new file:   Library/AssetImportState
 #       new file:   Library/AssetServerCacheV3
 #       new file:   Library/AssetVersioning.db
 #       new file:   Library/BuildPlayer.prefs
 #       new file:   Library/BuildSettings.asset
 #       new file:   Library/EditorUserBuildSettings.asset
 #       new file:   Library/EditorUserSettings.asset
 #       new file:   Library/FailedAssetImports.txt
 ..........

All of these files are now ready to be committed to the project. But this isn’t want we want to commit. We only want everything under the Assets Folder and the ProjectSettings folder. So, let’s reset this. If you already had a commit in your history, you’d be able to run ‘git reset’, and be done. But since I haven’t commit anything yet, I’m going to need to run git rm -r –cached *‘  to reset the staging area. After running this, everything will be set to as it was before we ran git add . ‘.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git rm -r --cached *
 rm 'Assets/Example.cs'
 rm 'Assets/Example.cs.meta'
 rm 'Assets/ExampleScene.unity'
 rm 'Assets/ExampleScene.unity.meta'
 rm 'Library/AnnotationManager'
 rm 'Library/AssetImportState'
 rm 'Library/AssetServerCacheV3'
 rm 'Library/AssetVersioning.db'
 ..................
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 #
 # Initial commit
 #
 # Untracked files:
 #   (use "git add <file>..." to include in what will be committed)
 #
 #       Assets/
 #       Library/
 #       ProjectSettings/
 nothing added to commit but untracked files present (use "git add" to track)

Okay, now let’s just add those specific folders, and files within them. We could stage things individually, like so:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git add Assets/Example.cs

or, we can add the entire folder:

shawn@SHAWN-PC ~/Desktop/TestProject (master) $ git add Assets/Example.cs

Now, if we run git status, we can see that we have a bunch of files ready to be committed:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$ git st
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#       new file:   Assets/Example.cs
#       new file:   Assets/Example.cs.meta
#       new file:   Assets/ExampleScene.unity
#       new file:   Assets/ExampleScene.unity.meta
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       Library/
#       ProjectSettings/

shawn@SHAWN-PC ~/Desktop/TestProject (master)
$

We can do the same thing for the ProjectSetting Folder. After we stage everything we want to stage, we’ll commit our files. We can run ‘git commit -m’, and after the -m part, include our commit message within quotation marks. So….:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git commit -m "Initial commit"
 [master (root-commit) e143bb3] Initial commit
 15 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 Assets/Example.cs
 create mode 100644 Assets/Example.cs.meta
 create mode 100644 Assets/ExampleScene.unity
 create mode 100644 Assets/ExampleScene.unity.meta
 create mode 100644 ProjectSettings/AudioManager.asset
 create mode 100644 ProjectSettings/DynamicsManager.asset
 create mode 100644 ProjectSettings/EditorBuildSettings.asset
 create mode 100644 ProjectSettings/EditorSettings.asset
 create mode 100644 ProjectSettings/InputManager.asset
 create mode 100644 ProjectSettings/NavMeshLayers.asset
 create mode 100644 ProjectSettings/NetworkManager.asset
 create mode 100644 ProjectSettings/ProjectSettings.asset
 create mode 100644 ProjectSettings/QualitySettings.asset
 create mode 100644 ProjectSettings/TagManager.asset
 create mode 100644 ProjectSettings/TimeManager.asset
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

So, we commit a bunch of stuff! Lovely right? Let’s look at our log.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git hist
* [e143bb3] 2012-03-20 (HEAD, master) | Initial commit

Git hist is an alias that I set up for the git command git log. There’s a bit more formatting details that I won’t get into, but it makes everything look pretty:

Git log made 'pretty'

After looking at the history, we can see that our log contains the initial commit with the message.

Let’s run ‘git status’ again:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 # Untracked files:
 #   (use "git add <file>..." to include in what will be committed)
 #
 #       Library/
 nothing added to commit but untracked files present (use "git add" to track)

Looks like there’s some of stuff that we don’t want to track. In fact, we just want to ignore it. Well, there’s a nice file that we can create called ‘.gitignore‘, which will do that for us. You can open up whatever editor you want, name a file .gitignore, and add the files you want git to…well, ignore. Let’s take a look at some of the files I have in my .gitignore:

.gitignore
 Assembly-CSharp-vs.csproj
 Assembly-CSharp.csproj
 Assembly-CSharp.pidb
 Library/
 TestProject-csharp.sln
 TestProject.sln
 TestProject.userprefs

In this file, I’m ignoring everything under the Library folder, some of the files generated when opening up MonoDevelop, an IDE that comes Unity, and the .gitingore file itself. If I had Unity on two machines, and was doing work on both of them, I may consider leaving the .gitingore line out of the .gitignore file. But, I’m not sure if that would be wise at this point.

Edit: As pointed out by kLinus (and some others), it’s probably better practice to not ignore the .gitignore file most of the time. There may be files that most people should ignore, and it wuld be easier if they didn’t have to set up the .ignore files on their end.  Also, a more transferable version of what to put in .gitignore could look like this:

*.csproj
*.pidb
*.sln
*.userprefs
Library/
Temp/

The Temp folder is created and destroyed when you open/close Unity, so if you happen to commit files while Unity is still open, you won’t run the risk of including Temp files. I’ve also heard talk of people saying that it’s better to close Unity before committing. I’m sure closing Unity is safer, but I don’t have any reasons to promote why committing while Unity is open is bad.

There are a few more thing you can do in regards to ignoring files. If you want to ignore things that everyone should ignore, then .gitignore is a good place to add things, and you can go and commit the .gitignore files. However, if there are files that you want to ignore, but everyone else may not want to, you can add your files to .git/info/exclude. This may be useful for specific files generated by an editor, or a platform specific program (the help and credit for that goes to a coworker of mine).

 

So, we create our file, save it, and run git status again:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 nothing to commit (working directory clean)
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Now, we don’t need to worry about a Git tracking a bunch of other things. If we made this file before we made our first commit, we could have ran ‘git add . ‘, and only have Git add the files under Assets and ProjectSettings.

Okay, now we’re ready to work on our Unity project some more. Let’s say some changes were made to the example script, such as a Debug.Log statement added, or some new variables. After saving the script, you’ll see something happen after running ‘git status‘ again:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 # Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
 #       modified:   Assets/Example.cs
 #
 no changes added to commit (use "git add" and/or "git commit -a")
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Well, we have some modified files that need to be committed. Here, you can see that these file are already tracked by Git. If we made a new file, for example, called NewScriptTwo, and saved it, Git would tell us we also have another file (and it’s corresponding .meta file), but it’s currently not being tracked:

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git status
 # On branch master
 # Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
 #       modified:   Assets/Example.cs
 #
 # Untracked files:
 #   (use "git add <file>..." to include in what will be committed)
 #
 #       Assets/NewScriptTwo.cs
 #       Assets/NewScriptTwo.cs.meta
 no changes added to commit (use "git add" and/or "git commit -a")
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Let’s stage things individually. First, let’s add the new file, commit it, and look at our log.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git add Assets/Example.cs
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git commit -m "Adding Example.cs"
 [master 9e2293f] Adding Example.cs
 1 files changed, 3 insertions(+), 2 deletions(-)
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git hist
* [9e2293f] 2012-03-20 (HEAD, master) | Adding Example.cs
 * [e143bb3] 2012-03-20 | Initial commit
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

The log shows a new commit, right on top of the first commit. Let’s also commit the other files, then view the history.

shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git add .
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git commit -m "Adding NewScriptTwo"
 [master bca80ab] Adding NewScriptTwo
 2 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 Assets/NewScriptTwo.cs
 create mode 100644 Assets/NewScriptTwo.cs.meta
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $ git hist
 * [bca80ab] 2012-03-20 (HEAD, master) | Adding NewScriptTwo
 * [9e2293f] 2012-03-20 | Adding Example.cs
 * [e143bb3] 2012-03-20 | Initial commit
shawn@SHAWN-PC ~/Desktop/TestProject (master)
 $

Looks like it’s coming along.

But that’s it for now. I’ve come to realize that this post is getting quite long, which means that it needs to be split up. Next, I’m going to do a little bit more locally, bring remotes into the fold, and look at some Redmine.

Game Jam Weekend

Posted in Other, Tone Def, Unity by Shawn on January 27, 2012

So that fancy Global Game Jam is today until some time on Sunday. I’m most likely going, and will try to do my best to be useful to someone this time. Last year, I wound up floating around quite a bit for the weekend, making some music here and there, then making an awkward game on the last day. This also means that I’ll need to put Tone Def on the side this weekend, and focus on what ever I wind up working on. Knowing me, I’ll still bounce around a lot this year. Last years theme was extinction; I hope to see something much more quirky this year. Something like donuts or hubcaps.

I’ve also finally downloaded the Unity 3.5 beta, and have upgraded Tone Def to this version. The first version of the 3.5 beta was too troublesome for me, and one of the main reasons I was looking to get into it was for the “Flash in a Flash” contest. Exporting to flash was a pain for me, and there are a number of things that I just can’t do for Tone Def & Flash, without major overhauls. Basically, since coroutines cannot be used for Flash exports, and I use them all over the place, a lot would have to be rewritten. I’m actually pretty sure that only two scripts have an Update() of some kind, not counting the scripts that extend from extend from a specific class.

One very nice thing about 3.5 is version control for basic license users. I have to admit that I was using the free version of Unity, and using Git for everything. Everything. And for the most part, it worked. I was able to push my repo online without problems. I could even ‘git reset –hard’ to blow away changes, or revert to an earlier version of the project. Git -dfx worked as well, and actually help me downgrade a project that I didn’t mean to upgrade. So, yay Git?

Back to Tone Def….I really wanted to push for a February 1st release date, but with the Game Jam this weekend, this does not seem like a possibility. I may need to push back to the 6th, since that should give me an entire weekend to lock myself somewhere and only work on the game until it makes me smile on the inside and out. Whatever that means.

But that’s it for now. Here’s to good jamming for everyone participating in this year’s game jam, and to those who have already started!

Comments Off on Game Jam Weekend