Some questions related to opengl, may be related. Right now, I have things on my griddy thing that are being represented by a sets of 3-D vertices. Each object is drawn by doing a thing of glLoadIdentity, glBegin, glVertex3fv's, and then glEnd. When I want to move the thingy around, I add change the quantities of everything in my set of 3-D vertices, instead of using glTranslatef. Is this bad?
Also, the way I percieve time in my game is all funky. I time things and stuff and then every time I call my update routine, it passes it the elapse in time. And then the objects can displace themselves around with velocity * delta time. So, their position is never like in some definite spot aligned to a grid, and they make just little sporadic jumps around the place that are really really small and are percieved as smooth movement. So:
1) Is that a good system? What if the system hangs, and the next update is a really big interval, and things make big jumps?
2) This makes collision detection kind of wierd, and (non-nerdy) people I've talked to say that this is just a bad way of doing things because I don't really know where things are. Like, the example right now, is that I'm doing pong, and really I should be able to check if a face of the pong ball hits a face of the paddle.
But, the lines which make their borders will never really be exactly the same, because of the timing, so I can't just check for that. So, Right now, I'm checking if the rectangles intersect, and if they do, it reverses directions. 2 problems with that
(-) If it hits the top of the paddle, it still chenges directions (not logical) and
(-) Sometimes, the ball can get 'stuck' in the paddle, and will change it's direction thousands of times before exiting the paddle, because it doesn't just reverse its direction and leave. Thus, it can hit the paddle, and then still go past it getting a goal.
So, that's wierd, and requires odd workarounds. Is there a better system, or shoul I just use wierd workarounds?