Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

139 Neutral

About carb

  • Rank
  1. Thanks Oluseyi - what a great post. I was actually reading a number of your posts on the subject, as you've stated before what an avid sports fanatic you are, though none are as specific as this ;) I began thinking about it more and more, and it makes sense to physically simulate players on a court, rather than model a bunch of probabilistic equations. I suppose the easiest thing is to represent players/ball/basket as circles, and perform a bunch of ray-circle intersection tests to answer questions like ... Is there a defender between me and the basket? Is there an open teammate to pass to? Bigger players with a wide reach might have bigger radii, and so on. I suppose you could go on forever with this. In any case, I'm pretty excited about it all now ;)
  2. Hey all, I was wondering how some of you (familiar with the sport, of course) would approach simulating a game of basketball. I was thinking that, at the simplest level, it would just be a series of semi-random actions whose probabilities are based on each player's many statistics - i.e. the probability that a player chooses to shoot is based on x, y, and z. In this fashion, there's no need for any kind of AI, and if you modelled it correctly (how each attribute affects what), I think you could get some decent results - of course there wouldn't be any visuals to go with it. What do you guys think? What's another (better?) way of approaching this problem? - carb
  3. I think the issue I was having is that I was attempting to backface culling in clip space but *before* division by W, which was incorrect. Thanks all for your help.
  4. Quote:First thing: in eye space I believe the camera is at (0 0 -1 0). Yep, that's minus infinity along the Z axis. Just about every article I've read puts the camera at (0, 0, 0). Quote:However, testing the Z component of the normal in eye space should produce perfect backface culling. If the dot product in the 1st case or Z component in the 2nd case is zero cull the polygon - this means the camera's looking at it side on. I've tried this, and it works for now, but it doesn't product perfect results. Some triangles get culled which shouldn't. I've stared at this code for hours now ... ;)
  5. Yeah, I know most of the theory, and I've tried taking the Z component alone - but the results don't look right for some reason. Here's another problem I've come across: Assume I do take the vector from a point on the triangle to the camera, followed by the dot product of that and the triangle normal. That makes perfect sense. However! What if the triangle lies on the XY plane with Z=0? Then the vector from a vertex to the camera will be (a, b, 0), and the normal from the triangle will be (0, 0, c), for some a, b, c. The dot product of that is 0. In particular, the result will be zero regardless of whether the vertices were drawn clockwise or counterclockwise. So what's the behaviour then? Since it's "on" the camera, it's neither backfacing nor frontfacing. Should I just consider that a special case and move on? ;) [phew] Thanks, Ben
  6. Hi there, Could use some help from those of you here familiar with basic 3D rendering theory :) I'm writing a software rasterizer and I'm trying to figure out how to perform backface culling in clipping space (i.e. after multiplying a triangle's vertices by the modelview and projection matrices). Basically, where is the camera? In eye space (after modelview transform), the camera is at (0, 0, 0, 1). I assumed I just need to multiply that value by the projection matrix to obtain the new camera location. (Which is just the 4th column of the projection matrix). I've tried this, but it doesn't seem to work correctly - the result is generally correct, unless I mess around with the projection matrix. Am I missing something here? Thanks, carb
  7. You'll want to have a look at Mouse Party. It's not in the most polished shape, but its by the guys at Reflexive, and it's free to use/license (with some small stipulations). - carb
  8. carb


    I thought internships referred more to the duration of a student work term. As in, internships are typically 12-16 months long, whereas co-op positions are usually small 4 month contracts. Hey, could be wrong. - carb
  9. carb

    Cheap Custom Software Solutions

    Wow. Looks like you better hit up some more forums - you haven't even hit the top ten. - carb
  10. carb

    SDL and windows

    Quote:thats your problem, you need to have main( int argc, char *argv[]) and link against libSDLmain.aI thought it was perfectly valid to use your own WinMain and discard SDLmain.lib, thereby suppressing the annoying console window. I haven't tried it yet - I just took some peoples' words for it. - ben
  11. What is the overhead/time of taking C++ modules and making them accessible to Python? I've been wondering if its worth facilitating the changes to make room for Python, in a game that's well underway in development. - carb
  12. carb

    Switching resulotion (SDL)

    Quote:Do I have to make three (if I have three resulotions for the user to chose from) versions of all sprites and load in the right sprite for the right mode when the user change the resulotion?Yes, or you could use some other library to scale them down automatically for you (e.g. SDL_image), barring some blurriness. - ben
  13. I tried using it only for the class - that's where the problem started. I think it can be done - I think this is just an uncommon/rare case we've stumbled upon. Otherwise there WOULD be more literature on why it can't be done. I've found examples on the net that show a class with static members being exported properly. Why mine/ours doesn't work is beyond me ... that's why I'm here ;) - carb
  14. Quote:a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)If I wanted to satisfy the LGPL under clause a), does that mean I'd include my game's .o files with my distribution along with the library covered by the LGPL? - carb
  15. I'm having this exact same problem. I am receiving a ton of linker errors from static member variables, all of which are private or protected, when I try to import my DLL. They all come up as unresolved external symbols. I tried putting __declspec(dllexport) both at class declaration and at the variables' initialization in the appropriate .cpp, which compiles alright, but the linker errors don't budge. - carb
  • 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!