Jacob's Blog The blog of a video game programmer


XNA Kinect depth sensor

Hi folks,

Been working with XNA again, updating a program I worked on over the summer.

I've been learning about the XBox Kinect, and this one uses the depth sensor to scan the field of vision for changes, and displays those changes using data from the color camera. Pretty cool effect, which if taken further could be used as a "green screen" but without the screen.

Here is a video: http://www.youtube.com/watch?v=cMOkoYOC7N8

Filed under: Programming Comments Off

XNA Particle System Test 1

Yesterday I started working on a 2D particle system for XNA. It is coded in C#.

I uploaded a quick video to my hopefully-soon-to-be-used-more YouTube account. Enjoy!


Filed under: Programming Comments Off

Arcade Controller Part 3

Quick update... did a bit of planning for the controller using Sketchup. My plan is to have a strong box to hold the electronics, and have a replaceable top board so that I can easily change the configuration by just making a new top. My plan is to make everything out of a nice wood such as oak, and have a thin layer of plexiglass to cover the top and protect the hands from splinters.

Here is an image of my design for the first version:

The base is about 12 x 8 inches in size, but I think I may size that up some. The top is 16 x 11 inches. Again that may change. The top will be slanted downward to make it easier to rest your hands on top of.

Tagged as: Comments Off

Arcade Controller Part 2

Today was exciting for me because I got a fair amount done on my controller project. I began by splitting apart the wires of an old IDE hard drive cable I had, and stripping the ends. You might wonder why I used an IDE cable: the answer is because it is small, compact, and the black end that normally plugged into the computer is the perfect size to plug regular 22 gauge wires into, so I don't have to solder the buttons directly to the controller, and can easy change button configurations in future. It works great!

So after preparing the cable I applied a bit of solder to the points on the controller that I would be attaching the cables. Then it was simple to heat up the attached solder again and push the wire into the liquid metal. Some of the earlier solder points were a bit rough, with too much solder on the point or too much stripped cable outside the connection, but I tested it out by plugging the controller into the computer again and was ecstatic to see that each button still worked and that I had not shorted out any of the connections.

Above is what I ended up with. Yeah it's a bit messy, but it works!

After doing a bit more testing, I realized that I forgot to solder two important points: the ground connections! I also figured out that the d-pad points have a separate ground connection... the ground wire for the buttons wouldn't work. I soldered those two wires, then trimmed off the excess cable I wouldn't need, and created a pinout diagram to quickly find out where each button was connected.

Isn't it beautiful? Well not really. Still messy, but it's compact now and should easily fit into wherever I want to put it.

Final thing for today: I went to a hardware store and purchased some quick disconnect clamps that hook up to the switches on the arcade components I have, and started wiring up the parts. I have successfully hooked up both a button and the joystick to the controller, and tested them on the computer. Just a few more buttons and some cable organizing and I'll have a fully functional arcade controller, except I still need to make the box to house it.

Looks complicated, but the concept is simple. The black wire is the ground connection. I have it daisy chained to the ground ends of the 4 switches of the joystick, because all it does is supply electrical current. Then the red wires (and the green wire of the button) hook into the correct point of the controller, and viola! Working external controls.

That's all i'll work on tonight. Still have other projects to do. Tomorrow I will probably do a bit of cable organization and get started on planning the box for the controller.

Good night everyone!

Tagged as: Comments Off

Arcade Controller Part 1

I am interested in building an arcade controller from scratch, both to use in arcade-style games and to learn about the electronics involved.

First things first: I need to get familiar with how controllers work, and that means learning circuitry. I took apart a cheapo USB gamepad, and I plan to use the circuit board to attach my own arcade style joysticks and buttons.

I've traced the connections to determine points where I need to solder to connect external buttons. This particular controller is great for this project because right on the PCB it has bare circles of metal that are exactly there for surface soldering. Each button on the controller has a circle, as well as a special bonus: 2 hidden buttons that are not used in the regular setup have circles... and that give us an extra 2 buttons!

For those curious, I bought it off Amazon here.

Also, my arcade parts arrived today. I ordered Happ joysticks and buttons.

I've starting preparing the board for soldering the needed cables onto it.

Tagged as: Comments Off

Another semester underway

This semester is looking to be great. I'm taking on the 3 core classes, plus two extra electives. Both my electives this semester deal with programming, which is my passion. The first is an artificial intelligence course for games, and the second is graphics programming in XNA, which allows me to port games from the PC to the XBox and Windows 7 Phone. The graphics course is an extra elective on top of the suggested 4 courses this semester, so I'm going to be very busy. Looking forward to it.

Tagged as: Comments Off

A Minecraft Story – Day 1

I wake up slowly, uncomfortably. There’s a rock poking me in my back. I stand up, taking a moment to balance myself. Looking around, I see I’m on a sandy patch of ground, surround by grassy hills. All around me I see trees. I reach down and check my pockets, but they’re empty.

I spend a dazed minute just standing there taking in the environment, I hear sheep somewhere. I see a strange rock formation to what I suppose is the north, and start walking that way.

I need something to work with, something to protect myself with. I don’t know what’s out there, but it’s best to be prepared. I start breaking apart a tree with my bare hands and then separate it into planks I can use to make tools. After crafting a table I create a pickaxe I think I can use to chip away at the stone nearby. Among the rocks I find bits of what appears to be coal, so I strap some of the larger pieces onto the sticks I gathered, they can probably be used as torches for when it gets dark.

It’s already noon, time is passing quick. I should start thinking about shelter. I haven’t seen any indication that rescue is coming any time soon. The land looks entirely pristine, no sign of other human activity at all.

Back at my table, I strap a sharp bit of stone to a large stick to make a rudimentary axe, and get to work chopping down some trees. Perhaps I can get a cabin of some sort fashioned before nightfall.

It takes several hours, but I finally have enough wood to start. After splitting the logs into plants, I start building the walls to my new home, slotting each one to the next to hold them in place.

The sun is setting as I am laying down the roof. I hear noises in the distance, and they don’t sound friendly. I see some sort of humanoid figure coming toward me. I’m about to yell out a hello when an arrow suddenly embeds itself in the wood plank I was about to attach to the roof!

With a muttered curse I drop into the cabin through the hole still in the roof, and grab my axe. The creature steps into the open doorway and I realize with a jolt that it is a skeleton! And right now this skeleton is drawing back on its bow, ready to shoot at me again. Well, once was enough thank you very much, so I start swinging my axe at it, chipping away at the hard bone until finally whatever evil held the skeleton together disperses and I’m left with a pile of bones on the ground.

Sweeping the pile to the side, I look out and see more unfriendly figures shambling toward me. Looks like it’s going to be a long night.

Filed under: Minecraft Comments Off

Life Update

Thanksgiving break is upon us busy students, so I thought I’d take some time to reflect on the current state of my student/developer life.

Only 4 weeks till the MFA symposium, where we will be showing off our work and giving a nice presentation to any that wish to attend. Lots of preparation left for that. And of course lots of work for the 4 classes as well. There are a huge variety of projects going on right now, and it’s so refreshing to have such different and new things going on in my life. From programming Legos and working with barcode readers, to discussing the Internet and the future of games. Not going to be going into detail on the projects, since I like surprising people.

On a sadder note, the Torque game engine which I have been playing with for the past two years is sadly going through a difficult time since InstantAction had to close down. I wish everyone at TorquePowered the best, and hope they can sort things out. In the mean time though, that means I’m in the market for a new engine to work with in the future. There was a discount for Torque owners on the Leadwerks engine, so I went ahead and bought that for a very nice price and I like its ease of use... however I want something more robust and multiplatform. Shiva is also offering a discount and they have a nicely packaged editor, but I right now I have my sights set on Unity3D. I’ve been using a trial version and enjoying it greatly so far. Its community is excellent with lots of tutorials to get started. It’s expensive though, especially since buying the iOS package adds several hundred more dollars to the price. And of course there are other options such as the Unreal Development Kit which is an interesting option, especially since I’m already familiar with the Unreal Editor. Going to play around with it over the break and see how I like it. Problem with that is that I’m still interesting in developing for my iPad as well. So right now it’s up in the air as to what I will do.

Tagged as: Comments Off

The most popular phone in the world

... is this, the Nokia 1100:

For the most part all we see of cell phones here in the United States is the latest and greatest iPhone or Android or Palm. But the market of smart phones is tiny... minuscule even. Apple is happy that they have sold some 15 million iPhone 4s? The phone above is made of cheap plastic, uncomfortable rubber coated keys, and you could probably count how many pixels the screen has. AT&T stopped selling it back in 2005. But, it has sold over 250 million units and continues strong.

Smart phones are not huge money makers for the major cell phone companies. They do not sell in the volumes needed to bring in large amounts of cash. However, they are excellent publicity in a culture that thrives on the next greatest piece of technology. The real expansion of cell phones is taking place in developing countries like India and China, where the consumer doesn't care or can't afford anything better than the most basic unit. But for most people that is all they need. And don't worry about the cell phone breaking; phones like this have survived 100 foot drops, being thrown against brick walls, and being tossed into the ocean.. and other than some cosmetic damage they all worked fine afterwards.

So when you look at cell phone advertisements and think on how popular it must be and how much you want one, look at the phone above and remember that most of the rest of the world is happy with what they have.

Further reading and source of the image: Gizmodo


The State of American Broadband

The way I see it, the future of the Internet in America is looking bleak. Increasing data requirements for movies and music are putting strain on the networks, and the companies controlling them would rather limit your usage than spend the required money to outfit their networks for the future. Cellular networks are especially evident to this: shortly before the launch of the iPhone 4 AT&T removed their unlimited data plan that was required for smartphones, and replaced it with a tiered service that offers limited data capacity per month. There is talk that Verizon Wireless has plans for a similar system in the future. With the dramatic increase of data usage over cellular networks, this creates a bad precedent of limiting data usage while the internet is constantly becoming more data hungry.

Why is this a particular problem in the United States? It comes down to a 2002 ruling by the FCC that declared broadband Internet service an ‘information service’ instead of a ‘telecommunications service’. What is the difference? Control. Telephones are listed as a telecommunications service, and therefore the companies that own the physical wires are required to allow competitors to buy usage of those lines, and therefore allows for competition in that sector. As an information service, broadband companies have a monopoly of service on whatever households are connected through their lines, which in practice means that if you want broadband you are almost always limited to one company in your area. Without competition, broadband companies have become lazy and haven’t pushed themselves into keeping up with the times.

Another buzzword that has been popping up recently is ‘net neutrality,’ which means that internet content should not be controlled by the companies that own the wires. All content should be accessible by all people. As it stands, it is not required for providers to follow this, and they could potentially block any content they want to, and many already do so by limiting or blocking access to peer-to-peer services used for file sharing.

Besides user convenience, what does all this mean for the US as a country? In part it means that we are falling behind the times. This is not a problem in Great Britain, Japan, and just about every other first world country. A recent study about the rate that 40 countries are moving towards a knowledge-based economy, as we should be, placed the United States in last place in part because we seem to be deliberately slowing our Internet expansion. “We are at risk in the global race for leadership in innovation,” FCC chairman Julius Genachowski said recently. “Consumers in Japan and France are paying less for broadband and getting faster connections. We’ve got work to do.”

In order to prepare for a more data-heavy Internet filled with user generated content, we need to open up the core of our connection services to competition that will encourage growth and reduce prices.

Source: http://www.scientificamerican.com/article.cfm?id=competition-and-the-internet

Tagged as: Comments Off