Tuesday, July 23, 2013

Level Editors are Boring in Space

It's true! Writing a level editor isn't super fun. Burn down the level editor:

The fire still works! Kinda.
First, a quick update before we get on to the level editor. I am (not) secretly a fuel cell system controls programmer. Recently, a company I've previously contracted for contacted me to do some crazy-not-enough-time rapid fuel cells programming; and also you have to build the whole system by yourself because the other engineer is harvesting his crops (not a metaphor). In my efforts to quit my job and make video games, I have become a fuel cell system engineer. Oops. Luckily, it's only for the next week or two, so progress on Bad Things should be more exciting after that.

Also, Unity 4.2 is officially out. Now I can talk about all the beta secrets! Err, well, I pretty much did that anyways. I am not the best with confidential information. I am slightly surprised they released with this version because some stuff is still broken (TC particle settings don't show up). Also also, I've finally purchased a Unity pro license, so no more sneaking by on 30 day trials and beta keys. $1,500 is a lot, but the Unity team deserves every cent of it. Oh, and If you check out the release notes, near the very bottom it says:

  • Shuriken: Fix collision module such that trigger objects do not cause particle collisions.
You can thank me for that. I reported that bug and harassed the developers for the fix. I've made my mark on the world.

Level editing

Light directions as textures!
I find that I am less productive if I don't have a feature set in mind, so I'll put down some features here to help clear that up:

Done:
Lay out tiles for rooms.
Make walls from tile selection and group section into a room.
Make doors from walls.
Automatically create necessary oxygen system components.

Not done:
Make roof pieces.
Make walls from doors.
Be able to save and load layouts.
Unroom walls and tiles.
Select from a set of default room names (via drag and drop??)
Go back to tile editing mode after the tiles have been cleaned up.
Finalize level, removing level editor garbage.

That's all?

Chameleon, cobalt, and misty rose
Yeah, totally. I'm pretty sure I'll get roof pieces, and walls from doors done fairly quickly. I think saving layouts is a good place to start for the rest of the stuff because of some intangible hunch. Also, once the level editor is done, I'll release a unity scene file with all the level editing stuff so you guys can play around with it if you want. As always, questions and comments are appreciated.

Tuesday, July 16, 2013

iamagamer game jam: Blood

I didn't actually do much development for Bad Things this week, instead I was focused on finishing up at Intel, and then there was the iamagamer.ca game jam this weekend. Along with two other people, I produced a game in 48 hours. The link to download it is here http://jam.iamagamer.ca/submissions/53-blood, though I'll probably put up a download on this blog on an 'other projects' page.

Blood!

The topic was "Strong female protagonist", and my first idea was to take the concept literally and make a game about a female body builder. After some discussion among my friends, I decided to pitch a game about bleeding. One person put their name on it (someone I knew already), then I put my name on it, and we got a third person. Luckily for us, none of us had ever done a game jam before, and I was the only one with game development experience.

We settled on an action platformer where your blood is both your life and your ability to attack. Each weapon or spell you use would remove some of your blood, and on top of bleeding constantly, that makes for a very interesting decision process. You can't wait around too long because you'll bleed to death and you can't attack without planning or you'll bleed to death.

The initial scope was waaay too big, as it always is, but we finished with two enemies, a level, a blood sword, running, attacking and idle animations, and some sound effects stolen from Kirby Super Star put in during the last 20 minutes. It turns out that the particle effects used in the game became too intense for mere laptops so we had to demo the thing on my PC. Yes, I brought my tower to a game jam... I've since optimized the game by turning down the physics frame rate and changing the world particle collisions to planar particle collisions. I expect it will run on most computers now.

Game jams are crazy

It was 48 hours of intense, exhausting effort, and I think we built something that we can be proud of. It feels like we were one of the teams that got the most done, and I believe it's impressive that we got so much done considering our team size and experience. I don't know if I'll do another game jam any time soon, or at least until I forget how exhausting it was. Not to say it wasn't fun, but it didn't exactly achieve the goal of showing other people what I could do on a team, or networking very well (because I already knew one of the team members, and the other quit half way through and tried as hard as possible to remain completely anonymous, including making up new emails for the event and then deleting the accounts after it was over).

The boston scene

The boston scene is a lot stronger than I expected. There's a ton of people and they're all really cool. It's really fun to meet other game developers; my current social circles do not contain very many creative types, and game devs are the same intersection of technical/creative that I pathologically exhibit. I've met a ton of audio guys, some artists, some modelers and a bunch of engine guys. I'm not usually super extroverted, but I can power up my social abilities when faced with the consequences of network or die. I've spent the last 4 days traveling back and forth to boston every day, so it will certainly be more convenient when I move there.

Normal development of Bad Things should resume this week. Here's some level editor progress to smooth things over.


Sunday, July 7, 2013

Surprise level editor!

Yes, the next thing I am going to be working on is the level editor. I didn't actually plan to do this for quite a while because it seems like a nice but not essential feature to have. For reasons I will make clear shortly, I need to build the level editor before I can continue.

What is this garbage?
Menus are the best showcase of my work.

Wrenching animations

I'm so sorry for the pun. What I really wanted to work on after the procedural fracturing was repairing of the fracture sites. Hit the debris with a wrench until it's close to its non-fractured position, and then weld it into place. Here's a spiffy gif of the wrench animation:
+1 for perfectly looping wrench
Here is a video, but it's not the greatest. Everything is 100% broken at the moment; I guess that's what I get for building my game with the Unity betas.


The video shows off some cool stuff, even if it looks horrible. There's the inverse kinematics on the hand placement. Inverse kinematics is a way of calculating the shoulder, arm and elbow position required to place a hand at a certain position. There's also the physics on the debris and well, you can see the lighting is broken (Unity's fault) and the scale is all weird (my fault).

Everyone is three feet tall

That's right. The reference I was using for the scale and level layout pretty much has everyone being three feet tall. After making the wrench animation, I naturally tried to apply it to a character and animate it. The problem here is that a standard character model is 1.8 meters tall, or almost twice the height of the ship. Changing the scale of the ship to be twice as tall reveals just how incredibly cramped the place is.

It's interesting how making the place bigger actually makes it look smaller.

Scaling the character models is a no-go because you'll have to scale down all the animations too and reimporting stuff is a nightmare in general. The ultimate conclusion is that I'm going to have to build the level editor a lot sooner than I expected. I need to test out different scales and room sizes, and I can't do that easily with my current set up. As for the level editor itself, Unity editor scripting is in some respects quite easy, but implementing a custom tool for laying out floor pieces and walls is difficult. There is some artificial difficulty here because most of the problems are caused by the complete lack of documentation. My techniques thus far have relied on snippets from the forums and wishes. Example: Editor.OnSceneGUI()'s documentation consists of:
function OnSceneGUI () : void 
Description 
Lets the Editor handle an event in the scene view.
In the OnSceneGUI you can do eg. mesh editing, terrain painting or advanced gizmos If call Event.current.Use(), the event will be "eaten" by the editor and not be used by the scene view itself.
That's all you get. Now go implement a level editor!
...It's coming along, but there are bugs and I don't really know what I'm doing. Expect to hear more about the level editor next time. Also, it's my last week at Intel(!!!). Let's all celebrate this new era of starvation and potential homelessness!