Advertisement Jump to content
  • Advertisement

Forrest Smith

  • Content Count

  • Joined

  • Last visited

Community Reputation

140 Neutral

About Forrest Smith

  • Rank
  1. Forrest Smith

    Visual Studio 2k5 Questions

    Quote:Original post by Dave I discovered this about a month ago and havn't used it since. I can't see any reason for regions in either C/C++ or C#. Since every comment block and namespace is regioned by code folding automagically, what are regions needed for? What do poeople use them for? Dave They're great for grouping stuff together in large files, especially forms in C#. I had a given form broken down into regions for Enums, Delegates, Subclasses, Fields, Class Methods, Properties, Interface Implementations, Load/Save, Gui Events (with subregions for each control), Undo/Redo Setup, Undo/Redo Handlers and so on. Which regions were needed exactly changed on a case by case basic of course. If for example I needed to navigate to the function for the Foo ListView event for selection changed it was a simple matter of Gui Events -> Foo ListView -> SelectionChanged. They are excellent for organizing, maintaining, and finding functions.
  2. Forrest Smith

    Appying an Impulse to a 3d object

    Ok, so I'm apparently stupid and haven't been to figure this out. Assume a box, a world space collision point (probably a corner of the box), and a world space impulse vector. I will warn you this is NOT a copy paste of code, but it should be extremely clear. The basic issue is that, well, it doesn't work! Objects improperly rotate (as in about a completely wrong axis and with an improper magnitude) when the objects orientation is not about a single axis. //Everything in World space MyAwesomeBox::ApplyImpulseInWorld(Vec3 collOrig, Vec3 impulse) { Vec3 rad = collOrig - m_position; Vec3 torque = rad ^ impulse; // Cross product for those unsure Matrix3 worldInverseInertia = m_orientation * (bodyInverseInertia * m_orientationInverse); // orientInverse is simply the transpote of the regular orient Vec3 changeInAngularVel = worldInverseInertia * torque; } //Convert to body space, calculate change in angular vel, convert back //Note: collOrig/impulse still in world frame MyAwesomeBox::ApplyImpulseInBody(Vec3 collOrig, Vec3 impulse) { Vec3 rad = collOrig - m_position; Vec3 radBody = m_orientationInverse * rad; Vec3 impBody = m_orientationInverse * impulse; Vec3 torqueBody = radBody ^ impBody; Vec3 changeInAngularVelBody = bodyInverseInertia * torqueBody; Vec3 changeInAngularVel = m_orientation * changeInAngularVelBody; } It is important to note that both ways of applying the impulse come up with the exact same answer in all cases. So thats some code, let's discuss the actual problem. First, imagine a box laying flat on the ground of dimension (1,1,4) where the y-axis is up, and we're in openGl not that it matters. Imagine the box is in the air with a velocity of (10,0,0). Let the box move and it will hit the ground 'flat' and bounce up, no rotation and it will keep on moving horizontally bouncing up and down with zero rotation. Hurray! Imagine the box rotating 30 degrees about the z-axis. Now when it bounces off the ground it will rotate, only about the z-axis, and it will be 'rollin in the direction that it's travelling, at least after the first bounce. Now imagine the box instead rotated 30 degrees about the x-axis (the direction it is moving). Now when it hits it will just kind of rotate back and forth rotating entirely about the x-axis. Finally, imagine the box rotated about the z-axis and then the x-axis so it will hit with just a single corner. When it does so the resulting rotation, assuming no friction, should be about the x and the z-axis. However, in my case it rotates about the y-axis! This is most definately not what we want to have happen at all. The rotation about the y-axis should be zero. So, despite all of those words I doubt anyone read, anyone see an issue? It has something to do with getting the worldInertiaTensor perhaps. Because in my case the impulse is (0,some number,0) because the box is bouncing off the ground and the normal to the ground is simply (0,1,0). So the torque I get, in the world frame, is properly on the x-z plane. But then when I multiply it with the worldInvTensor I get something terribly wrong because it has rotation about the y-axis and that should not happen. The tensor itself is quite simple - since it's a box it's diagonal and thus the inverse is diagonal as well each non-zero element being 1/regularTensorValue. So I'm not sure what the issue is, but if you think the issue is matrix multiplication being non-communative you're wrong...I think. Yes the orientation is a concenation of matrices - infact it's many concenations over many frames after many collisions. But you can still get it's inverse so I dunno. =[
  3. Forrest Smith

    Visual Studio 2k5 Questions

    Quote:Original post by raz0r #pragma region MyRegion //Code #pragma endregion Oh man sweet! I feel like a dingleberry for not knowing, but thanks! =D
  4. So I'm not sure what the right forum would be, so this one seems as good as any. So anyways, onto a few IDE questions... 1) I've been using C# a lot this summer, it's pretty sweet, especially in 2k5. There are a few things that it does that I would like to be able to do in C++, but I don't believe they are supported by default. At least so far as I could tell, there aren't regions in C++ nor is there a way to color class names. Both are extremely simple, and I find super useful, especially the regions. Also seeing as how both have no effect on the compiled result it seems like it should be supported. Anyone know perhaps of a 3rd party plugin that allows for such behavior? 2) Are there any good, free profilers for 2k5? In 2k3 DevPartner had a free version of theres and it was quite nice. But, again so far as I can tell, there isn't a feww one for 2005. Well, there is trial version that lasts for 14 days but that isn't very many days as I'd like this for a longer term project. Thanks.
  5. Kinda of a two part question. I have an avi file and I need to extract the still frames and the sound as a wav file. The frames were extracted using the MediaDet in DirectShow through an interop, this works just fine. Through the MediaDet I can see that the file has two streams, audio and video, but I am unable to do anything with the audio stream. I can't actually see the stream, I just know it's there. So to extract the audio I ended up going through the avifil32.dll that comes with windows. It seems to work fine. The issue is that I need the wav in a specific frequency. Supposedly DirectShow can do this but I've yet to figure out how, the documentation is incredibly poor seeing as how it was deprecated. Another option would be a command line based program that convert it from one wav form to another. So either help with using directshow to perform the conversion or a free command line based application that can reencode the wav from an arbitrary frequency to another would be much appreciated. Thanks.
  6. Seeing as how I go to DigiPen and have 1 year till graduation it's safe to say that this thread and the ignorance within is offensive. But rather than reply to the middle of what I'm sure is an ever growing thread I'll try to respond to the root thread. "Why is it that so many people are considering schools like full sail and digipen?" I can tell my story and nothing more. I spent one year at a 'real' University. David Lipscomb University to be exact, in Nashville, Tn. A small liberal arts college, but extremely well known in the area. One of the best pre-med programs in the state actually. Can't say the same for their Comp Sci. For the record, their avg SAT is 1130 and my ACT was 30, which would be something around 1340 so I'd do just fine at ktuluorion's unknown school. Anyways.. I knew from the start I wanted to do games programming. I went to Lipscomb as many before me and their CS program just wasn't up to speed. Maybe a big state school or another private school would have been, I don't know. But I did know what I want. And I know what DigiPen offers, a high intensity 4 year degree in game programming. I do not want to design games. I think any degree offered in game design is doomed to failure. DigiPen does not offer a degree in designing games, they offer a degree in programming games. Most students coming here don't realize this. And most of these students drop out. Some are good enough to do both, but not many. The degree is 154 credits and yes that is a significant amount more than the majority of schools, but not all of course. Thats an average of 19 1/2 credits per semester every single semester for four years. Most schools require special permission to take more than 18 credit hours in a single semester, here that's the norm. So, to answer the original question, why DigiPen? To learn my shit and get into the industry. Maybe I could do that at a regular school, maybe. But probably not. For every mod that gets someone a job there were a thousand that crashed and burned. Even if I could get a job at another school I can pretty safely say that any school I could have gone to that I would have been better prepared graduating from DigiPen. To answer a later question, does it scare me that I may want to change careers and DigiPen hurt me in this regard? Damn straight it does! That was a huge concern of mine and my parents before I came here. But getting a job as a DigiPen graduate is a pretty safe bet, and getting a job outside the industry after working for a programmer at where ever is a relatively safe bet. It's a gamble, but so is any choice in college. I will call you out on a few things in the middle. The teachers at DigiPen, like any school, are a mixed bag. We have some that are absolutely brilliant, and a few duds. It gets better every year. There are currently 4 full time Microsoft employees who also teach as well as someone completely awesome from Nintendo. The graphics teacher is a damned genius and was lead programmer on several games (the GC Wave Race, some Ridge Racer, a 1080 snowboarder and more I believe). I guess you have PhD professors, but big whoop. I care about games, not fancy research work. To be honest thats almost a turn-off to me. Why? Because I know of numerous teachers at University of Tennessee and Vanderbilt who are there explicitly to do their research and they hate teaching. They only teach because it lets them work at the nuclear power plant (not joking) or get their $10 million research grant. At DigiPen every single teacher who is here is because they want to be and they enjoy teaching. The same can not be said for large universities. Holy crap that was long! If you could recompile a clean list of complaints I'm sure we can address every one of them.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!