here is my source
SYNC ON
SYNC RATE 60
BACKDROP OFF
SET DISPLAY MODE 320,240,32
GOSUB load_sprites
current_sprite_to_place = 20000
space_key_Stopper = 0
SPRITE 2,SPRITE X(1),SPRITE Y(1),200
rem main editor loop
DO
rem get scancode from keyboard
keypress = SCANCODE()
IF keypress = 0
stopper = 0
ENDIF
SET CURSOR 0,0
PRINT SPRITE COLLISION(1,0)
GOSUB cursor_movement
GOSUB select_tile
GOSUB paint_tile
GOSUB save_map
rem end of main loop
SYNC
LOOP
cursor_movement:
rem set stopper to zero when no key is pressed
IF DOWNKEY() = 0 AND UPKEY() = 0 AND LEFTKEY() = 0 AND RIGHTKEY() = 0
stopper_dir_keys = 0
ENDIF
rem up
IF UPKEY() = 1 AND stopper_dir_keys = 0
FOR current_tile = 20000 TO 62000
IF SPRITE EXIST(current_tile)
SPRITE current_tile,SPRITE X(current_tile),SPRITE Y(current_tile)+16,SPRITE IMAGE(current_tile)
ENDIF
NEXT current_tile
stopper_dir_keys = 1
space_key_stopper = 0
ENDIF
rem down
IF DOWNKEY() = 1 AND stopper_dir_keys = 0
FOR current_tile = 20000 TO 62000
IF SPRITE EXIST(current_tile)
SPRITE current_tile,SPRITE X(current_tile),SPRITE Y(current_tile)-16,SPRITE IMAGE(current_tile)
ENDIF
NEXT current_tile
stopper_dir_keys = 1
space_key_stopper = 0
ENDIF
rem left
IF LEFTKEY() = 1 AND stopper_dir_keys = 0
FOR current_tile = 20000 TO 62000
IF SPRITE EXIST(current_tile)
SPRITE current_tile,SPRITE X(current_tile)+16,SPRITE Y(current_tile),SPRITE IMAGE(current_tile)
ENDIF
NEXT current_tile
stopper_dir_keys = 1
space_key_stopper = 0
ENDIF
rem right
IF RIGHTKEY() = 1
FOR current_tile = 20000 TO 62000
IF SPRITE EXIST(current_tile)
SPRITE current_tile,SPRITE X(current_tile)-16,SPRITE Y(current_tile),SPRITE IMAGE(current_tile)
ENDIF
NEXT current_tile
stopper_dir_keys = 1
space_key_stopper = 0
ENDIF
rem return from cursor movement
RETURN
select_tile:
rem keypress 28 is enter
IF keypress = 28 AND stopper = 0
active_piece = active_piece + 1
stopper = 1
DELETE SPRITE 2
CLONE SPRITE active_piece,2
ENDIF
rem keypress 14 is backspace
IF keypress = 14 AND stopper = 0
active_piece = active_piece - 1
stopper = 1
DELETE SPRITE 2
CLONE SPRITE active_piece,2
ENDIF
SPRITE 2,SPRITE X(1),SPRITE Y(1),SPRITE IMAGE(active_piece)
rem return from select_tile
RETURN
paint_tile:
rem keypress 57 is space
IF keypress = 57 AND space_key_stopper = 0
CLONE SPRITE 2,current_sprite_to_place
SPRITE current_sprite_to_place,SPRITE X(1),SPRITE Y(1),SPRITE IMAGE(2)
current_sprite_to_place = current_sprite_to_place + 1
space_key_stopper = 1
ENDIF
rem return from paint_tile
RETURN
REM ******FILE STUFF TRY OUT :P********
save_map:
rem keypress 31 is s
IF keypress = 31
IF FILE EXIST("map1.map")
DELETE FILE "map1.map"
ENDIF
OPEN TO WRITE 1,"map1.map"
FOR current_tile_to_save = 20000 to 62000
IF SPRITE EXIST(current_tile_to_save)
WRITE LONG 1,SPRITE X(current_tile_to_save)
WRITE LONG 1,SPRITE Y(current_tile_to_save)
WRITE LONG 1,SPRITE IMAGE(current_tile_to_save)
ENDIF
NEXT current_tile_to_save
CLOSE FILE 1
ENDIF
rem return from save file
RETURN
REM *************************
REM *****LOAD SPRITES********
REM *************************
load_sprites:
rem ******************************
rem *****get lowest tile**********
rem ******************************
rem ******************************
rem ******get bottom tiles********
rem ******************************
rem get test piece
LOAD BITMAP "bmp\tiles\tile7.bmp",1
GET IMAGE 200,0,0,16,16
SPRITE 200,-50,-50,200
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\tiles\tile6.bmp",1
GET IMAGE 201,0,0,16,16
SPRITE 201,-50,-50,201
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\tiles\tile2.bmp",1
GET IMAGE 202,0,0,16,16
SPRITE 202,-50,-50,202
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\tiles\tile8.bmp",1
GET IMAGE 203,0,0,16,16
SPRITE 203,-50,-50,203
DELETE BITMAP 1
rem SET SPRITE PRIORITY 302,1
rem get test piece
LOAD BITMAP "bmp\tiles\tile1.bmp",1
GET IMAGE 204,0,0,16,16
SPRITE 204,-50,-50,204
DELETE BITMAP 1
rem SET SPRITE PRIORITY 301,1
rem get test piece
LOAD BITMAP "bmp\tiles\tile3.bmp",1
GET IMAGE 205,0,0,16,16
SPRITE 205,-50,-50,205
DELETE BITMAP 1
rem SET SPRITE PRIORITY 309,1
rem get test piece
LOAD BITMAP "bmp\tiles\grass1.bmp",1
GET IMAGE 206,0,0,16,16
SPRITE 206,-50,-50,206
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\tiles\sand1.bmp",1
GET IMAGE 207,0,0,16,16
SPRITE 207,-50,-50,207
DELETE BITMAP 1
rem ******************************
rem ******get middle tiles********
rem ******************************
rem get test piece (doors 5000-5300)
LOAD BITMAP "bmp\doors\door1.bmp",1
GET IMAGE 208,0,0,16,16
SPRITE 208,-50,-50,208
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\lamps\lamp1.bmp",1
GET IMAGE 209,0,0,16,16
SPRITE 209,-50,-50,209
DELETE BITMAP 1
rem get test piece (furniture 6000-7000)
LOAD BITMAP "bmp\furniture\chair1.bmp",1
GET IMAGE 210,0,0,16,16
SPRITE 210,-50,-50,210
DELETE BITMAP 1
rem get test piece (furniture 6000-7000)
LOAD BITMAP "bmp\furniture\table1.bmp",1
GET IMAGE 211,0,0,16,16
SPRITE 211,-50,-50,211
DELETE BITMAP 1
rem get test piece (doors 5000-5300)
LOAD BITMAP "bmp\doors\door2.bmp",1
GET IMAGE 212,0,0,16,16
SPRITE 212,-50,-50,212
DELETE BITMAP 1
LOAD BITMAP "bmp\corpses\corpse1.bmp",1
GET IMAGE 213,0,0,16,16
SPRITE 213,-50,-50,213
DELETE BITMAP 1
rem get test piece (doors 5000-5300)
LOAD BITMAP "bmp\doors\door3.bmp",1
GET IMAGE 214,0,0,16,16
SPRITE 214,-50,-50,214
DELETE BITMAP 1
rem get test piece (doors 5000-5300)
LOAD BITMAP "bmp\player\player1-lightsabre.bmp",1
GET IMAGE 215,0,0,16,16
SPRITE 215,-50,-50,215
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\monsters\mummy1.bmp",1
GET IMAGE 216,0,0,16,16
SPRITE 216,-50,-50,216
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\furniture\sarkofag-part1.bmp",1
GET IMAGE 217,0,0,16,16
SPRITE 217,-50,-50,217
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\furniture\sarkofag-part2.bmp",1
GET IMAGE 218,0,0,16,16
SPRITE 218,-50,-50,218
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\furniture\grave1.bmp",1
GET IMAGE 219,0,0,16,16
SPRITE 219,-50,-50,219
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\monsters\skeleton1.bmp",1
GET IMAGE 220,0,0,16,16
SPRITE 220,-50,-50,220
DELETE BITMAP 1
rem get cursor
LOAD BITMAP "bmp\monsters\skeleton2.bmp",1
GET IMAGE 221,0,0,16,16
SPRITE 221,-50,-50,221
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\trees\tree1.bmp",1
GET IMAGE 222,0,0,16,16
SPRITE 222,-50,-50,222
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\trees\tree2.bmp",1
GET IMAGE 223,0,0,16,16
SPRITE 223,-50,-50,223
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\trees\tree3.bmp",1
GET IMAGE 224,0,0,16,16
SPRITE 224,-50,-50,224
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\furniture\grave2.bmp",1
GET IMAGE 225,0,0,16,16
SPRITE 225,-50,-50,225
DELETE BITMAP 1
rem get test piece
LOAD BITMAP "bmp\monsters\cyborg1.bmp",1
GET IMAGE 226,0,0,16,16
SPRITE 226,-50,-50,226
DELETE BITMAP 1
rem active piece
active_piece = 200
rem ******************************
rem *******get top tiles**********
rem ******************************
rem get cursor
LOAD BITMAP "editor\cursor.bmp",1
GET IMAGE 1,4,4,12,12
SPRITE 1,160,112,1
DELETE BITMAP 1
SET SPRITE PRIORITY 1,4
rem set sprite priority 1,1
OFFSET SPRITE 1,-4,-4
REM *****return from load_sprites*******
RETURN
and it gets very slow when I have a lot of tiles (sprites), I think it is because I move them all at one time.