Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

104 Neutral

About bgoldbeck

  • Rank
  1. bgoldbeck

    Keyframe animation help

    I didn't ask for help refactoring my code. The last thing i'm worried about is that while i'm trying to learn a new subject. I also have tried multiple variations of an interpolation algorithm.
  2. bgoldbeck

    Keyframe animation help

    Here is some of my code. static long begin = Timer::timerInitialize(); long dif = Timer::timerDifference(begin); if(dif > 1000) { begin = Timer::timerInitialize(); dif = 1000; if((curFrame + 1) != endFrame) { curFrame++; } else { curFrame = startFrame; } } float weight = dif * .001; //Divide by 1000. vector<vec3> newVerts; for(int i = 0; i < getObject(animationState, curFrame, 0)->vertices.size(); i++) { float x1 = getObject(animationState, curFrame , 0)->vertices[0]; float x2 = getObject(animationState, curFrame + 1, 0)->vertices[0]; float y1 = getObject(animationState, curFrame , 0)->vertices[1]; float y2 = getObject(animationState, curFrame + 1, 0)->vertices[1]; float z1 = getObject(animationState, curFrame , 0)->vertices[2]; float z2 = getObject(animationState, curFrame + 1, 0)->vertices[2]; float newX = (1.0 - weight) * x1 + (weight * x2); float newY = (1.0 - weight) * y1 + (weight * y2); float newZ = (1.0 - weight) * z1 + (weight * z2); vec3 newVector(newX, newY, newZ); newVerts.push_back(newVector); } vbo->modifyVertices(&newVerts[0]);
  3. Animation Hello, I am currently trying to learn keyframe animation and I am currently running into trouble. The link about shows where I am trying to animate a "T" shaped structure made of multiple cubes at three separate frames. I interpolate between each frame and the motion appears to come out correctly, but the triangular polygons lose there bearing and detach from the shape.
  4. bgoldbeck

    Problem creating an item in Text Game

    Instead of having a function [color=#1C2837][size=2]DeclareAllItems(), you should just use the constructor to initiate variables of a struct or a class. I won't be able to tell you why you are getting errors without seeing any code.
  5. bgoldbeck

    Char Question

    +1 on the std::string and with a string you can still convert it easily to a c-string if you have to. IE: const char* cstr; string str = "testing string"; cstr = str.c_str();
  6. Well, its much easier on linux , but just do some quick googling on it and you'll find things like this
  7. bgoldbeck

    create and animate models?

    You could start by learning specific formats like .obj or .3ds. .3ds is a binary file and may be a little harder to implement, but here is a link that may help you with that. .obj is a simple text file you can read with human eyes, making it easier to work with and load. Both these formats are a little old and not good for animation. I suggest starting with them to learn the basics and move on from there to more advanced model formats.
  8. The only correct way of exiting is making sure everything in your program is cleaned up and nothing is dangling. Do it the way it makes sense to you. It's like if you told 5 separate people to sketch a picture of an alien, there isn't 1 correct answer, there would just be 5 different interpretations of an alien : )
  9. I'm new to the GLM Mathematics library and I have a problem with swizzling. Right now if i do: vec3 A; float x = A.x; My IDE doesn't like it and throws up a red flag saying "unable to resolve identifier x". However, the code compiles, runs, and works fine. I would like to avoid this way of attaining float values from vec3 objects anyway. What is another way I can do this?
  10. bgoldbeck

    Best timer (clock) functions to use.

    This is actually good news for me, because I was thinking of eventually implementing a client/server and the server would be UNIX anyway. Still 49 days is probably a really long time for a server to run and a client would probably be extremely absurd to run for that long.
  11. bgoldbeck

    Best timer (clock) functions to use.

    Very good idea alvaro : ) So then it would only be windows machines that crash after "49 Days".
  12. bgoldbeck

    Best timer (clock) functions to use.

    Ooh, I like that. How is that platform dependent though? Would time.h not work the same on multiple OS?
  13. bgoldbeck

    Best timer (clock) functions to use.

    Perhaps i'm being a little eccentric, but I like to not be limited. Which is why I chose SDL and OpenGL in the first place. Otherwise, I would have picked a single platform to work with. For me, as a programmer, I am inquisitive about learning another way that isn't limited to 42 days.
  14. Hello, I am currently using SDL's timer functions and they work great for me so far. However, the timer eventually will go out of range after (42 days) I believe it was. That does seem like a long time I know, but I was wondering if there are better alternatives like 'ctime' or something. Although on paper it looks to me ctime will share the same 42 days flaw, unless someone knows a workaround.
  15. Thank you, I should mention I do realize some of the waste of time in my program. However right now i'm more focused on making it work first As for the normal mapping i'm going off of the code used in the RenderMonkey called "Textured Bump."
  • 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!