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, 07:10 PM
**---

#5002811 open gl game

Posted by phil67rpg on 20 November 2012 - 06:50 PM

actually I have already done pong with opengl, how about breakout?


#5002182 drawing to windows with the mouse

Posted by phil67rpg on 18 November 2012 - 07:03 PM

I am attempting to draw to a window using DrawText and WM_PAINT. I want to use the mouse and the WM_LBUTTONDOWN message. I understand that to actually draw to the screen one must use the WM_PAINT message. I am using the Win21 API. I am using this API because I want to learn how to program in windows better.


#4997060 erasing text

Posted by phil67rpg on 03 November 2012 - 08:07 PM

hey kathar thanks for the reputation boost, and to mhagain can you post some code.


#4996954 erasing text

Posted by phil67rpg on 03 November 2012 - 02:03 PM

I have done a great deal of research about game loops, message pumps, windows messages, windows threads and timer functions. I also read about splash screens and finite state machines.  I still want to erase text on the screen.  After much research I am still stuck on how to solve this problem. Google is my friend. Go easy on me I am attempting to ask better questions.  Basically I am confused about how to use game loops.My question is when in the game loop do you print text to the screen and then print black text to the screen. Fastcall22 gave me some code and a explanation on how to  use game loops I would like just little more information on how to use game loops.


#4996341 erasing text

Posted by phil67rpg on 01 November 2012 - 04:58 PM

My problem is that I can use dx9 to print text to the screen. I created a font and used the drawtext function to print text to the screen. What I want to do is that after the text is sent to the screen that the text would be cleared from the screen. Basically all I want to do is give instructions to the player on how to interact with the GUI and then to be able to play the game without text on the screen. This is something like a splash screen. I have tried printing text to the screen in red color and then printing the same text to the screen in black but it does not erase the text that is already printed there. I hope you can understand my problem and hopefully help me to solve. Let me know if need more information or code.


#4995682 erasing text

Posted by phil67rpg on 30 October 2012 - 09:43 PM

well thanks I like the thumbnail picture, and yes star trek rocks.


#4995658 erasing text

Posted by phil67rpg on 30 October 2012 - 07:49 PM

case WM_TIMER:
  {
  switch(wParam)
  {
  case ID_TIMER:
   {
  HRESULT hr=D3DXCreateFont(g_pd3dDevice,     //D3D Device
22,    //Font height
10,     //Font width
FW_NORMAL, //Font Weight
1, //MipLevels
false, //Italic
DEFAULT_CHARSET,  //CharSet
OUT_DEFAULT_PRECIS, //OutputPrecision
ANTIALIASED_QUALITY, //Quality
DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily
"Arial", //pFacename,
&g_font);    //ppFont
  
   D3DCOLOR fontColor = D3DCOLOR_XRGB(0,0,0);
   RECT rct;
   rct.left=200;
   rct.right=600;
   rct.top=20;
   rct.bottom =50;
   g_font-> DrawText(NULL,"Welcome to DX9 Pong",-1,&rct,DT_CENTER,fontColor);

   KillTimer(hWnd,ID_TIMER);
   }
   break;
  }
  return 0;
  }
I am using the windows timer function to draw black text to the screen to cover up red text which I already drew to the screen.
I am trying to erase text for my  pong game.I have done a lot of research on this topic but I still need help.


#4995282 font text

Posted by phil67rpg on 29 October 2012 - 09:41 PM

case WM_TIMER:

  {

  switch(wParam)

  {

  case ID_TIMER:

   {

  HRESULT hr=D3DXCreateFont(g_pd3dDevice,	 //D3D Device

					 22,			   //Font height

					 10,			    //Font width

					 FW_NORMAL,	    //Font Weight

					 1,			    //MipLevels

					 false,		    //Italic

					 DEFAULT_CHARSET,  //CharSet

					 OUT_DEFAULT_PRECIS, //OutputPrecision

					 ANTIALIASED_QUALITY, //Quality

					 DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily

					 "Arial",		  //pFacename,

					 &g_font);		 //ppFont

   

   D3DCOLOR fontColor = D3DCOLOR_XRGB(0,0,0);

   RECT rct;

   rct.left=200;

   rct.right=600;

   rct.top=20;

   rct.bottom =50;

   g_font-> DrawText(NULL,"Welcome to DX9 Pong",-1,&rct,DT_CENTER,fontColor);

  

   KillTimer(hWnd,ID_TIMER);

   }

   break;

  }

  return 0;

  }
I am using the windows timer function to draw black text to the screen to cover up red text which I already drew to the screen.


#4986552 [SOLVED] c++ sorting problem

Posted by phil67rpg on 03 October 2012 - 03:32 PM

yeah! I finally got my program to work!thanks for all the help.


#4942744 [FAST] What book should i Buy

Posted by phil67rpg on 23 May 2012 - 07:37 PM

I agree C# is nice and easy to use.


#4942073 [FAST] What book should i Buy

Posted by phil67rpg on 21 May 2012 - 09:11 PM

I prefer the o-reilly texts and others agree with me.they are very  books for reference.


#4941094 APPCRASH

Posted by phil67rpg on 17 May 2012 - 08:30 PM

So you just start the app, and wait 2 minutes, then it crashes?

yes I start the app and wait then it crashes.


#4930470 First programming language: C, Python or something else

Posted by phil67rpg on 11 April 2012 - 09:21 PM

well I learned c++ in university and it has been my main tool ever since,but c# is really nice too.


#4930446 hi if you are new to any aspect of game design(like me) but want to work...

Posted by phil67rpg on 11 April 2012 - 07:18 PM

do you have yahoo messanger


#4930442 hi if you are new to any aspect of game design(like me) but want to work...

Posted by phil67rpg on 11 April 2012 - 07:11 PM

I dont have a web cam either.




PARTNERS