checkers

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5

63 Replies - 3774 Views - Last Post: 05 May 2018 - 07:40 PM Rate Topic: -----

#31 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14859
  • View blog
  • Posts: 59,283
  • Joined: 12-June 08

Re: checkers

Posted 27 March 2018 - 02:39 PM

*sigh*

Perhaps use plain text..
Perhaps explain _WHAT_ you are doing.
Was This Post Helpful? 0
  • +
  • -

#32 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 27 March 2018 - 02:41 PM

I put the imgur web site address inside the img tags.
Was This Post Helpful? 0
  • +
  • -

#33 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14859
  • View blog
  • Posts: 59,283
  • Joined: 12-June 08

Re: checkers

Posted 27 March 2018 - 02:42 PM

Really? You didn't upload your file to imgur in there?
Was This Post Helpful? 0
  • +
  • -

#34 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 27 March 2018 - 02:46 PM

here is the imgur address
https://imgur.com/a/sHJdd
let me know what you think of my checkers board using opengl

This post has been edited by pbivens85: 27 March 2018 - 02:48 PM

Was This Post Helpful? 0
  • +
  • -

#35 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12526
  • View blog
  • Posts: 45,656
  • Joined: 27-December 08

Re: checkers

Posted 27 March 2018 - 02:58 PM

pbivens85- Seriously, this isn't Twitter. I'm glad you made progress, but it's not necessary for us to weigh in on every change you make!
Was This Post Helpful? 0
  • +
  • -

#36 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 27 March 2018 - 03:13 PM

I just wanted to know if I am on the right track.
Was This Post Helpful? 0
  • +
  • -

#37 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14859
  • View blog
  • Posts: 59,283
  • Joined: 12-June 08

Re: checkers

Posted 27 March 2018 - 03:43 PM

It's a checkers board. Pretty cut and dry.
Was This Post Helpful? 0
  • +
  • -

#38 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 29 March 2018 - 06:57 PM

I want to drag and drop a sprite using glut. should I use the mouse motion callback or the mousebutton down callback?
Was This Post Helpful? 0
  • +
  • -

#39 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14859
  • View blog
  • Posts: 59,283
  • Joined: 12-June 08

Re: checkers

Posted 29 March 2018 - 08:32 PM

This is your project, why not try both to see which fits your goals.
Was This Post Helpful? 1
  • +
  • -

#40 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7400
  • View blog
  • Posts: 15,334
  • Joined: 16-October 07

Re: checkers

Posted 30 March 2018 - 02:06 AM

Hmm... as an aside, the top left starting square displayed is back. This is technically wrong. A chessboard is explicit on the rules of color alternation ( https://en.wikipedia...wiki/Chessboard ) and a checkers will follow the same convention: https://en.wikipedia.org/wiki/Draughts

Moving from console display to gui is quite a jump. I'd think this is something you'd do after you'd figured out the real logic and structure of game play.

GLUT, while eminently capable of doing what you want, sounds like a poor choice for a new project. A board game is simply not that graphics intensive, so a generic library for forms GUI that supports images would be far more appropriate for such a project.
Was This Post Helpful? 2
  • +
  • -

#41 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 30 March 2018 - 10:54 AM

well I have fixed the board coloring as suggested.
Was This Post Helpful? 0
  • +
  • -

#42 ndc85430   User is online

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

Reputation: 972
  • View blog
  • Posts: 3,834
  • Joined: 13-June 14

Re: checkers

Posted 31 March 2018 - 10:22 PM

Sigh, as usual, you're posting updates and not asking a question. Please reread macosxnerd101's post above:

View Postmacosxnerd101, on 27 March 2018 - 10:58 PM, said:

pbivens85- Seriously, this isn't Twitter. I'm glad you made progress, but it's not necessary for us to weigh in on every change you make!


As always, if you need help, please make sure to

1. Post the code
2. Ask a specific question
3. Explain what you've done to try and solve the problem

Again, also, it would be best for you to actually try and solve the problems yourself before asking for help. We can't hand hold all the way.
Was This Post Helpful? 0
  • +
  • -

#43 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1556
  • View blog
  • Posts: 4,930
  • Joined: 20-March 10

Re: checkers

Posted 04 April 2018 - 12:03 AM

View Postpbivens85, on 30 March 2018 - 01:57 AM, said:

I want to drag and drop a sprite using glut. should I use the mouse motion callback or the mousebutton down callback?


You should use mousebutton down callback....

Also im with baavgai in that using opengl for a checkers game is way overkill...

A programmer uses the most apt technology for the task at hand ..... if you were writing a spreadsheet program would you use opengl for that as well....??

Think man Think !!
Was This Post Helpful? 1
  • +
  • -

#44 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 07 April 2018 - 02:08 PM

well I am going back to studying c++ in one of my textbooks and I am doing the exercises in the back of the chapters, I really need the practice.
Was This Post Helpful? 0
  • +
  • -

#45 pbivens85   User is offline

  • D.I.C Addict

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

Re: checkers

Posted 10 April 2018 - 04:50 PM

I am going back to a game project I have worked on before. I am able to get rock sprites to move down the screen and can shoot them with bullet sprites and then they disappear. what I want is a collision sprite to be drawn after a bullet hits a rock and then the rock is erased. here is some of the code I am using, I may have asked this question before but has been a while since I have worked on this project.
void collision_rock_one()
{
	glEnable(GL_TEXTURE_2D);//collision sprite
	glBindTexture(GL_TEXTURE_2D, _textureId_four);

	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

	glColor3f(1.0f, 1.0f, 1.0f);
	glBegin(GL_POLYGON);
	glTexCoord2f(0.0f, 0.0f);
	glVertex3f(-7.0f, 10.0f + down, 0.0f);
	glTexCoord2f(1.0f, 0.0f);
	glVertex3f(-7.0f, 9.0f + down, 0.0f);
	glTexCoord2f(1.0f, 1.0f);
	glVertex3f(-6.0f, 9.0f + down, 0.0f);
	glTexCoord2f(0.0f, 1.0f);
	glVertex3f(-6.0f, 10.0f + down, 0.0f);
	glEnd();

	glDisable(GL_TEXTURE_2D);
}

void coll_rock_one()
{
	float x = -0.5+scroll;
	float y = -8.0f+up;
	float oWidth = 0.5f;
	float oHeight = 0.5f;

	float xTwo = -7.0f;
	float yTwo = 9.0f+down;
	float oTwoWidth = 0.5f;
	float oTwoHeight = 0.5f;

	if (checkCollide(x, y, oWidth, oHeight, xTwo, yTwo, oTwoWidth, oTwoHeight) == 1)
	{
		board[0][0] = 1;
	}
}

void erase_rock_one()
{
	if (board[0][0] == 1)
	{
		glColor3f(0.0f, 0.0f, 0.0f);
		glBegin(GL_POLYGON);
		glVertex3f(-7.0f, 10.0f + down, 0.0f);
		glVertex3f(-7.0f, 9.0f + down, 0.0f);
		glVertex3f(-6.0f, 9.0f + down, 0.0f);
		glVertex3f(-6.0f, 10.0f + down, 0.0f);
		glEnd();
	}
}


I know that I have asked this question before, but I never solved it. sometimes I like to go back previous projects and see if I can solve them after I have studyed texts.
Was This Post Helpful? 0
  • +
  • -

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5