Displaying Simple graphics - at a loss here
Using C++
on Windows
IDE: VC2005
I needed some direction in how I could load a simple stick figure to the screen when it loads. I can either have the program draw the stick figure at runtime or have it save the contents. If I could have it save the contents, then I could write the program so that the user could draw his own. Eventually, I want to be able to unify the stick figure so that I can move him.
[Edited by - pghTech on October 2, 2006 9:39:27 AM]
You need to let us know your language and the operating system.
If I assume C++ and Windows, the most straightforward way to make a start with graphics is probably SDL. If you don't want to use a third party graphics lib, at the very least you need to use the Win32 API to create a Window, then respond to WM_PAINT messages and use the GDI to draw the image.
There is no shortage of online tutorials for the above. I'd hope I've provided a few terms to Google for.
If I assume C++ and Windows, the most straightforward way to make a start with graphics is probably SDL. If you don't want to use a third party graphics lib, at the very least you need to use the Win32 API to create a Window, then respond to WM_PAINT messages and use the GDI to draw the image.
There is no shortage of online tutorials for the above. I'd hope I've provided a few terms to Google for.
Yes, thanks for your response. I was actually on my way back to edit this post, because I completely forgot that important information. I want to use C++, OS: Windows, using VC2005 as my IDE.
Before defining my program, let me just state that I know many would say the following program would be better off done in <fill in the blank> language, but I am trying to learn C++, so I want to do all the following in it:
I am basically writing a stick figure fighting simulator that will allow you to fight against the computer using stick figures. Simple actions such as punching, kicking, jump kicking and block to start out with. Maybe expand it so that as you are successful, you get additional feets granted (i.e. flurry attack). Each action by you and the computer will filter through a % to hit filter. This is a very, very simple game to be a practice program for the stuff I have been reading and learning in C++. (i.e. after acquiring a certain amount of points, have the ability to combine attacks, allowing to setup a recursion function).
Before defining my program, let me just state that I know many would say the following program would be better off done in <fill in the blank> language, but I am trying to learn C++, so I want to do all the following in it:
I am basically writing a stick figure fighting simulator that will allow you to fight against the computer using stick figures. Simple actions such as punching, kicking, jump kicking and block to start out with. Maybe expand it so that as you are successful, you get additional feets granted (i.e. flurry attack). Each action by you and the computer will filter through a % to hit filter. This is a very, very simple game to be a practice program for the stuff I have been reading and learning in C++. (i.e. after acquiring a certain amount of points, have the ability to combine attacks, allowing to setup a recursion function).
While I wish you all the luck in the world, I would have to say that that does not sound at all like a simple project to me.
If this is your first foray into the world of graphics in C++, I would heavily recommend you start with something far simpler, preferrably something that just requires static graphics like tic-tac-toe or, if that is too simple, something that just uses static rectanglar sprites without animation, like pong or breakout.
I know that is what people always say around here, but there is a good reason it is such popular advice [smile].
However, either way, you'd probably be advised to take a look at SDL if your C++ is already at a standard where you could use it since it vastly simplifies what can be a very daunting area in C++.
If this is your first foray into the world of graphics in C++, I would heavily recommend you start with something far simpler, preferrably something that just requires static graphics like tic-tac-toe or, if that is too simple, something that just uses static rectanglar sprites without animation, like pong or breakout.
I know that is what people always say around here, but there is a good reason it is such popular advice [smile].
However, either way, you'd probably be advised to take a look at SDL if your C++ is already at a standard where you could use it since it vastly simplifies what can be a very daunting area in C++.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement