• Content count

  • Joined

  • Last visited

Community Reputation

307 Neutral

About Crazyfool

  • Rank
  1. Linker errors with new computer

    I got this to work, but I want to share what I learned so others who google this might have an answer: So first thing I discovered was that most of the august 2009 dx lib (and other libs I was using) were probably compiled under VS2008, not VS2010 which was causing problems (I got this from a good result, the validity of this is not known). So I got vs2008 and tried that, didn't work. I then tried (with vs2008) to link against x86 version of the libs whereas I was previously linking to x64 version of the libraries. This goes for lua/luabind/directx (the libs giving me trouble). I am not 100% sure everything is working, but my game compiled and ran seemingly fine and so I feel like I got past this. Thanks.
  2. Linker errors with new computer

    I appreciate the response but its not just directx, and if the d3dx library was missing, I get a compile error. Any other ideas? Edit: Sorry if there was confusion, I only gave an example which was direct x
  3. Linker errors with new computer

    Hey guys, I recently bought a new computer and was setting up my new development environment when I ran into issues. My old computer used visual studio 2008 express edition, and now I'm using VS 2010 express edition. There were some minor kings with how to setup include directories and such (because 2010 is different than 2008 in this regard) but I got those setup I think. I was getting "could not find *.h" or "could not load lib" errors but now its compiling but getting linker errors. The errors I'm getting are along the lines of "LNK2019: unresolved external symbol _D3DXCreateSprite@8 referenced in function "public: bool __thiscall Font::init(struct IDirect3DDevice9 *,char *,int,int,int)" (?init@Font@@QAE_NPAUIDirect3DDevice9@@PADHHH@Z)". A few notes: this works on my windows xp 32 bit visual studio 2008, but is not working on visual studio 2010 on windows 7 64 bit. I downloaded the directx sdk from microsoft (its august 2009) along with the luabind/lua installs. I'm linking to 64 bit versions of the libs in all cases. I'm including my libs via: #pragma comment (lib, "d3d9.lib") Any ideas why this might be happening?
  4. How to prevent Jlist from adding null?

    Is it actually adding null, or is the string "null" when displayed? If you're checking for null and null is being added, its probably be added another way, OR the thing you're checking isn't the thing that matters. It looks like there are two places where you can be adding things to the list, are you checking both?
  5. THQ vs. EA Games

    I second Promit's response. It very much depends on the specific details of each job.
  6. My Sid Meiers Civilization 5 Review

    My problem doesnt really come from any well thought out issues, it comes from the fact my computer cant handle a turn based game. I bought it for my brother and myself to play with a coworker, and turns take about 30 seconds to process (not to play out, but once everyone is done it takes about 30 seconds from that point until we can perform another action). It was a horrible waste of $60 :(
  7. Box rotations for 2d collisions (Directx C++)

    Thanks a bundle. I read that I can use dot product only for true/false check, but I wanted to first make sure things worked using the tutorial method, and then move to improving it however I can. I appreciate your help so far!
  8. Box rotations for 2d collisions (Directx C++)

    Hi, thanks for the help so far. I tried following this tutorial, but I am not getting results that I expect. It seems to be returning true almost always. I only perform collision tests when the player is near, and the tile is non-walkable. As soon as that happens, a collision is detected. I appreciate any help. bool Polygon2D::detectCollision(Polygon2D* other) { VECTOR2 axis1(vertex[UR] - vertex[UL]); VECTOR2 axis2(vertex[UR] - vertex[LR]); VECTOR2 axis3(other->vertex[UL] - other->vertex[LL]); VECTOR2 axis4(other->vertex[UL] - other->vertex[UR]); if(!collisionOnAxis(other, axis1)) { return false; } if(!collisionOnAxis(other, axis2)) { return false; } if(!collisionOnAxis(other, axis3)) { return false; } if(!collisionOnAxis(other, axis4)) { return false; } return true; } bool Polygon2D::collisionOnAxis(Polygon2D* other, VECTOR2& axis) { float minOther, maxOther; float minSelf, maxSelf; findScalars(other, axis, minOther, maxOther); findScalars(this, axis, minSelf, maxSelf); if(maxOther >= minSelf || minOther <= maxSelf) return true; return false; } float Polygon2D::projectAndFindScalar(VECTOR2& coord, VECTOR2& axis) { float val = ((coord.x * axis.x) + (coord.y * axis.y)) / ((axis.x * axis.x) + (axis.y * axis.y)); VECTOR2 projected(val * axis.x, val * axis.y); return (projected.x * axis.x + projected.y * axis.y); } void Polygon2D::findScalars(Polygon2D* other, VECTOR2& axis, float& min, float& max) { max = min = projectAndFindScalar(other->vertex[UL], axis); for(u_int i = 1; i < 4; ++i) { float temp = projectAndFindScalar(other->vertex[i], axis); if(temp < min) min = temp; else if(temp > max) max = temp; } }
  9. Box rotations for 2d collisions (Directx C++)

    Thanks for your quick response. I assumed the rounding errors would "go away" because center/vertices are recalculated every frame. I've looked at other code samples that have this kind of collision detection and rotated polygons, and the vertices are calculated the same way. You've given me some keywords to use in my searches, so thanks :)
  10. Hey, so I am trying to rotate 4 vectors representing a box around a sprite. I am trying to have it mimic the way sprites are actually rotated, and I and I am doing something like: for(u_int i = 0; i < 4; ++i) { vertex[i].x -= center.x; vertex[i].y -= center.y; tempX = cos(angle) * vertex[i].x - sin(angle) * vertex[i].y; tempY = sin(angle) * vertex[i].x + cos(angle) * vertex[i].y; vertex[i].x = center.x + tempX; vertex[i].y = center.y + tempY; } This appears to work sometimes, and other times it goes completely wrong. I am drawing points at each vertex, so I can see where the box is. What seems to be happening is the vertexes progressively get an incorrect value, which alter the computations of center, which increase the inaccuracy, etc etc. I am not sure where it is going wrong. If I rotate around a vertex, things look fine, but are offset a variable amount (depending on the angle). I tried for a while to find some existing help, and I couldn't find anything but I might have missed it. Thanks in advanced.
  11. DirectSound tutorial

    What is your goal? Are you trying to learn directsound, or merely get sound working in your game/app?
  12. Grandma's Boy: How did you feel about it?

    I thought the movie was pretty funny. Anyone who takes comedies too seriously should relax and realize its a movie meant purely to entertain. Plus, I always wanted a car bed sooo :)
  13. New Zealand earthquake

    That is very good news that there have been no known fatalities, and I hope there is very little damages done. Earthquakes are incredibly frightening because your entire foundation (what youre standing on, not foundation in the construction sense) is basically being torn apart.
  14. the case of virtual destructors

    Quote:Original post by draconar Quote:Original post by SiCrane If you don't need to do anything in D's destructor, you don't need to write it. The fact that X's destructor is virtual is enough. cool! And the empty virtual destructor in the base class does not make any harm too, I guess? I dont think so, its the default case for a function. If none of the children classes have their own destructor, it will use the base class'.
  15. What's your favorite StarCraft 2 unit?

    Firebat! Oh wait.. :( I heard they are in the campaign, which is cool!