Jump to content
  • Advertisement
Sign in to follow this  
Kronikle66

I'm part of a big programming project. (question about windows programming)

This topic is 4975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Recently I picked up an internship at a place called Advanced Science and Technology. I told them I know C++, Visual Basic, html, can build computers, etc. Well it's all true to some extent, but the main problem is with the project he gave me. He wants me to create something with a green circle as the background taking up the entire screen. The entire time, there should be a small ball rotating in the shape of a square around the center of the green background circle. He's going over things that I should do and he comes to this and says, "Ok I need you to do this. You can do this, right? Not so hard." Well I didn't think it would be. The only problem is, it is. Most of my background comes from working with text based games. He wants this windowed. I don't know how to do that! I mean, if I understood windows programming, yeah, it wouldn't seem to hard to rotate a ball in the shape of a square, but I don't! This doesn't seem that difficult if I were to have a basic understanding of windows programming. I don't use Visual C++ (using a school laptop. Visual C++ is not installed so I use Dev-C++) so I have to rely on strict coding. I read there's like GDI and SDL among others. Which should I choose, and where would be an easy place to start?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
So you want us to do your job, that you aparently don't qualify for, for free. You want us to do this for you so that you can keep up a lie, that takes a job away from a different actually qualified person who may need the job more then you.

LOL...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
[google] is your friend[attention] [headshake]

Share this post


Link to post
Share on other sites
First of all, I don't want you to do my job. I just want to know which windows programming style would be appropriate for this project and where I can find a good tutorial that adequately covers the language or at least what I need to know.

Second, my school makes people intern for companies as a senior requirement. I'm the only person who enjoys computer programming at my school. This was also the ONLY job in the area that had anything related to computers that interns could work with. So my guidance counselor naturally put me in here.

Third, I don't get paid. There's no one else trying to get hired here, the company just wanted some extra FREE manpower to help on some projects. And trust me, I want to help. I know how to program, just not windows applications. All I need is just some simple advice as to which style of windows programming would be adequate and where I could find a decent tutorial.

Share this post


Link to post
Share on other sites
"a ball shaped like a square"
seriously wtf??

for the love of God, be more descriptive

there are enough ppl willing to point you in the right direction here - although no one will do it for you - but you need to be a little bit more clear

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Anonymous Poster
So you want us to do your job, that you aparently don't qualify for, for free. You want us to do this for you so that you can keep up a lie, that takes a job away from a different actually qualified person who may need the job more then you.

LOL...

Well put - took the words rite outta my keyboard

Share this post


Link to post
Share on other sites
oh and ignore the trolls, since none even seem to have read that this is a senior year thing and not an actual job

Share this post


Link to post
Share on other sites
No, a ball rotating in the shape of a square.

For example, if you make a train track in the shape of a square, the train will run along the square path; it hits one corner, changes direction until it hits next corner, moves to next corner, etc. So that's what I mean when I say the ball will rotate around in the shape of a square. When most people hear rotate they think of circular rotation such as planets around the sun.

Share this post


Link to post
Share on other sites
- does this need stuff like input boxes ?
- 2D or 3D ?

and more important: what does he need it for?

Share this post


Link to post
Share on other sites
You'd probably be best to tell your employer that you don't know windows programming, but you're willing to learn (I assume you are).

I find windows GDI easiest, but there's a lot more tutorials on SDL. If your employer didn't specify, it's likely that he wants it done in GDI (I could be wrong here, it may be best to check).
You can get a "Hello World" program from Wikipedia (Goto "Windows API (in C)" if that link doesn't take you to the section).
That should really be enough to get you started believe it or not. You want to do your drawing code in WM_PAINT. For a circle, you want to use the Ellipse() function, and for the square, you probably want Polygon(), assuming you do the rotation yourself (a little bit of sin() and cos() work), which will probably be easiest.
To get a fullscreen window you can change the CreateWindow() call to this:

hwnd = CreateWindowEx(0, //No extended window styles
szClassName, //Class name
"", //Window caption
WS_POPUP,
0, 0, // Window pos
GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), // Set w&h to size of the screen
NULL, NULL, hInstance, NULL);





However, you'll still need to learn the Win32 API fairly sharpish, and/or let your employer know. You won't be able to go much further without doing some heavy research.


EDIT: Oh, I misunderstood your square and ball thing. You'll just need Ellipse(), and you can work out the position to draw at using some trig. Xpos = sin(angle)*radius and Ypos = cos(angle)*radius with an increasing angle. You could look into using timers (SetTimer) for increasing the angle, or you can do whatever method you like instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!