User Tools

Site Tools


sprites_20in_20multiple_20windows_20_28lbb_29

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sprites_20in_20multiple_20windows_20_28lbb_29 [2018/03/31 13:19]
127.0.0.1 external edit
sprites_20in_20multiple_20windows_20_28lbb_29 [2018/04/17 18:54] (current)
tbest3112 Added syntax highlighting
Line 7: Line 7:
   * Hide all the sprites which **do not** '​belong'​ to this window/​graphicbox (SPRITEVISIBLE command).   * Hide all the sprites which **do not** '​belong'​ to this window/​graphicbox (SPRITEVISIBLE command).
 \\  Here is an example of a program which has sprites in two different graphics windows. It uses sprite and background bitmaps from the LB 4.04 examples folder; you should save the program there to ensure it finds the required resources:​\\ \\  \\  Here is an example of a program which has sprites in two different graphics windows. It uses sprite and background bitmaps from the LB 4.04 examples folder; you should save the program there to ensure it finds the required resources:​\\ \\ 
 +<code lb>
       nomainwin       nomainwin
  
Line 43: Line 44:
   [landed]   [landed]
       wait       wait
 +</​code>​
 \\  Another thing to be aware of is that sprites which are set to move automatically (SPRITEMOVEXY or SPRITETRAVELXY command) will move whenever a DRAWSPRITES command is issued, irrespective of which window or graphicbox the command is sent to. So in the above program they move at twice the speed that might have been expected.\\ \\  Also, if you use SPRITECOLLIDES it will detect '​collisions'​ between sprites in different windows or graphicboxes. You may need to ignore sprites which '​belong'​ to another window yourself. \\  Another thing to be aware of is that sprites which are set to move automatically (SPRITEMOVEXY or SPRITETRAVELXY command) will move whenever a DRAWSPRITES command is issued, irrespective of which window or graphicbox the command is sent to. So in the above program they move at twice the speed that might have been expected.\\ \\  Also, if you use SPRITECOLLIDES it will detect '​collisions'​ between sprites in different windows or graphicboxes. You may need to ignore sprites which '​belong'​ to another window yourself.
sprites_20in_20multiple_20windows_20_28lbb_29.txt ยท Last modified: 2018/04/17 18:54 by tbest3112