Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does C/C++ programming translate into pictures and movement in games?

0
Posted

How does C/C++ programming translate into pictures and movement in games?

0

Your suggestion is along the right track, but in modern games there are a lot more details. For example, take the idea of someone moving through a tunnel – you have to make sure that the movement doesn’t make the person go through the walls or any obstacles, and the behaviour of any object is natural. This is done using a “physics engine”, for example Havok. For pictures they are individually painted on the screen. For motion, e.g. for a person walking, you display one picture, then you display the person’s legs and arms as having moved a little bit, and then another little bit – a set of frames, similar to a film. However there are some optimizations: you only change the part of the screen where the movement occurs rather than redrawing the whole screen every time. This is a very, very simplistic description of how to do this stuff. If you’re interested in this, learn your math – a big part of motion involves things like matrix multiplication.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123