Author Topic: 3D Fun Test  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
3D Fun Test
« on: February 01, 2011, 03:19:40 AM »
Deleted

« Last Edit: April 11, 2015, 09:03:14 AM by Peter »

Charles Pegge

  • Guest
Re: 3D Fun Test
« Reply #1 on: February 01, 2011, 10:15:08 AM »

Thanks Peter,

I've found a way to radically reduce the CPU load. See if it works okay on your system.

Code: [Select]
act=1

While WinExit =0
if act then
  ClearBuffer &hFF8400
  DrawText hdc,"3D Test",254,16,&hFFFF00
  DrawText hdc,"Use arrow keys and (a) for origin",20,40,&hFFFF00
  CalCulation()
  For pk =0 To ih
  For dp =0 To pk
  DrawText hdc,"<>",a2(dp)-60,b2(dp),&h00FF64
  Next: Next
  FlipBuffer
end if
DoEvents
act=0
iF Key(vk_right) Then gx = gx - 1 * pi / 360 : act=1
iF Key(vk_up)    Then ay = ay - 1 * pi / 360 : act=1
iF Key(vk_left)  Then gx = gx + 1 * pi / 360 : act=1
iF Key(vk_down)  Then ay = ay + 1 * pi / 360 : act=1
iF Key(vk_a)     Then Initial : act=1
sleep 5
Wend

Charles

Charles Pegge

  • Guest
Re: 3D Fun Test
« Reply #2 on: February 01, 2011, 10:52:37 AM »
Could you try reducing the sleep period to 1. This is sufficient to prevent the CPU from maxing out.

Charles