@@ -119,6 +119,9 @@ export function createMascotGame(): Game {
119119 const TRANSITION_LONG = 56 ;
120120 const PIPE_DESCENT_FRAMES = 62 ;
121121 const PIPE_SCENE_TRANSITION_FRAMES = PIPE_DESCENT_FRAMES * 2 ;
122+ const VOID_COMMENT_SPEED = 0.18 ;
123+ const VOID_COMMENT_SPACING = 86 ;
124+ const VOID_COMMENT_LANES = [ 60 , 72 , 84 ] as const ;
122125
123126 const sound = ( name : string ) => {
124127 ( window as Window & { __missionSound ?: MissionSoundBridge } ) . __missionSound ?. play ?.( name ) ;
@@ -1400,6 +1403,47 @@ export function createMascotGame(): Game {
14001403 }
14011404 }
14021405 const textW = ( str : string , s : number ) => str . length * 4 * s - s ;
1406+ type VoidComment = {
1407+ slot : number ;
1408+ text : string ;
1409+ x : number ;
1410+ y : number ;
1411+ color : string ;
1412+ } ;
1413+ const voidCommentPool = ( ) => [ ...miniGame . voidSignLines , ...miniGame . voidComments ] ;
1414+ function visibleVoidComments ( ) : VoidComment [ ] {
1415+ const comments : readonly string [ ] = voidCommentPool ( ) ;
1416+ if ( comments . length === 0 ) return [ ] ;
1417+ const trackW = Math . max ( VIEW_W + 180 , comments . length * VOID_COMMENT_SPACING ) ;
1418+ const travel = voidT * VOID_COMMENT_SPEED ;
1419+ const items : VoidComment [ ] = [ ] ;
1420+ const colors = [ C . subs , C . mobile , C . rent , C . electric , C . tax , C . water , C . fees , C . life ] ;
1421+
1422+ for ( let slot = 0 ; slot < comments . length ; slot ++ ) {
1423+ const text = comments [ ( slot * 11 + 5 ) % comments . length ] ;
1424+ const width = textW ( text , 1 ) + 8 ;
1425+ const raw = ( slot * VOID_COMMENT_SPACING - travel ) % trackW ;
1426+ const x = ( ( raw + trackW ) % trackW ) - 80 ;
1427+ if ( x < 4 || x + width > VIEW_W - 4 ) continue ;
1428+
1429+ items . push ( {
1430+ slot,
1431+ text,
1432+ x,
1433+ y : VOID_COMMENT_LANES [ ( slot * 5 + 1 ) % VOID_COMMENT_LANES . length ] ,
1434+ color : colors [ ( slot * 7 + 3 ) % colors . length ] ,
1435+ } ) ;
1436+ }
1437+
1438+ return items ;
1439+ }
1440+ function drawVoidComment ( comment : VoidComment ) {
1441+ const w = textW ( comment . text , 1 ) + 8 ;
1442+ const wx = camX + comment . x ;
1443+ block ( wx - 4 , comment . y - 4 , w , 13 , C . sign ) ;
1444+ block ( wx - 4 , comment . y - 4 , w , 1 , comment . color ) ;
1445+ text ( comment . text , wx , comment . y - 2 , 1 , C . starHi ) ;
1446+ }
14031447 function drawPixelMask ( x : number , y : number , rows : string [ ] , color : string ) {
14041448 for ( let r = 0 ; r < rows . length ; r ++ )
14051449 for ( let c = 0 ; c < rows [ r ] . length ; c ++ )
@@ -1821,15 +1865,7 @@ export function createMascotGame(): Game {
18211865 block ( x , VOID_GROUND + 3 , TILE , 2 , C . sign ) ;
18221866 }
18231867
1824- const signColors = [ C . subs , C . mobile , C . rent , C . electric , C . tax , C . water , C . fees , C . life ] ;
1825- miniGame . voidSignLines . forEach ( ( line , i ) => {
1826- const wx = 120 + i * 220 ;
1827- const y = 58 + ( i % 2 ) * 20 ;
1828- const w = textW ( line , 1 ) + 8 ;
1829- block ( wx - 4 , y - 4 , w , 13 , C . sign ) ;
1830- block ( wx - 4 , y - 4 , w , 1 , signColors [ i % signColors . length ] ) ;
1831- text ( line , wx , y - 2 , 1 , C . starHi ) ;
1832- } ) ;
1868+ for ( const comment of visibleVoidComments ( ) ) drawVoidComment ( comment ) ;
18331869
18341870 text ( miniGame . voidTitle , camX + 12 , 14 , 2 , C . rent ) ;
18351871 text ( miniGame . voidSubtitle . toUpperCase ( ) , camX + 12 , 34 , 1 , C . mobile ) ;
@@ -2389,6 +2425,14 @@ export function createMascotGame(): Game {
23892425 voidWarning : miniGame . voidWarning ,
23902426 voidSignLines : [ ...miniGame . voidSignLines ] ,
23912427 voidPressureBursts : [ ...miniGame . voidPressureBursts ] ,
2428+ voidCommentsCount : voidCommentPool ( ) . length ,
2429+ voidCommentSpeed : VOID_COMMENT_SPEED ,
2430+ visibleVoidComments : visibleVoidComments ( ) . map ( ( comment ) => ( {
2431+ slot : comment . slot ,
2432+ text : comment . text ,
2433+ x : Math . round ( comment . x ) ,
2434+ y : comment . y ,
2435+ } ) ) ,
23922436 voidSeconds : voidSeconds ( ) ,
23932437 voidDragonX : Math . round ( voidDragon . x ) ,
23942438 voidGap : Math . round ( voidGap ( ) ) ,
0 commit comments