I kinda need help

The Partridge Family were neither partridges nor a family. Discuss.
Dragonborn
Posts: 11
Joined: June 8th, 2012, 6:48 am

I kinda need help

Post by Dragonborn » June 8th, 2012, 1:28 pm

I believe I have been having some trouble with my debugger. Sometimes, when I click Start Debugging, the window pops up and there is nothing...There is not even a black screen. I can just see through it. Then it gives me and error message that says, "This program is not responding" and closes the window. Any help or suggestion would be appreciated.
btw I have Windows XP...I know :(

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: I kinda need help

Post by LuX » June 8th, 2012, 1:41 pm

Without seeing the code, I can't tell if there's something wrong in there.
Since you seem to have a low end computer, try this lighter framework here: Link
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I kinda need help

Post by chili » June 8th, 2012, 1:58 pm

If you video card is old or is an onboard card, it might be that you need the version of the framword that LuX has referenced. In any case, the symptoms that you describe are definately pathalogical.

First, try the ghillie build of the framework. Second, if that does not work, post your code and let us see what you have there just to be sure.
Chili

Dragonborn
Posts: 11
Joined: June 8th, 2012, 6:48 am

Re: I kinda need help

Post by Dragonborn » June 8th, 2012, 2:08 pm

Ok, I already have the ghille framework and I think I might know what's up.
When I tried to make my program make the square on the screen change color like this:

Code: Select all

    while( kbd.SpaceIsPressed() )
			{
				r++;  //r represents red
			}
it freezes. It must be because I am on a crappy computer right now huh?

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I kinda need help

Post by chili » June 8th, 2012, 2:09 pm

Clean yourj solution and post your code bro. We can help yoiu, but only if we can see your shit. :)
Chili

Dragonborn
Posts: 11
Joined: June 8th, 2012, 6:48 am

Re: I kinda need help

Post by Dragonborn » June 8th, 2012, 2:15 pm

Here's my shit:

Code: Select all

Game::Game( HWND hWnd,const KeyboardServer& kServer,const MouseServer& mServer )
:	gfx( hWnd ),
	audio( hWnd ),
	kbd( kServer ),
	mouse( mServer ),
    boxHeight( 200 ),
    boxWidth( 200 ),
    boxY( 200 ),
    boxX( 300 )
	
	


{}

void Game::Go()
{
	gfx.BeginFrame();
	ComposeFrame();
	gfx.EndFrame();
}

void Game::ComposeFrame()
{	
	int z = 30;
	r = 30;
	b = 30;
	g = 255;
if( boxX < 5 )
   {
      boxX = 5;
   }

   if( boxX + boxWidth > 795 )
   {
      boxX = 795 - boxWidth;
   }

   if( boxY < 5 )
   {
      boxY = 5;
   }

   if( boxY + boxHeight > 595 )
   {
      boxY = 595 - boxHeight;
   }

   /*Moving the Box*/

   if( kbd.RightIsPressed())
   {
      boxX = boxX + 3;
   }

   if( kbd.LeftIsPressed())
   {
      boxX = boxX - 3;
   }

   if( kbd.UpIsPressed())
   {
      boxY = boxY - 3;
   }

   if( kbd.DownIsPressed())
   {
      boxY = boxY + 3;
   }

   /*Re-sizing the box*/

   if( kbd.EnterIsPressed())
   {
      boxHeight = boxHeight - 5;
      boxWidth = boxWidth - 5;
   }

   if( kbd.SpaceIsPressed())
   {
      boxHeight = boxHeight + 3;
      boxWidth = boxWidth + 3;   
   }


   if( boxHeight > 325 )
   {
      boxHeight = 325;
   }

   if( boxWidth > 325 )
   {
      boxWidth = 325;
   }

  

   if( boxHeight < 5 )
   {
      boxHeight = 5;
   }

   if ( boxWidth < 5 )
   {
      boxWidth = 5;
   }

   /*Drawing the Box*/

   int y = boxY;
   while( y < boxY + boxHeight )
   {
      int x = boxX;
      while( x < boxX + boxWidth )
      {
		  
         gfx.PutPixel( x,y,r,g,b );
         x++;
     if( boxWidth > 1 )
	 {
		if( kbd.SpaceIsPressed() )
		{
			while( kbd.LeftIsPressed() )
			{
				r++;
			}
			
		}
	 }
	  }
      y++;
	  
   }
  
   
   



}
It was supposed to make the box change color, or at least that is what I wanted it to do.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I kinda need help

Post by chili » June 8th, 2012, 2:22 pm

Bro, you really need to read the topic titled "READ THIS FIRST" :lol:

Anywyas, my computer is too broken and im too drunk to take a look at htis righrt now. Mybe Lux will be super nice enought to look at this for you without the zipped cleaned solutin. ;)

I shoudl make Lux a moderator. :lol: Whatl do you think lux/_?
Chili

Dragonborn
Posts: 11
Joined: June 8th, 2012, 6:48 am

Re: I kinda need help

Post by Dragonborn » June 8th, 2012, 2:25 pm

Alright Chili that's cool. :)

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: I kinda need help

Post by LuX » June 8th, 2012, 2:29 pm

Would be cool : -)
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I kinda need help

Post by chili » June 8th, 2012, 2:40 pm

Done, I think。 0000000:lol:

どんてぃdn
Chili

Post Reply