Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Need help drawing constellation! Newbie :P

Author
Message
JoeS050
13
Years of Service
User Offline
Joined: 23rd Sep 2010
Location:
Posted: 24th Sep 2010 04:44
Hey everyone.

I'm really new to Dark GDK and C++ in general, but I'm learning.

I was assigned by my friend who happens to be teaching me C++ in his free time to plot the Corona Australis constellation using the DbCircle (for the points of the stars), and the DbLine command to connect them.

here is what I want to do:

NOTE: Using the basic 640 x 480 window size
//Skeleton
#include "DarkGDK.h"

Void DarkGDK()
{

//Wait for key input with "Press any Key" message in the middle of the screen, so I guess that would be:

dbText(320,240,"Press any key")? Or would I have to do something different?

//Then I want to be able to have it draw all the points for Corona Australis on the 640 by 480 window after pressing a key. This is where I need help. I want to use dbCircle commands to draw the star points, and dbLine to connect them after a key press. I also want it to display a picture of Sagittarius (Can be an JPG or GIF or any image type) in the background after the points have been plotted and connected with lines.

I know this is a lot to ask but its a fairly simple program and Im wondering if anyone has free time if they could do it so I can work and learn off of your code?

Here are links to the 2 images which are a picture of Corona Australis and the image of Sagittarius i wanted to use to place in the background on the 3rd key press.

Corona Australis (the constellation)
http://img716.imageshack.us/i/coronaaustralis.gif/

Sagittarius
http://img8.imageshack.us/i/sagittarius2.gif/

So here is basically what I want it to do.

Open a window 640x480,
Display message in the middle of the screen that says "Press any Key to Continue"
wait for key press

Display all 8 points (Stars) of Corona Australis,

wait for 2nd key press

Connect all points together using dbLine

wait for 3rd key press

Display uploaded image of Sagittarius in the background behind Corona Australis.

Thanks so much to anyone who can write this short program for me, I'm really trying to learn

Hope this isn't a repost.. didn't see my thread posted so trying to post again.

-Joe
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Sep 2010 15:08
Quote: "Hope this isn't a repost"

It was - you're on post approval, like all new members, so you just need to wait a while until a moderator gets to your post.

Quote: "Thanks so much to anyone who can write this short program for me"

You'll get more help by attempting to write the code yourself first. People generally don't mind jumping in to help, but why would they want to do it all for you?

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Sep 2010 15:19 Edited at: 24th Sep 2010 15:19
What is the point of asking us to do that for you? if you have totally no idea about how to do it, then your friend didn't teach you anything, if he did, you didnt understand what he explained, so better ask him for help, or else, you are just asking him to give US the assignment

i'd suggest you to learn C++ (http://cplusplus.com/doc/tutorial/ is a VERY good resource for learning C++), start with simple DOS applications, learn the LANGUAGE then use it to make games, learning from games might make it a very steep learning path

i don't think teaching is an easy job, your friend might be an expert in C++, but he might still forget a thing or two, and might find some troubles delivering the point in his mind to you, so learning from a book or a site is better, alot of source code (examples), you can ask your friend to give you "exams" or something after every chapter to test your understanding

it wouldn't take much really, you can get good knowledge in a week or two, it can get you started with the program you want to make

Good luck.

Login to post a reply

Server time is: 2024-07-02 08:39:46
Your offset time is: 2024-07-02 08:39:46