Newb with a question

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
Hydrasin
Posts: 14
Joined: May 23rd, 2012, 11:09 pm
Location: San Diego, California

Newb with a question

Post by Hydrasin » May 23rd, 2012, 11:37 pm

Hey Chili,

First off, many thanks for your tutorials. They are both enlightening and humorous. I'm about a third of the way through tut 8 where you are correcting the "corner case" with the moving reticle. To exaggerate the point you were making about the reticle not hitting the corner, I turned up the speed from x2 = x2 + 5 to x2 = x2 + 50 so that I could visually see the reticle missing the corner. When I did this it showed that you were correct about the reticle missing the corners. However after applying your fix ( if(x2 == 100 && y2 > 100) ) it showed that your fix corrected the issue in top right, bottom right, and bottom left corners, but that the reticle is now missing the top left corner. When the program is first loaded the reticle is starting out at 100 x 100, but every loop after it is missing it. I know you mentioned hair removal over corner issues so i just wanted to know if that's a problem to look out for. Otherwise, thanks again and keep up the most awesome work :mrgreen:

ps.... here's the code I got for that particular section

Code: Select all

	//moving Reticle code:
	if(x2 == 100 && y2 > 100)
	{
		y2 = y2 - 50;
	}
	if(y2 == 500)
	{
		x2 = x2 - 50;
	}
	if(x2 == 700)
	{
		y2 = y2 + 50;
	}
	if(y2 == 100)
	{
		x2 = x2 + 50;
	}

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

Re: Newb with a question

Post by chili » May 24th, 2012, 12:38 pm

Hmmm, interesting problem bro... just from looking at the code I don't see how it can miss the corner. I don't have my copy of the code for that lesson anymore; would you mind posting your solution folder (after cleaning and zipping of course)? I wanna take a look at this in more depth.
Chili

Post Reply