Alhazred said:
I'm thinking to go 3D since the beginning. About that, I'm reading something about animating characters trying to figure out what's needed to learn.
Probably the hardest part of 3D.
You need to understand the math related to representing spaces in 3D. Which is linear algebra of vectors and points (vec3), and matrices to represent orientation and scale (3x3 matrix) and translation (4x4 matrix).
Next you need to understand how to work with such spaces in a hierarchy formed by the skeleton, so lifting an upper arm also rotates the lower arm, hand, and fingers accordingly, because they are child nodes of the upper arm.
Usually you represent each bone with a 4x4 matrix, and multiplying the child matrix with the parent transformation gives this result as expected.
The bone matrices can then also transform the skin vertices. We can use a linear combination of multiple bones per vertex to get some smooth skinning also on joint regions.
(I'm not sure if SFML has 3d data types like vec3, vec4, matrices, etc. If it's missing you can use another library like GLM, or use another framework which has it. DirectX has this math lib stuff included, but OpenGL has not. And both APIs use different conventions or row vs. column major order, which can cause some confusion when looking at tutorials using the other convention than you do.)
The hardest part here is usually getting used to 3D rotations, which are much harder than in 2D. Beside matrices, quaternions are a common and nice tool specifically about rotations.
Character animations are basically about such 3D rotations and rarely contain other data. Bone positions emerge entirely by rotating the joints of the skeleton accordingly to the data.
We can interpolate multiple animation clips at runtime to deal with discontinuities and transitions, but often the result looks kinda bad or inaccurate in practice, which can be addressed using inverse kinematics, e.g. to constrain a foot to the floor, or a hand to some handle, or to aim a gun. That's already some geometrically challenging problems to solve.
As a one man game developer, so far i never released a game using 3D character animation. It's really a hurdle. Making good animation manually is difficult, time consuming, often impossible.
And likely you don't want to do motion capture like AAA does to solve it, nor do you want to pay professional artists to help out.
So, for a first city building game, i'd try to limit it or avoid it completely.
Contrary, drawing 2D pixel art animations isn't easy either, but much more doable. Probably the main reason indie games use mostly pixel art.
That said from the perspective of content generation. Learning the math on the other hand is totally worth it and essential, if you aim for serious 3D game dev.
But the best advise always is: Start small. If you aim to high, you won't finish your first game. Which is not so much of a problem if learning is your top priority.