need help with modeling a dog~please help

hi everyone, I'm a noob in c++, here I have a project to finish, which is a model of a dog. I want to visualize it and I can give it some function to do different moves like bark jump something like that. Now I'm not sure where to start with just like other beginners. Someone suggests me to use Qt. But I really have no idea where to start. Give me some pointers friends!
Last edited on
What exactly do you want to do?
like a few buttons on the screen, click them and the dog can do different moves.
closed account (3CXz8vqX)
I'm going to recommend SDL...since I know of an awesome tutorial for that (Lazyfoo ).

Firstly you're going to need a plan as pogrady states, what exactly do you want to do. It sounds like you're jumping in too deep if you're new to c++. Even lazyfoo only recommends that you start Graphics and stuff after you have figured out how classes and inheritance works, with a good understanding of pointers of course.
thanks Rav, I just learned almost everything basic about c++ , never worked with animations like that~
Tony, most graphic applications have a solid design underneath. I would recommend reading this:

Graphics are the visible extension of what the program already does. Consider making the dog bark and wag without graphics first. Something like:


void Bark()
   std::cout<<"Woof woof"<<std::endl;

void Wag()
    std::cout<<"Wags tail"<<std::endl;

Once that's there its easy to draw the dog. But if you don't have much experience as to what you need, then it becomes a guessing game.
thanks pogrady, I know u want me to write a outline class first, I can do that, I just dont have, like u said, much experience as to what I need, and it's really becoming a guessing game
The thing about graphic applications is that they run in a loop. So what you want to do is create the dog class that does certain things, then make sure that it works properly within the console. For example, if you want to have the dog bark, you call Dog::Bark() which has the dog output "Bark". Once the class is working properly, then you begin to look into graphics APIs to render the dog. At that point instead of having the dog output "Bark", you would have it draw itself rendering an animation of it barking. You could also play a sound if you like. This approach is very extensible, and if you wanted to create AI for the dog it becomes very easy.

Once that works, then you create the buttons to control the dogs behavior. There are multiple ways you can do this: by directly controlling the actions of the dog by clicking buttons, or you can send a message to the dog, and have the dog check the message stack. If you do it like this, then the only call to make is a call to Update(), which has the dog check the messages and respond, on its own, correctly.

As far as the graphics APIs are concerned, there are numerous to choose from. I like SFML. Its easy to understand and implement, as well as being object oriented, which makes it easy to implement into c++. They also have tutorials on how to create a window and to set up the render loop. I used to use SDL, but its based in C, and is somewhat difficult to get up and running as it uses call backs. SFML is much easier.

Hope this helps with your AI dog dreams.
Last edited on
thanks pogrady, I have been trying SDL the whole afternoon, and its like u said, somewhat difficult to set up and to understand. I will try SFML, you are really helpful, and I hope I can find some good tutorial on SFML! Thanks a lot!
By the way, if u have good tutorials, please give me a link or the name, if u leaned it yourself, can u share some experience with me ~? thanks again
Last edited on The website has good tutorials.
Topic archived. No new replies allowed.