mameman

Members
  • Content count

    115
  • Joined

  • Last visited

Community Reputation

100 Neutral

About mameman

  • Rank
    Member
  1. fopen problem...

    It's okay guys. I've managed to track down the problem. I actually found a bug in my memory manager. Using an array index that was out of bounds, that is of course, bad. I fixed this and it made the fopen() problem disappear. :) Thanks for the replies. mameman.
  2. fopen problem...

    I'm using GCC and Code::Blocks to write an image class that wraps up libpng and libjpeg functionality. The image class is in a static library. However, specifically when I try to open an jpeg image file using fopen() I get the following error. Process terminated with status -1073741819 (0 minutes, 1 seconds) I know that the fopen() call is causing the issue because I put two messagebox's either side of the call and the first one pops up, the second doesn't. Any help appreciated.
  3. There are too many problems there!. To bolster your DirectDraw understanding try click me!. Should give you enough infos to get you started. :)
  4. Hi, Why not just convert to a string?. TCHAR buffer[128] = { 0 }; DWORD dwLen; _tsprintf(buffer, _T("mouse position (%d, %d)\n"), point.x, point.y); // call WriteConsole() Hope that helps, MAMEman.
  5. Hi, I battled with this one when I first started out. It's not that complex (surprisingly). Anyways, what you need to do is separate the axis for the player i.e. y and x and check for collisions in those axis alone. For example check the y-axis for a collision first then check the x-axis (but don't do both!) and respond to the collision accordingly. That should be all you need to know. Good Luck :) mameman
  6. Approximating Arc Length

    Hello All, What to know is it possible to find the arc length of the parametric functions: x(t) = t, y(t) = cos(t)?. I know that this has the following integral: sqrt(1 + sin^2(t)), between the interval [t0, t1]. I'm pretty sure that this does integrate but it would take way too long for my purposes. Are there any approximate methods out there that you could recommend?. Thanks for your help, mameman.
  7. 2D rendering

    It does and they are glBitmap() and glDrawPixels(). These two functions allow blitting of monochrome and colour images respectively. Be warned though, they are incredibly slow and you have manually setup clipping operations etc. otherwise the image won't render. You'd be much better off (and it's a lot quicker) to just apply a texture to a ploygon. Good luck, MAMEman.
  8. Converting Vector3D to Sphere Angles

    @jyk. I always like those general solutions ;). Yes this has given me enough information to implement a solution for my particular problem. I can also make some assumptions in my case that reduces the maths to a few simple equations. @wentworth. Yes you are correct. However my system is the one used by OGL i.e. z(coming out of the screen), y(up) and x(left). So in my case its theta = arctan(x/z) and phi = arcsin(r/rho) ;). Anyways thanks. Cheers guys, MAMEman.
  9. Hi All, I have a problem in that I want to extract the angles (phi and theta) from a specified 3D vector. For example, if I pass in the vector(1.0, 0.0, 0.0) then this would return (phi = 90.0 and theta = 90.0). Similarly if I pass in (0.0, 0.0, -1.0) then the angles would be 90.0 and 180.0 respectively. Any advices appreciated. MAMEman.
  10. Racing Game. Where to start?

    Thanks for the input guys. The plan is to test the game on a LAN first, just to make sure that everything is working correctly, and then move it to the internet. I'll be using UDP for everything, I'm not touching TCP for speed reasons. As I've said any questions I'll post them here. @NineYearCycle. Those articles are very informative. I'm slowly beginning to understand and the water is getting ever deeper. :) MAMEman.
  11. Racing Game. Where to start?

    @DrCoolSanta. You've misunderstood my initial post. I'm not looking to "start" programming a racing game. I'm more specifically interested in the networking section of the game that I'm developing. I've been developing stuff in OpenGL for a long time now so the render system isn't really an issue as is the OS issue, although I'm targeting Windows based PCs. However the advices that you have given, I would whole heartedly agree with. OpenGL is easier (by far IMHO) than D3D. Anyways thanks!. @NineYearCycle. Hit the nail on the head. Only interested in the networking section nothing more, nothing less. Yes I fully understand what you are getting at here. My strategy for the networking would be to actually send out the keyboard state of the client to the server, the server will then update the the clients position and then send the data back to the client. Of course there is a "huge" flaw in this plan and it is network lag. Another flaw is the amount of bandwidth being used by the server. At the moment I'm just "feeling" my way as to what is a good strategy for "smooth" game play. At the minute I'm all out of ideas. I'll take a look at those articles, any questions I'll post them here. Thanks for the advises. MAMEman.
  12. Parsing text files?

    Text parsing of this sort is not really that difficult!. The simple rule for parsing ANY text file is: scan to the first non-white space get token interpret token Note that while your scanning white space there my be a possibly of hitting the end of file character (if there is one) so you'll need to break out of the parsing at that point. To reduce complexity in the parser you may want to write a scanner object which does all of the low level file/io and passes tokens to the parser. Good luck! MAMEman.
  13. Afternoon all, I would like some advises about developing a racing game using a client/server methodology. Having spent many hours looking though informations I have decided that I want to do this using UDP and have the client and server run in a multi-threaded manner. I also have some of the basics under my belt. I can develop a simple chat server that allows clients (and lots of them :)) to connect to the server and converse with other clients that are connected. Clients can disconnect at any time and the server informs other connected clients that a client has disconnected. Also the server can time-out a client if the server has not received a message within a specified time limit. Conversely if a client does not receive a message from the server in a specified time then the client assumes that the server is down or crashed and exits. Any advises on where to start developing my racing game, what I need to look at etc. BTW, I'm not too keen on looking at third party api's for this simply because I want to know HOW these things are done from first principles. My choice of language(s) is a mixture of C and C++ with the standard winsock api. Advice appreciated. MAMEman.
  14. Dialog not visible?

    Skizz, Many thanks, worked a treat. MAMEman.
  15. Need help with trees/linked lists

    Hi, You might want to consider looking at some compiler theory books: pay particular attention context free grammars and parsing. Good luck, MAMEman.