shawn's blog

How the SquareBots are spawned

Posted in Tone Def, Unity by Shawn on July 30, 2012

I’ve been working on the code that manages the spawning of SquareBots (the enemies for Tone Def: ROTS) for quite some time. The method for actually spawning, and some of the other features, have change significantly, and hopefully for the better (or at least I’d like to think such). It feels robust enough for me to think “I’m done with this……for now”.

The first instance of the enemy spawner was….well, terrible. There was one good takeaway I had from that spawner, and it was how I managed a list that let me choose the bots I wanted to have for a level. At the time, there were only 6 slots that I can choose from, and six different bots I had the options of choosing from. I don’t have a screenshot of how this looked, and I’m glad I don’t. How it worked was, the enemy in slot one had the highest chance of spawning, with the odds of an enemy spawning decreasing if placed in a lower slot. It was sloppy but functional code, filled with “Pick a random number from 1-20. If it’s between 1-10, spawn this enemy, if between 11-15, spawn this enemy…”. Something like this (off the top my head):

int x = Random.Range(0,18);
if(x == 0 || x == 1 || x == 2 || x == 3 || x == 4 || x == 5)
{
       enemyReturn = enemyList.GetEnemy(slotOne);
}

I wrote this a long time ago and thought, “Well, it’s good enough for now”, and didn’t look at it again until I was trying to do something more advanced and realized that the code was terrible for what I wanted to do. And this wasn’t even the worst part of the spawner code…..

The worst part was how I managed the rate at which the enemies spawned. Spawning was managed in steps. A graph is the best way I can think about representing this (made with a high quality art program because I couldn’t make this in Excel)

An awesome chart.

As time when on (marked as seconds on the x-axis), the spawn interval range for enemies would decrease. Again, it was good enough to get by, but when I needed to do more dynamic things, it just wasn’t functional.

My first decent revision to the enemy spawner was when someone told me that a curve would be much more elegant than those steps. I agreed, not entirely sure how to go about making this work at first. However, it was much easier to implement than I thought. I wound up using an Animation Curve (I’m using Unity 3D for this game). Now, what I do, instead of the steps, and horrible code on different objects, is evaluate the curve over time.

For example, let’s say that a level has 300 seconds. The graph would tell the enemy spawner to create an enemy every 7 seconds. Eventually, it would be a smaller wait to spawn the closer you get to the end of a level. For this curve, I started at the right and went left. Not only was this more elegant, but it would allow me to have spikes where the spawing dramatically increases for moments in time:

This would make this much more interesting. The sharp declines in the graph indicate where the delay between spawn time would decrease dramatically for moments in time.

But, that wasn’t good enough. The curve would always be the same, no matter what (unless I randomly generated the curve values at the beginning of a level). Each time a person would play out a level, they would know exactly when an enemy would spawn. Even though they wouldn’t know the location at which they would spawn, players would still know when. In order to keep people on their toes, a second curve was added.

In the photo, you can see the drop down menu that has the options ‘Linear’ or ‘Area Between’. For ‘AreaBetween’, instead of evaluating one curve, I evaluate the two curves and choose a random number between the two. Now, if someone chooses to play specific levels where “AreaBetween” selected for spawning, spawning will be less predictable.

The next big change was dealing with the odds of when a particular enemy would spawn. The goal was to give everyone a certain percentage, but use larger numbers than before. 1 – 10 on a 20 point scale wasn’t good enough. So, the first thing I tried to do was make it out of 100. I added an extension method which checked between two different numbers. If ‘x’ was between 1-25, return enemy one, and so on for the other 5 slots. This was nice, but I still had limited control over the actual percentages. I really wanted to be able to say ‘Make slot one spawn 43% of the time’, instead of being stuck fixed with numbers like 25%, 50%, etc. This took me a while to actually finish properly — I found a few bugs within the system not too long ago — but what I do now is delegate out a certain number of points to each enemy slot. So, slot one could have 50 points, slot two could have 30 points, slot three to six could have 23, 18, 10 and 5 (total 144). These numbers are used to set the spawn ranges. The enemy in slot one will spawn when the random number system selects a number between 0 – 49. The enemy in slot two would spawn if a number between 50 – 79 is selected. 79 is chosen because the second slot was given 30 points (remember, I’m staring at 0, not 1). Following this suit, slot three would have the range 80-102, slot four 103-120, and so on.


This felt miles better than the previous code. The next thing I did was make this even more dynamic, and added ways to add or remove the number of enemy slots that I needed. There was no need for me to have 6 slots in a level, and 4 with 0pts for spawning if I did not need that enemy to spawn. This meant doing more work to how the ranges were handled, but the work was worth in, in my opinion.

There are still a few more things that I felt were missing. It was nice to have everything be a bit more ‘random’, but now I wanted some control back. The next feature implemented was the “Forced Spawn” list, composed of enemies that I wanted to spawn manually. I had two methods of how I felt this should be managed. Either spawn enemies when there are ‘y’ seconds left, or spawn a specific enemy every ‘z’ seconds. Both were great options, and it wasn’t as bad as I thought, implementing both of these.

The first slot contains the type of bot being spawned, the second field was the method of how the bot was going to be spawned (interval or countdown) , the third field was a number associated with the type of forced spawning that took place. For interval spawning, the “Interval” field was the delay between each time an enemy is manually spawned. The “Time” field for “Countdown” was the time when an enemy would spawn. In this example, a Masked Bot would spawn when there are 120 seconds left in the level. When interval spawning is selected, you also had the option of choosing when we start the spawning an enemy at the selected interval.  Finally, the last option is “how many enemies should spawn during the forced spawn”.

The question I face now is, “When do I stop adding features to the enemy spawner?”. The answer could be, when I don’t need anymore, but new features come to mind every time I stop and take a look at this. Right now,  I think I have enough, and I may just be at the point where I have to actually say ‘It’s time to move on’.

But that’s it for now. I need to test all of the code that I just changed…again.

Comments Off on How the SquareBots are spawned

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)

Planning for the next month

Posted in Music, OriGamInc, Other, Tone Def, Unity by Shawn on March 19, 2012

So, my laptop’s screen is definitely broken. Pretty good timing too, I guess. The last time I had laptop issues, the deadline to the IGF was quickly approaching. I was out a laptop for a good week, which meant I couldn’t do a lot of programming.

This time, the deadline for IndieCade is coming. What are the plans for IndieCade? Well, I hope to submit two games, Mr. Condyle’s Escape and Tone Def. So, the problem is, I have two games to work on, can’t work on them full time, and have no laptop. Still, that doesn’t mean that I can’t do other things, in regards to planning, designing, organizing and more. After I get my laptop back, I do plan to, as they say, ‘kick it in high gear’, I think. That means I’ll have a lot more content to share, on the design front, as well as other aspects.

By mid next week, I hope to be in full swing with my music production. In the mail, coming my way, is a new Midi Controller that I plan to use with Reason, my current DAW. Rather, I should say ‘first’ Midi Controller. All of my work with Reason has been me using my mouse and keyboard. That doesn’t mean that I’ve haven’t been able to make music that I’m unhappy with. All it means is that I should be able to make music faster, which I’m looking forward to. Hopefully, later on this week, or early next week, I should have some new musical pieces that I can share via the blog/soundcloud. For now, I’m going to continue working on a cheaper borrowed, non midi keyboard, to help me get ideas out of my head. Also, I purchased the sheet music book for various Legend of Zelda Songs.

In terms of designing, there’s a lot that still needs to be done. The part that does make me a bit upset is that I can design some things, and put them into my game, then update them based on how they appear in game. I’ll have to do some waiting before I can see my ideas and plans in production. Each time I get a free chance, I muck about in my Redmine, doing a lot of organizing. The way I work is in 2-week iterations. I assign myself a number of task that I think I’ll be able to complete within the two week timeline. More often than not, I bite off more than I can chew, which is okay for now, since I’m my own boss. But, setting these goals and iteration time periods help me keep track of what I’m doing, how long it takes for me to accomplish a task, and helps me form a nice timeline of production. It also helps me figure out where something went wrong, and who to blame it on (I can only blame it on myself….).

In terms of actual planning, I have outlined what’s needed for Tone Def, thing the player will actually see. More instruments, more instrument effects, and new level types. Also, interesting light shows (more on that in a future post, hopefully). There’s more work behind the scenes that need to be done also. I recently starting to make more and more custom editors, and there are a few other thing that would work better for me if I had a few custom inspectors in this Unity project. Such as the aforementioned light show. I’ve been thinking about going into some detail regarding some of the editor scripting. I’m still on the fence about it, since most of the time I start writing a blog update, I delete it. This is actually the third time I’ve tried to write this particular one.

But that’s it for now, before I go ahead a delete this one. I’m hoping to move at a better pace, and have something good before the IndieCade submission date. I’ve gotten some feedback from others regarding Tone Def, and it seems like other people don’t think it’s terrible!

Comments Off on Planning for the next month

Rebuilding and Custom Editors

Posted in Tone Def, Unity by Shawn on February 24, 2012

So, the web build of Tone Def has come and gone. I did receive a bit of feedback, which I found useful, and have implemented/will plan to implement in the new and improved desktop build. It doesn’t seem like too many people took interest in it, which is okay. I have future plans for a desktop build, and hopefully it does better. But in order for this to be better, I need the code behind the game to improve.

There’s a lot that I’ve been doing behind the scenes. A lot of code has been deleted, and a lot of odd work has taken place. A god portion was me experimenting with different implementations, looking for better places to put code, and other places to delete code that is just plain foolish…and there appears to be a lot of that unfortunately.

One of the (more important) elements that was reworked was the Enemy Spawner. Originally, the spawner managed spawning in a ‘step’ format. Now, however, the enemy spawner is managed by a curve. The rate of enemy’s spawning continues to drop until the it reaches the minimum that I set for that level. The harder levels with have a lower wait time until an enemy spawns.

Enemy Spawner Collapsed

This is the new enemy spawner. This spawner has everything collapsed, and right now, spawning is disabled. It’ll be disabled on particular levels, which are puzzle levels, or levels where players are just allowed to mess around. Here is the spawner with spawning enabled:

The Spawer, and some of its information

The six slots are reserved for the different types of enemies that will be spawning for a particular level. Each slot is hooked up to a percentage, and the bot in the first slot has the highest percentage of being spawned, with the percentage lowering as you move down in slots. This isn’t finalized, as I really want to change the percentage controls, and make them easier to adjust on the fly.

Underneath the “Spawning Management” section, you can see the curve and the “Max Spawn Amount”. The max spawn amount caps the number of enemies that can be spawned at one point in time. This first worked as ‘damage control’, keeping the game from getting out of hand, but it would also assist in the learning curve for players who are potentially having a difficult time with the game. Finally, you can see the curve, which is an animation curve. Instead of moving an object with this curve, I’m evaluating the curve at certain points to handle the spawning. This way, the spawning is more gradual, as opposed to staged. It’s also better suited to allow me to have ‘burst’, akin to Plants vs Zombies, my main source of inspiration to for this game actually. (Imagine a zombie from that game showed up in mine as an enemy…….that’d be…..interesting……)

I also have two aptly named Conductors for the game. One conductor controls the level, and the other controls the musical aspects.

Do conductors tell them when to play?

Now, this custom inspector wasn’t actually necessary. However, it does make things easier to look at, and easier to organize. I can hide the Main Beat Lanes, so I’m not looking at everything all at once. Also, I have a set of lanes that play on the ‘ands’. Currently, it’s disabled (the Enable OffBeat toggle), but when it’s enabled, you’ll see another set of lanes, along with the parameter which ask how many lanes are valid. The number of lanes will be adjusted when there’s a level that has a different Time Signature. My latest build only has a 4/4 songs, but I have a few ideas for some 3/4 (and even 5/4) songs.

The Level conductor has a number of things behind scenes, but at face value, it has this:

A few things in a 'normal' stage

It’s pretty simple, and still in the works. However, changing the type of stage will also change the variables exposed:

Less is More?

There will eventually be more added, but this is what is available for now.

Here’s a fun one! The Note Selector:

Choosing Notes

The note selector holds the notes that a specific instrument will play. If the is more than one sound present, the instrument will cycle from the sound in the first slot down to the last slot. The plus/minus buttons help you quickly add or remove a slot. This was actually the first custom inspector script I wound up writing, with the help of many different online resources. While there’s a lot of documentation this stuff, sometimes, I feel as if the docs could use a bit more in the example field. Still, they are very useful.

Now, the actual first editor script I wrote and used frequently one to manage the save data. There are a number of things that I am saving via PlayerPrefs, and I needed a simple way to access them. This is another script in progress, but as of now, this is all I need for this game:

Saving some Prefs

This allows me to search for some save data, as well as set values for other pieces of information. The two larger buttons do what they say, and delete either the Player Pref in the name field, or delete all the prefs. And, no worries, there are layers of warnings before it’s actually done, it’s not a one click and “Oh jeeze, I’ve accidentally deleted everything again…”. This is actually a less complex version of the one I have set for Mr. Condyle’s Escape. That one showed the pref name/value underneath all the buttons, which was great for that type of game. There are a number of collectibles in the game, and I would hate to need to beat the game every time I want to actually a specific number of collectibles, or unlock a level. I also didn’t want to constantly update code and write “Set level x unlocked!”. With my luck, I’d forget to lock the level, and a certain level would be unlocked from the get go, causing some sort of problem somewhere.

This allows me to avoid these problems, letting me choose the value for the save data, delete individual pieces of information, and so on and so forth. Very handy!

But that’s it for now. I’m actually quite tired, and need to get up for work in the morning. Then get back home and work more on setting up my project. Maybe, in the future, and if someone really wants to know somethings, I’ll actually dive into the code of how some of this is done. However, this is really just meant to show some of the things I’ve been doing this past week. Everything but the Player Pref Window was done this past week in between day job and sleeping. Speaking of sleep…

Tagged with: , , ,

Comments Off on Rebuilding and Custom Editors

Managing Assets

Posted in Other, Unity by Shawn on January 31, 2012

So, this past weekend was the Global Game Jam. I jammed up in the Philadelphia area, and it was definitely very fun. I do have plans to actually continue this, and the project is currently online here on GitHub. Fun stuff, and I can’t wait to jam again, potentially in June.

Speaking of jamming, a big thing for most people there, are the methods of collaboration. Not everyone needs to work together. Someone from the jam I attended work on a game alone, but did a really awesome job. My group took advantage of the Unity’s offer for letting free licenses use the pro version of Unity. Someone at the jam had set up the Asset Server, so we were able to share our projects that way. Very awesome indeed. I’ve heard of people using the Asset Server, and loving it, but I have also heard the opposite, were people feel as if this thing is a waste of time. I finally got to use it, and now I get to form a much better opinion.

Let’s talk about the positives that I found in my short time with the server. One was the speed. It was very *very* fast to use. The fact that it is fully integrated helps tenfold and makes the process much easier. Simply open the window (if you don’t have it tabbed), add files and commit them. This allowed me to do collaborate with my other members quite easily. I could definitely see why people would use the Asset Server.

It wasn’t all roses however. There are a number of reasons why I wouldn’t use the Asset Server for major projects. The Asset Server is fully integrated with Unity 3D. And that seems to be it. And I did search (not for too long, I will admit), but I didn’t really find anything that would lead me to believe otherwise. The install of Unity comes with MonoDevelop. However, Unity 3D doesn’t use MonoDevelop for anything regarding merges, changes, logs, etc. Yes, it does have it’s own history viewer, but the one with MonoDevelop acted much better when I used it. Actually, despite the complaints that people have against MonoDevelop, I really do like the changes that I found. In regards to version control, MD read the directory that my project was it, and found that I was using Git. Because of this, MD was able to allow me to view a number of different things, including logs, changes, blames, etc. Even funnier, and I guess potentially unsettling that information such as this is easily shared, was that m Gravatar icon show up when I was looking through the commits and changes. I do wonder how another vcs would integrate with MonoDevelop, but it’s out of the box interactions with Git was rather impressive. I’m not at my laptop right now, but I do also think I remember a history tree of my files/commits.

The asset sever, again doesn’t integrate itself well outside of Unity (from what I can find), which isn’t good if you’re using some sort of project management system to manage your files. I’ve mentioned this before, but I’m currently using Redmine to manage my work. Redmine, and things like it, are great for keeping me organized, and I’m sure getting it to work well with the Asset Server would require me to develop a set of slick skills, ones that I’m a bit too distracted to learn at the moment.

But again, along the lines of integration, with Git/Redmine, I can add/commit/push my files to a remote repo. I can also tag files related to certain task/issues that I have open. For example, I can create task #210: Bug fix for Squarebots. Once I finish that task, in my git commit message, I can close the task. This would allow others (if I were working with others), to see in Redmine, “Oh, this task that Shawn was working on is now closed. Let me now do x, y, z”. Yes, you can do this in person, text message, email, etc, but the less time you have to spend doing such, the faster production can potentially be, especially if people aren’t working in the same location. Fun stuff!

So, what’s this all mean with the Asset Server? Basically, that the level of integration outside of Unity seems to be very non-existent. Personally, I don’t think it would fly for me, as I like to keep things organized and enjoy fully utilizing project management tools to help me get work done.  Not to say that you need that, but it has certainly helped me get work done, stay organized, etc. My brain is cluttered enough as it is, and it’s nice to put a piece of it somewhere…..figuratively.

But that’s it for now.  I could go into more details and such, and of course, this is all my opinion, AND I plan to do some more research on this! For now, the Asset Sever doesn’t look like a better option than using an external vcs.

Comments Off on Managing Assets

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

A small earful

Posted in Music, Unity by Shawn on December 7, 2011

A couple of months ago, I had an idea for a game involving music. It was tower defense game, with some very simple concepts. I really wanted to make this, but at that point in time, I couldn’t wrap my head around how I could actually pull this off. The idea isn’t too complicated, but I just couldn’t get things working right, without them turning out convoluted and ugly.

Fast forward to about a week from now, and I get that urge to make that music game again. This time, I start out with a different approach (it’s been a week, so I forgot how I started….), and progress is made. At that point, I figure, I have about one week to actually make something of this. If I had more time during each weekday, I would have probably given myself less time. The main reason for this week deadline is because I did not want to spend too long working on projects that I wasn’t sure I was going to complete. Too much time dabbling around in other projects, and I wouldn’t be able to actually finish something.

It turns out that I have something that actually became enjoyable. The problem wasn’t the coding, or the mechanics or anything too technical. The game functions as it should, albeit, there are a few issues that need tweaking. The main problem was the music. It just wasn’t sounding like anything I would listen to outside of the game. And since this game is extremely dependent on music, this was an absolute problem.

But then something changed. I made an audio file, and a musical sheet to go with it (I call it my music sprite sheet…I think I may post code next update). And they were good. Good enough for me to listen to. I’m actually listening to the music right now.  But it made the game more enjoyable. The power-up duplication bonuses felt better when I got them, the synching bonuses felt better when I matched notes, the overloaded instruments made things less enjoyable. Things were taken to a point where I though “I think I’m actually having fun”.

It’s easy to say “Of course a game featuring around music must have good music”.  I knew that from the get go. But I’d at least think that a few other concepts from the game would be fun, even if the music wasn’t all too wonderful, but I have learned otherwise.

But that’s it for now. Since the testing week is over, I need to determine whether this is something that I can continue, or whether or not it will be a big distraction in terms of other development.

Comments Off on A small earful