Friday, October 30, 2009

Visual Studio 2010

Soo I have some time before class and was going to give VS2010 a spin. Reading the What's New was awesome, static_asserts for C++ sound great, concurrency system, hooray! I had also heard they gave C++ a GUI editor much like VB/C#'s. Well, I tried creating a New Project, of Win32 calibre, with default settings (not empty project), and upon compilation with no changes...errors.

Boo! So next I tried Console with empty project. Well, same error. Link.exe exits with code 1.

Apparently in Microsoft.Cpp.Win32.Targets this is the offending line:

Not enough time before class to mess with it, so whatever. Otherwise things seem pretty nice, typing the little bit I did in the new editor with its anti-aliased text and whatnot was nice, although I remember reading that Intellisense is missing out on lots of normal features in this edition of C++, at least for now? Wonder if Visual Assist X will put these back in.

Oh well, back to '08 for now.

Thursday, October 29, 2009


Thought I would update you, just added the Butterfly curve and Rose curves to my lil Curve plotting app :> Oh, and I forgot to include sources last time, they are at the bottom of this post after the pics.

Source Code (C#)

Differentials Explained

So, in spirit of the last post - and because I shared this on facebook the other day and forgot to include it here, here is a wonderful video from the pre-WWII era explaining differentials! It's a wonderful video.

Richard Feynman - 'Fun to Imagine'

Just found an awesome video from the links section of It's Richard Feynman, who was a physicist. This is actually the last clip on Youtube of the film this is from (specifically note it's part TWO of the last clip). Link to the beginning is below clip. Hope you enjoy as much as I did!


The beginning of 'Fun to Imagine' (above talk) - This is an informative site. He breaks down a wipe variety of math topics into nice, easy to understand versions. I think much in the same vein as Feynman would encourage. "Learn right not rote." is their motto. The links section I linked to earlier in this post leads to his "Links" page, where people can submit things they found that fit in with this - it led me to this video.

Monday, October 26, 2009

Lissajous Curves

Well, the internships are going great! Got the fists in and animated, now we just need to touch up the animations and get 'em skinned and get better sounds. It's looking good though! I can't wait to get it playable, and to show you guys :o) I actually have a few in-house videos already but I'm not sure if it's ready for public release yet..but I do have something I can show!!

I was reading some thread on cymatics when this guy in the comments used the word Lissajous to describe sand movement. I googled this strange word and found no definition, but instead a Wolfram's and a
wikipedia mathematics page. Quite informative, but fairly heady. There was once a time when I would shy away from this, but this time I decided, "Hey, I want to make a program that utilizes these!" And so, I did.

Here is the result of a total of about two hours, I suggest you download it and play with it :) I hope the Dance mode works as smoothly on slower PCs as it does on mine..let me know what you think! It's fairly silly but was a great learning experience. Here's some pics to show it happened:

I am including a link to the Release .exe. It's written in C# and so will require the .NET 3.5 framework.

Click to download Lissajous Curves Win32 Binary


Thursday, October 15, 2009


Well, had a meeting today for my iPhone internship and we are currently undergoing a test checkout of SIO2, an iPhone game engine. It actually looks pretty sweet so far, it's very close to how I would currently design a game engine which is good: it utilizes Bullet, an open source physics system, it also of course utilizes the OpenAL/OpenGL ES already on the phone. At first I was rather wary about throwing out all the Quake 3 engine work we've done because I think we really are close to the ball starting to roll downhill rather than up, but oh well, what can you do. There are definitely big pros and big cons to both choices. We'll see how this thing does.

I can't say I'm not excited though. I'm getting my little schoolgirl squeal excitement about playing with this thing as I go through the videos - I've been itching to start up with Ogre again recently (was actually gonna post a thing about it actually) and on the forums I read that the current version utilizes an Ogre scene graph-inspired layout! It's almost like a nice refreshing dream come true. Built specifically FOR the iPhone, open source (I think? sort of? At least there are user patches on the forums for some thing (faster PNG loading in particular)), fairly sexy, etc... But it's not Quake 3. :~(

I really would like to develop on Quake 3, and I really would like to explore SIO2. I'm not sure about estimation for time frame with SIO2 though, but I guess when all is said my answer I don't care either way. Hell, I'd like to do them both if we had time and energy to spare lol


Wednesday, October 14, 2009

Website Updates

Well, I implemented multithreading into the terrain editor, and then it hit me at the very end that while it all does work as expected, the entire algorithm itself suffers from its own race condition. Particle deposition sort of relies on iteratively working the environment, and as far as I can tell at the moment, there is no real good way to split this task up other than just doing it.

This means optimizations could be made in the current search range, I bet there's a lot of unnecessary overlap that could be removed. At the end of the day though, it's a tool and it's forming the map, so speed is not that big of a concern. Besides, it's pretty damn fast as it is as long as the particle range threshold isn't set ridiculously high.

In other news, added a soundcloud widget to me website and worked on a bit of music. Today feels kind of like a bust because I did all this research into implementing multi threading well and then it ends up my fear came true and I can't even use it with my central algorithms! Haha. But more important: now what to read. >_< Soo many freaking tabs man, will I ever get through them all!?

Tuesday, October 13, 2009

Momentary Lapse

Well I apologize, I actually had a portion of a post typed out and saved in notepad, but have since for some reason deleted it. I have been rather busy with my internships this past weekend, but in my spare time I have mainly been reading and learning new things.

I learned splines/curves, which are pretty neat. You essentially pass a set of points and get the curve that approximates or fits between the middle two with the outer two as weights. I want to play with this in an implementation and write an article on it if I can find the time.

I also found a nice programming slideshow/video from ASM '09, which essentially broke down the current state of things as far as graphics game programming. It was given by a the lead engineer from the Unity team and in essence for any of my future projects I am pretty sure I am going to skip along with Ogre. This will simultaneously allow OpenGL as well as DirectX, and just generally be more agreeable with the things I tend to do. Namely the scene graph and everything, I'm to the point where I'm just creating my own, which is fine, but I'd rather stop re-inventing the wheel at this point - my rate of learning versus grinding is quickly going out of proportion for the time being.

Anyway, that's what my old post was going to be about, but since then I've been reading a lot more and it all kind of blurs as I've read SO much. I've come down with a cold so I've had time to just 'stare read' to pass the time. I really am going to try and take more 'blog breaks' in between readings to help disseminate things and hopefully share more indepth summaries or something of articles; as a bonus it would help my retention. Today for example I've been grooming through More Effective C# (awesome book, btw), specifically the Multi-threading section as it pertains to the tool that I am considering making multi-threaded for my internship. It was a great read, but I should have paused there. The next section, on collections and generics/actions/predicates/lambdas, ALL also (at least sort of could) apply to the things I'm doing, so I read those too. There's just no way I can be retaining everything from these articles by reading them like an addicted magazine reader. At least it's better than reading some magazine telling me I'm fat, haha.

I hope to go through the best ones and put them out in code, cementing my grasp of the concepts they cover. Regardless, I've been doing good about staying focused and really devoting my attention to what I'm reading - it's almost Zen like in a way, so at least that's something.

Sorry for this post lacking in any real content, just wanted to let you know I haven't forgotten about this thing :o)

Saturday, October 3, 2009


Okay, so last night before I went to bed I built from scratch a new heightmap system utilizing SFML and OpenGL this time. I am happy to wave goodbye to SDL! I implemented OpenGL's Select mode Picking system and had to debug it for a while for a stupid perspective FOV mismatch. Soon after I confirmed that it would not suit my purposes and then came across that it's going to be phased out in OGL 3.0 anyway as its not actually 3d graphics related. So I ripped out all the select mode picking code and put in a transposition system.

In essence, you are reversing the normal matrix transformations (from space->model->world->clip->screen to screen->clip->world->model->space (that's simplified, there's a few more steps inbetween). For those of you who don't understand any of that, it basically turns a 3 dimensional coordinate (x, y, z) into a 2 dimensional screen coordinate or vice versa. In reality they are 3 dimensional screen coordinates with the z being the top of the depth buffer or 0..1 for near and far planes respectively. Now I can tell exactly where in the world the user is clicking, and it even has a cute side effect where when I create a box where you are clicking in the world, if one holds the mouse button down, then you are now clicking on the edge of the newly created box, so it moves to there, but now you are clicking on the edge of where it just moved, so it moves closer, and closer, and closer, and smacks the screen in the face. It's kind of funny, albeit unexpected at first. I am thinking if I disable writing to the depth buffer when I draw it that should fix that issue as my select code is using the depth buffer to determine where in the near/far clip planes the user is clicking (it thus picks the closest).

Anyway, now I have a terrain mesh that has a cursor and allows raising and lowering. I have some issue somewhere in the renderer though that is causing strange (albeit cool looking) circular artifacts when you edit the mesh. When you raise a lump, it actually raises a LOT of lumps. I was too sleepy to correct this so I decided it would be best to take a break.

I then started reading over the docs for Bullet physics again. Pondering on how I want to implement things, and even where I want to take this. So I decided to sleep on it.

Actually I lied, I played Aion for a few hours and THEN went to sleep. Anyway, I ended up dreaming about programming! Woke up pondering a few things. Now I am just stopping reading back over Ogre3d. Exciting news there!! The next version will use the MIT license, which will loosen licensing requirements with Ogre even further! The Google Summer of Code 2009 also evidently resulted in someone totally revamping the samples. I am not sure if these new and improved samples are in the Ogre distribution yet, but they are accessible (at least the one I've been looking over) in the Ogre Wiki. It's about time too, some of those samples were ....

So in all of this, I found on the Ogre forums someone has written a terrain manager. I haven't looked at its code yet but have been perusing the monolithic thread that it started from. It now has its own forum section, but if that link works correctly you should see where the author is pondering changes for his next version and he mentions some shortcomings with the current design.

Anyway, so now I'm at the point where I'm trying to determine if I should stay the path or just return home to Ogre. If I stay where I am at, I can continue doing interesting things, but it will be all on my own with straight OpenGL. I can also learn from the other managers, etc... This will allow me to really support anything, my next steps anyway were to add in some basic LOD and eventually paging once I got textures working nicely. While the custom Ogre terrain manager cannot support paging or LOD in its current state (although the Ogre scene manager might/should(?) handle the LOD business anyway. There is also a 3rd iteration of the slowly developing paging system for it too. It already can splat textures and do some other nifty things though.

So I'm just not sure. It's one of those could go either way things, the pros and cons are fairly convoluted in this one. I suppose I could even take the Ogre heightmap code and just take a stake to it and turn it into some hybrid mixture. I suppose I should eat, about four hours overdue from lunch and had no breakfast and ate shitty junk food last night. Afterwards I have actual internship and school work beckoning, as well as a required legion event on Aion. But in reality, I will probably just keep perusing the forums and reading up on everything. Knowledge is power.