glut game

  • (6 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6

77 Replies - 4626 Views - Last Post: 19 August 2018 - 08:27 PM Rate Topic: -----

#46 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 17 February 2018 - 07:55 PM

here is my adjusted code, I put the if into a switch
	switch (num)
	{
	case 1:
		flag_one = true;
		cout << "Blink Yellow Square" << endl;
		break;
	case 2:
		flag_two = true;
		cout << "Blink Red Square" << endl;
		break;
	case 3:
		flag_three = true;
		cout << "Blink Blue Square" << endl;
		break;
	case 4:
		flag_four = true;
		cout << "Blink Green Square" << endl;
		break;
	}



it is simon and you are correct it works like you said.
Was This Post Helpful? 0
  • +
  • -

#47 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 02:57 PM

View Postmodi123_1, on 17 February 2018 - 06:33 PM, said:

Why wouldn't your 'if (num ==' statements be in a switch?
Why not store the sequence in an array or collection? It would handle more than one in a sequence.

what should I store in an array?
Was This Post Helpful? 0
  • +
  • -

#48 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,627
  • Joined: 12-June 08

Re: glut game

Posted 18 February 2018 - 03:16 PM

The random number sequence generated.
Was This Post Helpful? 0
  • +
  • -

#49 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 03:22 PM

ok how will this help?
Was This Post Helpful? 0
  • +
  • -

#50 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,627
  • Joined: 12-June 08

Re: glut game

Posted 18 February 2018 - 03:27 PM

I explained that above.
Was This Post Helpful? 0
  • +
  • -

#51 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 03:32 PM

are you referring to post 43? can you tell me more about the array you want me to implement.
Was This Post Helpful? 0
  • +
  • -

#52 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,627
  • Joined: 12-June 08

Re: glut game

Posted 18 February 2018 - 03:44 PM

I am not sure how more plain I can make it.

Simon generates a sequence.
Simon shows you a sequence.
You repeat the sequence.

With no array, or collection, how do you plan on accomplishing that?
Was This Post Helpful? 1
  • +
  • -

#53 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 03:47 PM

sorry but I needed some clarification, and yes I know how simon works.
Was This Post Helpful? 0
  • +
  • -

#54 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,627
  • Joined: 12-June 08

Re: glut game

Posted 18 February 2018 - 03:49 PM

How else would you store a sequence - generated BEFORE showing or the user entering - and still validate the user input? Serious.. this should not be a difficult concept.
Was This Post Helpful? 0
  • +
  • -

#55 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 03:52 PM

I agree that arrays are not a complex code structure.
Was This Post Helpful? 0
  • +
  • -

#56 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 08:22 PM

well I am going back to reading the Sams Teach Yourself C++ in one hour a day text, I am also going to do the exercises in the backs of the chapters. hopefully this will help me into better understanding of C++ and will help me in designing my game.
Was This Post Helpful? 0
  • +
  • -

#57 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12566
  • View blog
  • Posts: 45,688
  • Joined: 27-December 08

Re: glut game

Posted 18 February 2018 - 08:29 PM

View Postpbivens85, on 17 February 2018 - 09:42 PM, said:

why did you ding me again macosxnerd, I am trying my best code, I thought it would be easier if I stubbed out some code.


I gave you the downvote for pointlessly bumping your thread. Folks can see your thread- bumping your thread without adding anything new (e.g., progress on your end) is generally considered poor forum etiquette.


Quote

well I am going back to reading the Sams Teach Yourself C++ in one hour a day text, I am also going to do the exercises in the backs of the chapters. hopefully this will help me into better understanding of C++ and will help me in designing my game.


If you are not comfortable with arrays, then you should not be designing games. It might be a good thing if you took an Intro to Programming class at a local college. I think you would benefit from some hands-on instruction.
Was This Post Helpful? 1
  • +
  • -

#58 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: glut game

Posted 18 February 2018 - 08:35 PM

unfortunately I don't have access to college classes but I have plenty of books to study.
Was This Post Helpful? 0
  • +
  • -

#59 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 976
  • View blog
  • Posts: 3,849
  • Joined: 13-June 14

Re: glut game

Posted 18 February 2018 - 11:00 PM

It's not just about reading over the material again and again. If someone gives you a hint, like "consider using an array", you need to go away and try that out and figure out how it solves the problem. Ideally, you should be comfortable with basic language concepts like this that it just becomes obvious. If it isn't, then you need to go and work on much simpler problems so you get a good feel for how those concepts work, rather than working on large projects that are obviously too complex.

If you can't go to a class, perhaps try to find a tutor nearby?

I swear we've been here before...

This post has been edited by ndc85430: 18 February 2018 - 11:02 PM

Was This Post Helpful? 1
  • +
  • -

#60 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12566
  • View blog
  • Posts: 45,688
  • Joined: 27-December 08

Re: glut game

Posted 18 February 2018 - 11:03 PM

View Postndc85430, on 19 February 2018 - 01:00 AM, said:

I swear we've been here before...


For the last five years...
Was This Post Helpful? 0
  • +
  • -

  • (6 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6