home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xpool-10.zip / Xpool / README < prev    next >
Text File  |  1992-05-26  |  5KB  |  96 lines

  1.  
  2.  I. ARIT 1992 Hidirbeyli,AYDIN,TR.  09400
  3.               Golden,    CO,   USA. 80401
  4.  
  5.  
  6.  
  7. Xpool
  8. =====
  9.  
  10. Xpool is an X windows application which simulates a billiard game by using
  11. an approach called Discrete Element Methods(DEM). I actually wrote this as an 
  12. assignment for the DEM class that I was taking this semester (Spring 1992).
  13. Currently, I am having some problems with the graphics (moving bitmaps on the
  14. screen), so don't expect to see something real fancy. To increase the 
  15. performance, I wrote the code such that any stopped ball will not be redrawn.
  16. This causes some problems because when you create a bitmap you actually 
  17. create a rectangle area which contains the shape you define and that 
  18. rectangle chops off some pieces from other balls when they get close to 
  19. each other. You can solve this by redrawing all the balls in each time
  20. step, but it will dramaticlly reduce the performance. There may be some
  21. other problems that I didn't catch. Actually, I couldn't spend enough
  22. time to add some other feautes like 3-ball, 8-ball, or 9-ball options but
  23. will do that later . The other thing is that this is the first
  24. complete X Windows program that I wrote. I am still learning how to develop
  25. graphics program for X Windows, so if you find some stuff that can be done  
  26. more efficiently, please tell me. Future release will have the options that
  27. I just mentioned and better performance with your ideas. And also, I will refine
  28. the code to increase the performance.
  29. OK, let's talk about the code. Originally, I did this program in C++ for
  30. DOS. I was going to port this code in C++ for un*x, but not everybody has 
  31. C++ up and running on his/her machine, so I emulated (is that the word ?)
  32. C++-like programming in C. I actually don't know why I did this, I guess
  33. I just got used to C++. 
  34.  
  35. Before we go on, I should mention that I don't know the original dimensions
  36. of a pool table, so if anybody knows, please send me those dimensions
  37. so that next release will have correct dimensions for the balls and table.
  38.  
  39. Now it is time to crank up the good old compiler and build this sucker.
  40. I don't have a complicated Makefile or an Imakefile ,so if you just type
  41.    make
  42. it should do it. I also tried GNU C compiler, it works just fine.
  43. I compiled the code on RS6000, DEC 3100  and NeXT (under X Windows).
  44. It runs on these machines just fine.
  45. I don't think you will have any problem with the other machines too since
  46. I don't use any machine dependent stuff. It is just pure number crunching.
  47. I will also post the Windows 3.0 version later.
  48.  
  49.  
  50. bugs:
  51.    Xpool currently has a some bugs. If you want to move the cue ball,
  52.    and you move your mouse fast, program thinks that you want to 
  53.    use the cue stick so it shows the stick. Move the cue ball slowly.
  54.    And I am really concerned about the balls chopping each other.
  55.    In fact you will see some balls passing by and cutting pieces from
  56.    another ball even if they thouch each other,that is because of the fact that 
  57.    they don't create enough force to move the stopped ball. Since we don't
  58.    want to wait 'till everybody reachs 0.0000 speed, I wrote that part
  59.    such that if the ball speed drops under 1.0000, it means that ball is
  60.    stopped and has 0.0000 velocity. You can change these limits in 
  61.     definition.h   ....
  62.    
  63.    When I have the time, I'll fix these problems and  
  64.    others coming from you.
  65.  
  66.    As I said there are some other options that I want to add to this program
  67.    but for now, they have to wait. You will see that there is some
  68.    code in the program that is commented out for this 'version'. I am going to
  69.    use most of it  later.
  70.  
  71. rules:
  72.    With the current setup, we have two sets of balls, red and blue ( for
  73.    color display ). I didn't label the balls yet, do that later...
  74.    whoever  gets his/her balls in first and then gets the
  75.    black ball in last wins. 
  76.    If you want to see where your ball will go, click on 'Cheat' ( or 'No Cheat')
  77.    button to get a trajectory of your shot.
  78.  
  79.   
  80. Any idea for speeding up the graphics  will be
  81. cheerfully accepted and any recommendations which could 
  82. benefit overall performance will be appriciated.
  83.  
  84. Happy playing, Guys............
  85. IstakayI kIrma Haaaaa..!!!!( Don't break the stick OKKKKKKKK.!!)
  86.  
  87. Ismail ARIT  
  88. iarit@slate.mines.colorado.edu
  89.  
  90. note:
  91.    when you run the program, you are gonna see a layout on the main
  92.    window  "SALOON HIDIR". in case if you wonder what the hell that thing is,
  93.    it is the place that we used to play pool when I was in High School back
  94.    home.
  95.  
  96.