| collision detection 
 
	 
	
		| Author | Message |   
		| Paul 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:25 pm    Post subject: (No subject) |  |   
				| 
 |  
				| crap, I edited the wrong line, I edited it back now. Theres a bug that when you expand while moving, it goes into the wall. |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Sponsor Sponsor
 
  
   |  |   
		|  |   
		| Cervantes 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:32 pm    Post subject: (No subject) |  |   
				| 
 |  
				| okay okay dodge I repent I repent!  hail whatdotcolour!!  whatdotcolour is the way to go! It's the way to live!  All hail whatdotcolour!!  The Turing command that elevates Turing beyond C++ for gaming and all other purposes! 
  |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Andy 
 
 
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:34 pm    Post subject: (No subject) |  |   
				| 
 |  
				| gj, plus another 10 bits lol |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Paul 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:35 pm    Post subject: (No subject) |  |   
				| 
 |  
				| Yes, whatdotcolor IS the greatest thing ever, it changed my life, otherwise I might not understand collision at all. I'll go and reccommend it to all my friends now. *nudge* |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Cervantes 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:41 pm    Post subject: (No subject) |  |   
				| 
 |  
				| woot!  I'm getting the hang of this religion now   
 Paulbian I'll have my own style of your program up in a bit.
 |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| shorthair 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:46 pm    Post subject: (No subject) |  |   
				| 
 |  
				| dodge is being sweet talked every way till sunday , i think a labrinth marble game , would be hte best way to put collision detection to the test  ,also becuase you would hav etrue phyics involved , wow i jsut bouht 3dsMax and im lost , the book is 790 pages , its insane in the membrane wanna know why......." its the beginers guide " , someone better make a what dot color tutorial , everyone asks aboutit at least once in their compsci life ( well most )  ,dodge this would be cool of you to do since your like the god of it and what not |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Andy 
 
 
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:50 pm    Post subject: (No subject) |  |   
				| 
 |  
				| ok well since ccc is coming up, for every problem on there that some one does with whatdotcolor in a cool way, i will award 20 bits*question number s4 counts as 6 s5 as 7
 |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| recneps 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:53 pm    Post subject: (No subject) |  |   
				| 
 |  
				| whats CCC? |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Sponsor Sponsor
 
  
   |  |   
		|  |   
		| Andy 
 
 
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 6:57 pm    Post subject: (No subject) |  |   
				| 
 |  
				| waterloo's canadian computing contest |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| shorthair 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:03 pm    Post subject: (No subject) |  |   
				| 
 |  
				| go look in contests and im sur there is a sticky with everything about it by tony or someone , its really interesting , you ca end up programming overseas for waterloo , well 4 peopel in canada will be |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| recneps 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:04 pm    Post subject: (No subject) |  |   
				| 
 |  
				| Verrrry Interesting  |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Andy 
 
 
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:06 pm    Post subject: (No subject) |  |   
				| 
 |  
				| 4? more like 20 |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| shorthair 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:08 pm    Post subject: (No subject) |  |   
				| 
 |  
				| for the final amount , i htought it was like 4 , wow ther eteam is that big , didnt bugz make round 2 last year the one at waterloo |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Andy 
 
 
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:10 pm    Post subject: (No subject) |  |   
				| 
 |  
				| yea so did another massey kid, but he didnt want to go... he's at MIT now |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Cervantes 
 
  
 
 
 | 
			
				|  Posted: Sun Feb 01, 2004 7:20 pm    Post subject: (No subject) |  |   
				| 
 |  
				| what compsci knowledge should you have for this CCC?  full highschool knowledge? 
 Paulbian here's my version of your program, flawless if I might add.  and in the spirit of my conversion to whatdotcolour I have utilized whatdotcolour in said program 8)
 
 
 	  | code: |  	  | setscreen ("offscreenonly")
var x : int := maxx div 2
 var y : int := maxy div 2
 var xr, yr : int := 10 %x radius, y radius
 var move : boolean := true % this fixes a small bug, if you want to see what that bug is, delete all the move stuff ;)
 var chars : array char of boolean
 loop
 drawfillbox (0, 0, maxx, maxy, black)
 drawfillbox (10, 10, maxx - 10, maxy - 10, 0)
 
 Input.KeyDown (chars)
 
 %controls
 if move = true then
 if chars (KEY_UP_ARROW) then
 y += 2
 end if
 if chars (KEY_DOWN_ARROW) then
 y -= 2
 end if
 if chars (KEY_LEFT_ARROW) then
 x -= 2
 end if
 if chars (KEY_RIGHT_ARROW) then
 x += 2
 end if
 end if
 
 %collision whatdotcolour style!!   woot!! ;)
 if whatdotcolour (x - xr, y) = black then
 x += 2
 end if
 if whatdotcolour (x + xr, y) = black then
 x -= 2
 end if
 if whatdotcolour (x, y - yr) = black then
 y += 2
 end if
 if whatdotcolour (x, y + yr) = black then
 y -= 2
 end if
 
 %circle growing and shrinking
 move := true
 if chars (KEY_ENTER) then
 xr += 2
 yr += 2
 move := false
 end if
 if chars (KEY_BACKSPACE) then
 xr -= 2
 yr -= 2
 end if
 
 %keep the growth under control!!!! aaaaugh!!!
 if xr < 4 or yr < 4 then
 xr := 4
 yr := 4
 end if
 
 if xr > maxy div 2 or yr > maxy div 2 then
 xr := maxy div 2
 yr := maxy div 2
 end if
 
 
 drawfilloval (x, y, xr, yr, red)
 View.Update
 delay (2)
 end loop
 | 
 
 btw, just to clarify, do you know what this means?
 
 
 |  
				|  |  |   
		|  |  |  
	  
		|  |   
		|  |  
 |