Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About jermz

  • Rank
  1. jermz

    Separating Axis

    Thanks, easy to see in the example given.
  2. jermz

    Separating Axis

    I've coded up an intersection test for convex polyhedrons, more specifically OOBs using the separating-axis thereom. It seems to work fine, at least for the test cases I've tried it with. Now I'm working on detection of the actual collision between the boxes, basically plane vs vertex and edge vs edge plus degenerate cases. However, while doing this I began thinking more on the separating axis thereom for intersection tests. If two convex polyhedrons are disjoint, then there exists a projection along an axis orthogonal to a face or orthognal to an edge in each polyhedron where they are also disjoint. I can't for the life of me visualize any case for 2 OOBs where they would be disjoint and NOT have a separating axis based on faces. In otherwords, is the 2nd part of the thereom necessary? Can someone give me a case where projections on the faces all overlap but the polys are disjoint?
  3. jermz

    Game freeze...

    2 possibilities that come to mind are either A) You are playing the sound synchronously and execution waits till playback is complete (PlaySound() in winapi does this by default I think) or B) Your sound isn't cached in memory and needs to be loaded from disk when you play it. So look into asynchronous playback or pre-loading your sounds if those are the problem. Some unsolicited advice is to stay away from MFC if you are doing a real-time, non turn-based game. Either use directx/opengl/winapi directly or some intermediary like SDL.
  4. jermz

    matrix trouble

    Why exactly are you using z coordinates in your equations? You said you are making a 2D game which to me implies your vectors will be 2D and your rotations will be around a point instead of around axes.
  5. If you use tiles, it won't be so bad on memory. Let's say you use 32x32 pixel tiles with a screen size of 640x480. That means a screen has 20x15 or 300 tiles on screen at once. If you limit the number of possible tiles in one level to 256, you can use bytes to index your tiles. Even if you are making a super mario type clone, where the level may be 50 screens long, this is only 50 screens * 300 tiles per screen * 1 byte per tile = 15000 bytes. Thats probably less than the amount of memory a single tile graphic will take up. As for how to do the side scrolling, load your map file from the webserver (since you are using java 1.1 in a browser, your access is restricted). Then load a palette of tiles. Read input to move your character around. Have a camera class that stores its position in the map. Usually this will be centered on your character except at the ends, or when you do in-game cutscenes. Render the map through the camera, just drawing the visible tiles and game objects.
  6. jermz

    Gun fighting in a RPG

    If you need an example of an RPG with well implemented guns, try the Fallout series, especially Fallout 2.
  7. jermz

    3DS file format question

    My understanding of 3DS files is that each vertex has only 1 set of texture coordinates. You have 8 vertices for a cube but since they each belong to 3 separate faces with different texture coordinates, you have to duplicate the vertex info for a total of 3 * 8 = 24 vertices. One thing you could do is generate a single texture for the cube by combining all 6 textures into 1 big texture (think of unfolding the cube so it lies flat). That way each vertex has the same texture coordinate for all faces. This can be a lot of work tho and you lose some flexibility in just slapping textures to faces. You may also have to deal with this when rendering as vertex buffers and such generally only allow you to specify 1 set of texture coordinates per vertex so you will have to duplicate vertices or combine textures there as well.
  • 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!