Animation C++

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Animation C++

Post by xmjhsx »

I couldn't find any tutorials on it, so I have to ask. To animate in C++, do I have to install allegro? Also, how would I load an object onto the screen and make it move, and switch between different pictures of the frame.
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: Animation C++

Post by kostiak2 »

First of all, whats you knowledge in C++? Do you think you know it well enough (console code wise..) ?

If you do, what you need here is a graphics library. You can try Allegro, or you can try SDL. I personally prefer SDL, and if you choose it, you can learn the basics of it from http://lazyfoo.net/SDL_tutorials/

Enjoy,
kost.
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Re: Animation C++

Post by xmjhsx »

Thanks, that was really helpful. I didn't know that SDL actually went with C++ before. I thought it was it's own language...or is it? Lol, i know im a stupid noob but im trying to learn.
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: Animation C++

Post by kostiak2 »

Well SDL is a library for C. A library means a collection of functions, classes and other things, that make some operation easier. A graphics library for example (like SDL and Allegro) provides classes and functions to help you do all kinds of graphic manipulations.

2 Questions for you:

1) What language(s) do you know, and what parts of it do you know?

2) Why C++? Is it your first time programming or do you already have experience in C++?

kost.
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Re: Animation C++

Post by xmjhsx »

I've been doing c++ for a few months now, on and off. I know html and javascript, but I wouldn't really count those as languages. This isn't my first time to program in c++.
I know how to do basic input and output, like the computer asks something and you can say yes or no, and it will act depending on whatever you typed.
I know if statements, else and else if. That's pretty much it... I'm not that skilled.
I wanted to learn c++ becuase it's more powerful than most other languages. People recommend starting with easier languages and working your way up, but I decided to do this anyway.
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: Animation C++

Post by kostiak2 »

xmjhsx wrote:I wanted to learn c++ becuase it's more powerful than most other languages. People recommend starting with easier languages and working your way up, but I decided to do this anyway.
Ok so a little warning, if you follow my suggested path, you may be a bit far from displaying images just yet.

Path #1:
I see you say you decided on C++, I would say that's not too good of a choice as a beginner language. I would start with Python for example, it is simpler and (I think) it's great for learning the concepts of programing. If you want to start with it, go to this Python Tutorial and learn some programing :).

Path #2:
If you still want to start with C++, I would suggest on getting a book. You can get one in your local store, or if you are short in money you can try a free C++ book. Furthermore, you can use online tutorials (like a personal favorive, Cplusplus).

In any of the two path, you will need to learn a lot of basic programing concepts first. Get up to the point you have a fair idea what classes are (that means you will need to know ifs, loops, data structures, arrays, pointers, classes and other topics).

When you have done all that, and have a good understanding of what programing is, go back and pick you graphics library of choice.
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Re: Animation C++

Post by xmjhsx »

Okay, do the ifs, loops, data structures, arrays, pointers, and classes go along with C++, SDL, or both?
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: Animation C++

Post by kostiak2 »

xmjhsx wrote:Okay, do the ifs, loops, data structures, arrays, pointers, and classes go along with C++, SDL, or both?
C++, but any language in general (SDL is a library, C++ is a language). Check out the Cplusplus link.
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Re: Animation C++

Post by xmjhsx »

Okay, I'll look at that. I also just downloaded both volumes of thinking in c++.
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: Animation C++

Post by BlueMonkey5 »

kostiak2 wrote: Path #1:
I see you say you decided on C++, I would say that's not too good of a choice as a beginner language. I would start with Python for example, it is simpler and (I think) it's great for learning the concepts of programing. If you want to start with it, go to this Python Tutorial and learn some programing :).

Path #2:
If you still want to start with C++, I would suggest on getting a book. You can get one in your local store, or if you are short in money you can try a free C++ book. Furthermore, you can use online tutorials (like a personal favorive, Cplusplus).

In any of the two path, you will need to learn a lot of basic programing concepts first. Get up to the point you have a fair idea what classes are (that means you will need to know ifs, loops, data structures, arrays, pointers, classes and other topics).

When you have done all that, and have a good understanding of what programing is, go back and pick you graphics library of choice.

I've never heard of this Python thing. Is it similar to C++? Basically, if i were to spend a few months with Python to get warmed up, would it be an easy switch to make over to C++? If so, I would consider Pythin very good practice for C++ and that would work out perfectly.

Also, I've read that C is not really that good for making games and the way to go for that is C++. so should us aspiring developers skip C all together?
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Animation C++

Post by eatcomics »

What I did was start with a game programming specific language (blitz basic- free version of blitz plus) these languages teach you the structure of a game, and their syntax is really simple so you can spend more time learning game programming, then once I was comptent with blitz I moved on to c++... I just learned the syntax then moved on to graphics... which I'm actually still using blitz quite a bit.... but anyways... That is actually a good path to take it helps you put things together, know exactly why you're doing something and it ensures that you will learn game programming and not get lost learning the syntax of a lower level language (lower meaning more powerful, harder to use //people get confused with this) anyways that is just the path I would suggest because it is very simple :mrgreen:
Image
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: Animation C++

Post by BlueMonkey5 »

got it. very good advice. so, things like python, blitzbasic and darkbasic are game specific programming languages. use that as a type of framework to structure yourself when it comes time to use a full programming language, such as C. sounds like great practice and good place to begin for the beginner, such as myself :)

i wiki'd them. python seemed to be used more for websites allthough it did mention it was used for games too.

of course blitz and darkbasic are specifically meant for gaming only, it seems. BUT what i don't understand is that it kept saying that they are BASIC based. what is BASIC programming language? is it like C and how is it compared to the C language?
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: Animation C++

Post by kostiak2 »

BlueMonkey5 wrote:got it. very good advice. so, things like python, blitzbasic and darkbasic are game specific programming languages. use that as a type of framework to structure yourself when it comes time to use a full programming language, such as C. sounds like great practice and good place to begin for the beginner, such as myself :)

i wiki'd them. python seemed to be used more for websites allthough it did mention it was used for games too.

of course blitz and darkbasic are specifically meant for gaming only, it seems. BUT what i don't understand is that it kept saying that they are BASIC based. what is BASIC programming language? is it like C and how is it compared to the C language?
No. Python is not a game specific language like blizbasic and darkbasic.

BASIC is an old language (made by mr. Bill Gates himself). I myself started with it. But it's very outdated, and these days I would recommend going for Python.

Both Basic based languages and Python are easier to learn at first than C++. The difference is a lot of things, BASIC does wrong (mainly the fact that it lacks Object Oriented Programing), so I had to do a lot of un-learning a lot of thing I learned with BASIC in order to use C++ properly. Python on the other hand, Does OOP much better, and is closed conceptually to C++.
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 16
Joined: Tue Mar 24, 2009 3:54 pm

Re: Animation C++

Post by xmjhsx »

Lol. I've been learning c++ for so long now...but i guess i'll downgrade a little. Take it slow... I'll try python
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: Animation C++

Post by MarauderIIC »

In regards to the original post, there's an "SDL Tutorials" sticky that's a bit dated in this forum. Most of it still applies and it should get you started if you still want to get started with that sort of thing, iirc it's pretty basic.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Post Reply