Jump to content
  • Advertisement

wolfscaptain

Member
  • Content Count

    174
  • Joined

  • Last visited

Community Reputation

200 Neutral

About wolfscaptain

  • Rank
    Member
  1. wolfscaptain

    Thanks Game Dev

    Machine code. But with more seriousness, if you are going to make a triple-A game, C++ is most likely the way to go. Until then, you should use other more sane languages.
  2. wolfscaptain

    Screen Coordinates and (0,0) Position

    All matrix operations are removed in ES2, but the idea is the same - send your own projection matrix. As to integer positions, use glVertexAttribIPointer (note the I).
  3. To replace data files, I'd go with with something like PhysicsFS. They have this exact example on their main page I believe.
  4. Wall sliding is done by moving the colliding object along the collision normal until he stops colliding. I assume any physics engine gives a collision listener which also feeds the collision "force", which is just the penetration vector's length. You can use that to apply your own response, but remember to check the normal's direction, or you'll slide down on ramps too.
  5. wolfscaptain

    Question about GLEW.

    For some reason I don't understand, no one introduced a window-less OpenGL context, so you have to make a window. If you don't want it showing, just set it to be hidden.
  6. It will be a whole lot easier to use that same quad you defined, but before drawing it, reset your projection and view matrices. I am not in front of a computer and I don't remember the exact synta, but something like this: // draw your scene glMatrixMode(GL_PROJECTION_MATRIX); glPushMatrix(); // does this work for the projection matrix? glLoadIdentity(); glMatrixMode(GL_MODELVIEW_MATRIX); glPushMatrix(); glLoadIdentity(); // render your quad glMatrixMode(GL_PROJECTION_MATRIX); glPopMatrix(); glMatrixMode(GL_MODELVIEW_MATRIX); glPopMatrix(); // ... I haven't used the fixed pipeline for years, so I don't remember if pushing and poping matrices works for the projection matrix, but logically it should. In any case, you can render that same quad in your code this way to make it "fullscreen". As to seeing the other objects behind it - use blending (set your color with alpha below 1).
  7. wolfscaptain

    Swapping out meshes at runtime

    Attachments should be in separate files, since they are not directly related to one character (e.g. Monsters that wield weapons). With skeletal animation, you can indeed attach models to points on the original one and have them follow its animation. I would still try to make a few animations of the same type. For example, you can swing a sword or a spear the same way, but stabbing with them is done quite differently.
  8. wolfscaptain

    Moving a scene/entity in a 3D world.

    You can use a unit vector to store your facing direction. If you want to turn, rotate the vector. If you want to move, the velocity is speed*direction. Another option is to use a quaternion, but I think starting with a vector is easier (more straightforward, anyway).
  9. wolfscaptain

    Achieving oldschool platformer physics

    I realize that, but I really don't want to start handling collisions, so I am wondering if you can force Box2D to be less "physicy"
  10. I am using Box2D, with a world made by arbitrary polygons, and I can't get for the life of me the oldschool platformer feeling. I am talking about moving at a constant velocity when you press the left/right keys, moving up/down on slopes at exactly the same way as on horizontal surfaces, and simple jumps. I tried playing with friction, gravity, using impulses or setting velocity directly. The issue is, no matter what I do, something works physically correct, which isn't really what I want. If friction is set to 0, and the velocity is set directly (if left is pressed, move left, if right is pressed, move right, if neither is pressed, set to 0), the player moves correctly on horizontal surfaces, but would slip on curves for some reason, jump when stopping to move upwards (still there is still velocity in the Y axis), and jump sideways when starting to move downwards, still gravity doesn't catch up immediately. If friction is set to 1, and the velocity is set directly (as above), the player doesn't slip from slopes, but still jumps upwards and sideways when stopping to move while going upwards or starting to move while going downwards respectively. In addition, the payer gets stuck while going against a wall to his sides, but that can be solved by checking if he is in the air or not. If friction is set to something very high, and I use very large impulses instead, while controlling manually the maximum velocity that the player can get to, then the player can't go up slopes (even the tiniest one) - he just gets stuck in place, and he also moves very fast when in the air (but this, again, can be controlled by checking if the player is in the air or not). Is there a decent way to get the feeling of old platformers, or is Box2D not suitable for this? Thanks.
  11. wolfscaptain

    Cleanup at end of program

    Like I wrote above, my resources get deleted (as in, the destructor is called) after the window is closed, so there is no context to delete them from. Guess I'll just use heap memory (new) and delete them manually before the program ends.
  12. Does one need to clean up OpenGL resources when a program finishes? I can't think of any not-annoying way to clean up global resources in an SFML project, since the window (and thus context) gets destroyed before my resources. Do they leak to VRAM, or does the context take them with it? Is there any decent design to delete global resources before a program ends (and before the window is closed)? Thanks.
  13. wolfscaptain

    Assimp only importing some bones?

    Nodes are not necessarily bones. Are you getting the bones from all the meshes in the scene (if there are more than 1)? for some reason I don't understand Assimp doesn't save the whole skeletal structure, but rather splits all the references throughout the meshes. This means that you will have to figure out what the skeleton really is, because it does not have to be equal to the node hierarchy started with mRootNode. Here are two links that talk about this in addition to some other animation related stuff: http://gamedev.stackexchange.com/questions/26382/i-cant-figure-out-how-to-animate-my-loaded-model-with-assimp http://ephenationopengl.blogspot.se/2012/06/doing-animations-in-opengl.html
  14. wolfscaptain

    glBufferData failing

    I wrap all my GL calls with a macro that, if debugging is wanted, adds a call to a function that prints a GL error. It's not automated, but it's as close to it without going and making bindings that do it. I would have liked having a debug version of GLEW. On another note - do not use glBufferData to edit buffers, use glBufferSubData. The former forces the driver to reallocate the whole buffer.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!