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

Next revision
Previous revision
sprites_20in_20multiple_20windows_20_28lbb_29 [2018/03/31 13:19] – external edit 127.0.0.1sprites_20in_20multiple_20windows_20_28lbb_29 [2024/01/05 00:21] (current) – external edit 127.0.0.1
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.1522502384.txt.gz · Last modified: 2024/01/05 00:16 (external edit)