Animation in C++ [closed] - c++

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What are ways to draw animations in C++? GDI+? OpenGL? Would you recommend a class pattern in particular to get the drawing and redrawing done?
Do you know of any open source project where animations are made so I can take a peek at the code?
Where would you start if you wanted to code geometrical animations? Do you know of any good libraries? Post links to tutorials and any other interesting information...

QT QGraphicsScene
It was specifically designed to make writing 2D games easy and effortless, with great support for animation.
QT is a very mature cross platform toolkit which also have an open source flavor.

I'm a developer of openframeworks (openframeworks.cc / openframeworks.cc/download) and also, I teach a course about animation in c++ in ny, there are some code examples up now (and more over the next few months):
http://makingthingsmove.org/blog
there is some example code in OF here too:
http://wiki.openframeworks.cc/index.php?title=OfAmsterdam
and some processing animation code here:
http://thesystemis.com/makingthingsmove
that might be a helpful starting point.
have fun !
zach

Your question is a bit too open. There are tons of graphics library, lot of them supporting animation.
You don't even give the scope of your question. Since you mention GDI+, I suppose you want it for Windows, but there are good portable solutions, like SDL, Allegro, Cairo, etc.
Lot of game frameworks can do that too.

There are good lists of different libraries:
http://www.twilightsembrace.com/personal/gamelibs.php
http://www.thefreecountry.com/sourcecode/graphics.shtml

As others have stated this is a very broad question. I woudl advise to go check some computer graphics and game development books. They usually ahve the "easy to understand"material on that area. If you want to peek at code there are several open source game engine like Ogre3d, Nebuladevice and Irrlicht. But peeking at that code without knowing what you are looking for is not recommended at least by me. Graphic engines are usually huge and complex code bases.
Try looking for game development tutorials in google, you will find a lot of very simple examples. They usually do not reflect the exact same techniques used in full fledged engines, but understanding those first will make possible to understand the later.

I know of this: http://www.openframeworks.cc/
and this: http://www.contextfreeart.org/

Related

Win32 still best for Windows game development? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking to start a new project to work on in my free time that covers a lot of areas of Computer Science and I've decided on a game (most likely flight simulator or simple 2D side-scroller). Anyway, I do a lot of C#/Java development at work writing business applications so I'm looking to do a game in C++ (I have used C#/XNA for games previously).
However, I'm trying to find a good framework for C++ game development. I have used Qt before but don't believe this is suitable for what I am trying to achieve. Is Win32 and OpenGL still the best for C++ game development?
Also, I want to keep this pretty OO, any recommendations for wrapping the Win32 for game development? Or does OpenGL provide abstractions to help?
From what I've experienced, the Win API is a complete mess. I'd recommend using something like SDL and save yourself the trouble. As a bonus, this will also make it cross platform. You can also use OpenGL with SDL.
SDL is still a bit low level and has a C style API, so you'll need to write your own OO wrappers. I've heard that SFML and Allegro are popular alternatives but I have less experience with them.
SFML is probably the closest you can get. Most people using 2D rendering roll their own, and most using 3D go with either something like Irrlicht, or roll their own.
As for OGL, the OGL API is horrific- it's even worse than the Windows API. At least that is OO, C-style, instead of just plain old global-variables-up-wazoo.
Check out GLFW. It looks to be minimalistic (in a good way).

Writing a map editor for game development [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have recently begun game development, working mainly with C++ and SDL. After creating few simple clones, I want to work on something more complex. Something with a lot more physics than I am used to, and complex game objects.
So far, I have been using a basic tile editor I made in SDL to create binary maps, but now I want to work on something meatier. Something in which I can place objects and define their properties. 2D, of course, but with more utility than a simple tile editor.
I have been searching, but I haven't really found any articles which are aimed at developing such utilities.
Where can I find information to help me develop this toolkit? And what should I use? I have been looking at Qt, but I'm not really sure. I would appreciate any help and possible guidance for this endeavor of mine.
(I know that excellent utilities do exist, but I want to develop one myself, and then hopefully integrate my basic physics engine into it. It may be re-inventing the wheel, but a very good learning opportunity.)
Tiled seems to answer most, if not all of your questions.
Where can I find information to help me develop this toolkit?
A good place to start is by looking at open-source projects, which tiled is.
And what should I use? I have been looking at Qt, but I'm not really sure.
You need to be more specific. What requirements do you have? Tiled seems to do most of what you say you need, and is written in Qt, so Qt is definitely up to the task. It's also written in C++, which you are already familiar with.
I would recommend not reinventing the wheel, and using an existing, open-source map editor (like tiled) to do what you need. If there's a feature you HAVE to have, you can always contribute or extend the editor.
Since you're going into making a more complicated game, my recommendation is to first define your requirements. Once you've done that, write the game (not an engine).

C++ Game Design - What Library/API? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am currently developing an rpg type game in C++. I have developed a few games in the past but have used heavily inclusive APIs. For this game I am looking into developing it more myself. I still want the graphic and animation functions to be (mainly) implemented using the library. Here is a break down of the game:
It will be a top down tile-based game when not in battle where the character is free to walk around and speed will be determined by a speed stat
Once in battle it will be a turn-based battle system with (not completely final) 3 man team on each side
Some information will be stored online and will be used in the game but that will not need to be checked often
What I am asking is; what would most likely by the best library or API for me to use for this purpose? I have searched and have been able to find a few that I believe may suit my needs but none that have been popular. Perhaps I am looking for something too specific but any help or recommendation would be greatly appreciated.
P.S. Along with a recommendation, a link for a decent tutorial or documentation would be most appreciated.
There is always the popular libsdl. There are many tutorials for this library online inluding the dedicated
http://www.sdltutorials.com/
You can always use as much or as little of a library's functionality as you like.
Have you had a look at this?
http://irrlicht.sourceforge.net/
If you look in the forums, people have written their own compatible libraries for AI, Physics etc etc that they seem to be happy to share. Also there are lots of compatible tools like this http://www.ambiera.com/coppercube/ and lots of language wrappers.
As an addendum to Caustic's answer, I suggest looking into Ogre3D. Like Irrlicht, it is primarily a rendering engine, leaving much of the work to be done by yourself. From personal experience, I cannot recommend one over the other.
I am sorry to swear. I believe you should use SFML because it is an all-around nice library for graphics development.

Is QT the right framework to use for simple 2D game in C++ [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to create a simple "Mario-like" 2D game. Nothing too fancy, just a some kind of plubmer walking and jumping, some bad guys, user interference, few levels. Is QT the right framework to use? My friend suggested me Irrlicht, but that seems much more for 3D stuff.
Thanks for your ideas!
I don't think that QT is the right tool for 2D game development in C++, but you can try SDL.
Also, for future game development questions, there's a better StackExchange web site where you can probably get better answers: Game Development.
Qt can be used to make very complicated animations and graphics scenes (2D and 3D). There are tiny examples included in the SDK that you can use to base your work on, but remember you'll be programming in Qt, instead of something a tad more general like OpenGL.
Check out SDL.
If you want a more OO API, check out SFML. SFML has more done for you in terms of design (a Sprite class, for instance).
Qt has a big library which provides a lot of features, you would be wanting to use Qt wholly rather than just for 2D drawing.
If you already know qt and are comfortable with it, then its way to go.

What is the best free portable 3d/2d engine? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i like to make very simple 3d/2d game for pc/mac/linux
what is the best free 3d/2d engine for this ?
i have no experience in game programming so i guess it have to be easy to learn
please in c++
thanks
While 'best' can very much depend on your situation, one I have used in the past to great success is OGRE 3D.
It's cross-platform, very nicely written (C++), and runs well. However the one thing that set it apart for me was the great community - you can always get help no matter how simple your question, and there are plenty of guides/tutorials around on their forum/wiki. The documentation is also very good.
It's well worth checking out.
Hrmm, upon reading that it almost sounds like I have a vested interest - I don't! I just really like it from past experience!
Try searching DevMaster's Game and Graphics Engines Database for 3D engines. This question has also been asked and answered MANY MANY times in their forums.
C4 Engine, irrLicht and Torque are often recommended for 3D in C++, but it really depends on your individual requirements or if you really need an engine at all.
I recommend Irrlicht. It's simple, lightweight but fast and powerful. It's not as featureful as Ogre3D, but I've found it more simple to use.
If you're looking for more of a simple API rather than a full-blown game engine, you should try SDL. That will give you a platform-independent way to render with OpenGL, handle input, do basic audio, etc. It's especially handy if you're looking for a way to do a simple 2D game project.
Panda3D is quite easy:
You can use it with C++ (or Python.)
It is well documented and offers many good samples.
It's mostly 3d oriented, so be aware although any 3d engine will involve a learning curve, Panda3D will have one of the shortest.