third-helix.com (you could filter for Technical or Unity Tutorials)
I'm a gonna spend some time skimming these.
You can get the new build at http://energyhookgame.com if you don't already have it. This build has gear customization (adjust the speed of your jets, the parameters of your energy hook, and more); new animations (hold X+Y to get at the third midair trick now); and leaderboards, so you can throw down. For now, you can grab whatever screen name you want, though I will be resetting things later when we get closer to Done.
With the latest release I wanted to not only get every stretch goal to a first draft state but also polish glaring issues - janky animation in particular. (Especially since James Zachary has been doing some work and there's no excuse any more.)
It's taken all week! I started cleaning stuff up on Monday, sweeping up dead leaves, so to speak, and have finally gotten to the point where I can push a release that doesn't suck.
This last glitch that I was cleaning up today was one for the books. The lighting in one of my levels looked really blown out - but only when I played the build, not when I played it in the editor. After much experimentation, I realized that if I went to the level from the front end, it had the problem. After looking at various lighting and camera and graphics settings and wondering what could be bleeding from one level to the next, I got fed up and started deleting objects from the front end, hoping it finally would go away.
The offending object? ParseInit, the object that handles the leaderboard API.
But it wasn't Parse's fault. At some point, I somehow accidentally dragged the front end's directional light into the ParseInit object. Which is persistent. So the directional light was in every level. (It looked a little bad in some of the levels, but was particularly painful in the Misty City.)
I'd also discovered that my lighting and shadow quality had ... drifted. Just didn't look as good as it used to. Maybe I applied some changes to a light prefab, or the camera, or something. Don't know.
All in all, I think Unity could use some way to lock your objects and prevent them from being changed once you have them at a state where you feel they're done. Sort of like taping down knobs on a mixing board - you don't want to accidentally bump them and mess things up just a little, because you might not notice until much later and be at a loss what got messed up.
And, just for giggles, this is the checklist I follow when I'm trying to get a build together:
Does anything need its lightmaps redone?
Check log and update version number +1. Apply changes to prefab.
Set quality to normal.
Save project & exit Unity (just to be safe.)
If currently using NGUI Easy, delete and switch to NGUI Pro
1st & 3rd person modes
registering for leaderboards
If testing fails, fix & go back to 3
Once testing is solid, add changes. Commit changes
Build linux (universal)
Change Input for Mac: InputMac -> Input
Build & test on Mac (have to build from Windows so we have the lightmaps)
Switch back to Windows OS
Zip separately and share with Humble on Google Drive (this portion takes me hours because of my slow upload speeds - good to do at night)
Wait for them to get in there
Announce to: in-game news page, blog, forum, mailing list, facebook
I'll be talking at Unite 2013 - August 29th at 5pm. http://unity3d.com/unite/unite2013/schedule
For a sneak preview you can check out this article on using SketchUp and assets from Google Warehouse in Unity. I'll be demonstrating that live and answering questions.
I'll probably be up there for just that day - if you want to hang out sometime that day, get in touch!
I heard about the Ludum Dare 7drts just a couple days before it happened and said, "Why not?" After checking on Facebook to see if people who are avidly waiting for Energy Hook would be pissed off, asking my wife if she could maybe do a little extra childcare that week, I committed.
What came out at the end?
Orchammer 1944: Nazi elves want to exterminate us Orcs, and we have to fight back with hammers and tanks. A session takes a couple minutes - the whole thing takes a couple hours.
I've done quick games before, but of all the games I've made in a week or less, this is the best.
So what did I learn?
Livestreaming Makes Me Very Productive
I livestreamed most of my work. You'd think it would be a distraction, but livestreaming works even better than Stay Focus'd and Rescue Time at getting me to focus. As long as someone is watching me, or even might watch me, I stop reading e-mail, using social networks, and even put off going to the bathroom. It's the benefits of pair programming without having to spend a second programmer on it. It makes me want to stream my work on Energy Hook much more frequently, and I wonder if it scales - could every member of a larger studio stream at the same time?
"Yes, And..." Gets Things Done
Improv theater has a thing called "Yes, And..." which I learned about from my tabletop RPG playing and these books. The idea is a lot of us have a tendency to shoot down ideas that aren't ours. It's our first reaction. A book on parenting sensitive children that I read even has a name for it: 'bad first reaction' - anytime somebody suggests something the default is to say no. That's my daughter, and me, but thanks to my tabletop RPG playing I'm learning to get over it. I look back at ideas I shot down during my videogame career and ask myself, "Why did I shoot that down? It would have added to the game and in its absence it wasn't like something rushed in to fill the void and make it better."
I did a lot of Yes, And... over the last seven days. I started with an existing RTS framework. The people watching the stream gave many suggestions and feedback and I believe I incorporated most of them - and in particular, Mark Nau gave me the title, and a document on his ideas for the macro game - which I didn't finish to his specs but I feel it turned the game from something I could enjoy for 5-10 minutes into something I could enjoy for 2-3 hours.
I Almost Can't Ask For Feedback Too Early
It's super-tempting to say, "I know this has problems so I'm going to fix them before showing it to people." After all, what's the point? They're just going to point out the problems I know I already have and I'll be like, "Yeah, yeah, I know."
So there's a couple of problems with that logic:
Make A Game ASAP
It was tempting to scope my game so that the first playable isn't ready until day 6 or 7. Instead, again at Mark Nau's advice, the first thing I did after I had the tech up-and-running was make a game out of it by adding some creeps and giving it a win and lose condition. That way I was able to ask for feedback on Day 3.
Do Looks Matter? Why Yes, They Do
I could have made the game with the existing art in the framework and some cubes and spheres and just worked on game mechanics all week, but instead decided I wanted to spend at least a day on art so I'd have something at the end that looked finished rather than prototype-y. I let people vote on my ideas for the look - and the votes were pretty split, with the "Ed Emberley" style winning.
I wasn't totally consistent about it, and ended up with some outlined orthographic 3d pieces mixed with some Ed Emberleyish 2d pieces but pretty happy how it turned out, and want to do an RPG with a similar look in the future - like pixel and voxel art I think a look like this has its own charm, is super-easy to produce, and opens up lots of opportunity for modding and customization - without being tired, like pixel and voxel art. In the future, I'd model the characters in a 3D package instead of using bitmaps.
Also, by choosing a look, the game really started to take shape. Once I knew there'd be Ed Emberlyish humanoids, I knew there'd be orcs. But there were also tanks. Tanks and orcs? Why, it's a WW2 - fantasy mashup. And then Mark suggested the title and I knew what the game was. Though it was a day later that I realized it made more sense for the Elves to be the bad-guys.
And, this is a no-brainer - while I might wish that people could appreciate a game by simply looking at its abstract math, they don't. Going by the 'number of twitter / facebook comments' metric as an index of a game's remarkability, the new look drove a lot more interest in the game.
Google First, Asset Store Second
When looking for plug-ins, code, whatever for Unity, there's a lot of stuff out there that people haven't bothered to put in the asset store. I went straight to the asset store for RTS technology and wouldn't even have found what I ended up using if it wasn't for Twitter. Googling also got me the blood splatter tech I used.
What Went Wrong
I lost most of the first day by starting with a framework that, after getting it up and running and making some progress, I decided I simply didn't like. Though I'm not sure if this is an example of What Went Wrong or if I did the smart thing in abandoning that package and switching to the other one. The only real way to evaluate whether you like some middleware is to work with it for a while; if you have two choices there's something to be said for switching mid-stream just to see what you're missing. Could I have had the foresight to realize that the first package wasn't for me? <shrugs>
In the final analysis, this game is pretty cool for a gamejam but isn't going to set the world on fire, as it is. Which is fine ... expecting every gamejam to produce a Tower of Goo, Receiver, or Canabalt would be silly ... most of us will go our whole lives without a gamejam of that caliber ... (but I can wish, even though I've already been lucky enough to come up with one pretty cool game mechanic in my life.) When I do another game jam, I wonder how I can tap into something deeper, go more creative / innovative, mine that undiscovered country where crazy things like Starseed Pilgrim and Tower of Goo come from - or if it's really a numbers game, where I have to make a lot of shots on goal to finally come up with something truly remarkable.
I gave a little talk - mostly just a Q&A - to the Seattle Unity3D User's Group last night.
They didn't record it, but Joseph Stankowicz took notes.
I also learned about the Washington Interactive Network REACTOR program - a program to accelerate small studios making games and apps. They have office space, mentoring, and cool people are involved. If you're an indie in the Seattle area, they could be a big help.
This is a great article with great ideas: http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/ It's also worth coming back to, as your project gets bigger and you get more proficient with Unity, to see if things that didn't make sense before now apply.
The first time you look at it, you may wonder: "50 is an awful lot. Which of these are *really* important?" A thing about Unity is its pretty flexible, so you can be agile about adopting these things. For example, 27 - I'm not doing that yet, probably will have to someday, but when it comes to that a global search and replace should let me fix things up in a couple hours.
Here's the ones I use so far:
6, 7 (usually), 9 (usually), 10, 11, 12 (if you're using other people's assets you can do this with prefabs), 15 (look at prototype textures in the asset store), 16 (well, most things), 19, 26, I'm not doing 27 but probably will have to at some point, I'm not doing 30 but only because I'm the only one working in Unity right now (and I still do it sometimes), 32 (but in a different way, with saveable game state in a MacroState class), 35 (who wouldn't do that, anyway? parallel arrays are so old school), 42, (on a Mac you don't have to do 43), 45 (what you've unlocked so far), 47 (I have a "PrefabLibrary" scene - more on that in a bit).
I'm not doing 36, but I was just bit by some enum problems: supposing you declare a big enum. (I was using one for string localisation.) At first, that seems really nice, because in the Unity inspector gameobjects that expose the enum are human readable. But behind the scenes they still store their values as int, so if you insert something in the middle of the enum it will throw off all your work. For small enums 36 seems like a good option ... for long enums I might want to use strings. (A localisation file is really just a super-long enum, for example, and he does something like it with 39.) Or you can still use enums and make sure when you extend them you only ever add to the end...
37 looks really cool but I haven't tried it yet - my main character class could use it. What I've been doing is giving related parameters the same prefix, like "swing" or "wallrun" or "jump" and alphabetizing them to make them easy to find.
On Specialized Prefabs
I have a lot of triggers that activate challenges. I want them all to look and act the same, but they all trigger different challenges. Sometimes I'd make a change to one, hit Apply to propagate it to all of them, and realize that some variable I didn't want propagated got propagated, like what text it displays or what goody it unlocks.
Concretely, suppose I have two of these things. One unlocks goody 34, the other doesn't unlock anything so I left it in its default of 0. Later I decide these triggers aren't green enough, and I happen to have the scene open with the first one, so I make it more green and hit apply. Now the prefab's default state is to unlock goody 34, and any trigger that hasn't been explicitly specialized will have that 34 value in its unlock variable.
But these things are still pretty simple - so Herman's 33 technique seems like overkill. What I've started doing:
Another Gotcha With Prefabs - Don't Make A Hierarchy Out Of Them
One thing I've liked to do is build, say, a walkway, or a pipe, out of walkway segment or pipe segment prefabs by making each segment a child of the previous segment. This way I can add each segment and just type in the new +x or +z or whatever, it's the same each time. BUT - this is kind of like a nested prefab, which Unity doesn't like, and if the underlying prefab changes, it can cause all of these pieces to lose their parenting information, and I have to rebuild the thing again. So I still sometimes build things this way, but then make sure to unparent them afterwards.
Normally I don't notice these kinds of things, but maybe I'm leveling up in Artist, because I was wondering why the skybox in my level looked so pixelly and banded. It was actually made up of 1024x1024 source textures, so...why?
Turns out they default to 512 width max, and lose a lot with compression as well. Override For Standalone, 1024 Max Resolution, Format Truecolor. Much better. Still banding but I think I can live with that. But so much memory for a skybox seems extreme even in this day and age. I managed to get the memory usage down some with Texture Type Advanced, Generate Mip Maps off, Format RGB 24 bit. Still seems extreme, but maybe that's just because I'm old. (And 512x512 is probably fine for a skybox that doesn't have tiny stars...)
I had fun playing with perlin noise and shaders to make the various procedural smoke patterns for sixty second shooter and last week brought the same tech over to Energy Hook - but before I did, I looked around the Asset Store to see if there was anything that would do the same effect. There was, but it was all at least $50 or more, and didn't feel like paying it. So I did the work - took me longer than I expected to figure out ShaderLab - and here's the result.
And then I thought, hey, I would have paid $10 for that. So why not put it up on the Asset Store and see if I can sell any?
It's not the most powerful or flexible procedural smoke generator in the Asset Store, but I'm pretty sure it's the cheapest.
Why is the Unity Asset Store so much more pleasant than the Windows 8 Store or the Chrome Web Store? Well, it's curated, so there isn't a lot of utter crap in there. (It's tempting to download every single free asset.) It's sortable by a variety of parameters (such as price.) It's easy on the eyes - partly because it's curated (there aren't infinite results splitting your attention) but partly because the graphic design is better IMO.
Submitting an asset wasn't hard - about as easy as putting an app in the Chrome Web Store - and seemingly much easier than submitting something for the Windows 8 store. And it was accepted on my first try, so yay.
I'll keep you posted how it's selling. Although I doubt one could make a living out of selling stuff in the Unity Asset Store unless it was something crazy popular that almost everybody needs, like nGUI, there's a chance it could provide decent alternative revenue if you're selling stuff that you would have made anyway for your game - then it only has to pay for the effort to get it into the store to make it worthwhile (but mustn't forget to include the opportunity cost...) We'll see.
On the technical side, if you want an effect like this and you're too poor to pay the $10, I'm here for you, since you're a valued reader of my blog. This is where the magic happens, the Cg that I brought over from sixty second shooter:
float2 in v_TexCoord : TEXCOORD0,
float4 in v_Color:COLOR0,
float4 out Color : COLOR,
uniform sampler2D s_Texture : TEXUNIT0,
uniform float Time,
uniform float Rate,
uniform float2 Scroll,
uniform float4 meshColor
float offset = Time*Rate;
float4 c = tex2D (s_Texture, v_TexCoord + float2(0.25,-0.25) + offset*Scroll.xy);
c = tex2D(s_Texture, c.yx - 8.0*float2(offset*0.71,offset*0.33));
float intensity = c.r + c.g * 0.5 + c.b * 0.25;// + c.a * 0.12;
intensity = intensity * intensity;
Color = intensity * meshColor * v_Color;
The texture it looks up into should be a perlin noise texture with different frequencies of noise in each color channel. It uses the RG channels to then look up into the texture a second time, and then blends that noise together. But it does interesting kaleidoscopic things with normal textures as well. You'll have to wrap that in ShaderLab stuff to get it working in Unity, but it should work more or less as-is in engines that use straight up Cg (like Playstation Mobile.)
Enjoy! If you buy it, feel free to ask questions right here in the comments.
There's something about the work of Jordan Grimmer that makes me want to sit down and try to model it in Unity. So, inspired by https://www.facebook.com/photo.php?fb..., I did this:
This shows off some Sketchup modeling, cubemapping, bloom, cloth, atmospheric fog, terrain editing, and some really manky stock waterfalls. I've crammed the three hours down into seven minutes, so you'll probably need to be ninja with the pause button to see how I'm doing some of this stuff.
I love doing this, even though it's disappointing how far from the mark the final product ends up...
...probably better ways to spend my time, like working more directly on Energy Hook, but, hey, I'm practicing my Unity skills and maybe Energy Hook can have a level like this one. Hey, Google employees get 20% discretionary time, right? Maybe this is my 20% discretionary time.
Cartoony and reflective?
Lots of anime and manga have reflections. If they didn't, windows often wouldn't look right.
Making something reflective in Unity is as simple as using one of the Reflective shaders and then adding a cube map. The hard part is finding the cube map. You can take the same skybox you're using and use its textures, but that won't have any of your level's details in it, and also ends up backwards and can have seams if someone's looking closely. (Side note - if someone looks closely at your reflections they can almost always find something wrong with it. Go look at some Borderlands 2 reflections.)
I wanted this building to be shiny (I have a Backer Upgrade for anyone who recognizes where I took that building from, btw)
I tried building a cube out of the textures from the skybox but it was too dark and had seams:
So, shout out to Cubemapper. For $10 it's trivial to create cubemaps.
That reflection is a reflection of the building in the previous shot. You can control how blurry you want it to be by setting the texture resolution.
One thing we did on Spider-Man 2, that I don't think I'll do here, is render a reflection of Spidey when he was crawling on walls. Since you can't crawl on walls in this game I don't think I need to do that - wall-running is fast, and by the time it's over you probably don't notice that you never saw your own reflection.