From 6f733bc069849312db075df4da5348d4de87a43e Mon Sep 17 00:00:00 2001 From: Chris Weed Date: Sat, 13 Jul 2024 09:45:22 -0500 Subject: [PATCH] Dirt speckles --- images.g.jres | 14 +++++++------- images.g.ts | 6 +++--- island.ts | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/images.g.jres b/images.g.jres index 566c4b3..9cb15d7 100644 --- a/images.g.jres +++ b/images.g.jres @@ -106,20 +106,20 @@ "data": "NjQwMDEwMDAxMDAwMGMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBhMGFhMDAwMDAwMDAwMDAwYWE1YTA1MDAwMDAwMDAwMGFhYWFhYTBhMDAwMDAwMDBlZWRkZGQwZTAwMDAwMDAwZGRmZGZkMDAwMDAwMDAwMGRkZGRkYjAwMDAwMDAwMDBkMGRkMGQwMDAwMDAwMGEwYWFhYWFhMGEwMDAwMDBhYWFjYWFjYTBhMDAwMDAwMGFhYWFhYWEwYTAwMDAwMGRhZWVlZWVlZWUwZTAwMDBkZGZiZmZlZTBkMDAwMDAwZTAwZTAwYzAwYzAwMDAwMGYwZmYwMGYwZmYwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMGEwYWEwMDAwMDAwMDAwMDBhYTVhMDUwMDAwMDAwMDAwYWFhYWFhMGEwMDAwMDAwMGVlZGRkZDBlMDAwMDAwMDBkZGZkZmQwMDAwMDAwMDAwZGRkZGRiMDAwMDAwMDBhMGRhZGRhZDBhMDAwMDAwYWFhY2FhY2EwYTAwMDAwMGRhZWVlZWVlZWUwZTAwMDBkZGZiZmZlZTBkMDAwMDAwZTBlZTAwY2MwYzAwMDAwMGUwMGUwMGMwMGMwMDAwMDBmMGZmMDBmMGZmMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBhMG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BhYTVhMDUwMDAwMDAwMDAwYWFhYWFhMGEwMDAwMDAwMGVlZGRkZDBlMDAwMDAwMDBkZGZkZmQwMDAwMDAwMDAwZGRkZGRiMDAwMDAwMDAwMGQwZGQwZDAwMDAwMDAwYTBhYWFhYWEwYTAwMDAwMGFhYWNhYWNhMGEwMDAwMDAwYWFhYWFhYTBhMDAwMDAwZGFlZWVlZWVlZTBlMDAwMGRkZmJmZmVlMGQwMDAwMDBlMDBlMDBjMDBjMDAwMDAwZjBmZjAwZjBmZjAwMDAwMA==", "displayName": "Militia Shoot" }, - "song3": { - "data": "0032000408020306001c00010a006400f401640000040000000000000000000000000000000002300000002000012420002400012424002800012228002c0001202c003000011e30003400011d34003800011b38004000011907001c00020a006400f4016400000400000000000000000000000000000000035a0000000400012404000800012208000c0001200c001000012210001400012414001800012518001c0001241c002000012220002400012024002800012228002c0001242c003000012530003800012438003c0001203c004000011d08001c000e050046006603320000040a002d00000064001400010000020000022a0000000400012404000800012208000c0001200c001000011e10001400011d14001800011b18002c000119", - "mimeType": "application/mkcd-song", - "displayName": "Game Over", - "namespace": "mySongs." - }, "song1": { "data": "0078000408050206001c00010a006400f401640000040000000000000000000000000000000002d20000000400012a04000800012908000c00012a0c001000012c10001400012a14001800012918001c00012a1c002000012c20002800012a28002c0001272c003000012930003400012a34003800012738003c0001293c004000012540004400012a44004800012c48004c00012a4c005000012950005400012a54005800012c58005c00012a5c006000012960006400012a64006800012c68007000012a70007400012c74007800012a78007c0001277c008000012c80008400012a84008800012c88008c00012a8c00900001299000a000012707001c00020a006400f401640000040000000000000000000000000000000003f00000000400012204000800012208000c0001220c001000011b10001400011d14001800012218001c0001221c002000012220002400011b24002800011d28002c0001222c003000012230003400012234003800011b38003c00011d3c004000012240004400012244004800012248004c00011b4c005000011d50005400011954005800011958005c0001195c006000011d60006400011e64006800011968006c0001196c007000011970007400011d74007800011e78007c0001197c008000011980008400011984008800011d88008c00011e8c009000012490009400012494009800012498009c0001259c00a0000127", "mimeType": "application/mkcd-song", "displayName": "mySong", "namespace": "mySongs." }, + "song3": { + "data": "0032000408020306001c00010a006400f401640000040000000000000000000000000000000002300000002000012420002400012424002800012228002c0001202c003000011e30003400011d34003800011b38004000011907001c00020a006400f4016400000400000000000000000000000000000000035a0000000400012404000800012208000c0001200c001000012210001400012414001800012518001c0001241c002000012220002400012024002800012228002c0001242c003000012530003800012438003c0001203c004000011d08001c000e050046006603320000040a002d00000064001400013200020100022a0000000400012404000800012208000c0001200c001000011e10001400011d14001800011b18002c000119", + "mimeType": "application/mkcd-song", + "displayName": "Game Over", + "namespace": "mySongs." + }, "song2": { - "data": "0078000408050400001c00010a006400f40164000004000000000000000000000000000500000494000000040002192504000c000219250c001000021b2710002000031d20292000240002192524002c000219252c003000021b2730004000021d294000440002192544004c000219254c005000021b2750006000021d296000640002192564006c000219256c007000021b2770008000021d298000880002192588008c000218248c009400021b27940098000219259800a00002192503001c0001dc00690000045e01000400000000000000000000050000010000031c0018002000021d2938004000021d2958006000021d2978008000021d2906001c00010a006400f401640000040000000000000000000000000000000002ea0000000400011d04000800012408000c00011d0c001000012410001400011d14001800012418001c00011d1c002000012420002400012024002800012728002c0001202c003000012730003400012034003800012738003c0001203c004000012740004400011d44004800012448004c00011d4c005000012450005400011d54005800012458005c00011d5c006000012460006400012064006800012768006c0001206c007000012770007400012074007800012778007c0001207c008000012780008400011d84008800012488008c00011d8c009000012490009400011d94009800012498009c00011d09010e02026400000403780000040a000301000000640001c80000040100000000640001640000040100000000fa0004af00000401c80000040a00019600000414000501006400140005010000002c0104dc00000401fa0000040a0001c8000004140005d0076400140005d0070000c800029001f40105c201f4010a0005900114001400039001000005c201f4010500058403050032000584030000fa00049001000005c201f4010500058403c80032000584030500640005840300009001049001000005c201f4010500058403c80064000584030500c8000584030000f40105ac0d000404a00f00000a0004ac0d2003010004a00f0000280004ac0d9001010004a00f0000280002d00700040408070f0064000408070000c80003c800c8000e7d00c80019000e64000f0032000e78000000fa00032c01c8000ee100c80019000ec8000f0032000edc000000fa0003f401c8000ea901c80019000e90010f0032000ea4010000fa0001c8000004014b000000c800012c01000401c8000000c8000190010004012c010000c80002c800000404c8000f0064000496000000c80002c2010004045e010f006400042c010000640002c409000404c4096400960004f6090000f40102b80b000404b80b64002c0104f40b0000f401022003000004200300040a000420030000ea01029001000004900100040a000490010000900102d007000410d0076400960010d0070000c8007800000001000104080009000106100011000104180019000106200021000104280029000106300031000104380039000106400041000104480049000106500051000104580059000106600061000104680069000106700071000104780079000106800081000104880089000106900091000104980099000106", + "data": "0078000408050400001c00010a006400f40164000004000000000000000000000000000500000486000000040002192504000c000219250c001000021b2710002000031d20292000240002192524002c000219252c003000021b2730004000021d294000440002192544004c000219254c005000021b2750006000021d296000640002192564006c000219256c007000021b2770008000021d298000880002192588008c000218248c009400021b2703001c0001dc00690000045e01000400000000000000000000056400010400031c0018002000021d2938004000021d2958006000021d2978008000021d2906001c00010a006400f401640000040000000000000000000000000000000002f00000000400011d04000800012408000c00011d0c001000012410001400011d14001800012418001c00011d1c002000012420002400012024002800012728002c0001202c003000012730003400012034003800012738003c0001203c004000012740004400011d44004800012448004c00011d4c005000012450005400011d54005800012458005c00011d5c006000012460006400012064006800012768006c0001206c007000012770007400012074007800012778007c0001207c008000012780008400011d84008800012488008c00011d8c009000012490009400011d94009800012498009c00011d9c00a000012409010e02026400000403780000040a000301000000640001c80000040100000000640001640000040100000000fa0004af00000401c80000040a00019600000414000501006400140005010000002c0104dc00000401fa0000040a0001c8000004140005d0076400140005d0070000c800029001f40105c201f4010a0005900114001400039001000005c201f4010500058403050032000584030000fa00049001000005c201f4010500058403c80032000584030500640005840300009001049001000005c201f4010500058403c80064000584030500c8000584030000f40105ac0d000404a00f00000a0004ac0d2003010004a00f0000280004ac0d9001010004a00f0000280002d00700040408070f0064000408070000c80003c800c8000e7d00c80019000e64000f0032000e78000000fa00032c01c8000ee100c80019000ec8000f0032000edc000000fa0003f401c8000ea901c80019000e90010f0032000ea4010000fa0001c8000004014b000000c800012c01000401c8000000c8000190010004012c010000c80002c800000404c8000f0064000496000000c80002c2010004045e010f006400042c010000640002c409000404c4096400960004f6090000f40102b80b000404b80b64002c0104f40b0000f401022003000004200300040a000420030000ea01029001000004900100040a000490010000900102d007000410d0076400960010d0070000c8007800000001000104080009000106100011000104180019000106200021000104280029000106300031000104380039000106400041000104480049000106500051000104580059000106600061000104680069000106700071000104780079000106800081000104880089000106900091000104980099000106", "mimeType": "application/mkcd-song", "displayName": "We Boat", "namespace": "mySongs." diff --git a/images.g.ts b/images.g.ts index bed4f2d..995760c 100644 --- a/images.g.ts +++ b/images.g.ts @@ -1161,12 +1161,12 @@ d d b f f f e e d . . . . . . . helpers._registerFactory("song", function(name: string) { switch(helpers.stringTrim(name)) { - case "song3": - case "Game Over":return hex`0032000408020306001c00010a006400f401640000040000000000000000000000000000000002300000002000012420002400012424002800012228002c0001202c003000011e30003400011d34003800011b38004000011907001c00020a006400f4016400000400000000000000000000000000000000035a0000000400012404000800012208000c0001200c001000012210001400012414001800012518001c0001241c002000012220002400012024002800012228002c0001242c003000012530003800012438003c0001203c004000011d08001c000e050046006603320000040a002d00000064001400010000020000022a0000000400012404000800012208000c0001200c001000011e10001400011d14001800011b18002c000119`; case "song1": case "mySong":return hex`0078000408050206001c00010a006400f401640000040000000000000000000000000000000002d20000000400012a04000800012908000c00012a0c001000012c10001400012a14001800012918001c00012a1c002000012c20002800012a28002c0001272c003000012930003400012a34003800012738003c0001293c004000012540004400012a44004800012c48004c00012a4c005000012950005400012a54005800012c58005c00012a5c006000012960006400012a64006800012c68007000012a70007400012c74007800012a78007c0001277c008000012c80008400012a84008800012c88008c00012a8c00900001299000a000012707001c00020a006400f401640000040000000000000000000000000000000003f00000000400012204000800012208000c0001220c001000011b10001400011d14001800012218001c0001221c002000012220002400011b24002800011d28002c0001222c003000012230003400012234003800011b38003c00011d3c004000012240004400012244004800012248004c00011b4c005000011d50005400011954005800011958005c0001195c006000011d60006400011e64006800011968006c0001196c007000011970007400011d74007800011e78007c0001197c008000011980008400011984008800011d88008c00011e8c009000012490009400012494009800012498009c0001259c00a0000127`; + case "song3": + case "Game Over":return hex`0032000408020306001c00010a006400f401640000040000000000000000000000000000000002300000002000012420002400012424002800012228002c0001202c003000011e30003400011d34003800011b38004000011907001c00020a006400f4016400000400000000000000000000000000000000035a0000000400012404000800012208000c0001200c001000012210001400012414001800012518001c0001241c002000012220002400012024002800012228002c0001242c003000012530003800012438003c0001203c004000011d08001c000e050046006603320000040a002d00000064001400013200020100022a0000000400012404000800012208000c0001200c001000011e10001400011d14001800011b18002c000119`; case "song2": - case "We Boat":return hex`0078000408050400001c00010a006400f40164000004000000000000000000000000000500000494000000040002192504000c000219250c001000021b2710002000031d20292000240002192524002c000219252c003000021b2730004000021d294000440002192544004c000219254c005000021b2750006000021d296000640002192564006c000219256c007000021b2770008000021d298000880002192588008c000218248c009400021b27940098000219259800a00002192503001c0001dc00690000045e01000400000000000000000000050000010000031c0018002000021d2938004000021d2958006000021d2978008000021d2906001c00010a006400f401640000040000000000000000000000000000000002ea0000000400011d04000800012408000c00011d0c001000012410001400011d14001800012418001c00011d1c002000012420002400012024002800012728002c0001202c003000012730003400012034003800012738003c0001203c004000012740004400011d44004800012448004c00011d4c005000012450005400011d54005800012458005c00011d5c006000012460006400012064006800012768006c0001206c007000012770007400012074007800012778007c0001207c008000012780008400011d84008800012488008c00011d8c009000012490009400011d94009800012498009c00011d09010e02026400000403780000040a000301000000640001c80000040100000000640001640000040100000000fa0004af00000401c80000040a00019600000414000501006400140005010000002c0104dc00000401fa0000040a0001c8000004140005d0076400140005d0070000c800029001f40105c201f4010a0005900114001400039001000005c201f4010500058403050032000584030000fa00049001000005c201f4010500058403c80032000584030500640005840300009001049001000005c201f4010500058403c80064000584030500c8000584030000f40105ac0d000404a00f00000a0004ac0d2003010004a00f0000280004ac0d9001010004a00f0000280002d00700040408070f0064000408070000c80003c800c8000e7d00c80019000e64000f0032000e78000000fa00032c01c8000ee100c80019000ec8000f0032000edc000000fa0003f401c8000ea901c80019000e90010f0032000ea4010000fa0001c8000004014b000000c800012c01000401c8000000c8000190010004012c010000c80002c800000404c8000f0064000496000000c80002c2010004045e010f006400042c010000640002c409000404c4096400960004f6090000f40102b80b000404b80b64002c0104f40b0000f401022003000004200300040a000420030000ea01029001000004900100040a000490010000900102d007000410d0076400960010d0070000c8007800000001000104080009000106100011000104180019000106200021000104280029000106300031000104380039000106400041000104480049000106500051000104580059000106600061000104680069000106700071000104780079000106800081000104880089000106900091000104980099000106`; + case "We Boat":return hex`0078000408050400001c00010a006400f40164000004000000000000000000000000000500000486000000040002192504000c000219250c001000021b2710002000031d20292000240002192524002c000219252c003000021b2730004000021d294000440002192544004c000219254c005000021b2750006000021d296000640002192564006c000219256c007000021b2770008000021d298000880002192588008c000218248c009400021b2703001c0001dc00690000045e01000400000000000000000000056400010400031c0018002000021d2938004000021d2958006000021d2978008000021d2906001c00010a006400f401640000040000000000000000000000000000000002f00000000400011d04000800012408000c00011d0c001000012410001400011d14001800012418001c00011d1c002000012420002400012024002800012728002c0001202c003000012730003400012034003800012738003c0001203c004000012740004400011d44004800012448004c00011d4c005000012450005400011d54005800012458005c00011d5c006000012460006400012064006800012768006c0001206c007000012770007400012074007800012778007c0001207c008000012780008400011d84008800012488008c00011d8c009000012490009400011d94009800012498009c00011d9c00a000012409010e02026400000403780000040a000301000000640001c80000040100000000640001640000040100000000fa0004af00000401c80000040a00019600000414000501006400140005010000002c0104dc00000401fa0000040a0001c8000004140005d0076400140005d0070000c800029001f40105c201f4010a0005900114001400039001000005c201f4010500058403050032000584030000fa00049001000005c201f4010500058403c80032000584030500640005840300009001049001000005c201f4010500058403c80064000584030500c8000584030000f40105ac0d000404a00f00000a0004ac0d2003010004a00f0000280004ac0d9001010004a00f0000280002d00700040408070f0064000408070000c80003c800c8000e7d00c80019000e64000f0032000e78000000fa00032c01c8000ee100c80019000ec8000f0032000edc000000fa0003f401c8000ea901c80019000e90010f0032000ea4010000fa0001c8000004014b000000c800012c01000401c8000000c8000190010004012c010000c80002c800000404c8000f0064000496000000c80002c2010004045e010f006400042c010000640002c409000404c4096400960004f6090000f40102b80b000404b80b64002c0104f40b0000f401022003000004200300040a000420030000ea01029001000004900100040a000490010000900102d007000410d0076400960010d0070000c8007800000001000104080009000106100011000104180019000106200021000104280029000106300031000104380039000106400041000104480049000106500051000104580059000106600061000104680069000106700071000104780079000106800081000104880089000106900091000104980099000106`; } return null; }) diff --git a/island.ts b/island.ts index aa28187..60f7864 100644 --- a/island.ts +++ b/island.ts @@ -11,6 +11,7 @@ namespace Island { let _boundingBox: number[] = [0, 60, 160, 120] let _island: Map.Island let _onLeaveIsland: () => void + let _dirtSpeckles: Sprite[] = [] function onPirateAttack({ pirate, direction }: { pirate: Pirate, direction: 'left' | 'right' }) { const dirPix = direction === 'left' ? -1 : 1 @@ -75,9 +76,27 @@ namespace Island { currentSegment++ // Move the background image 160px left + drawBackground() placeEnemies() } + function drawBackground() { + // Clear any exisitng speckles + _dirtSpeckles.forEach((speckle: Sprite) => { + speckle.destroy() + }) + + Utils.getArrayOfLength(20).forEach(() => { + const speckle = image.create(4, 4) + speckle.drawLine(0, 0, 1, 1, 6) + const sprite = sprites.create(speckle) + sprite.x = Math.randomRange(10, 140) + sprite.y = Math.randomRange(80, 110) + + _dirtSpeckles.push(sprite) + }) + } + function placeEnemies() { // The number of enemies is based on the risk level of the island // Start most enemies a bit from the left (avoiding starting ON the players) @@ -107,6 +126,7 @@ namespace Island { player1 = new Pirate({ control: controller.player1, playerNumber: 0, onAttack: onPirateAttack }) player2 = new Pirate({ control: controller.player2, playerNumber: 1, onAttack: onPirateAttack }) + drawBackground() // Baddies placeEnemies()