Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

phil67rpg

Member Since 25 Feb 2004
Offline Last Active Yesterday, 09:59 PM
***--

#5061680 tictac toe marks

Posted by phil67rpg on 13 May 2013 - 10:17 PM

what is trolling




#5061639 tictac toe marks

Posted by phil67rpg on 13 May 2013 - 06:26 PM

should I use c++ or c#?




#5061420 tictac toe marks

Posted by phil67rpg on 12 May 2013 - 10:16 PM

Remove the option to just hard code everything and force yourself to think in algorithms instead of a huge list of if-elses.

how do I get better at algorithms




#5061390 tictac toe marks

Posted by phil67rpg on 12 May 2013 - 07:57 PM

how do I get rid of magic numbers?




#5060947 tictac toe marks

Posted by phil67rpg on 10 May 2013 - 05:09 PM

so how do I get better at programming? should I read and work through a book?




#5060453 tictac toe marks

Posted by phil67rpg on 08 May 2013 - 07:12 PM

so I should plan things out very carefully more, should I use pseudocode or flowcharts or uml




#5060445 tictac toe marks

Posted by phil67rpg on 08 May 2013 - 06:24 PM

well I have decided since I SUCK at c++ maybe I should try c# and do apps NOT games




#5060420 tictac toe marks

Posted by phil67rpg on 08 May 2013 - 04:29 PM

so how do I get better at coding?




#5060416 tictac toe marks

Posted by phil67rpg on 08 May 2013 - 04:25 PM

yes I listen beer nutts, I am trying my best, I do need practice




#5060176 tictac toe marks

Posted by phil67rpg on 07 May 2013 - 09:42 PM

well after a break I am going to finish my tic tac toe game, however I still get the problem I have stated above.




#5056268 dx9 tutorial help

Posted by phil67rpg on 23 April 2013 - 10:55 PM

well I reread lesson 5




#5055388 tictac toe marks

Posted by phil67rpg on 20 April 2013 - 09:42 PM

Well I am still working on my tic tac toe game using dx9 and c++. My problem is that when I click on the second row that it puts a mark in the first row and when I click on the third row it puts a mark in the second row. The x and y variables are the mouse position.
here is the code I am using.
void display_text_x(int x,int y)
{
	d3ddev->BeginScene();

	RECT font_rect;
	
	if(x>=300 && x <=350 && y>=225 && y <=275)
	{
	font_rect.left=310;
	font_rect.top=235;
	font_rect.right=330;
	font_rect.bottom=255;
	board_x[0][0]=true;
	}

	if(x>=350 && x <=400 && y>=225 && y <=275)
	{
	font_rect.left=360;
	font_rect.top=235;
	font_rect.right=380;
	font_rect.bottom=255;
	board_x[0][1]=true;
	}

	if(x>=400 && x <=450 && y>=225 && y <=275)
	{
	font_rect.left=415;
	font_rect.top=235;
	font_rect.right=435;
	font_rect.bottom=255;
	board_x[0][2]=true;
	}

	if(x>=300 && x <=350 && y>=275 && y <=325)
	{
	font_rect.left=310;
	font_rect.top=290;
	font_rect.right=330;
	font_rect.bottom=310;
	board_x[1][0]=true;
	}

	if(x>=350 && x <=400 && y>=275 && y <=325)
	{
	font_rect.left=360;
	font_rect.top=290;
	font_rect.right=380;
	font_rect.bottom=310;
	board_x[1][1]=true;
	}

	if(x>=400 && x <=450 && y>=275 && y <=325)
	{
	font_rect.left=415;
	font_rect.top=290;
	font_rect.right=435;
	font_rect.bottom=310;
	board_x[1][2]=true;
	}

	if(x>=300 && x <=350 && y>=325 && y <=375)
	{
	font_rect.left=310;
	font_rect.top=350;
	font_rect.right=330;
	font_rect.bottom=370;
	board_x[2][0]=true;
	}

	if(x>=350 && x <=400 && y>=325 && y <=375)
	{
	font_rect.left=360;
	font_rect.top=350;
	font_rect.right=380;
	font_rect.bottom=370;
	board_x[2][1]=true;
	}

	if(x>=400 && x <=450 && y>=325 && y <=375)
	{
	font_rect.left=415;
	font_rect.top=350;
	font_rect.right=435;
	font_rect.bottom=370;
	board_x[2][2]=true;
	}

	HRESULT hr=D3DXCreateFontA(d3ddev,
				  20,
				  10,
				  FW_NORMAL,
				  1,
				  false,
				  DEFAULT_CHARSET,
				  OUT_DEFAULT_PRECIS,
				  ANTIALIASED_QUALITY,
				  DEFAULT_PITCH|FF_DONTCARE,
				  "Arial",
				  &g_font);
			 g_font->DrawTextA(NULL,"X",-1,&font_rect,DT_CENTER,0xFFFFFFFF);

	 d3ddev->EndScene();

    d3ddev->Present(NULL, NULL, NULL, NULL);
}



#5054405 RECT font_rect

Posted by phil67rpg on 17 April 2013 - 08:28 PM

well I am going to take a break because I am angering some good people and that is not my intent.


#5054073 RECT font_rect

Posted by phil67rpg on 16 April 2013 - 09:28 PM

	RECT font_rect;
	
	if(x>=300 && x <=350 && y>=225 && y <=275)
	{
	font_rect.left=310;
	font_rect.top=235;
	font_rect.right=330;
	font_rect.bottom=255;
	board_x[0][0]=true;
	}
is RECT font_rect;
and font_rect.left;
correct.


#5052622 dx9 tutorial help

Posted by phil67rpg on 12 April 2013 - 06:40 PM

I am able to draw a triangular pyramid to the screen, I am working with the directxtutorial.com web site. I really like this tutorial. I want to draw 20 triangular pyramids to the screen. Here is the code I am working with.
        { -1.0f, -1.0f, 0.0f, D3DCOLOR_XRGB(0, 255, 0), },
        { -1.0f, 1.0f,-1.0f, D3DCOLOR_XRGB(0, 0, 255), },
        { 1.0f, 1.0f, 0.0f, D3DCOLOR_XRGB(255, 0, 0), },
        { 1.0f, -1.0f, -1.0f, D3DCOLOR_XRGB(0, 0, 255), },





PARTNERS