Post by ramon on Jul 22, 2021 2:17:55 GMT
1) You can modify the sprite limit so that the AGD engine paints them on screen at the same time. This slows down the game. 12 is the optimal number of sprites that can appear at the same time to get a smooth movement of all things.
To do this, modify the following code in the EngineZX.asm which is in the AGD folder inside the SuiteZX.
Look for the Sprites section at the beginning of the program:
; Sprites.
NUMSPR equ 12 ; number of sprites.
TABSIZ equ 17 ; size of each entry.
SPRBUF equ NUMSPR * TABSIZ ; size of entire table.
NMESIZ equ 4 ; bytes stored in nmetab for each sprite.
X equ 8 ; new x coordinate of sprite.
Y equ X + 1 ; new y coordinate of sprite.
PAM1ST equ 5 ; first sprite parameter, old x (ix+5).
Add two more options, if you want to select them uncomment the option making sure to leave the other two commented. it can be like this:
; Sprites.
NUMSPR equ 12 ; number of sprites.
;NUMSPR equ 24 ; SPACE INVADERS number of sprites.
;NUMSPR equ 48 ; METEORITOS number of sprites.
TABSIZ equ 17 ; size of each entry.
SPRBUF equ NUMSPR * TABSIZ ; size of entire table.
NMESIZ equ 4 ; bytes stored in nmetab for each sprite.
X equ 8 ; new x coordinate of sprite.
Y equ X + 1 ; new y coordinate of sprite.
PAM1ST equ 5 ; first sprite parameter, old x (ix+5).
2) Now, at the end of the program, look for the section block NUMSPR * TABSIZ, 255
; block NUMSPR * TABSIZ,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ssprit defb 255,255,255,255,255,255,255,0,192,120,0,0,0,255,255,255,255
roomtb defb 34 ; room number.
Change the entire section to look like this:
; block NUMSPR * TABSIZ,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
; extra 12+ sprites modificación para SPACE INVADERS
IF NUMSPR = 24
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ENDIF
; extra 36+ sprites modificación para METEORITOS
IF NUMSPR = 48
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ENDIF
ssprit defb 255,255,255,255,255,255,255,0,192,120,0,0,0,255,255,255,255
roomtb defb 34 ; room number.
This is all.
You will lose speed in the flow of your game but you will win some more enemy or some more bullet in the sky
To do this, modify the following code in the EngineZX.asm which is in the AGD folder inside the SuiteZX.
Look for the Sprites section at the beginning of the program:
; Sprites.
NUMSPR equ 12 ; number of sprites.
TABSIZ equ 17 ; size of each entry.
SPRBUF equ NUMSPR * TABSIZ ; size of entire table.
NMESIZ equ 4 ; bytes stored in nmetab for each sprite.
X equ 8 ; new x coordinate of sprite.
Y equ X + 1 ; new y coordinate of sprite.
PAM1ST equ 5 ; first sprite parameter, old x (ix+5).
Add two more options, if you want to select them uncomment the option making sure to leave the other two commented. it can be like this:
; Sprites.
NUMSPR equ 12 ; number of sprites.
;NUMSPR equ 24 ; SPACE INVADERS number of sprites.
;NUMSPR equ 48 ; METEORITOS number of sprites.
TABSIZ equ 17 ; size of each entry.
SPRBUF equ NUMSPR * TABSIZ ; size of entire table.
NMESIZ equ 4 ; bytes stored in nmetab for each sprite.
X equ 8 ; new x coordinate of sprite.
Y equ X + 1 ; new y coordinate of sprite.
PAM1ST equ 5 ; first sprite parameter, old x (ix+5).
2) Now, at the end of the program, look for the section block NUMSPR * TABSIZ, 255
; block NUMSPR * TABSIZ,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ssprit defb 255,255,255,255,255,255,255,0,192,120,0,0,0,255,255,255,255
roomtb defb 34 ; room number.
Change the entire section to look like this:
; block NUMSPR * TABSIZ,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
; extra 12+ sprites modificación para SPACE INVADERS
IF NUMSPR = 24
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ENDIF
; extra 36+ sprites modificación para METEORITOS
IF NUMSPR = 48
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
ENDIF
ssprit defb 255,255,255,255,255,255,255,0,192,120,0,0,0,255,255,255,255
roomtb defb 34 ; room number.
This is all.
You will lose speed in the flow of your game but you will win some more enemy or some more bullet in the sky