
-----------------------------------
richcash
Mon May 01, 2006 5:58 pm

Is this a turing limitation?
-----------------------------------
I tried to get a start to 3D effect but my computer can't handle the various commands and restarts every time I try the following :

setscreen ("offscreenonly")
var x, y := 200
var d := 50
var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (chr (200)) then
d += 1
elsif chars (chr (208)) then
d -= 1
end if
drawfilloval (x - d, y - d, x + 100 + d, y + 100 + d, 12)
View.Update
cls
end loop

Sorry for the lack of indentation. I don't advise you to copy and paste this because your computer might be like mine and restart!
I appreciate anyone's thoughts or help.

-----------------------------------
Tony
Mon May 01, 2006 6:06 pm


-----------------------------------
the code runs fine on my end. I don't think this has anything to do with Turing, but just for the fun of it, why don't you try to insulate the test case for the crash?

test case being the smallest sniplet out of that code, where if anything more was to be removed, the computer will no longer restart.

-----------------------------------
HellblazerX
Mon May 01, 2006 6:43 pm


-----------------------------------
why don't you try to insulate the test case for the crash?

Lol, that would take a long time with all the restarting.  I think the best way is to get your computer checked, cuz from what I can seem about it your, its quite simple, and there shouldn't be any reason why your computer can't handle it.

-----------------------------------
Tony
Mon May 01, 2006 6:53 pm


-----------------------------------
Lol, that would take a long time with all the restarting.
nonsense, work the other way

start with an empty file and keep on adding one line at a time until you get something that crashes

-----------------------------------
HellblazerX
Mon May 01, 2006 7:00 pm


-----------------------------------
wow, did not think of that at all.  Then again, I don't think much.  That's really nice..... Man, I wish i was as smart as you....

-----------------------------------
GlobeTrotter
Mon May 01, 2006 7:04 pm


-----------------------------------
I have a feeling that this may be caused by the lack of delay in that code.  For example, in turing, if I run this program:

loop
end loop

then my computer slows down a lot and I may have to use the task manager.  So right underneath the loop, write
delay(10) and see if it still crashes.  If it does, I'm stumped.

-----------------------------------
HellblazerX
Mon May 01, 2006 7:08 pm


-----------------------------------
There is also the possibility that it is the setscreen command.  The setscreen ("offscreenonly") command draws to an offscreen buffer, and then draws onto the screen to reduce animation flickering.  It could be that your computer can't handle that buffer.

-----------------------------------
richcash
Mon May 01, 2006 7:14 pm


-----------------------------------
thanks for the advice.
I tested and it turned out my computer crashed and restarted everytime I added the d variable to the x or y co-ordinate. I know now it was my computer's inabilities and not Turing.
P.S. using delay works, good idea. I avoided this originally because I like maximum speed when I'm making a program.

-----------------------------------
Tony
Mon May 01, 2006 8:02 pm


-----------------------------------
[wtd accent]premature optimization is Bad

-----------------------------------
Delos
Mon May 01, 2006 9:18 pm


-----------------------------------
wtd has an accent :shock:.  I wanna hear!

-----------------------------------
wtd
Tue May 02, 2006 3:18 am


-----------------------------------
I have an Upstate/Western/Central New York accent.  Though I was once told my voice has a British quality to it.  I have heard this a few times, actually, but I can't detect it at all myself.

I sometimes have a notable accent when I really know what I'm doing while speaking spanish.
