mirror of
https://github.com/stevenhowes/TheEscape.git
synced 2026-05-27 00:03:25 +01:00
Lightened up enemy sprite, enemy hitboxes and debug de-twitching
This commit is contained in:
Binary file not shown.
@@ -15,20 +15,27 @@ DEF PROC_main
|
|||||||
PlayerVelocity%=0
|
PlayerVelocity%=0
|
||||||
PlayerShields%=100
|
PlayerShields%=100
|
||||||
PlayerStructuralIntegrity%=100
|
PlayerStructuralIntegrity%=100
|
||||||
|
|
||||||
DIM PlayerHitbox%(3)
|
DIM PlayerHitbox%(3)
|
||||||
PlayerHitbox%() = 0,0,60,81
|
PlayerHitbox%() = 0,0,60,81
|
||||||
|
|
||||||
|
DIM EnemyHitbox%(0,3)
|
||||||
|
EnemyHitbox%() = 0,0,48,74
|
||||||
|
|
||||||
XMovePerCent%=5
|
XMovePerCent%=5
|
||||||
ResetShipSprite% = 0
|
ResetShipSprite% = 0
|
||||||
|
|
||||||
MaxEnemies% = 4
|
MaxEnemies% = 4
|
||||||
DIM EnemyLocations%(MaxEnemies% - 1,1)
|
DIM EnemyLocations%(MaxEnemies% - 1,1)
|
||||||
DIM EnemySprites$(MaxEnemies% - 1)
|
DIM EnemySprites$(MaxEnemies% - 1)
|
||||||
|
DIM EnemyHitboxID%(MaxEnemies% - 1)
|
||||||
|
|
||||||
REM Random it up for now
|
REM Random it up for now
|
||||||
FOR Enemy%=0 TO MaxEnemies% - 1
|
FOR Enemy%=0 TO MaxEnemies% - 1
|
||||||
EnemyLocations%(Enemy%,0) = RND(SCREENGFXWIDTH%)
|
EnemyLocations%(Enemy%,0) = RND(SCREENGFXWIDTH%)
|
||||||
EnemyLocations%(Enemy%,1) = SCREENGFXHEIGHT% + (RND(SCREENGFXHEIGHT%/2) * (Enemy% + 1))
|
EnemyLocations%(Enemy%,1) = SCREENGFXHEIGHT% + (RND(SCREENGFXHEIGHT%/2) * (Enemy% + 1))
|
||||||
EnemySprites$(Enemy%) = "durno_ship"
|
EnemySprites$(Enemy%) = "durno_ship"
|
||||||
|
EnemyHitboxID%(Enemy%) = 0
|
||||||
NEXT Enemy%
|
NEXT Enemy%
|
||||||
|
|
||||||
REM Show/hide debug display
|
REM Show/hide debug display
|
||||||
@@ -158,7 +165,7 @@ DEF PROCinputs
|
|||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
IF INKEY(-17) THEN
|
IF INKEY(-17) THEN
|
||||||
IF DebugOut% = 1 THEN DebugOut% = 0 ELSE DebugOut% = 1
|
IF DebugOut% = 0 THEN DebugOut% = 1
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
@@ -172,6 +179,11 @@ DEF PROCdebugoutput
|
|||||||
PRINT "ENEMY:" STR$(Enemy%) + " " + STR$(EnemyLocations%(Enemy%,0)) + "," + STR$(EnemyLocations%(Enemy%,1))
|
PRINT "ENEMY:" STR$(Enemy%) + " " + STR$(EnemyLocations%(Enemy%,0)) + "," + STR$(EnemyLocations%(Enemy%,1))
|
||||||
NEXT Enemy%
|
NEXT Enemy%
|
||||||
|
|
||||||
|
|
||||||
|
FOR Enemy%=0 TO MaxEnemies% - 1
|
||||||
|
RECT EnemyLocations%(Enemy%,0) + EnemyHitbox%(EnemyHitboxID%(Enemy%),0), EnemyLocations%(Enemy%,1) + EnemyHitbox%(EnemyHitboxID%(Enemy%),1), EnemyHitbox%(EnemyHitboxID%(Enemy%),2), EnemyHitbox%(EnemyHitboxID%(Enemy%),3)
|
||||||
|
NEXT Enemy%
|
||||||
|
|
||||||
RECT PlayerLocation%(0) + PlayerHitbox%(0), PlayerLocation%(1) + PlayerHitbox%(1), PlayerHitbox%(2), PlayerHitbox%(3)
|
RECT PlayerLocation%(0) + PlayerHitbox%(0), PlayerLocation%(1) + PlayerHitbox%(1), PlayerHitbox%(2), PlayerHitbox%(3)
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user