I am from .net C# background and I want to learn DirectX. I have knowledge of C++ but I am fairly new to graphic world.
I am little confused about how to start learning directx, should I start learning direct directly or buy a basic graphic book like hern and baker and then jump to directx.
Which is the recommended book for learning basic graphic concepts, is it hern and baker? Is there any directx book which will cover graphic concepts as well?
I think that keeping a basic graphics book is allways good, because i can use it as reference anytime
Any suggestions from experts here?
You say that you have a C# background so I am going to assume you are more comfortable with C# then C++. Also, you say that you have knowledge of C++ so I will assume that you already have an understanding of memory management.
If you just want to learn and become more comfortable with the graphics pipeline you should check out SlimDX and XNA. They both allow you to use DirectX without having to dive into C/C++.
As for whether to learn the theory or API first I don't think you should do either one first. It makes sense to learn them asynchronously. Pick up a book on the theory but mess around with an API at the same time.
I highly recommend XNA. People commonly say that you should stick with C++ if you want to develop games but I strongly disagree. XNA will allow you to learn more high level game concepts in less time than if you use C++ and DirectX alone. You will be able to focus on learning why you are doing something rather than how to manage the memory. If in the future you decide that game development is a serious passion then by all means C++ is the way to go. You will find that XNA's graphics pipeline closely mirrors DirectX 9 and wont have much trouble moving to C++.
Also, DirectX 9 should be good enough for any beginner and it will give you a better understanding of how and why things have changed in 10 and 11. However, if you really want bleeding edge technologies you can try out SlimDX which is a C# wrapper for DirectX.
With all this said, XNA offers many easy to understand samples that you can start playing with on their educational catalog page. Also, check out ziggyware (great collection of xna tutorials).
Also, there are many blogs you can check out. A lot of them have excellent tutorials on them. Here are some off the top of my head:
Reimer Grootjans
Shawn Hargreaves
Richard Dodsworth
Renaud Bédard
Nick Gravelyn
Finally, here are 2 graphics books that I highly recommend (they are pretty complex and will last you a long time):
Fundamentals of Computer
Graphics
Real-Time Rendering
They are not directly related to DirectX, but rather they cover the theory every graphics developer should know. (from linear algebra to texture mapping to volumetrix rendering...)
Well I have to disagree with the C# option. If you don't have a deadline to finish the game, then I recommend using the language that teach you most. Working with 3d graphics is A LOT about management so if you are avoding it you are not actually learning but just using it, ie. you not only have to manage memory but the actual render calls you make and the device state changes, a lot of things that you will never know by avoding lower level, and which applies for other APIs too such as OpenGL or for other kind of devices. I think the best way of knowing how the api works is by using the api, instead of a bunch of helper libraries. You can use the helper libraries when you really need it instead (which you can find in their C++ version anyway).
In the DX SDK you can also find the Sample Browser with some sample applications with their documentation and you have the DirectX Utility Toolkit which contains a framework and libraries to make a DirectX app without having to worry much about the nasty device things such as enumeration and config. It also comes with a GUI system and a settings dialog for the device config. I doubt you can find those in C# and they are very good if you want to start with DX.
Some resources that helped me when I started were
the zophusX tutorials
and a book called "Introduction to 3D Game Programming with DirectX 9.0c", by Frank D. Luna (there is the DX10 version now)
and probably the book 3d Game Engine Programming by Stephan Zerbst also helped me to understand some things about how to work better with the apis. Though you may have to buy them in order to read them. They are helpful to start with both some theory and using the API at the same time.
I think if your target is to learn how to make a game then you can use any language/library you want you don't even need to know a programming language :) but if your target is learning DirectX and graphics APIs you should definitively start with the C++ api which is the "actual" DX.
If you have a bit of extra money, I was very impressed with the DirectX graphics courses from http://www.gameinstitute.com. The textbook they provide was very good as far as the other DirectX books I've seen are concerned. The first module DirectX Graphics I starts off with a bit of a math review and some 3D fundamentals before diving into setting up and using DirectX. By the end of the first module you will have built a textured terrain renderer and an indoor scene.
Overall the courses are not that expensive when you consider how much books on the subject cost. I would definitely recommend checking it out!
Related
At my high school we can take a class where we basically learn about a subject on our own for a semester. I was thinking that I want to learn about "sound programming," but I realized that I have no idea what that entails. I'm interested in learning about, for example, how a synthesizer works, how I could write a VSTi, and how sound works in computer science. Is this a feasible subject? Are there any good tutorials out there for somebody completely new to this? Any tips or suggestions would be greatly appreciated.
Edit: This is the sort of thing that I'm interested in.
VST plugins are normally written with C++. But it's possible to use other languages as well. Building a VST plugin with C++ is quite an involved project. Without pre-existing experience it's probably too much for a school project. Additionally you'll probably spend as much or more time implementing the VST part and GUI as you will actual sound programming.
However there are a other ways to create a VST plugin and still get your hands dirty writing code.
SynthEdit is a modular environment for creating synthesizers and effects. Modules such as oscillators, envelopes etc are connected visually with wires. Patches can be exported as VST plugins. SynthEdit allows additional modules to be programmed with C++.
SynthMaker is another option similar to SynthEdit. It features a code module which allows you write DSP code without the difficultly of compiling modules in another language.
The advantage of using SynthEdit or SynthMaker in your situation is that you can focus your programming efforts on a particular area, such as creating a filter or oscillator module. SynthEdit/SynthMaker can then handle the other areas (GUI, voice logic, etc).
Using SynthEdit or SynthMaker will also allow you to prototype ideas quicker. So you will have more time to experiment with different synthesizer or effect architectures before settling on something to complete for your school project.
DSP theory can be quite involved and maths heavy but that alone shouldn't put you off. Depending on what you want to do, a basic understanding of digital audio principles and algebra level maths may be enough to take you a surprising long way.
You might try looking for resources on DSP (Digital Signal Processing) and/or Audio Signal Processing. The programming itself (unless you're looking for an existing audio library) will likely be more math intensive than programming intensive, so it might be a good fit for a query at math.stackexchange.com.
There's a very flexible and powerful audio application called Plogue Bidule. You could use it to learn about audio processing and synthesis, by creating your own 'bidules' or groups using low-level math and logic building blocks. There's an existing user community, and I've had a hard time finding a limit to what it can do. You're not going to be doing any code with this tool, but it's great for performance and learning about audio processing and synthesis fundamentals.
I've been programming for a little over 2 years now, and I want to get started with graphics programming and make some simple games to start with. A lot of the books I've looked at for learning directx assume you know the basics of it, which I don't, or that they'll just give you some snippets and assume you'll be able to digest their cryptic code without an explanation. So what are some good books for somebody that is truly new to graphics programming but has a some knowledge with general programming?
Hands down, the best 'graphics programming' book I have ever seen is "An Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach" by Frank Luna. It starts from the ground up with a linear algebra primer (absolutely critical), then explains how the 3D pipeline works (model, world, camera, ndc, view) and how to deal with the programming nightmare that is Directx ;)
It also covers some advanced techniques, suchs as reflections and refractions etc, but once you've gotten the essentials down (the first 8 chapters) you can basically write anything you want in directx and the rest of your graphics programming time will be spent reading books like the "Shader X" series by Wolfgang Engel, (Shader X7 is particularly good), GPU Pro (same author), and Nvidia's GPU Gems, which they have on their website for free: Gpu Gems.
Android NDK Game Development Cookbook http://www.amazon.com/Android-NDK-Game-Development-Cookbook/dp/1782167781 has pretty few things to do with Android NDK. However, it focuses on implementing a portable game engine from scratch in C++, regardless of the platform. Its topics mainly include low level things like filesystem, networking, audio and so on.
Should I use a game engine or a graphics library? I was just thinking of making a simple game to start out with, but what about when you get to higher-end stuff and high poly models? Which would be faster?
Also, should I choose Xith3D or JMonkeyEngine?
Or if I were to go with a graphics library should I go with JOGL, LWJGL, or the new JOgre?
Java is fine for making games, if I wanted to switch to c++ I wouldn't be asking.
There is in fact 2 questions to ask yourself to find the answer :
Do you want to make the game in no time or learn about more technical side of game programming?
Does the game is a variant of a well known/established genre or is it structurally different?
If you answered:
1==game && 2==genre : Use a game engine. Choose one that have been used for the target genre. Just make the game with this tool as fast as you can.
1==game && 2==different : As the structure of your game will be different, it will be hard to make something that match your game structure with a full engine. Maybe using a framework (made of several separated libs) will be of better use. Anyway, it will not be really fast to make but at least with a framework you'll not have to build the lower layer code and check that all libs are compatible.
1==technical && 2==genre : Well in this case you could study an engine or make your own. If it's your first game or your first 3D app, I recommand using DirectX or OpenGL directly one time, then pass to an engine later, like Ogre. Anyway, try to right yourself what techniques you want to learn about.
1==technical && 2==different : Take time to choose several libraries for each side of your game, then work on getting things together to make it work in your specific case. It might be the most interesting case but it's also the most time consuming. Anyway, use libs. Use ogre for graphics, etc.
Now, there is still a question to ask yourself when choosing your lib/engine, whatever the previous choice : does your game need to be cross-platform?
Check that your tool/engine match your answer to this question.
By the way, if you want to get in the industry OR want to get technical, you'll have to talk to hardware (at least if you want to learn about graphic programming) so use C++ (or C) instead of java. It will go in your way.
I wouldn't recommend Java for game development, as it tends to be slow and games require performance. To make a simple game, a graphics library would be enough. For a complex game, although, a game engine would offer you more interesting stuff.
A simple set of graphics libraries with some cool utilities to make simple games would be openGL + GLUT. I've already used it for small games...
Ok, so you want to learn game programming. You have a lot of options, but I don't see much of a plan in your question or comments, nor am I quite sure what your exact goals are. The only sure thing I get is that you want to work with 3D graphics.
The thing is, you're asking about performance without actually running into performance issues. Your question feels premature.
For the sake of making a choice, start building with JMonkeyEngine. It seems to be a fairly advanced 3D engine in Java. Starting with an engine allows you to concentrate more on the design of the game instead of having to fine tune everything yourself.
Take the time to make the game complete, with all the finishing touches, such as menus, player options, whatever completes the game. Finished projects teach you a lot about game design, and look good in your portfolio.
Repeat this process with slightly higher-complexity projects, over and over again. Depending on how quickly you advance the complexity and how well the engine is built, you will eventually reach a project where the engine doesn't keep up with your expectations. From here, you can take advantage of the Open Source aspect of the engine and figure out exactly HOW the engine is handling your design.
From this point your learning path switches gears. Instead of learning about generic game programming (which, by this point, you should have a fair bit of expertise in), you start to dig deeper into hardware interaction and low-level optimization.
This all assumes that you are only just beginning to get into game design and game programming, but have a fair amount of experience in your chosen language.
I'm interested in creating a visual programming language which can aid non-programmers(like children) to write simple programs, much like Labview or Simulink allows engineers to connect functional blocks together without the knowledge of how they are internally built. Is this called programming by demonstration? What are example applications?
What would be an ideal platform which can allow me to do this(it can be a desktop or a web app)
Check out Google Blockly. Blockly allows a developer to create their own blocks, translations (generators) to virtually any programming language (or even JSON/XML) and includes a graphical interface to allow end users to create their own programs.
Brief summary:
Blockly was influenced by App Inventor, which itself was based off Scratch
App Inventor now uses Blockly (?!)
So does the BBC microbit
Blockly itself runs in a browser (typically) using javascript
Focused on (visual) language developers
language independent blocks and generators
includes a Block Factory - which allows visual programming to create new Blocks (?!) - I didn't find this useful myself...except for understanding
includes generators to map blocks to javascript/python
e.g. These blocks:
Generated this code:
See https://developers.google.com/blockly/about/showcase for more details
Best wishes - Andy
The adventure on which you are about to embark is the design and implementation of a visual programming language. I don't know of any good textbooks in this area, but there are an IEEE conference and refereed journal devoted to this field. Margaret Burnett of Oregon State University, who is a highly regarded authority, has assembled a bibliography on visual programming languages; I suggest you start there.
You might consider writing to Professor Burnett for advice. If you do, I hope you will report the results back here.
There is Scratch written by MIT which is much like what you are looking for.
http://scratch.mit.edu/
A restricted form of programming is dataflow (aka. flow-based) programming, where the application is built from components by connecting their ports. Depending on the platform and purpose, the components are simple (like a path selector) or complex (like an image transformator). There are several dataflow systems (just I've made two), some of them has no visual editor, some of them are just a part of a bigger system, and there're some which don't even mention the approach. (Did you think, that make, MS-Excel and Unix Shell pipes are some kind of this?)
All modern digital synths based on dataflow approach, there's an amazing visual example: http://www.youtube.com/watch?v=0h-RhyopUmc
AFAIK, there's no dataflow system for definitly educational purposes. For more information, you should check this site: http://flowbased.org/start
There is a new open source library out there: TUM.CMS.VPLControl. Get it here. This library may serve as a basis for your purposes.
There is Snap written by UC Berkeley. It is another option to understand VPL.
Pay attention on CoSpaces Edu. It is an online platform that enables the creation of virtual worlds and learning experiences whilst providing a more flexible approach to the learning curriculum.
There is visual coding named "CoBlocks".
Learners can animate and code their creations with "CoBlocks" before exploring and sharing them in mobile VR.
Also It is possible to use JavaScript or TypeScript.
If you want to go ahead with this, the platform that I suggest is the one used to implement Scratch (which already does what you want, IMHO), which is Squeak Smalltalk. The Squeak environment was designed with visual programming explicitly in mind. It's free, and Smalltalk syntax can learned in half an hour. Learning the gigantic class library may take just a little longer.
The blocks editor which was most support and development for microbit is microsoft makecode
Scratch is a horrible language to teach programming (i'm biased, but check out Pipes Visual Programming Language)
What you seem to want to do sounds a lot like Functional Block programming (as in functional block programming language IEC 61499 and other VPLs for mechatronics development). There is already a lot of research into VPLs so you might want to make sure that A) what your are trying to do has an audience and B) what you are trying to do can be done easily.
It sounds a bit negative in tone, but a good place to start to test the plausibility of your idea is by reading Davor Babic's short blog post at http://blog.davor.se/blog/2012/09/09/Visual-programming/
As far as what platform to use - you could use pretty much anything, just make sure it has good graphic libraries (You could use Java with Swing - if you like pain - or Python with TKinter) just depends what you are familiar with. Just keep in mind who you want to eventually launch the language to (if its iOS, then look at using Objective-C, etc.)
So, I use Linux, and I've been trying to find the time to get into game programming. I started out with Panda3d and had some pretty decent results and got a feel for many of the concepts in game programming. Not too long after that, I decided to step it up a notch and go to something more powerful and C or C++ based.
I'm probably just really dumb, but I could never really figure out how to use Crystalspace correctly. If somebody has any useful resources on how to use it, I would appreciate that. But in the meantime, I was messing around with Irrlicht and I like it, but I would like to know what more knowledgable people have to say about the subject. And maybe theres another awesome option out there I don't know about.
If you ask me, Irrlich is the best open source engine - it has clear architecture, good performance and requires lesser code to be written by programmer. I can not honestly compare Irrlicht with Crystal Space or Orge. I consider CS as mess of code, written by many different programmers in different manners - I am hard to imagine how to use it too (due to absolute lack of documentation). As for Ogre, it is not easier than D3D. I've examined different samples and fount plenty multyline fragments of code that are done with a single line in D3D. So, I simply can not see a reason, why to spent months learning OGRE's terrible API - if one has free time, I would advice to learn D3D itself.
I can say even more - Irrlicht is better, than many commercial engines, for example - Torque (absolute lack of documentation, forces to start project over existing one etc.), Truevision etc. Of course, Irrlicht lacks some great features, AAA grade engines must have, but it is quite sufficient for smaller projects.
If you have not BIG money to acquire Gamebryo and similar grades engine, I would advice to stick with Irrlicht - for first several projects at least.
I've spent some time working in the game industry. I'm also a Linux guy. I used Irrlicht to make a couple games, and used those as part of my resume, which helped get me get a job as a game programmer.
Irrlicht has a cleaner API, lower system requirements and works better across platforms than Ogre, in my opinion. I've had a blast making games with Irrlicht. It's also fairly lightweight (much lighter than Ogre), with a very open license for any use, commercial or otherwise.
Working with that engine did a lot to prepare me for working within the commercial game industry.
Ogre3D
http://www.ogre3d.org/
Is typically named together with crystalspace and irrlicht.
Ogre and Irrlicht both are said to have a cleaner design than crystalspace so I wouldn't worry to much about problems with the latter.
If you're looking for productive game development, then my best bet would be to use Unity 3D. I started off by using Irrlicht but quickly backed out because of non intuitive tools and a lot of stress on programming. Ogre seemed to be even more complex.
Unity on the other hand is rapidly gaining grounds with each release. The recent Unity 4 is packed with a ton of features. With very little game dev knowledge, I've managed to write my own flight sim engine in Unity Android. Even learned to write shaders easily.
Though advanced Unity licenses are paid, but they are well worth it. But you can always use Unity free edition to make commercial PC games. In all, game development is all about getting the hang of a game engine. Master any, and you will rule.