how am I suppose to use graphics in visual studio 2010 using c++ language...... please help me in it....
Members - Reputation: 1653
Posted 11 May 2014 - 08:39 AM
The question is too vague to answer - in Windows (having a graphical user interface) "graphics" encompasses everything from drawing menus, drawing graphs, displaying bitmaps, all the way up to full blown 3D applications. Try narrowing your question to something more specific.
GDNet+ - Reputation: 4771
Posted 11 May 2014 - 08:43 AM
Your question is too broad to answer easily. I'm going to assume you're new to programming in general.
The FAQ has some pointers on where to being with programming:
Additionally, I'm going to copy something written by jbadams, which might also help you on your journey - a more step-by-step guide. What follows is the advice he gave to a different user, but a lot of it should be relevant to you as well. Good luck!
- Download SFML and follow the getting started tutorial for your development environment (from here) to install it and get set up. Get help if you have problems, and do not give up until you have it set up properly.
- Follow the tutorial to open a window. Get help if you have problems, and do not give up until you have a window open.
- Follow the tutorials on "drawing 2d stuff" and "sprites and textures" to draw a single sprite (make it a space ship if you like!) in your window. Get help if you have problems, and do not give up until you have a sprite drawn in your window.
- Follow the tutorial on "keyboard, mouse and joysticks" to make your sprite move in response to the arrow keys on your keyboard. Get help if you have problems, and do not give up until your sprite is moving around the screen in response to input.
- Referring back to the drawing tutorials (from step #3) and the input tutorial (from step #4), make a second sprite (make it a bullet if you like!) appear in your window when the space-bar is pressed. Don't worry about putting it in the right place yet (just put in in the middle of the window), and don't worry about making it move. Get help if you have problems, and do not give up until your second sprite appears in response to pressing the space-bar.
- Make it so that your second sprite (bullet) moves constantly until it goes off the screen. Don't worry about making it go the correct way, just make it go up for now. Get help if you have problems, and do not give up until it moves up and disappears off the top of the screen after you press the space bar.
- Make it so that if your bullet moves off of the screen it will be removed. Get help if you have problems, and do not give up until it's working.
- Make it so that instead of appearing in the middle of the screen your bullet appears in front of the space-ship. Get help if you have problems, and do not give up until it's working.
- If it doesn't already, make sure that you can spawn additional bullets by pressing the space bar again. Get help if you have problems, and do not give up until it's working.
- Continue to make very small additions to your program, and at each stage get help if you're stuck and do not give up till it works. Continue until you have a complete asteroids game including a simple menu, scores, and a proper "game over", with no obvious bugs.
- Make a slightly more complicated game using the same technique of breaking it down into small steps. Each time you finish a game you can make something more complicated next.
For all of the above steps (except the test program from step #1) actually type out the code, don't just copy and paste from the tutorials.
Project journal, check it out!
Hello to all my stalkers.
Crossbones+ - Reputation: 3261
Posted 11 May 2014 - 09:17 PM
You need to research 2D and 3D file format workflow pipeline from art creation to implementation in your software. There are standard file formats that you can use. There are also coding libraries which render the art. The 2D and 3D assets are contained in a folder that your software needs to read and display, obviously. Often a class is defined in your coding and each model or 2D image has its own file or folder within that class. As for rasterizing to screen, do not try to reinvent the wheel but use existing code libraries or even a game engine which is designed to reduce or eliminate the low level coding. Look for libraries designed for use in Visual Studio. What I am saying is that first you need to assemble a workflow pipeline of software, applications, and libraries for them.
List of game engines
Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.
by Clinton, 3Ddreamer
Senior Staff - Reputation: 21942
Posted 11 May 2014 - 09:33 PM
C++ doesn't have built in graphics capabilities -- you need to use an additional library or API. I would suggest you have a good grasp of the basics of programming in C++ (by working through an online tutorial such as LearnCpp.com or a book such as C++ Primer, 5th Edition) before moving on to graphics, but it is of course your decision to try graphics whenever you feel you're ready.
Hopefully that helps, or at least gives you enough information to ask a more specific question we can help you with.
- Jason Astle-Adams.