home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3713 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.9 KB  |  60 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: newshost.grace.cri.nz!maths!peterm
  3. From: peterm@maths.grace.cri.nz (Peter McGavin)
  4. Subject: Re: Demo/game to OS frien
  5. Message-ID: <PETERM.96Feb21235737@tui.maths.irl.cri.nz>
  6. Date: 21 Feb 1996 10:57:37 GMT
  7. Distribution: inet
  8. References: <4g4eaa$m23@sinsen.sn.no> <980.6624T876T1485@wr.com.au>
  9. Organization: Industrial Research Ltd
  10. In-reply-to: accolyte@wr.com.au's message of 20 Feb 1996 03:42:43 GMT
  11.  
  12. accolyte@wr.com.au (Accolyte) writes:
  13. >> It depends..  If you have a framerate of 50fps, wiggling the mouse will
  14. >> make the whole thing jerk down to 25fps.  At least it did the last time
  15. >> I checked.
  16. >
  17. >Same here. Another testament to the overhead are the demos written for 1.3
  18. >that used system interrupts, and jump out of frame with 2.0+ because (and
  19. >only because) the system takes more time.. I must be a considerable amount
  20. >then.
  21.  
  22. This is not a reason for killing the entire OS.  The performance hit
  23. when the mouse moves comes from Intuition and the console.device.
  24. That is easily eliminated, without killing the entire OS, by
  25. installing an input-handler as described in the input.device chapter
  26. of the Devices RKM.  This has the added advantage of providing highly
  27. efficient keyboard and mouse input in exactly the same format as
  28. current raw hardware in a way that is promised to work on all existing
  29. and future Amigas.  This includes the problematic A3000 keyboard,
  30. CD32s with PC keyboards, homemade keyboards, serial mice, etc.  And it
  31. prevents the user flipping screens giving the illusion of
  32. single-tasking without disabling network play or continuous hard disk
  33. access or the ability to call the OS, etc.
  34.  
  35. A high-priority input-handler that eats all input events starves
  36. Intuition and console.device of input messages.  In my experience that
  37. reduces OS overheads from a max of more than 20% on slow machines when
  38. the mouse moves to a max of less than 1%.
  39.  
  40. It's hard to imagine a game where all the frames take the same time to
  41. render on all configs within +-1%.  My experience with texture-mapping
  42. engines, for example, is that some frames often take more than twice
  43. as long to render as others.  That's partly due to the fact that walls
  44. are faster to render than floors/ceilings and creatures add an unknown
  45. factor.  Even the angle the player sees the floor can make a factor of
  46. 2 difference on some Amigas because the texture may or may not be
  47. accessed in a sequence that utilises the datacache.  Then there are
  48. different configs to consider --- PAL versus NTSC, fast RAM or not,
  49. accelerators can be more than 10 times faster than base machines, etc.
  50.  
  51. Hence any occasional jerkiness is more likely due to the config or the
  52. game itself instead of the OS.  Techniques such as using the real-time
  53. clock instead of the vblank for simulated time and/or using a
  54. smoothing algorithm to predict the time of the next frame are
  55. effective at smoothing out jerkiness on all configs --- whether the OS
  56. is killed or not.
  57. -- 
  58. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  59.  
  60.