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 making minesweeper in dark GDK

Author
Message
Cold Iron
12
Years of Service
User Offline
Joined: 3rd Dec 2011
Location:
Posted: 4th Dec 2011 00:31
Hi. I am a game design student with my focus being art. My collage requires all of us to take a introductory programming class. We are on the last of our projects and I am stuck. I need to make a minesweeper clone using 2 2D arrays and several functions that have been described. I have been able to handle all the projects up tell now and know what I need the program to do but I am lost on what the syntax of the program should be. If anyone can prove some advice and tips I would me most thankful.

Here are functions and their descriptions that I am required to us.

void Setup(); // Loads images/sprites and Initializes both Arrays with appropriate data

void CleanUp(); // Unloads images/sprites

void Update(); // Updates arrays based on user input, sets flag values when necessary

void Draw(); // Uses the data in both Arrays to draw the mine field grid every frame.

bool HasHighScore( int playerScore ); // Checks the file to see if the user has a high score

void WriteHighScore(); // If the player has a high score then adds the name to the file

void DisplayHighScoreScreen(); // Displays the high score screen at the end of the game
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 7th Dec 2011 18:48 Edited at: 7th Dec 2011 19:01
Cleanup and setup seem straight forward. When programming in general it is good to have sort of neutral states that you program will sit in most of the time. So, when you design your methods you can count on certain conditions being true, and you won't have to worry about not being quite right about what is going on in the program. Just make sure that you always end methods in one of these neutral states.

Hmm.. there would be a lot to talk about here if I don't have some general knowledge of what you think you have covered.

Think you could give me an idea of a game plan you have so far?

Edit: for debugging it is a good Idea to locate problems by eliminating potential problems by substituting complex algorithms out for default test values.

for example: you have a program that does this:

x = read in from a text file 2
y=function(x) //when x = 2 y should equal 5
write out y

now suppose your output is 'g'
what you should do is set y to 5 instead of function(x)

is the problem persists your write out is the problem.

if it does not set x to 2

if the problem persists then the function is the problem

if it does not then the read in is the problem


Login to post a reply

Server time is: 2024-10-02 21:35:39
Your offset time is: 2024-10-02 21:35:39