Categories
Life

Weight Loss

I just achieved my goal weight loss of 25 pounds since January. I’ve been pretty happy with the results, and figured I’d write a long post summing up what I’ve done and what I’ve learned.

My Goals
I started in January at a weight of about 225lb. I’ve weighed in the 220s for a while – at least since college. I picked 200 because it seemed like a good weight to strive for. I didn’t want to try any specific diet – I just wanted something simple and sustainable so I could develop some good habits. And mostly, I just didn’t want to work very hard at it.

How I Did It
I don’t expect this to work for everyone, but these are the major things that worked for me.

LoseIt!
Easily the most important tool that helped me was LoseIt! on my iPhone. LoseIt tracks your weight and what you eat. You can set up a goal, and LoseIt will adjust your daily calorie budget to meet that goal. It has a giant library of foods already in it, so adding new foods was always easy – usually scanning a barcode brought up exactly what I was eating.

Tracking what I ate had a few important side effects. I learned what I could eat that was “cheap” (calorie-wise), and how much I could eat. This meant going hungry a few times, but I quickly got used to the lower calorie consumption.

Measure your food
I bought a digital scale, got out my measuring cups and spoons, and measured everything I ate. After doing this for a month or two, I started to learn how large serving sizes were and could better estimate my consumption.

I didn’t change what I ate, just how much I ate. I still eat plenty of cereal, pizza, french fries, and tacos. I just eat them in moderation and I’m acutely aware of how much I can eat before going overboard.

Lean Cuisine is cheap
Lean Cuisine, Healthy Choice, and Smart Ones made up the bulk of my meals because I’d eat them at work for lunch. They’re pretty cheap, both dollar- and calorie-wise. When I can feel satisfied from a 300-calorie Lean Cuisine meal, there’s a lot more calories I can spend elsewhere.

Don’t be strict
I occasionally took a break from my diet. During my trip to PAX, I left the diet behind entirely and ate what I wanted (and what was available). Occasionally I’d go out and eat a giant cheeseburger or pizza. This reduced any stress of trying to stay on a diet, and was a bit of a reward for my progress. Granted, I had to immediately get back on the diet the next day.

Don’t get discouraged
When I got back from PAX, I had gained 11 pounds. That’s a pretty big blow, but I didn’t let that discourage me, and I got back on my diet the next day. Those 11 pounds quickly bled back off. I was fortunate that I was never terribly serious about the diet – it was just something I wanted to try – so setbacks like this didn’t phase me.

Side Effects
There have been some interesting side effects I didn’t expect starting out. For one, a lot less food will fill me up. I guess my stomach got used to the smaller amount of food and shrunk a bit, which made the whole diet easier. I also have a lot more energy, I sleep better, and I feel better in general. I assume this is all because I’m carrying around 25 fewer pounds, which makes a pretty huge difference over the course of the day.

People have apparently noticed, too, which feels odd. It’s rare when people ask me if I’ve lost weight, but coworkers have been asking about it and congratulating me when I tell them how much I’ve lost. It’s a nice boost when someone notices your progress.

Stats
Some miscellaneous statistics:
Total weight lost: 25 lbs.
Time: 164 days (January 11, 2012 – June 23, 2012)
Average weight loss per week: 1.05 lbs (0.15 lbs/day)
Average calories consumed per day: 1478

Weight loss graph from LoseIt.com
Weight Loss Progress from January 11 – June 23

In Summary
I told people several times during this diet, “If I had known it was this easy, I’d have done it a long time ago.” I want to stress that I got this weight loss simply by monitoring what I ate. I didn’t add any exercise (because I’m lazy), and I didn’t change what I ate (because I like what I eat). The result has been a simple, sustainable diet that I can continue with for as long as I’d like.

I know I still need to add some exercise and probably eat a bit healthier overall (more green stuff, probably), but I’ve been pretty pleased with how a few simple changes have resulted in a pretty dramatic shift.

And maybe someone will come along, read this, and say to themselves, “I’m lazy and cheap, maybe I’ll give this a try, too!” And maybe it’ll work for them. And maybe I can write a dieting book and become filthy rich. And if not, I’ve at least got my own success to be proud of.

Categories
Projects

BattleGrid – New Gameplay Concepts

I’ve been considering some new gameplay concepts and decided to implement a few and see how they pan out. This post is about a new resource storage concept.

Currently, each player starts with a resource storage limit (“cache”) that is determined by how many outposts they control. The player’s base (“core”) provides storage for 100 bits. Each outpost adds storage for 10 bits. A player can keep building outposts to increase their storage capacity.

The new concept moves the storage to the grid cells you control. This means outposts are still the structure that provides more storage, but only because they expand your area of control. Grid cells started off as simply being the area you can build in, but now they’re much more important. Each grid cell you control can store 1 bit or power a structure. If you build on a cell, you lose the storage capacity for that cell, but gain whatever benefits come along with the structure (like being able to kill things).

This change has several side effects. Placement of outposts becomes a bit more important. Building an outpost on the edge of your territory is best, since it provides the biggest increase in storage capacity. However, overlapping outposts are still fine since it means losing one won’t cause a big dip in your storage capacity.

Another side effect, and the one I like best, is that building outposts to contest enemy control areas is an effective way of cutting off their storage – it’s like attacking their supply lines.

In the past, I found myself building several outposts around my base just to be able to build bigger structures (artillery and shields). It’s not a strategy that I intended, and it would be difficult to teach the AI the same strategy. However, the AI is already decent at expanding its control, so this change should put the AI on more equal footing with the player.

Categories
Projects

BattleGrid Update – May

From now until the end of development, I’m going to do a monthly wrap-up of what’s been done with BattleGrid. Hopefully there won’t be too many of these before BattleGrid is finished.

How’d May start?
At the beginning of May, I still had two major problems that were holding back development. First, the number of draw calls was far too high for the simplicity of my game, and without lowering the draw calls, BattleGrid was unlikely to run well on the iPad. Second, the AI was eating up far too much CPU time, mostly because each turret had its own AI all trying to run at the same time, which was hurting framerate.

What got done?
An epiphany on the draw call issue ended up solving the problem. Even if the problem isn’t totally solved (I have a feeling it will pop back up later), I know how to tackle it to improve the draw call count. A similar epiphany struck me related to the AI, which has eliminated problems with too many AIs trying to run at once.

In addition, I’ve added an extra animation to one of the turrets, which looks great and adds some life to the game. I’m planning on updating the remaining turrets with similar animations. I also added a new effect when shields are hit, and I added or improved several sound effects.

What’s left?
AI Rewrite and Updates
I want to rewrite my AI to use a finite state machine, custom code, or a new behavior tree system. Currently, the behavior trees are created with Behave, which is free and works great, but it requires a 3-second logo to appear when the game starts. BattleGrid has a long enough load time as it is, so I want to trim out everything I can. The AI also needs some general tuning to run faster and make sure I don’t have any memory leaks or excessive garbage collection.

Effects
While I love the style of the game and think it’s gorgeous when it runs at 60FPS, it’s still a bit bland. It’s lacking anything that makes you go “Wow” or even “Neat.” I think what’s needed here are more of the effects that make the game feel more alive, and I’ve begun adding those.

Defense Mode and Editor
Defense mode and the editor need testing and bug fixing. I play skirmish and challenge maps a lot, but defense doesn’t get as much love. The editor, likewise, hasn’t seen any work or bug fixing in a while. There are also several bits of the game that need finishing, like the victory screen.

Map Sharing
I need to create a site for BattleGrid where I can support map submission, viewing, and downloads. I plan on letting players upload, rate, and download maps from the server. None of this has been set up yet.

Music
I’m not a composer, so this is going to be incredibly difficult for me, even though I know the style I want.

Goals for June
I’ve been playing a lot of Diablo lately, so I’ve cut back on how much I expect to get done. For June, I just want to get those extra effects in, and maybe some bug fixes for the editor and defense mode. I’m also planning on looking into what it would take to rewrite my AI as a finite state machine. I like behavior trees better, but my AI is so simple a state machine may work just as well.

Categories
Projects

BattleGrid Update – An Epiphany

So I finally had that epiphany I was hoping for. I should have expected it to come to me as soon as I decided to quit working on it…

I was reading over my last post (in which I decided to quit working on draw calls) and I realized that the majority of the vertices in that vertex buffer are used up by my grid tiles. Although each individual tile only has 4 vertices, the map as a whole uses up a large chunk of the 4000-vertex buffer. My problem was that I was trying to get everything into a single batch – it’s simply not going to happen because there’s too many vertices to batch. So I decided to try something slightly different. Instead of trying to batch everything together, I’ll batch all the tiles together, and all the structures separately. And today, after about 3 minutes of work setting up a new material for just the tiles, I’m down to around 20 draw calls. Well within the iOS “limit” with room to spare. So I’m happy and I can still move on to doing more interesting things.

Categories
Projects

BattleGrid Update – Screw Draw Calls

Trying to get my draw calls down is extremely frustrating. I’m slowly learning what I’m doing that’s causing the batching to break, but I’m also finding out that some of what I want to see (draw call wise) simply isn’t going to happen.

I just found out that the vertex buffer for draw calls is around 4000 vertices (at least as of 2009). For a 30×30 map, my grid alone is 3600 vertices (900 grid tiles * 4 vertices per tile). For a 40×40 map (my largest maps), that comes out to 6400 vertices – already too many to batch. So, trying to get my terrain and structures to batch together is futile anyway. On the other hand, it seems like I should still be able to get down to just a few draw calls. Even if I max out that vertex buffer each time, I should still only be making about 4-5 draw calls, not the 86 I’m seeing. Those 80 extra draw calls are really causing me grief, and Unity can’t be so stupid about ordering things that it can’t properly organize the batches…

So for the time being, I’m going to forget about draw calls and get back to the fun stuff – AI and bug fixing. I’m going to do some optimization to the AI to get it running smoother, then fix the few things that are still slowing things down (like rendering map previews). Maybe I’ll also take a stab at the map submission website. Anything to get my mind off those damned draw calls.

Categories
Projects

BattleGrid Update – Graphics

Since I’m kind of stuck progress-wise until I figure out what to do about the draw calls in my game, I decided I’d do a post on some of the updated graphics in BattleGrid. Looking over the images I’ve posted in some previous posts, I realized that things have changed a lot since I posted those images.

New Tile Graphics
Tiles have gotten two big updates – first, I reduced the number of planes used for a single tile from three (base, owner highlight, and an extra highlight) to one, which cuts the number of polygons on a single map by two-thirds. Always a good thing.

Second, I found a really cool (and more importantly, free) circuit board drawing that I put on the tiles. I love the way it looks, and it makes the grid a little less barren.

The new map tile, with a circuit board texture.
The new circuit board tile.

The “contested” tiles also got a graphics update. They’re now “cracked” tiles. I like them, but they’re likely to see some updates before the final version:

The new contested tile.
The new contested tile, with a “cracked” look.

They look best on defense maps where it looks like the gateways have “infested” the map. Speaking of which…

New Gateway Texture
The original gateway texture hasn’t been shown before, but it was using a noise-generation function to animate the portal. It looked neat, but killed performance, so I scrapped it. I use a flat texture and a particle system now, which looks pretty good:

Gateway
The gateway, used by waves of enemies to invade the grid.

If the gateway looks a bit like the obsidian portals to the Nether from Minecraft, that’s good because it’s exactly what I intended. If they don’t… Well, that works, too.

New Buttons & Windows/Dialogs
I’ve said before I hate the gradient backgrounds on most of my buttons. The idea I’ve been thinking about for a while now is using scan line backgrounds, sort of like a holographic display. I finally created some, and I’ve updated practically the entire UI to use them.

The new “holographic” buttons come in two styles – the main menu buttons:

New play button
A good button for games to have.

And the window/dialog style:

Close button
Used for… closing things.

The dialogs themselves are supposed to look a bit like a holographic display. They’re lacking in depth, though, but with my new UI framework, I should be able to eventually do something about that.

Pause menu
Kind of boxy.

The new UI uses a package called “NGUI”, which is actually pretty cool. I’ll write a separate post about NGUI soon, since it has totally changed how I think about the UI.

New Factory Model
The last time I mentioned factories, I said the factory was likely to see another model update, and they have. The new model looks a lot like the original:

The newer new factory.
The new(er) factory

However, this one is animated, so when it’s building the “wings” fold down and spin:

The newer new factory, building a tank.
The new factory looks better when it’s moving.

It looks pretty cool in action. I also added a “platform” under the factory to make it a bit easier to tell that the factory covers 9 tiles. The platform isn’t in these images because I took them before I added it. Maybe next time.

Categories
Projects

BattleGrid Update

I’ve scaled back my work on BattleGrid a bit. Through February and March, I was working on BattleGrid like it was a second job, and I could definitely feel some pressure building. I was making a big push to get something ready for PAX, and even though I missed that target, I’m happy with the work I got done. It’s just not a sustainable pace.

That said, I’ve been working on the problem I mentioned in my last BattleGrid post – draw calls. I’ve been trying to get batching working properly, and to that end I’ve got my texture atlases set up and all my meshes updated to use the atlas. In theory, a scene in my game should be using less than 10 draw calls: 1 neutral material (for the neutral player and projectiles), 4 colored materials (1 for each player), 2 for the UI (foreground and background), and a few for particle effects. Instead, I get 300 – 400 draw calls. For those of you keeping count, that’s 3x more than before creating the texture atlas and updating all my meshes. It’s the exact opposite of what I expected.

I know the atlas is supposed to work, so there’s obviously something else I’m doing wrong, I just don’t know what yet. Maybe I’ll have an epiphany and realize I’m doing something stupid, or maybe I’ll spin my wheels for a month or two and get very little done. I’m hoping for the epiphany.

Categories
Games

Mass Effect 3 – The Ending

There’s been some “discussion” on the Internet about the ending to Mass Effect 3. There’s even a theory that the ending isn’t “real” and coming DLC will reveal the truth – called the “Indoctrination Theory” (GameFront has a good writeup about it here: http://www.gamefront.com/mass-effect-3-ending-analyzing-the-indoctrination-theory/). I’d love to find out BioWare was just tricking us, because the ending as it stands is extremely unsatisfying. The ending is boiled down to a single choice between 3 options, just like Deus Ex: Human Revolution, and none of them are really satisfactory. Unlike most of the game, there’s no clear “Paragon” or “Renegade” choice, and while I loved the hard decisions I was forced to make throughout most of the game, I couldn’t find a choice I liked here – no matter what I chose, I felt like I was making the wrong choice. It’s not like Inception where the ending is left up to interpretation – there’s simply no ending to be had.

Not only that, but your decisions and war assets from the rest of the game don’t make any return for the final scenes. Collecting war assets only contributes to a number that unlocks the third option. And although the third option gave me the “happiest” ending (in my mind, at least), it still didn’t feel right. I love endings that are up to interpretation, but there’s so little closure at the end of Mass Effect 3 that it feels like something’s wrong. The rest of the story was fantastic, and the universe is so fleshed out that it speaks very highly of the writing – dialog is perfect, the characters had so much personality you could become attached to them, and there were several jaw-dropping twists along the way. In spite of all this, the ending feels empty – almost as if they gave up or ran out of time. Or maybe they just couldn’t figure out how to end it and wanted to see how everyone reacted.

Categories
Games

PAX East 2012

I thought it would be fun to do a “roundup” sort of thing about what I saw/played/liked at PAX East this year. I’ll start with my favorite stuff, so you can quit reading or skip ahead if you get bored.

My Favorite Game: XCOM
I knew there was a strategy XCOM coming, but I haven’t been keeping up with game news, so I knew nothing about it. Seeing it at PAX (both on the show floor and in the XCOM panel) got me extremely excited about the game. I loved the style of the turn-based combat, with extra animations as things were going on. The “ant farm” base looked awesome, too. It was also great to see that they’re drawing so heavily from the original – I can’t wait to play it when it’s released later this year.

My Favorite Not-Game: “Day in the Life of an Indie Dev” Panel
I mainly liked this because it reinforced everything I’m already doing in the development of my game, which was mainly “Just make a game.” They even mentioned Unity several times, so I’m happy with my choice of tools. I only attended “part 1”, but it made me feel good about the path I’m taking with my game, so it’s all I needed.

What I Played
Monaco
I knew a bit about Monaco, but after playing it, I know it’s a day-one purchase. Even though we crashed the game, it was so much fun, even when I kept screwing up and alerting all the guards. My favorite moment: Matt saying “Don’t bring them toward me!” as an army of guards was chasing me.

Guacamelee
This was probably my biggest surprise at PAX this year. I had heard nothing about Guacamelee, but it’s a fun platformer that looks gorgeous, has good writing, and has a neat “dimension-shifting” trick.

Bloodforge
A God of War-like action game that’s pretty generic, but really fun to play. It has really nice graphics, which was apparently part of the goal of the game – to create an XBLA game that looks like a AAA game.

Trials: Evolution
If you’ve played Trials, you know how this plays. The multiplayer was really fun, though.

Star Wars Kinect
The more I see of this game, the more I want it, even though it’s just a collection of different game styles. I played the Rancor destruction game, and it was fun, mindless destruction.

Go Home Dinosaurs
This is a neat tower defense game for Chrome (NaCl), where you play as gophers who are trying to save their barbecue from dinosaurs. The “towers” are shaped like Tetris pieces, so you have to arrange them in the open area of the maps. It’s also got a kind of “deck building” feature, similar to Plants vs Zombies.

Raiderz
I got a free mug and bag for playing it. That was the best part.

What I Saw/Watched
Assassin’s Creed 3
Looks amazing. I’ve always loved the AC games, and I’ll likely buy this one right away.

Antichamber
I played this a while back as a UDK demo, but it’s come a ways since then. It still looks like a great FPS puzzler that encourages a lot of outside-the-box thinking.

AirMech
I wish I took the time to play this. It looks beautiful, has transforming jets, and looks really fun.

Mark of the Ninja
This looks like a cool Metal Gear Solid-style stealth action game. I wanted to play, but media badges got in the way and I was tired.

Crimson Dragon
A Panzer Dragoon clone that plays like Child of Eden. Child of Eden was hard to play with Kinect, but hopefully this is a bit better. It has dragons, so I think I am required to buy it.

Steel Battalion: Heavy Armor
This looks cool, and the Kinect controls seem to replace the need for the giant controller. I’ll have to play a demo before I buy it, though – the Kinect controls seemed to be having some issues, though that may have just been because of the crowd.

Novus Aeterno
An MMORTS that looks a bit like Homeworld and I’m a sucker for RTS games with space ships. According to the devs, it’s $30 with no subscription, so it might be worth it. I’ll at least play the beta coming up later this month.

That’s all I can think of for now. I might add more later.

Categories
Projects

BattleGrid – PAX

As stated before, I was aiming to have BattleGrid playable on my iPad by PAX so I could get feedback from strangers. While the game is certainly playable on my iPad, it still suffers from framerate problems when things get hectic, so I’m probably not going to be showing it to strangers – it’s simply not ready for that.

I think I’ve figured out how to fix the framerate problem, I just don’t know exactly how to do it, and the only tools I’ve found to help either don’t work well or are a bit complex.

The problem is that iOS simply can’t handle drawing a lot at once. Unity uses “dynamic batching”, which means that each time it needs to redraw, it batches everything together that’s using the same material (textures + shader) and sends it as a single draw call. My game uses about 100 – 140 draw calls in busy scenes. Everything I’ve read says I should keep it below 30 draw calls for good performance. So I’m using over 3 times as many draw calls as I should.

I think I know what needs to be done to fix it – I need to use a texture atlas. This means taking all the individual textures and cramming them into a single big texture. This is the easy part.

The hard part is that the UV mapping on all the models also needs to change. The UV mapping defines what part of the texture is displayed on each face of the model. When all the textures are combined, I need to scale and offset the UV coordinates for each model, and I can’t find a tool to make this easy. In the end, I’ll likely just write a tool to do it myself, since working with meshes in code isn’t too difficult. Writing a tool to do the work for me will take some time, though, so there’s no time to do that before PAX.

I’ll install BattleGrid on my iPad 3 and see if it runs better, but I’m not getting my hopes up.