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 have stubbornly decided to learn Xlib programming for Linux GUIs, just for fun & the gained experience. I'm young and have lots of time to read useless stuff. Nobody seems to want people to learn this, though, as everywhere I look, askers are being bombarded with suggestions of using a toolset instead - usually Qt or wxWidgets. This is kind of sad, if nobody learns Xlib, who will continue development of e.g. wxWidgets? I will learn wxWidgets too, though, when I feel comfortable with Xlib.
So - with that out of the way - my question is: Is there a recommended book (or other resources) for learning Xlib programming, preferably with C++, but C is OK too. Windows programming has its Petzold, I was wondering if Xlib had some sort of equivalent.
There used to be a whole series of books on X programming (they actually worked their way up to Xlib!) but the one you probably want is Xlib Programming Manual
Over a year later I ran across a "retro UNIX" imgur album which has a picture of it! Keeping good company with the Red Book (the Postscript Language Reference Manual) and another in the O'Reilly X series.
I found this on amazon: Fundamentals of X Programming
I liked one by Levi Reiss and Joseph Radin, I think it was "X Window inside and out" (I read a translated version). Of course, it's really outdated, and predates Xutf8* functions, XRender, XFt and client side fonts, XCB, XRandr, Composite, etc...
Also found these books myself:
http://www.amazon.com/Introduction-Window-System-Oliver-Jones/dp/0134999975/ref=sr_1_4?s=books&ie=UTF8&qid=1288651669&sr=1-4 (old and expensive, but it's something)
http://www.amazon.com/Window-Programming-Scratch-Jesse-Libertys/dp/0789723727/ref=sr_1_25?s=books&ie=UTF8&qid=1288651711&sr=1-25 (this one is quite recent, compared to most other resources I could find, but it's got some bad reviews. Maybe worth the read)
http://www.amazon.com/Window-Toolkit-Complete-Programmers-Specification/dp/1555581781/ref=sr_1_44?s=books&ie=UTF8&qid=1288651754&sr=1-44 (supposedly good, actually on Xt, but I guess it might be worth the read)
And this website which seems to at least contain something usable:
http://manuals.itc.virginia.edu/unixdocs/u014.xwindows.html
If anyone has read any of these, please leave a comment.
Related
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).
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.
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 am working as c++ developer in cfd field for last 1.5 years. Since I am from computer science background I have very poor domain knowledge in CFD. I have searched on net but didn't get the kind of material am looking for. Actually am getting mathematical research papers about cfd focusing on theory and formulas . What I want is a tutorial written in plain English targeting novice people with focus on software development. I might be asking too much , but any help is appreciable :)
Well, if you want to have a somewhat more friendly introduction (although you simply won't be able to escape math) you might start at "Fluid Flow for the Rest of Us" by Cline, Cardon and Egbert and work your way up from there. Google it and you'll find it online.
Or you could have a look at Robert Bridson's book "Fluid Simulation for Computer Graphics" which introduces the basic concepts in a more gentle way.
These are both texts dealing with fluids targeted at computer graphics, but they might provide a gentle introduction while you work your way up to CFD simulations.
I've worked with/on two C++ libraries that both come with a lot of theory, docs and tutorials: http://www.dealii.org/ and http://libmesh.sourceforge.net/. Both are adaptive refinement finite element libraries, both with a focus on (scientific) fluid simulations.
Another good start could be Fast Fluid Dynamics Simulation on the GPU, which actually lends to a very simple (but not optimal) implementation on the CPU.
It comes with shader's source that can be ported straight to the CPU, and provides an easier and more programming oriented approach than Bridson's book.
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 already program in C#, Java and C++ and would like to know if you know good books (wether about OpenGL or DirectX and with any of these languages) that cover video game development and that include a discussion about shaders, special effects, sound and collision detection. I know this may seem a lot, but I searched on Amazon and O'Reilly and didn't find a book that covers all these subjects. I don't know if you have seen a book like this.
Jay Baxter of Blizzard Entertainment has posted a list of books that are recommended reading for aspiring programmers at his company. You can view his lists of recommended game programming books here.
A broad (not in depth) book that touches those topics among many others is Core Techniques and Algorithms in Game Programming. I highly recommend it.
[...] this book is exactly what I was
looking for. After reading it (and
re-reading some passages) the
difference with other books on games
is appalling: this is a course on
games programming, a tool for those
who want a formal, well laid-out
introduction, that covers all the main
topics and leaves few questions
unanswered.
What you're looking for is a MASSIVE amount of information and if there ARE any books out there that cover all of these, I'm fairly sure that they wouldn't really go into any amount of depth on each.
Both the DirectX and OpenGL websites have pretty much all information that you'll need for either graphics API. If you're not so interested in the actual plumbing work, then I'd suggest maybe taking a look at Ogre (which I believe also has a C# port).
Shader documentation: DirectX, OpenGL
Audio all depends on the the API that you end up going with: DirectX, or you can choose from many OS audio libraries out there (i.e. OpenAL).
For special effects, I'd recommend the Graphics Gems series, as well as GPU Gems.
I'm not too sure about specific collision detection references, as I usually just end up google'ing for algorithms on demand.
The Game Programming Gems series is a great source for information, but it's more tips 'n tricks and not a thorough explanation of each topic.
I have heard from others that "Essential Mathematics for Games and Interactive Applications" is a good start to building your foundation and (re)familiarizing yourself with the math aspects.
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/