Box2D is an open source physics engine used in games - probably the most well known in Angry Birds. A physics engine is software that simulates physical objects and their interactions with each other, taking into account things like gravity, speed (velocity), object shape, friction, etc. The application using the physics engine can then use that data to display those simulated objects (like a box) in the correct place on your screen. A 2D engine is great for applications that run with reduced resources (like on a mobile device) because the addition of a third dimension to the calculations increases the required processing power immensely, and most mobile game apps operate in 2D anyways (right-left, up-down movement). I wanted to use it in XNA on a Windows form, this is my first attempt - I used the C# port of Box2D. I've since found out there is a library tweaked specifically for XNA which I'm going to take a look at, my program starts slowing down considerably once you put more than 10 objects on the screen at once.
Note: You can't see the mouse cursor but when the blocks reload it's because I'm clicking the "Reload" button. If another block is being added to the stage it's because I am clicking on the screen and it's being added at runtime.
I Started digging into 3DS Max these last 2 weeks as part of my quest to strengthen my design skills. There are some amazingly simple tutorials that you can download from the autodesk site here, the first tutorial being a simple scene where you add some basic objects, add materials, camera and some animation. I won't post that resulting render video here, but this was the basic idea. Now, I've downloaded 3DS Max before and attempted to play around with it, but the interface was so intimidating (downright scary) I shelved it for a while. With the exception of the reflective surface, this is what I could do after only the first tutorial (not scared anymore). I spread it out over 4 or 5 days, in about 15 minutes sessions.
This short video clip took 30 minutes to render on a machine with 8GB of memory and an Intel Xeon (crazy, but hi-def looks so nice).
Working on an app concept that needs to graph out accelerometer data. The accelerometer is what tells your iPhone/iPad which way it is tipping, and from that information you can find out if it is moving, turning, etc. There is some noise in the data because it is SO sensitive (never knew it was that sensitive) that is making the bars a little twitchy. In order to make some meaningful decisions on how best normalize (remove the noise) the data I thought visually would be the best, just writing the numbers to labels was just too hard to interpret. My thought is that I can take the previous 3 (or n) measurements and average them out to make it a little smoother. Original code found on Stackoverflow.
- (void) viewDidLoad
UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer];
//the frequency of the sampling of data. This would be 12 times per second.
accelerometer.updateInterval = 5.0f/60.0f;
accelerometer.delegate = self;
-(void) accelerometer:(UIAccelerometer *) acelerometer didAccelerate:(UIAcceleration *)acceleration
float xValue = acceleration.x * 10.0f;
float yValue = acceleration.y * 10.0f;
//adding 1 to the z value because device laying flat gives -1
float zValue = (acceleration.z + 1) * 10.0f;
//myQuads is an array of structures used in rendering polygons elsewhere in the code. move_x is the x translate (horizontal movement) of that polygon.
//all 3 polygons are the same size and shape, I'm just making them move back and forth according to the values I get out of the device
myQuads.move_x = xValue;
myQuads.move_x = yValue;
myQuads.move_x = zValue;
I wanted to link to my Github repository, but as you may have noticed my personal links are all icons. Overplayed Web 2.0 or not, I like my 32 x 32 icons. A search of "Git Icons" did not bring up anything that I was in love with, so I made my own. I won't say I'm particularly in love with these either, but I do "like" them. Right click the link below each image and click "save as".
After I finished the icon, was talking to a co-worker to show them what was out there and searched for Github Icons instead, which is really what I was looking for all along, and the Cat/Squid is WAY cooler. You may not, however like the Cat-Squid chimaera, so please feel free to use mine.
I do a lot of graphical work (at least more than I though I would) but have yet to post any of it. I did this originally for poormansdataplan.com, although this isn't the same one that's out on the site now (since improved). Created using Inkscape, a terrific [Vector Graphics program.