• Content count

  • Joined

  • Last visited

Community Reputation

116 Neutral

About ddustin

  • Rank
  1. Installing Allegro - Dev-C++

    Installing allegro on dev-cpp is very easy. Run this file and follow prompts: Download Allegro
  2. pleading for winsock help

    Oh and I ran some tests on windows XP (but i assume its the same for earlier versions) on the select function. There were some beliefs that it had a minimium 10 millisecond delay for every function call, and therefore you should only use it by passing *all* of your sockets to it at once. The tests I ran concluded that for about 99.99% of the time the function returns near immediately and in some rare cases (it was about 2-4 in a couple hundred thousand) it would stall for 1-3 milliseconds. So therefore I would just make a wrapper function that takes a socket, runs select on that socket, and returns true if the socket is ready to recieve data. I've implemented the function a number of times. You end up with code like this: if(isSocketReady(sock)) recv(socket, ...); And its completely non-blocking and very simple and very straight forward.
  3. "fadeing in" a mesh

    Do you mean fading using glColor() when applying the texture?
  4. Recent Posts By Me

    Ah I see. Is there a way to see if anyone has replied to any of these topics since my last post?
  5. New to GDnet

    Quote:Original post by BeanDog 3. Don't get addicted to the Lounge. You'll never get any work done again. Heh I'll keep that in mind :).
  6. pleading for winsock help

    Also another tip, don't use non-blocking sockets. They're not worth the confusion. Instead use the select function to detect when data is waiting for you on a socket. If you want I can walk you through how to use select for a completely non-blocking networking app without using the dumb and confusing EALONGMACROFORNONBLOCKING stuff.
  7. pleading for winsock help

    When sending you have to check to see how many bytes were actually sent. Its possible that the kernel is only sending half your message without the delay and you're expecting the whole message to go through. When using winsock you have to check all output paramters and return values. If you click the 'faq' link it will walk you through various mockup codes. Heres a link to the faq.
  8. New to GDnet

    So what do most people who post on this forum do? Is it mostly commercial game developers or are there all types?
  9. std::map problems

    Even though the error is fixed by removing the line, the error could still be the fact that you're returning 0. Templates are very weird creatures. Try returning .end() instead of 0 and see if the error goes away.
  10. Is there a page where I can get a list of the threads that i've posted in ordered by date? Something like all posts by user Dustin Dettmer
  11. 2D rotation issues

    I'm trying to do the typical 'pivot rotation' with opengl (as well as d3d) but I cant seem to get the math right. I know I should be using matrices but I'm not very good with them so I thought I would try solving it with trig. Aparently I cant do that either. Would someone be able to point me in the right direction? I've been googling for days but can't find a tutorial that I can understand :\. Heres my opengl pivot rotation function that isnt working: void Bitmap::pivotBlitToScreenHardware(int screenX, int screenY, int bitmapX, int bitmapY, float rotation, const Tint &tint, bool disableBlending) { glColor4f(tint.r, tint.g, tint.b, tint.a); if(disableBlending) glDisable(GL_BLEND); if(tint.additive) glBlendFunc(GL_SRC_ALPHA, GL_ONE); glBindTexture(GL_TEXTURE_2D, texture); glPushMatrix(); glTranslatef(screenX, screenY, 0); glRotatef(rotation * 360 + 180, 0, 0, 1); // u and v specify the size of the actual image inside the texture // 1, 1 would mean the image is taking up the full texture size // w and h are the size of the whole texture glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2f(-bitmapX, -bitmapY); glTexCoord2f(0.0f, v); glVertex2f(-bitmapX, h - bitmapY); glTexCoord2f(u, v); glVertex2f(w - bitmapX, h - bitmapY); glTexCoord2f(u, 0.0f); glVertex2f(w - bitmapX, -bitmapY); glEnd(); glPopMatrix(); if(disableBlending) glEnable(GL_BLEND); if(tint.additive) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); }
  12. std::map problems

    The common practice for iterators would be to return mSectors.end() when the iterator cannot be found. Returning 0 or NULL like that is most likely why MSVC is crapping out on you. Though you can never really be sure with MSVC, its not the best C++ compiler.
  13. New to GDnet

    Hello! I'm new to the gamedev forum, wanted to say hello and introduce myself. Hopefully this is the correct section to do it in. So... hello :).