From: Svjatoslav Agejenko Date: Fri, 22 Aug 2025 19:45:10 +0000 (+0300) Subject: Move Pomppu Paavo to own directory X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=50710131333928878545b3951427c60c0917d772;p=qbasicapps.git Move Pomppu Paavo to own directory --- diff --git a/2D GFX/Fractals/index.html b/2D GFX/Fractals/index.html index 038a6d0..cd95ce4 100644 --- a/2D GFX/Fractals/index.html +++ b/2D GFX/Fractals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Fractals @@ -210,11 +210,11 @@

Table of Contents

@@ -236,8 +236,8 @@ -
-

1. Fractal circles

+
+

1. Fractal circles

This QBasic program generates a visually captivating spiral fractal @@ -247,7 +247,7 @@ geometry, recursive programming, and graphical design.

-
+

fractal%20circles.png

@@ -266,8 +266,8 @@ indefinitely.
-
-

2. Fractal circles animated

+
+

2. Fractal circles animated

This QBasic program creates an animated fractal composed of circles, @@ -287,29 +287,29 @@ system to control the animation's progression.

-
-

3. Fractal of squares

+
+

3. Fractal of squares

This QBasic program generates and displays a fractal pattern composed of squares.

-
+

fractal%20squares,%201.png

-
+

fractal%20squares,%202.png

-
-

4. Fractal of squares animated

+
+

4. Fractal of squares animated

This QBasic program generates an animated fractal pattern composed of @@ -331,8 +331,8 @@ resulting in a dynamic and ever-changing geometric pattern.

-
-

5. Fractal of trees

+
+

5. Fractal of trees

QBasic program that generates a visually appealing fractal tree @@ -355,7 +355,7 @@ resembles a tree, with branches that grow and change over time.

-

Created: 2025-08-21 to 21:38

+

Created: 2025-08-21 to 21:52

Validate

diff --git a/2D GFX/Spirals/index.html b/2D GFX/Spirals/index.html index f485729..f99da9b 100644 --- a/2D GFX/Spirals/index.html +++ b/2D GFX/Spirals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Spiral series @@ -210,12 +210,12 @@

Table of Contents

@@ -236,11 +236,11 @@ } -
-

1. Spiral with increasing density

+
+

1. Spiral with increasing density

-
+

spiral.png

@@ -320,11 +320,11 @@ userInput$ = INPUT$(1)
-
-

2. Spiral with varying height

+
+

2. Spiral with varying height

-
+

spiral, 2.png

@@ -391,11 +391,11 @@ a$ = INPUT$(1)
-
-

3. Shaded spiral

+
+

3. Shaded spiral

-
+

spiral, 3.png

@@ -497,8 +497,8 @@ a$ = INPUT$(1)
-
-

4. Sphere forming spiral

+
+

4. Sphere forming spiral

Similar to previous spiral, Line segments are connected between the @@ -507,7 +507,7 @@ multiple linked spherical shapes. Initially point cloud in shown:

-
+

spiral, 4, 1.png

@@ -517,7 +517,7 @@ In the next step, points are connected using lines:

-
+

spiral, 4, 2.png

@@ -622,11 +622,11 @@ a$ = INPUT$(1)
-
-

5. Textured spherical spiral

+
+

5. Textured spherical spiral

-
+

spiral, 5.png

@@ -749,11 +749,11 @@ a$ = INPUT$(1)
-
-

6. Textured and shaded spherical spiral

+
+

6. Textured and shaded spherical spiral

-
+

spiral, 6.png

@@ -937,7 +937,7 @@ yStep2 = (oppositePointY2 - oppositePointY1) / stepCount
-

Created: 2025-08-21 to 21:38

+

Created: 2025-08-21 to 21:52

Validate

diff --git a/2D GFX/Textures/index.html b/2D GFX/Textures/index.html index 5e8f67e..ad92071 100644 --- a/2D GFX/Textures/index.html +++ b/2D GFX/Textures/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Algorithmic textures @@ -210,11 +210,11 @@

Table of Contents

@@ -233,8 +233,8 @@ } -
-

1. Circular waves

+
+

1. Circular waves

This QBasic program creates visually captivating circular wave @@ -313,8 +313,8 @@ algorithms can produce intricate and visually appealing results.

-
-

2. Diamond square clouds

+
+

2. Diamond square clouds

This QBasic program demonstrates the Diamond-Square algorithm, a @@ -429,8 +429,8 @@ WAITa$ = INPUT$(1)

-
-

3. Old paper

+
+

3. Old paper

This QBasic program generates a procedural texture that simulates the @@ -527,8 +527,8 @@ inputKey$ = INPUT$(1)

-
-

4. Wood

+
+

4. Wood

This QBasic program creates a visually appealing simulation of a wood @@ -622,8 +622,8 @@ exitKey$ = INPUT$(1)

-
-

5. Yellow flame

+
+

5. Yellow flame

"Yellow Flame" is a visually captivating program written in QBasic @@ -702,7 +702,7 @@ userInput$ = INPUT$(1)

-

Created: 2025-08-21 to 21:39

+

Created: 2025-08-21 to 21:52

Validate

diff --git a/3D GFX/3D Synthezier/doc/index.html b/3D GFX/3D Synthezier/doc/index.html index a6a111f..a3436a1 100644 --- a/3D GFX/3D Synthezier/doc/index.html +++ b/3D GFX/3D Synthezier/doc/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + 3D Synthezier @@ -1103,39 +1103,39 @@ hsAddReviewPanels();

Table of Contents

@@ -1157,8 +1157,8 @@ hsAddReviewPanels(); -
-

1. Operating principle

+
+

1. Operating principle

Parses scene definition language and creates 3D world based on @@ -1221,60 +1221,60 @@ They were produced by importing generated -

1.1. Rectangular city

+
+

1.1. Rectangular city

-
+

rectangular city, 1.jpeg

-
+

rectangular city, 2.jpeg

-
+

rectangular city, 3.jpeg

-
-

1.2. Hexagonal city

+
+

1.2. Hexagonal city

-
+

hexagonal city, 1.jpeg

-
+

hexagonal city, 2.jpeg

-
+

hexagonal city, 3.jpeg

-
-

2. Scene description language

+
+

2. Scene description language

See also examples.

-
-

2.1. here

+
+

2.1. here

 here
@@ -1285,8 +1285,8 @@ defines new segment
 

-
-

2.2. p

+
+

2.2. p

 p  x y z
@@ -1297,8 +1297,8 @@ defines new point
 

-
-

2.3. f

+
+

2.3. f

 f  p1 p2 p3 p4
@@ -1309,8 +1309,8 @@ defines new polygon,  p4  may be unused
 

-
-

2.4. warn

+
+

2.4. warn

 warn  <message>
@@ -1321,8 +1321,8 @@ displays warning message, and wait for key
 

-
-

2.5. end

+
+

2.5. end

 end
@@ -1333,8 +1333,8 @@ terminates parser
 

-
-

2.6. mtl

+
+

2.6. mtl

 mtl  material
@@ -1345,8 +1345,8 @@ selects material
 

-
-

2.7. mtlrnd

+
+

2.7. mtlrnd

 mtlrnd  material ...
@@ -1357,8 +1357,8 @@ selects random material from list
 

-
-

2.8. obj

+
+

2.8. obj

 obj  object xz45 xy20 x+3 y*2
@@ -1373,14 +1373,14 @@ directly from file, and not chached, to allow loading of greater than
 

-
+

rotation.png

-
-

2.9. rnd

+
+

2.9. rnd

 rnd  p^1^2^3 p^7^2^1
@@ -1391,8 +1391,8 @@ select random command to execute, ^ will be converted to spaces.
 

-
-

2.10. #

+
+

2.10. #

 # whatever text
@@ -1403,8 +1403,8 @@ comment
 

-
-

2.11. out

+
+

2.11. out

 out  file
@@ -1415,8 +1415,8 @@ specify output file name, must be first command
 

-
-

2.12. set

+
+

2.12. set

 set  variable  contents
@@ -1428,8 +1428,8 @@ string. max variables is 100. first is 0.
 

-
-

2.13. variables usage

+
+

2.13. variables usage

 anycommand %1 anything
@@ -1440,8 +1440,8 @@ inserts variable 1 contents info line
 

-
-

2.14. cmp

+
+

2.14. cmp

 cmp  flag string1 string2
@@ -1452,8 +1452,8 @@ compares strings, and inserts TRUE to flag, if they are equal, else inserts FALS
 

-
-

2.15. ?

+
+

2.15. ?

 ?flag anycommand
@@ -1468,8 +1468,8 @@ exapmle: ?3 obj car z*2 xy45
 

-
-

2.16. dum

+
+

2.16. dum

 dum
@@ -1482,16 +1482,16 @@ dummy function, does notheing
 
-
-

3. Installation

+
+

3. Installation

Edit bin/3dparse.bas file and update include path in there.

-
-

3.1. System requirements

+
+

3.1. System requirements

@@ -1522,8 +1522,8 @@ Edit bin/3dparse.bas file and update include path in there. -
-

3.2. Directory layout

+
+

3.2. Directory layout

bin
@@ -1540,8 +1540,8 @@ Edit bin/3dparse.bas file and update include path in there.
-
-

4. Usage

+
+

4. Usage

Make sure you have QB binaries in your PATH. Execute @@ -1566,7 +1566,7 @@ Visualize scene with your favourite renderer.

-

Created: 2025-08-21 to 21:40

+

Created: 2025-08-21 to 21:54

Validate

diff --git a/3D GFX/Miscellaneous/index.html b/3D GFX/Miscellaneous/index.html index 721c910..4038c39 100644 --- a/3D GFX/Miscellaneous/index.html +++ b/3D GFX/Miscellaneous/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Miscellaneous 3D graphics demos @@ -210,14 +210,14 @@

Table of Contents

@@ -238,8 +238,8 @@ } -
-

1. Rotating exclamation mark

+
+

1. Rotating exclamation mark

Wireframe 3D model of a rotating exclamation mark. @@ -258,8 +258,8 @@ Wireframe 3D model of a rotating exclamation mark.

-
-

2. 3D bouncing ball

+
+

2. 3D bouncing ball

This QBasic program creates a visually engaging 3D animation of a @@ -280,8 +280,8 @@ of early computer graphics techniques.

-
-

3. 3D text in a room

+
+

3. 3D text in a room

Wireframe 3D text hanging in a wireframe 3D room. User can look and @@ -301,8 +301,8 @@ fly around in all directions.

-
-

4. 3D bouncing cubes on grid floor

+
+

4. 3D bouncing cubes on grid floor

3D wireframe cubes bouncing on a grid floor, creating an immersive and @@ -322,8 +322,8 @@ dynamic visual effect.

-
-

5. Matrix math for rotation in 3D space

+
+

5. Matrix math for rotation in 3D space

Instead of combining simple 2D rotors, pixels in this 3D space are @@ -343,8 +343,8 @@ rotated by using matrix multiplications.

-
-

6. Maze explorer

+
+

6. Maze explorer

The Evolving 3D Maze Explorer is a QBasic program that generates and @@ -355,7 +355,7 @@ changes as they navigate through it.

-
+

Maze%20explorer.png

@@ -366,8 +366,8 @@ changes as they navigate through it.
-
-

7. Tank animation

+
+

7. Tank animation

Animated tank driving through the bridge back and forward. User can @@ -387,8 +387,8 @@ look and fly around in all directions.

-
-

8. Tiled room

+
+

8. Tiled room

Room with some tiles on the wall and on the floor. User can freely fly @@ -409,7 +409,7 @@ around.

-

Created: 2025-08-21 to 21:40

+

Created: 2025-08-21 to 21:54

Validate

diff --git a/3D GFX/Space/index.html b/3D GFX/Space/index.html index 23dd250..c31ff99 100644 --- a/3D GFX/Space/index.html +++ b/3D GFX/Space/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Space themed 3D graphics @@ -210,10 +210,10 @@

Table of Contents

@@ -234,8 +234,8 @@ } -
-

1. Galaxy explorer

+
+

1. Galaxy explorer

This QBasic program renders a navigable 3D point cloud galaxy, @@ -245,7 +245,7 @@ galaxy with stars distributed in a spiral pattern.

-
+

Galaxy%20explorer.png

@@ -256,8 +256,8 @@ galaxy with stars distributed in a spiral pattern.
-
-

2. Rocket simulator

+
+

2. Rocket simulator

QBasic program that simulates the takeoff and flight of a rocket from @@ -279,8 +279,8 @@ observe the rocket's trajectory from various angles.

-
-

3. Stars

+
+

3. Stars

The 3D Starfield Simulation is a QBasic program that creates a @@ -320,8 +320,8 @@ based on its distance, with closer stars appearing brighter.

-
-

4. Universe explorer

+
+

4. Universe explorer

This QBasic program that simulates a navigable 3D universe. Users can @@ -358,19 +358,19 @@ limiting the number of rendered objects based on distance. -

+

1.png

-
+

2.png

-
+

3.png

@@ -382,7 +382,7 @@ limiting the number of rendered objects based on distance.
-

Created: 2025-08-21 to 21:41

+

Created: 2025-08-21 to 21:54

Validate

diff --git a/Games/Pomppu Paavo.bas b/Games/Pomppu Paavo.bas deleted file mode 100755 index 92ccdd9..0000000 --- a/Games/Pomppu Paavo.bas +++ /dev/null @@ -1,1309 +0,0 @@ -' Pomppu Paavo -' -' This program is free software: released under Creative Commons Zero (CC0) license -' by Svjatoslav Agejenko. -' Email: svjatoslav@svjatoslav.eu -' Homepage: http://www.svjatoslav.eu -' -' Changelog: -' 1998, Initial version -' 2025, Improved program readability - - -DECLARE SUB DisplayGameStatistics () -DECLARE SUB LoadLevel (y%) -DECLARE SUB DrawSprite (p%, o%, m%, fr%, teler%) - -DEFINT A-Z -DIM SHARED graphicsMode -DIM SHARED asciiLevelData(1 TO 20) AS STRING * 31 -DIM SHARED FirstCompanionY%, FirstCompanionX%, SecondCompanionY%, SecondCompanionX% -DIM SHARED LivesRemaining%, CoinsCollected% -DIM SHARED DoorEntryX%, DoorEntryY%, DoorExitX%, DoorExitY% -DIM SHARED CurrentLevelNumber% -DIM SHARED TerrainGrid(0 TO 34, -10 TO 20) AS STRING * 1 -DIM SHARED ObjectGrid(0 TO 34, -10 TO 20) AS STRING * 1 - -' Full scale sprites -DIM SHARED SolidTerrainSprite(51) -DIM SHARED EmptySpaceSprite(51) -DIM SHARED kast(51) -DIM SHARED mar1(70) -DIM SHARED pilv(209) -DIM SHARED taht(50) -DIM SHARED siil(30) -DIM SHARED siil1(30) -DIM SHARED siil2(30) -DIM SHARED CoinSprite(30) -DIM SHARED poosas(100) -DIM SHARED WindowSprite(100) -DIM SHARED TrampolineSprite(50) -DIM SHARED IntroScreen(6000) -DIM SHARED TreeSprite(3000) -DIM SHARED noolt(51) -DIM SHARED noolt1(51) -DIM SHARED HoleSprite(51) -DIM SHARED sipp1(51) -DIM SHARED sipp2(51) -DIM SHARED sipp10(51) -DIM SHARED sipp20(51) -DIM SHARED sipp3(51) -DIM SHARED DoorSprite(120) - -' Small scale sprites (S suffix is used) -DIM SHARED SolidTerrainSpriteSmall(51) -DIM SHARED EmptySpaceSpriteSmall(51) -DIM SHARED kastm(51) -DIM SHARED marm1(70) -DIM SHARED pilvm(209) -DIM SHARED tahtm(50) -DIM SHARED siilm(30) -DIM SHARED siilm1(30) -DIM SHARED siilm2(30) -DIM SHARED CoinSpriteSmall(30) -DIM SHARED poosasm(100) -DIM SHARED WindowSpriteSmall(100) -DIM SHARED TrampolineSpriteSmall(50) -DIM SHARED TreeSpriteSmall(3000) -DIM SHARED nooltm(51) -DIM SHARED nooltm1(51) -DIM SHARED HoleSpriteSmall(51) -DIM SHARED sippm1(51) -DIM SHARED sippm2(51) -DIM SHARED sippm10(51) -DIM SHARED sippm20(51) -DIM SHARED sippm3(51) -DIM SHARED DoorSpriteSmall(50) - -leftArrowKey$ = CHR$(0) + "K" -rightArrowKey$ = CHR$(0) + "M" -upArrowKey$ = CHR$(0) + "H" -downArrowKey$ = CHR$(0) + "P" - -LivesRemaining% = 10 - -SCREEN 1 -CurrentLevelNumber% = 1 - -' Capture sprite images from screen drawing operations -GET (1, 1)-(20, 20), EmptySpaceSprite -DrawSprite 0, 0, 1, 1, 1 -GET (1, 1)-(20, 20), SolidTerrainSprite -DrawSprite 0, 0, 4, 1, 1 -GET (1, 1)-(20, 20), kast -PUT (1, 180), SolidTerrainSprite, PSET -PUT (300, 1), SolidTerrainSprite, PSET -PUT (300, 180), SolidTerrainSprite, PSET -DrawSprite 30, 50, 2, 1, 1 -GET (31, 51)-(91, 76), pilv -PUT (160, 10), pilv, PSET -DrawSprite 20, 100, 3, 1, 1 -GET (21, 101)-(31, 114), taht -CLS -DrawSprite 0, 0, 5, 1, 1 -GET (1, 1)-(11, 8), siil -CLS -DrawSprite 0, 0, 6, 1, 1 -GET (1, 1)-(8, 10), CoinSprite -CLS -DrawSprite 0, 0, 7, 1, 1 -GET (1, 1)-(31, 11), poosas -CLS -DrawSprite 0, 0, 8, 1, 1 -GET (1, 1)-(26, 21), WindowSprite -CLS -DrawSprite 0, 0, 9, 1, 1 -GET (1, 1)-(21, 11), TrampolineSprite -CLS -DrawSprite 0, 0, 11, 1, 1 -GET (1, 1)-(51, 81), TreeSprite -CLS -DrawSprite 0, 0, 12, 1, 1 -GET (1, 1)-(20, 20), noolt -CLS -DrawSprite 0, 0, 12, 50, 1 -GET (1, 1)-(20, 20), noolt1 -CLS -DrawSprite 0, 0, 13, 1, 1 -GET (1, 1)-(20, 20), HoleSprite -CLS -DrawSprite 0, 0, 14, 1, 1 -GET (1, 1)-(20, 20), sipp1 -CLS -DrawSprite 0, 0, 15, 1, 1 -GET (1, 1)-(20, 20), sipp2 -CLS -DrawSprite 0, 0, 14, 50, 1 -GET (1, 1)-(20, 20), sipp10 -CLS -DrawSprite 0, 0, 15, 50, 1 -GET (1, 1)-(20, 20), sipp20 -CLS -DrawSprite 0, 0, 16, 1, 1 -GET (1, 1)-(20, 20), sipp3 -CLS - - -' Capture small scale versions of sprites -GET (1, 1)-(10, 10), EmptySpaceSpriteSmall -DrawSprite 0, 0, 1, 1, 2 -GET (1, 1)-(10, 10), SolidTerrainSpriteSmall -DrawSprite 0, 0, 4, 1, 2 -GET (1, 1)-(10, 10), kastm -PUT (1, 180), SolidTerrainSprite, PSET -PUT (300, 1), SolidTerrainSprite, PSET -PUT (300, 180), SolidTerrainSprite, PSET -DrawSprite 30, 50, 2, 1, 2 -GET (16, 26)-(46, 38), pilvm -DrawSprite 20, 100, 3, 1, 2 -GET (11, 51)-(16, 72), tahtm -CLS -DrawSprite 0, 0, 5, 1, 2 -GET (1, 1)-(6, 4), siilm -CLS -DrawSprite 0, 0, 6, 1, 2 -GET (1, 1)-(4, 5), CoinSpriteSmall -CLS -DrawSprite 0, 0, 7, 1, 2 -GET (1, 1)-(16, 6), poosasm -CLS -DrawSprite 0, 0, 8, 1, 2 -GET (1, 1)-(13, 11), WindowSpriteSmall -CLS -DrawSprite 0, 0, 9, 1, 2 -GET (1, 1)-(11, 6), TrampolineSpriteSmall -CLS -DrawSprite 0, 0, 11, 1, 2 -GET (1, 1)-(26, 41), TreeSpriteSmall -CLS -DrawSprite 0, 0, 12, 1, 2 -GET (1, 1)-(10, 10), nooltm -CLS -DrawSprite 0, 0, 12, 50, 2 -GET (1, 1)-(10, 10), nooltm1 -CLS -DrawSprite 0, 0, 13, 1, 2 -GET (1, 1)-(10, 10), HoleSpriteSmall -CLS -DrawSprite 0, 0, 14, 1, 2 -GET (1, 1)-(10, 10), sippm1 -CLS -DrawSprite 0, 0, 15, 1, 2 -GET (1, 1)-(10, 10), sippm2 -CLS -DrawSprite 0, 0, 14, 50, 2 -GET (1, 1)-(10, 10), sippm10 -CLS -DrawSprite 0, 0, 15, 50, 2 -GET (1, 1)-(10, 10), sippm20 -CLS -DrawSprite 0, 0, 16, 1, 2 -GET (1, 1)-(10, 10), sippm3 -CLS -DrawSprite 0, 0, 17, 1, 1 -GET (1, 1)-(21, 31), DoorSprite -CLS -DrawSprite 0, 0, 17, 1, 2 -GET (1, 1)-(11, 16), IntroScreen -CLS - -DrawSprite -1, -1, 10, 4, 1 -GET (1, 1)-(318, 124), IntroScreen - -key$ = INPUT$(1) - -LoadLevel 1 -a = 50 -b = 50 -siie = 1 -siie1 = 1 -MainGameLoop: -kbd$ = INKEY$ -IF graphicsMode = 2 THEN b = b * 2: GOTO 106 -IF b > 0 THEN GET (a, b)-(a + 20, b + 20), mar1 -IF b > 0 THEN IF sipp = 1 THEN PUT (a, b), sipp1, OR -IF b > 0 THEN IF sipp = 2 THEN PUT (a, b), sipp2, OR -IF b > 0 THEN IF sipp = 10 THEN PUT (a, b), sipp10, OR -IF b > 0 THEN IF sipp = 20 THEN PUT (a, b), sipp20, OR -IF b > 0 THEN IF sipp = 3 THEN PUT (a, b), sipp3, OR - -' Draw first companion hedgehog -GET (FirstCompanionX%, FirstCompanionY%)-(FirstCompanionX% + 10, FirstCompanionY% + 10), siil1 -PUT (FirstCompanionX%, FirstCompanionY%), siil, OR - -' Draw second companion hedgehog -GET (SecondCompanionX%, SecondCompanionY%)-(SecondCompanionX% + 10, SecondCompanionY% + 10), siil2 -PUT (SecondCompanionX%, SecondCompanionY%), siil, OR - -' Create short delay using sound command (workaround for no built-in delay) -SOUND 0, .8 - -' Check collisions with terrain (z = solid block) -' Right side collision checks -IF TerrainGrid((a + 38) \ 20, (b + 37) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 -IF TerrainGrid((a + 38) \ 20, (b + 22) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 - -' Left side collision checks -IF TerrainGrid((a + 21) \ 20, (b + 22) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 -IF TerrainGrid((a + 21) \ 20, (b + 37) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 - -' Top collision checks -IF TerrainGrid((a + 22) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 -IF TerrainGrid((a + 37) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 - -' Bottom collision checks (landing on ground) -IF TerrainGrid((a + 22) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 -IF TerrainGrid((a + 37) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 - -qwer = qwer + 1: IF ObjectGrid((a + 30) \ 20, (b + 30) \ 20) = "q" AND qwer > 20 THEN qwer = 1: LivesRemaining% = LivesRemaining% - 1: eda = -10: all = -5: DisplayGameStatistics -IF qwer > 100 THEN qwer = 50 - -' Coin collection logic -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "1" THEN CoinsCollected% = CoinsCollected% + 1: kustuta1 = 1: DisplayGameStatistics: TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "" - -' Trampoline effect -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "v" THEN all = -8: sipp = 3 - -' Conveyor belt movement triggers -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = ">" THEN eda = 3 -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "<" THEN eda = -3 - -lke = lke + 1 -r = r + 1: IF r > 10 THEN r = 0: IF eda > 0 THEN eda = eda - 1: ELSE IF eda < 0 THEN eda = eda + 1 -r1 = r1 + 1: IF r1 > 3 THEN r1 = 0: all = all + 1 -lk = lk + 1: cd = cd - 1 - -' Breakable block interaction -IF ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "o" THEN TerrainGrid((a + 30) \ 20, (b + 21) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "": kustuta = 1 - -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "a" THEN TerrainGrid((a + 30) \ 20, (b + 38) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "": kustuta2 = 1 - -' First companion hedgehog terrain collision checks -IF TerrainGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 25) \ 20) = "z" THEN siiall = -1 -IF TerrainGrid((FirstCompanionX% + 30) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = -1 -IF TerrainGrid((FirstCompanionX% + 20) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = 1 - -' Second companion hedgehog terrain collision checks -IF TerrainGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 25) \ 20) = "z" THEN siiall1 = -1 -IF TerrainGrid((SecondCompanionX% + 30) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = -1 -IF TerrainGrid((SecondCompanionX% + 20) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = 1 - -' Screen boundary checks for companions -IF FirstCompanionX% > 300 THEN siie = -1 -IF FirstCompanionX% < 3 THEN siie = 1 -IF SecondCompanionX% > 300 THEN siie1 = -1 -IF SecondCompanionX% < 3 THEN siie1 = 1 - -' Restore previous companion positions -PUT (SecondCompanionX%, SecondCompanionY%), siil2, PSET -PUT (FirstCompanionX%, FirstCompanionY%), siil1, PSET - -' Restore previous player position -IF b > 0 THEN PUT (a, b), mar1, PSET - -' Handle sprite clearing after coin collection -IF kustuta = 1 THEN kustuta = 0: PUT (((a + 10) \ 20) * 20, (b \ 20) * 20), EmptySpaceSprite, PSET -IF kustuta1 = 1 THEN kustuta1 = 0: PUT (((a + 10) \ 20) * 20, ((b + 10) \ 20) * 20), EmptySpaceSprite, PSET -IF kustuta2 = 1 THEN kustuta2 = 0: PUT (((a + 10) \ 20) * 20, ((b + 28) \ 20) * 20), EmptySpaceSprite, PSET - -IF makk = 1 THEN makk = 0: a = a - 20 - -ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "" - -' Update companion positions -FirstCompanionX% = FirstCompanionX% + siie -FirstCompanionY% = FirstCompanionY% + siiall -SecondCompanionX% = SecondCompanionX% + siie1 -SecondCompanionY% = SecondCompanionY% + siiall1 - -' Mark new companion positions in object grid -ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "q": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "q" - -' Apply gravity to companions (max downward velocity = 2) -siiall = siiall + 1: IF siiall > 2 THEN siiall = 2 -siiall1 = siiall1 + 1: IF siiall1 > 2 THEN siiall1 = 2 - -' Update player position based on velocity -a = a + eda -b = b + all - -' Level transition when reaching right edge -IF a > 297 THEN a = 2: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 - -' Level transition when reaching left edge -IF a < 1 THEN a = 296: IF CurrentLevelNumber% = 1 THEN LoadLevel CurrentLevelNumber%: ELSE CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: IF graphicsMode = 2 THEN a = 594 - -' Player falls off bottom of screen -IF b > 179 THEN LivesRemaining% = LivesRemaining% - 1: DisplayGameStatistics: CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: b = 100: a = 2: DisplayGameStatistics - -' Teleportation triggers ("u" and "U" markers in level data) -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "u" THEN a = DoorExitX% + 10: b = DoorExitY%: eda = 0 -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "U" THEN a = DoorEntryX% + 10: b = DoorEntryY%: eda = 0 - -IF kbd$ = rightArrowKey$ THEN eda = eda + 1: IF eda > 3 THEN eda = 3: r = 0 ELSE IF lke > 10 THEN eda = 5 -IF kbd$ = rightArrowKey$ THEN IF sipa = 1 THEN sipp = 1: ELSE sipp = 2 -IF kbd$ = leftArrowKey$ THEN IF sipa = 1 THEN sipp = 10: ELSE sipp = 20 -IF kbd$ = leftArrowKey$ THEN eda = eda - 1: IF eda < -3 THEN eda = -3: r = 0 ELSE IF lke > 10 THEN eda = -5 -IF kbd$ = upArrowKey$ AND lk < 10 THEN all = all - 5: lk = 20: r1 = 0: sipp = 3 -IF kbd$ = downArrowKey$ THEN all = all + 1 -IF kbd$ = "/" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 -IF kbd$ = "+" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 5: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 -IF kbd$ = "q" THEN END -sipa = sipa + 1 -IF sipa = 3 THEN sipa = 1 -GOTO MainGameLoop - - -106 -kbd$ = INKEY$ -IF graphicsMode = 1 THEN b = b / 2: GOTO MainGameLoop -IF b > 0 THEN GET (a \ 2, b \ 2)-((a + 20) \ 2, (b + 20) \ 2), marm1 -IF b > 0 THEN IF sipp = 1 THEN PUT (a \ 2, b \ 2), sippm1, OR -IF b > 0 THEN IF sipp = 2 THEN PUT (a \ 2, b \ 2), sippm2, OR -IF b > 0 THEN IF sipp = 10 THEN PUT (a \ 2, b \ 2), sippm10, OR -IF b > 0 THEN IF sipp = 20 THEN PUT (a \ 2, b \ 2), sippm20, OR -IF b > 0 THEN IF sipp = 3 THEN PUT (a \ 2, b \ 2), sippm3, OR - -' Draw companions in scaled down mode -GET (FirstCompanionX% \ 2, FirstCompanionY% \ 2)-((FirstCompanionX% + 10) \ 2, (FirstCompanionY% + 10) \ 2), siilm1 -PUT (FirstCompanionX% \ 2, FirstCompanionY% \ 2), siilm, OR -GET (SecondCompanionX% \ 2, SecondCompanionY% \ 2)-((siia1 + 10) \ 2, (SecondCompanionY% + 10) \ 2), siilm2 -PUT (SecondCompanionX% \ 2, SecondCompanionY% \ 2), siilm, OR - -' Small delay to limit framerate -SOUND 0, .8 - -' Check collisions with terrain (z = solid block) -' Right side collision checks -IF TerrainGrid((a + 38) \ 20, (b + 37) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 -IF TerrainGrid((a + 38) \ 20, (b + 22) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 - -' Left side collision checks -IF TerrainGrid((a + 21) \ 20, (b + 22) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 -IF TerrainGrid((a + 21) \ 20, (b + 37) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 - -' Top collision checks -IF TerrainGrid((a + 22) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 -IF TerrainGrid((a + 37) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 - -' Bottom collision checks (landing on ground) -IF TerrainGrid((a + 22) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 -IF TerrainGrid((a + 37) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 - -qwer = qwer + 1: IF ObjectGrid((a + 30) \ 20, (b + 30) \ 20) = "q" AND qwer > 20 THEN qwer = 1: LivesRemaining% = LivesRemaining% - 1: eda = -5: all = -3: DisplayGameStatistics -IF qwer > 100 THEN qwer = 50 - -' Coin collection logic -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "1" THEN CoinsCollected% = CoinsCollected% + 1: kustuta1 = 1: DisplayGameStatistics: TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "" - -' Trampoline effect -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "v" THEN all = -8: sipp = 3 - -' Conveyor belt movement triggers -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = ">" THEN eda = 3 -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "<" THEN eda = -3 - -lke = lke + 1 -r = r + 1: IF r > 10 THEN r = 0: IF eda > 0 THEN eda = eda - 1: ELSE IF eda < 0 THEN eda = eda + 1 -r1 = r1 + 1: IF r1 > 3 THEN r1 = 0: all = all + 1 -lk = lk + 1: cd = cd - 1 - -' Breakable block interaction -IF ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "o" THEN TerrainGrid((a + 30) \ 20, (b + 21) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "": kustuta = 1 - -IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "a" THEN TerrainGrid((a + 30) \ 20, (b + 38) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "": kustuta2 = 1 - -' First companion hedgehog terrain collision checks -IF TerrainGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 25) \ 20) = "z" THEN siiall = -1 -IF TerrainGrid((FirstCompanionX% + 30) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = -1 -IF TerrainGrid((FirstCompanionX% + 20) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = 1 - -' Second companion hedgehog terrain collision checks -IF TerrainGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 25) \ 20) = "z" THEN siiall1 = -1 -IF TerrainGrid((SecondCompanionX% + 30) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = -1 -IF TerrainGrid((SecondCompanionX% + 20) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = 1 - -' Screen boundary checks for companions -IF FirstCompanionX% > 600 THEN siie = -1 -IF FirstCompanionX% < 3 THEN siie = 1 -IF SecondCompanionX% > 600 THEN siie1 = -1 -IF SecondCompanionX% < 3 THEN siie1 = 1 - -' Restore previous companion positions -PUT (SecondCompanionX% \ 2, SecondCompanionY% \ 2), siilm2, PSET -PUT (FirstCompanionX% \ 2, FirstCompanionY% \ 2), siilm1, PSET - -' Restore previous player position -IF b > 0 THEN PUT (a \ 2, b \ 2), marm1, PSET - -' Handle sprite clearing after coin collection -IF kustuta = 1 THEN kustuta = 0: PUT (((a + 10) \ 20) * 10, (b \ 20) * 10), EmptySpaceSpriteSmall, PSET -IF kustuta1 = 1 THEN kustuta1 = 0: PUT (((a + 10) \ 20) * 10, ((b + 10) \ 20) * 10), EmptySpaceSpriteSmall, PSET -IF kustuta2 = 1 THEN kustuta2 = 0: PUT (((a + 10) \ 20) * 10, ((b + 28) \ 20) * 10), EmptySpaceSpriteSmall, PSET - -IF makk = 1 THEN makk = 0: a = a - 20 - -ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "" - -' Update companion positions -FirstCompanionX% = FirstCompanionX% + siie -FirstCompanionY% = FirstCompanionY% + siiall -SecondCompanionX% = SecondCompanionX% + siie1 -SecondCompanionY% = SecondCompanionY% + siiall1 - -' Mark new companion positions in object grid -ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "q": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "q" -siiall = siiall + 1: IF siiall > 2 THEN siiall = 2 -siiall1 = siiall1 + 1: IF siiall1 > 2 THEN siiall1 = 2 - -' Update player position based on velocity -a = a + eda -b = b + all - -' Level transition when reaching right edge -IF a > 594 THEN a = 2: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 - -' Level transition when reaching left edge -IF a < 1 THEN a = 594: IF CurrentLevelNumber% = 1 THEN LoadLevel CurrentLevelNumber%: ELSE CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: IF graphicsMode = 1 THEN a = 297 - -' Player falls off bottom of screen -IF b > 358 THEN LivesRemaining% = LivesRemaining% - 1: DisplayGameStatistics: CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: b = 100: a = 2: DisplayGameStatistics - -' Teleportation triggers ("u" and "U" markers in level data) -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "u" THEN a = DoorExitX% + 5: b = DoorExitY%: eda = 0 -IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "U" THEN a = DoorEntryX% + 5: b = DoorEntryY%: eda = 0 - -IF kbd$ = rightArrowKey$ THEN eda = eda + 1: IF eda > 3 THEN eda = 3: r = 0 ELSE IF lke > 10 THEN eda = 5 -IF kbd$ = rightArrowKey$ THEN IF sipa = 1 THEN sipp = 1: ELSE sipp = 2 -IF kbd$ = leftArrowKey$ THEN IF sipa = 1 THEN sipp = 10: ELSE sipp = 20 -IF kbd$ = leftArrowKey$ THEN eda = eda - 1: IF eda < -3 THEN eda = -3: r = 0 ELSE IF lke > 10 THEN eda = -5 -IF kbd$ = upArrowKey$ AND lk < 10 THEN all = all - 5: lk = 20: r1 = 0: sipp = 3 -IF kbd$ = downArrowKey$ THEN all = all + 1 -IF kbd$ = "/" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 -IF kbd$ = "+" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 5: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 -IF kbd$ = "q" THEN END - -sipa = sipa + 1 -IF sipa = 3 THEN sipa = 1 - -GOTO 106 - -SUB DisplayGameStatistics -' -' Updates and displays the game's status information (coins collected, lives remaining) -' Handles game over condition when lives reach zero. -' -' This subroutine is called whenever the game state changes that affects statistics: -' - When a coin is collected -' - When the player loses a life -' - Periodically during gameplay - -LOCATE 1, 1 -IF GraphicsMode% = 2 THEN GOTO SkipTextDisplay - -' Clear previous stats display -PRINT " " - -' Award extra life every 10 coins collected -IF CoinsCollected% > 9 THEN CoinsCollected% = 0: LivesRemaining% = LivesRemaining% + 1 - -' Display current game statistics -LOCATE 1, 1 -PRINT "o "; CoinsCollected%; " Lives "; LivesRemaining% - -SkipTextDisplay: -' Check if player has run out of lives -IF LivesRemaining% < 0 THEN END -END SUB - -SUB DrawSprite (p, o, m, fr, teler) - -' Renders a sprite on screen based on predefined character patterns. -' -' How it works: -' The subroutine uses a lookup table (ao array) containing string representations -' of each sprite. Each character in these strings represents a pixel color. -' Depending on the parameters, it either: -' - Draws individual pixels (ScaleFactor=1) -' - Draws filled rectangles for each pixel (ScaleFactor>1 but not 50) -' - Draws flipped version of individual pixels (SpriteVariant=50) -' -' This flexible approach allows the same sprite data to be rendered at different -' sizes and orientations without storing multiple copies of the sprite data. - -DIM ao(1 TO 100) AS STRING -SELECT CASE m -CASE 1 ' Solid block pattern -ao(1) = "00000000000000000000" -ao(2) = "00111111111111111100" -ao(3) = "01222222222222222210" -ao(4) = "01233333333333333210" -ao(5) = "01232222222222223210" -ao(6) = "01232111111111123210" -ao(7) = "01232111111111123210" -ao(8) = "01232111111111123210" -ao(9) = "01232111111111123210" -ao(10) = "01232111111111123210" -ao(11) = "01232111111111123210" -ao(12) = "01232111111111123210" -ao(13) = "01232111111111123210" -ao(14) = "01232111111111123210" -ao(15) = "01232111111111123210" -ao(16) = "01232222222222223210" -ao(17) = "01233333333333333210" -ao(18) = "01222222222222222210" -ao(19) = "00111111111111111100" -ao(20) = "00000000000000000000" -CASE 2 ' Cloud sprite -ao(1) = "000000022200000222220000002222222200000000000222222000000000" -ao(2) = "000000022222002222222000222222222222000000222222222220000000" -ao(3) = "000000222222222222222202222222222222222222222222222222200000" -ao(4) = "000000222222222222222222222333333222220222222222222221110000" -ao(5) = "000000222222233333322222223333333322222222222222222221111000" -ao(6) = "000000022333333333333222233333333333222233322222222221111000" -ao(7) = "000002222333333333333322233333333333333333333222222221111100" -ao(8) = "000222222333333333333333333333333333333333333322222221111100" -ao(9) = "002222223333333333333333333333333333333333333333222221111100" -ao(10) = "022223333333333333333333333333333333333333333333222221111110" -ao(11) = "022233333333333333333333333333333333333333333333322222111110" -ao(12) = "222333333333333333333333333333333333333333333333322222111110" -ao(13) = "222333333333333333333333323333333323131113333333221221111110" -ao(14) = "223333333333333333333331112233331121111133333322112211111110" -ao(15) = "213333333333333333333331111133111111111111111112222111111110" -ao(16) = "111333313333333333333111111122111111111111111111221111111110" -ao(17) = "111333311111111333111111111111111111111111111111111111111100" -ao(18) = "011111111111111111111111111111111111111111111111111111111100" -ao(19) = "011111111111111111111111111111111111111111111111111111111100" -ao(20) = "011111111111111111111111111111111111111111111111111111111000" -ao(21) = "001111111111111111111111111111111111111111111111110111100000" -ao(22) = "001111111111111100111111111111111111111111111111100000000000" -ao(23) = "000111111111110000011111111111100011111111111111000000000000" -ao(24) = "000011111111100000000111111111000000011111111100000000000000" -ao(25) = "000001111110000000000001111110000000000000000000000000000000" -CASE 3 -ao(1) = "0000010000" -ao(2) = "0000010000" -ao(3) = "0000121000" -ao(4) = "0000131000" -ao(5) = "1111232111" -ao(6) = "0123333210" -ao(7) = "0123333210" -ao(8) = "0012332100" -ao(9) = "0001221000" -ao(10) = "0012112100" -ao(11) = "0121001210" -ao(12) = "0110000110" -ao(13) = "1100000011" -CASE 4 -ao(1) = "01111111110111111111" -ao(2) = "01222222210122222221" -ao(3) = "01233333210123333321" -ao(4) = "01233333210123333321" -ao(5) = "01233333210123333321" -ao(6) = "01233333210123333321" -ao(7) = "01233333210123333321" -ao(8) = "01222222210122222221" -ao(9) = "01111111110111111111" -ao(10) = "00000000000000000000" -ao(11) = "01111111110111111111" -ao(12) = "01222222210122222221" -ao(13) = "01233333210123333321" -ao(14) = "01233333210123333321" -ao(15) = "01233333210123333321" -ao(16) = "01233333210123333321" -ao(17) = "01233333210123333321" -ao(18) = "01222222210122222221" -ao(19) = "01111111110111111111" -ao(20) = "00000000000000000000" -CASE 5 -ao(1) = "0000333000" -ao(2) = "0033333300" -ao(3) = "0332222220" -ao(4) = "3322222222" -ao(5) = "3222111112" -ao(6) = "3111111111" -ao(7) = "1111111111" -CASE 6 -ao(1) = "00111100" -ao(2) = "01222210" -ao(3) = "12233221" -ao(4) = "12233221" -ao(5) = "12233221" -ao(6) = "12233221" -ao(7) = "12233221" -ao(8) = "12233221" -ao(9) = "01222210" -ao(10) = "00111100" -CASE 7 -ao(1) = "000000000000000033333300000000" -ao(2) = "000000000000000333333333000000" -ao(3) = "000000333300003332222222300000" -ao(4) = "000003333330333322232222220000" -ao(5) = "000033322333333222222222222000" -ao(6) = "003332222223332222322212222200" -ao(7) = "033222232222222222111211122200" -ao(8) = "033222222232111111111111112220" -ao(9) = "332223222111121121111111111222" -ao(10) = "322222111111111111121111111111" -CASE 8 -ao(1) = "0000000002222222000000000" -ao(2) = "0000000222111112220000000" -ao(3) = "0000002211131311122000000" -ao(4) = "0000022113331133112200000" -ao(5) = "0000022133331333312200000" -ao(6) = "0000221133331333311220000" -ao(7) = "0000221333331333331220000" -ao(8) = "0000221333331333331220000" -ao(9) = "0000221111111111111220000" -ao(10) = "0000221333331333331220000" -ao(11) = "0002211333331333331122000" -ao(12) = "0002213333331333333122000" -ao(13) = "0002213333331333333122000" -ao(14) = "0002213333331333333122000" -ao(15) = "0002213333331333333122000" -ao(16) = "0002213333331333333122000" -ao(17) = "0002213333331333333122000" -ao(18) = "0002211111111111111122000" -ao(19) = "2222222222222222222222222" -ao(20) = "0222222222222222222222220" -CASE 9 -ao(1) = "00000001112220000000" -ao(2) = "00001112222111120000" -ao(3) = "00112222111122221100" -ao(4) = "02222111122221111110" -ao(5) = "01111122221111122220" -ao(6) = "11122221111122221111" -ao(7) = "22221111122221111111" -ao(8) = "21111122221111112222" -ao(9) = "11222221111112222111" -ao(10) = "22221111112222111111" -CASE 10 -ao(1) = "33333333333333333333333333333333333333333333333333333333333333333333333333333333" -ao(2) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(3) = "30000110000111001110011111100011111110011111100000000000000000000000000000000003" -ao(4) = "30001111100111001110011111110011111110011111110000000000000000002222000000000003" -ao(5) = "30011001100011001100011100110011100110011100111000000000000000222222220000000003" -ao(6) = "30011000000011001100011111110011100000011100111000000000000000222222222222000003" -ao(7) = "30011000000011001100011111100011100110011111110000000000000000330330330002200003" -ao(8) = "30011111000011001100011100000011111110011111100000000000000000333333330000000003" -ao(9) = "30001111100011001100011100000011111110011100100000000000000000332222330000000003" -ao(10) = "30000001100011001100011100000011100000011100110000000000000000033333300000000003" -ao(11) = "30110001100011001100011100000011100110011100111000000000000030000111000000000003" -ao(12) = "30111011100011111100011100000011111110011100111000000000000331111111111000000003" -ao(13) = "30111111000001111000011100000011111110011100111000000000000331111111111100000003" -ao(14) = "30000000000000000000000000000000000000000000000000000000000000001111101100000003" -ao(15) = "30000000000000000000000000000000000000000000000000000000000000001111101100000003" -ao(16) = "30000000000000000000000000000000000000000000000000000000000000001101100000000003" -ao(17) = "30000000000000000000000000000000000000000000000000000000000000011101110000000003" -ao(18) = "30000000000000000000000000000000000000000000000000000000000000011101110000000003" -ao(19) = "30000000000000000000000000000000000000000000000000000000000000333303330000000003" -ao(20) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(21) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(22) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(23) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(24) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(25) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(26) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(27) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(28) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(29) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" -ao(30) = "33333333333333333333333333333333333333333333333333333333333333333333333333333333" -CASE 11 -ao(1) = "00000000000111111110000000000000000000000000000000" -ao(2) = "00000000011111111111000001100000000000000000000000" -ao(3) = "00000000111111111111110011110000000000000000000000" -ao(4) = "00000001101111111111111111111000000000000000000000" -ao(5) = "00000011111111111111111111111111000000000000000000" -ao(6) = "00000111111111111111111111111111000000000000000000" -ao(7) = "00000111111111111111111111111111001100000000000000" -ao(8) = "00000111111111111111111111111111111111100000000000" -ao(9) = "00000111111111111111111111111111111111100000000000" -ao(10) = "00000111111111111111111111111111111111110000000000" -ao(11) = "00000111111111111111111111111111111111111000000000" -ao(12) = "00000111111111111111111111111111111111111100000000" -ao(13) = "00000111111111111111111111111111111111111100000000" -ao(14) = "00000111111111111111111111111111111111111100000000" -ao(15) = "00000111111111111111111111111111111111111100000000" -ao(16) = "00000111111111111111111111111111111111111100000000" -ao(17) = "00011111111111111111111111111111111111111100000000" -ao(18) = "00011111111111111111111111111111111111111100000000" -ao(19) = "00111111110111111111111111111111111111111100000000" -ao(20) = "01110111111111111111111111111111111111111100000000" -ao(21) = "11111111111111111111111111111111111111111111100000" -ao(22) = "11111111111111111111111111111111111111111111100000" -ao(23) = "11111111111111111111111111111111111111111111100000" -ao(24) = "11111111111111111111111111111111111111111111100000" -ao(25) = "11111111111111111111111111111111111111111111111110" -ao(26) = "11111111111111111111111111111111111111111111110111" -ao(27) = "11111111111111111111111111111111111111111111111111" -ao(28) = "11011111111111111111111111111111111111111111111101" -ao(29) = "11111111111111111111111111111111111111111111111111" -ao(30) = "11111111111111111111111111111111111111111111111111" -ao(31) = "11111111111111111111111111111111111111111111111011" -ao(32) = "11111111111111111111111111111111111111111111111100" -ao(33) = "11111111111111111111111111111111111111111111111000" -ao(34) = "01111111111111111111111111111111111111111111110000" -ao(35) = "11111111111111111111111111111111111111111110110000" -ao(36) = "11111111111111111111111111111111111111111110110000" -ao(37) = "11111111111111111111111111111111111111111111110000" -ao(38) = "01111111111111111111111111111111111111111111110000" -ao(39) = "01111111111111111111111111111111111111111111110000" -ao(40) = "00011111111111111111111111111111111111111111100000" -ao(41) = "00111111111111111111111111111111111111111111100000" -ao(42) = "00011111111111111111111111111111111111111111110000" -ao(43) = "00001111111111111111111111111111111111111111110000" -ao(44) = "00001111111111111111111111111111111111111111111000" -ao(45) = "0000110111111111111111111111111111111111111111100" -ao(46) = "0000110011111111111111111111011111111111111100000" -ao(47) = "0000111101101111111111111111111111111110111000000" -ao(48) = "0000000000001111111111111111111111111111110000000" -ao(49) = "0000000000000001111111111111111111110111110000000" -ao(50) = "0000000000000000000011111111111111100111110000000" -ao(51) = "0000000000000000000001111020111000000000000000000" -ao(52) = "0000000000000000000001111222200000000000000000000" -ao(53) = "0000000000000000000000222222220000000000000000000" -ao(54) = "0000000000000000000000222222020000000000000000000" -ao(55) = "0000000000000000000000202222220000000000000000000" -ao(56) = "0000000000000000000000222222220000000000000000000" -ao(57) = "0000000000000000000000220202220000000000000000000" -ao(58) = "0000000000000000000000222222220000000000000000000" -ao(59) = "0000000000000000000000202222220000000000000000000" -ao(60) = "0000000000000000000000222222220000000000000000000" -ao(61) = "000000000000000000000022022220000000000" -ao(62) = "0000000000000000000000222222220000000000000000000" -ao(63) = "0000000000000000000000220222200000000000000000000" -ao(64) = "0000000000000000000000222220200000000000000000000" -ao(65) = "0000000000000000000000220222200000000000000000000" -ao(66) = "0000000000000000000000222222200000000000000000000" -ao(67) = "0000000000000000000000222222200000000000000000000" -ao(68) = "0000000000000000000000202222000000000000000000000" -ao(69) = "0000000000000000002000222222220000000000000000000" -ao(70) = "0000000000000000002200222222000000000000000000000" -ao(71) = "0000000000000000000222222222000000000000000000000" -ao(72) = "0000000000000000000222222222000000000000000000000" -ao(73) = "0000000000000000000022222222000000000000000000000" -ao(74) = "0000000000000000000022222222000000000000000000000" -ao(75) = "0000000000000000000020222222000000000000000000000" -ao(76) = "0000000000000000000222222202000000000000000000000" -ao(77) = "000000000000000000022022222200000000000" -ao(78) = "0000000000000000022222222222200000000000000000000" -ao(79) = "0000000000000000220222222222220000" -ao(80) = "000000000000000022222222222222" -CASE 12 -ao(1) = "11111111111111111111" -ao(2) = "11111111111111111111" -ao(3) = "11111111112111111111" -ao(4) = "11111111112211111111" -ao(5) = "11111111112221111111" -ao(6) = "11111111112222111111" -ao(7) = "11111111112222211111" -ao(8) = "11122222222222221111" -ao(9) = "11122222222222222111" -ao(10) = "11122222222222222211" -ao(11) = "11122222222222222211" -ao(12) = "11122222222222222111" -ao(13) = "11122222222222221111" -ao(14) = "11111111112222211111" -ao(15) = "11111111112222111111" -ao(16) = "11111111112221111111" -ao(17) = "11111111112211111111" -ao(18) = "11111111112111111111" -ao(19) = "11111111111111111111" -ao(20) = "11111111111111111111" -CASE 13 -ao(1) = "03333333333333333330" -ao(2) = "33333333222233333333" -ao(3) = "33333332222223333333" -ao(4) = "33333332222223333333" -ao(5) = "33333332222223333333" -ao(6) = "33333332222223333333" -ao(7) = "33333332222223333333" -ao(8) = "33333332222223333333" -ao(9) = "33333332222223333333" -ao(10) = "33333332222223333333" -ao(11) = "33333333222233333333" -ao(12) = "33333333333333333333" -ao(13) = "33333333333333333333" -ao(14) = "33333333222233333333" -ao(15) = "33333332222223333333" -ao(16) = "33333332222223333333" -ao(17) = "33333332222223333333" -ao(18) = "33333333222233333333" -ao(19) = "33333333333333333333" -ao(20) = "03333333333333333330" -CASE 14 - -ao(1) = "00000000022220000000" -ao(2) = "00000000022220000000" -ao(3) = "00000000022222000000" -ao(4) = "00000000033333000000" -ao(5) = "00000000033333300000" -ao(6) = "00000000033333300000" -ao(7) = "00000000003333000000" -ao(8) = "00000000011100000000" -ao(9) = "00000003111130000000" -ao(10) = "00000003111130000000" -ao(11) = "00000003111130000000" -ao(12) = "00000003111133000000" -ao(13) = "00000003111130000000" -ao(14) = "00000003111130000000" -ao(15) = "00000000333300000000" -ao(16) = "00000000333300000000" -ao(17) = "00000003303300000000" -ao(18) = "00000003303300000000" -ao(19) = "00000033302220000000" -ao(20) = "00000022200000000000" - - -CASE 15 -ao(1) = "00000000022220000000" -ao(2) = "00000000022220000000" -ao(3) = "00000000022222000000" -ao(4) = "00000000033333000000" -ao(5) = "00000000033333300000" -ao(6) = "00000000033333300000" -ao(7) = "00000000003333000000" -ao(8) = "00000000011100000000" -ao(9) = "00000003111130000000" -ao(10) = "00000003111130000000" -ao(11) = "00000003111130000000" -ao(12) = "00000033111130000000" -ao(13) = "00000003111130000000" -ao(14) = "00000003111130000000" -ao(15) = "00000000333300000000" -ao(16) = "00000000333300000000" -ao(17) = "00000000330330000000" -ao(18) = "00000000330330000000" -ao(19) = "00000002220333000000" -ao(20) = "00000000000222000000" - -CASE 16 - -ao(1) = "00000000022220000000" -ao(2) = "00000000022220000000" -ao(3) = "00000000022222000000" -ao(4) = "00000000033333000000" -ao(5) = "00000000033333300000" -ao(6) = "00000000033333300000" -ao(7) = "00000000103330100000" -ao(8) = "00000001111111000000" -ao(9) = "00000000311130000000" -ao(10) = "00000000311130000000" -ao(11) = "00000000311130000000" -ao(12) = "00000000311130000000" -ao(13) = "00000000311130000000" -ao(14) = "00000000311130000000" -ao(15) = "00000000333300000000" -ao(16) = "00000000333300000000" -ao(17) = "00000000330330000000" -ao(18) = "00000000330330000000" -ao(19) = "00000000330330000000" -ao(20) = "00000000222222000000" - -CASE 17 ' Door sprite -ao(1) = "00000022222222000000" -ao(2) = "00002222222222220000" -ao(3) = "00022220000000222000" -ao(4) = "00020002222222002000" -ao(5) = "00202222222222222200" -ao(6) = "00202222222222220200" -ao(7) = "00202222222222220200" -ao(8) = "02202222222222220220" -ao(9) = "02022222222222220220" -ao(10) = "02022323232323322020" -ao(11) = "02022323232323222020" -ao(12) = "02022323233223332020" -ao(13) = "22022323232322232022" -ao(14) = "20222323232322232202" -ao(15) = "20222232232323332202" -ao(16) = "20222222222222222202" -ao(17) = "20222222222222112202" -ao(18) = "20222222222222112202" -ao(19) = "20222222222222112202" -ao(20) = "20222222222222222202" -ao(21) = "20222222222222222202" -ao(22) = "20222222222222222202" -ao(23) = "20222222222222222202" -ao(24) = "20222222222222222202" -ao(25) = "20222222222222222202" -ao(26) = "20222222222222222202" -ao(27) = "20222222222222222202" -ao(28) = "20222222222222222202" -ao(29) = "20000000000000000002" -ao(30) = "22222222222222222222" - -END SELECT -IF fr = 50 THEN GOTO DrawFlippedSprite -IF fr > 1 THEN GOTO DrawScaledSprite - -FOR a = 1 TO 100 ' Normal sprite -IF ao(a) = "" THEN GOTO FinishDrawing -FOR b = 1 TO LEN(ao(a)) -PSET ((p + b) \ teler, (o + a) \ teler), ASC(RIGHT$(LEFT$(ao(a), b), 1)) - 48 -NEXT b -NEXT a -GOTO FinishDrawing - -DrawScaledSprite: ' Scaled sprite -FOR a = 1 TO 100 -IF ao(a) = "" THEN GOTO FinishDrawing -FOR b = 1 TO LEN(ao(a)) -c = ASC(RIGHT$(LEFT$(ao(a), b), 1)) - 48 -LINE (p + (b * fr), o + (a * fr))-(p + (b * fr) + fr, o + (a * fr) + fr), c, BF -NEXT b -NEXT a -GOTO FinishDrawing - -DrawFlippedSprite: ' Horizontally flipped sprite -FOR a = 1 TO 100 -IF ao(a) = "" THEN GOTO FinishDrawing -FOR b = 1 TO LEN(ao(a)) -PSET ((p + b) \ teler, (o + a) \ teler), ASC(LEFT$(RIGHT$(ao(a), b), 1)) - 48 -NEXT b -NEXT a - -FinishDrawing: -ERASE ao -END SUB - -SUB LoadLevel (y) -125 -FirstCompanionX% = 0 -FirstCompanionY% = 0 -aiia1 = 0 -SecondCompanionY% = 0 -FOR a1 = 1 TO 32 - FOR b1 = 1 TO 20 - TerrainGrid(a1, b1) = "" - ObjectGrid(a1, b1) = "" - NEXT b1 -NEXT a1 - -FOR a = 1 TO 10 - asciiLevelData(a) = "" -NEXT a - -CLS -LOCATE 3, 10 - -SELECT CASE y -CASE 1 -asciiLevelData(1) = " mmm" -asciiLevelData(2) = " - m mm" -asciiLevelData(3) = " . - mmm" -asciiLevelData(4) = "o . . mymm" -asciiLevelData(5) = "o -mmm" -asciiLevelData(6) = "o t mxmm" -asciiLevelData(7) = "o mmm" -asciiLevelData(8) = "o 1 1 " -asciiLevelData(9) = "o p p 1 1 1" -asciiLevelData(10) = "mmmmmmmmmmmmmmmm" -graphicsMode = 1 -CASE 2 -asciiLevelData(1) = "mmmmmmmmmmmmmmmm" -asciiLevelData(2) = "mm h h " -asciiLevelData(3) = "mmx m mmmymmm" -asciiLevelData(4) = "mmommmmmm mom m" -asciiLevelData(5) = "mo 1 1 1 o1m1m" -asciiLevelData(6) = "momm m m m m111m" -asciiLevelData(7) = "m h mmmmoom" -asciiLevelData(8) = " mm h m" -asciiLevelData(9) = " v mmm mm" -asciiLevelData(10) = "mmmmmmmmmmmmmmmm" -CASE 3 -asciiLevelData(1) = "mmmmmmmmmmmmmmmm" -asciiLevelData(2) = " h h h h h ym11" -asciiLevelData(3) = "mm mmmmmmmmmmm1m" -asciiLevelData(4) = "m h m xm " -asciiLevelData(5) = "mm m m mmmmmmmmm" -asciiLevelData(6) = "mmmm m1m " -asciiLevelData(7) = "m h m1moo m" -asciiLevelData(8) = "m mmmmmm m1moomm" -asciiLevelData(9) = "m 11111m h h " -asciiLevelData(10) = "mmmmmmmmmmmmmmmm" -CASE 4 -asciiLevelData(1) = "mmmmmmmmmmmmmmmm" -asciiLevelData(2) = " h1 h1 m" -asciiLevelData(3) = "mmm 1 11 1 o1m" -asciiLevelData(4) = " m 1 oo 1o1m" -asciiLevelData(5) = "m moo oo1m" -asciiLevelData(6) = " m h o " -asciiLevelData(7) = "mmm h o " -asciiLevelData(8) = "m o " -asciiLevelData(9) = " x oy " -asciiLevelData(10) = "mmmmmmmmmmmmmmmm" -CASE 5 -asciiLevelData(1) = "m . y - " -asciiLevelData(2) = "m m moo" -asciiLevelData(3) = "m. mxm mmo" -asciiLevelData(4) = "m - m mmmmmm" -asciiLevelData(5) = "m . m mm " -asciiLevelData(6) = "mt o o m " -asciiLevelData(7) = "m o om o ooo " -asciiLevelData(8) = "m ooooooooooo " -asciiLevelData(9) = " v o " -asciiLevelData(10) = "oooooooooooooooo" -CASE 6 -CLS -asciiLevelData(1) = " - " -asciiLevelData(2) = " . " -asciiLevelData(3) = " oo- oo " -asciiLevelData(4) = " - 11 11 ." -asciiLevelData(5) = " oo oo " -asciiLevelData(6) = " m ym11 11 " -asciiLevelData(7) = " m m " -asciiLevelData(8) = " ooom <> <> " -asciiLevelData(9) = " xmmm mmm" -asciiLevelData(10) = "mmmmmmmmmmm mmm" -CASE 7 -asciiLevelData(1) = " oooo " -asciiLevelData(2) = " o111 . " -asciiLevelData(3) = " oooo> >>>>>>" -asciiLevelData(4) = " . x v m" -asciiLevelData(5) = " mym m" -asciiLevelData(6) = " m m" -asciiLevelData(7) = " 111m" -asciiLevelData(8) = " 111m" -asciiLevelData(9) = " v p " -asciiLevelData(10) = "oooaaaaaaaaaoooo" -CASE 8 -asciiLevelData(1) = " . o" -asciiLevelData(2) = " . mm o" -asciiLevelData(3) = ". ommm t o" -asciiLevelData(4) = " mom mm o" -asciiLevelData(5) = " pmmoyxmmm o" -asciiLevelData(6) = " mmmomammmm m" -asciiLevelData(7) = "p mmmmv mmmm " -asciiLevelData(8) = "mmmmmmmmm mmmmmm" -asciiLevelData(9) = " " -asciiLevelData(10) = ">>>>>>>>>>>>>>>>" -CurrentLevelNumber% = CurrentLevelNumber% + 1 -CASE 10 -asciiLevelData(1) = "m. - m" -asciiLevelData(2) = "m . m" -asciiLevelData(3) = "m 111 - m" -asciiLevelData(4) = "mmmmm>>> ammm" -asciiLevelData(5) = "a a m" -asciiLevelData(6) = "mmm t a m" -asciiLevelData(7) = " ma m" -asciiLevelData(8) = ">>> a m" -asciiLevelData(9) = " m yx m m" -asciiLevelData(10) = ">>>mmmmmmmmmmm m" -CASE 9 -asciiLevelData(1) = "mammmmmmmmmmmmm " -asciiLevelData(2) = "m1m y xmo " -asciiLevelData(3) = "mamooo>>>a>am om" -asciiLevelData(4) = "m1m m1mamo m" -asciiLevelData(5) = "mamm m1mam om" -asciiLevelData(6) = "m1m mm1mamo m" -asciiLevelData(7) = "mammm m1ma om" -asciiLevelData(8) = "m1m mmm1ma o m" -asciiLevelData(9) = "m amam om" -asciiLevelData(10) = "mmmmmmmm 0 THEN GET (a, b)-(a + 20, b + 20), mar1 +IF b > 0 THEN IF sipp = 1 THEN PUT (a, b), sipp1, OR +IF b > 0 THEN IF sipp = 2 THEN PUT (a, b), sipp2, OR +IF b > 0 THEN IF sipp = 10 THEN PUT (a, b), sipp10, OR +IF b > 0 THEN IF sipp = 20 THEN PUT (a, b), sipp20, OR +IF b > 0 THEN IF sipp = 3 THEN PUT (a, b), sipp3, OR + +' Draw first companion hedgehog +GET (FirstCompanionX%, FirstCompanionY%)-(FirstCompanionX% + 10, FirstCompanionY% + 10), siil1 +PUT (FirstCompanionX%, FirstCompanionY%), siil, OR + +' Draw second companion hedgehog +GET (SecondCompanionX%, SecondCompanionY%)-(SecondCompanionX% + 10, SecondCompanionY% + 10), siil2 +PUT (SecondCompanionX%, SecondCompanionY%), siil, OR + +' Create short delay using sound command (workaround for no built-in delay) +SOUND 0, .8 + +' Check collisions with terrain (z = solid block) +' Right side collision checks +IF TerrainGrid((a + 38) \ 20, (b + 37) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 +IF TerrainGrid((a + 38) \ 20, (b + 22) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 + +' Left side collision checks +IF TerrainGrid((a + 21) \ 20, (b + 22) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 +IF TerrainGrid((a + 21) \ 20, (b + 37) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 + +' Top collision checks +IF TerrainGrid((a + 22) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 +IF TerrainGrid((a + 37) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 + +' Bottom collision checks (landing on ground) +IF TerrainGrid((a + 22) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 +IF TerrainGrid((a + 37) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 + +qwer = qwer + 1: IF ObjectGrid((a + 30) \ 20, (b + 30) \ 20) = "q" AND qwer > 20 THEN qwer = 1: LivesRemaining% = LivesRemaining% - 1: eda = -10: all = -5: DisplayGameStatistics +IF qwer > 100 THEN qwer = 50 + +' Coin collection logic +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "1" THEN CoinsCollected% = CoinsCollected% + 1: kustuta1 = 1: DisplayGameStatistics: TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "" + +' Trampoline effect +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "v" THEN all = -8: sipp = 3 + +' Conveyor belt movement triggers +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = ">" THEN eda = 3 +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "<" THEN eda = -3 + +lke = lke + 1 +r = r + 1: IF r > 10 THEN r = 0: IF eda > 0 THEN eda = eda - 1: ELSE IF eda < 0 THEN eda = eda + 1 +r1 = r1 + 1: IF r1 > 3 THEN r1 = 0: all = all + 1 +lk = lk + 1: cd = cd - 1 + +' Breakable block interaction +IF ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "o" THEN TerrainGrid((a + 30) \ 20, (b + 21) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "": kustuta = 1 + +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "a" THEN TerrainGrid((a + 30) \ 20, (b + 38) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "": kustuta2 = 1 + +' First companion hedgehog terrain collision checks +IF TerrainGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 25) \ 20) = "z" THEN siiall = -1 +IF TerrainGrid((FirstCompanionX% + 30) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = -1 +IF TerrainGrid((FirstCompanionX% + 20) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = 1 + +' Second companion hedgehog terrain collision checks +IF TerrainGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 25) \ 20) = "z" THEN siiall1 = -1 +IF TerrainGrid((SecondCompanionX% + 30) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = -1 +IF TerrainGrid((SecondCompanionX% + 20) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = 1 + +' Screen boundary checks for companions +IF FirstCompanionX% > 300 THEN siie = -1 +IF FirstCompanionX% < 3 THEN siie = 1 +IF SecondCompanionX% > 300 THEN siie1 = -1 +IF SecondCompanionX% < 3 THEN siie1 = 1 + +' Restore previous companion positions +PUT (SecondCompanionX%, SecondCompanionY%), siil2, PSET +PUT (FirstCompanionX%, FirstCompanionY%), siil1, PSET + +' Restore previous player position +IF b > 0 THEN PUT (a, b), mar1, PSET + +' Handle sprite clearing after coin collection +IF kustuta = 1 THEN kustuta = 0: PUT (((a + 10) \ 20) * 20, (b \ 20) * 20), EmptySpaceSprite, PSET +IF kustuta1 = 1 THEN kustuta1 = 0: PUT (((a + 10) \ 20) * 20, ((b + 10) \ 20) * 20), EmptySpaceSprite, PSET +IF kustuta2 = 1 THEN kustuta2 = 0: PUT (((a + 10) \ 20) * 20, ((b + 28) \ 20) * 20), EmptySpaceSprite, PSET + +IF makk = 1 THEN makk = 0: a = a - 20 + +ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "" + +' Update companion positions +FirstCompanionX% = FirstCompanionX% + siie +FirstCompanionY% = FirstCompanionY% + siiall +SecondCompanionX% = SecondCompanionX% + siie1 +SecondCompanionY% = SecondCompanionY% + siiall1 + +' Mark new companion positions in object grid +ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "q": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "q" + +' Apply gravity to companions (max downward velocity = 2) +siiall = siiall + 1: IF siiall > 2 THEN siiall = 2 +siiall1 = siiall1 + 1: IF siiall1 > 2 THEN siiall1 = 2 + +' Update player position based on velocity +a = a + eda +b = b + all + +' Level transition when reaching right edge +IF a > 297 THEN a = 2: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 + +' Level transition when reaching left edge +IF a < 1 THEN a = 296: IF CurrentLevelNumber% = 1 THEN LoadLevel CurrentLevelNumber%: ELSE CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: IF graphicsMode = 2 THEN a = 594 + +' Player falls off bottom of screen +IF b > 179 THEN LivesRemaining% = LivesRemaining% - 1: DisplayGameStatistics: CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: b = 100: a = 2: DisplayGameStatistics + +' Teleportation triggers ("u" and "U" markers in level data) +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "u" THEN a = DoorExitX% + 10: b = DoorExitY%: eda = 0 +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "U" THEN a = DoorEntryX% + 10: b = DoorEntryY%: eda = 0 + +IF kbd$ = rightArrowKey$ THEN eda = eda + 1: IF eda > 3 THEN eda = 3: r = 0 ELSE IF lke > 10 THEN eda = 5 +IF kbd$ = rightArrowKey$ THEN IF sipa = 1 THEN sipp = 1: ELSE sipp = 2 +IF kbd$ = leftArrowKey$ THEN IF sipa = 1 THEN sipp = 10: ELSE sipp = 20 +IF kbd$ = leftArrowKey$ THEN eda = eda - 1: IF eda < -3 THEN eda = -3: r = 0 ELSE IF lke > 10 THEN eda = -5 +IF kbd$ = upArrowKey$ AND lk < 10 THEN all = all - 5: lk = 20: r1 = 0: sipp = 3 +IF kbd$ = downArrowKey$ THEN all = all + 1 +IF kbd$ = "/" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 +IF kbd$ = "+" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 5: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 +IF kbd$ = "q" THEN END +sipa = sipa + 1 +IF sipa = 3 THEN sipa = 1 +GOTO MainGameLoop + + +106 +kbd$ = INKEY$ +IF graphicsMode = 1 THEN b = b / 2: GOTO MainGameLoop +IF b > 0 THEN GET (a \ 2, b \ 2)-((a + 20) \ 2, (b + 20) \ 2), marm1 +IF b > 0 THEN IF sipp = 1 THEN PUT (a \ 2, b \ 2), sippm1, OR +IF b > 0 THEN IF sipp = 2 THEN PUT (a \ 2, b \ 2), sippm2, OR +IF b > 0 THEN IF sipp = 10 THEN PUT (a \ 2, b \ 2), sippm10, OR +IF b > 0 THEN IF sipp = 20 THEN PUT (a \ 2, b \ 2), sippm20, OR +IF b > 0 THEN IF sipp = 3 THEN PUT (a \ 2, b \ 2), sippm3, OR + +' Draw companions in scaled down mode +GET (FirstCompanionX% \ 2, FirstCompanionY% \ 2)-((FirstCompanionX% + 10) \ 2, (FirstCompanionY% + 10) \ 2), siilm1 +PUT (FirstCompanionX% \ 2, FirstCompanionY% \ 2), siilm, OR +GET (SecondCompanionX% \ 2, SecondCompanionY% \ 2)-((siia1 + 10) \ 2, (SecondCompanionY% + 10) \ 2), siilm2 +PUT (SecondCompanionX% \ 2, SecondCompanionY% \ 2), siilm, OR + +' Small delay to limit framerate +SOUND 0, .8 + +' Check collisions with terrain (z = solid block) +' Right side collision checks +IF TerrainGrid((a + 38) \ 20, (b + 37) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 +IF TerrainGrid((a + 38) \ 20, (b + 22) \ 20) = "z" THEN eda = -1: r = 9: lke = 0 + +' Left side collision checks +IF TerrainGrid((a + 21) \ 20, (b + 22) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 +IF TerrainGrid((a + 21) \ 20, (b + 37) \ 20) = "z" THEN eda = 1: r = 9: lke = 0 + +' Top collision checks +IF TerrainGrid((a + 22) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 +IF TerrainGrid((a + 37) \ 20, (b + 21) \ 20) = "z" THEN all = 0: cd = 10: lke = 0 + +' Bottom collision checks (landing on ground) +IF TerrainGrid((a + 22) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 +IF TerrainGrid((a + 37) \ 20, (b + 38) \ 20) = "z" THEN all = -1: r1 = 2: lk = 1: lke = 0 + +qwer = qwer + 1: IF ObjectGrid((a + 30) \ 20, (b + 30) \ 20) = "q" AND qwer > 20 THEN qwer = 1: LivesRemaining% = LivesRemaining% - 1: eda = -5: all = -3: DisplayGameStatistics +IF qwer > 100 THEN qwer = 50 + +' Coin collection logic +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "1" THEN CoinsCollected% = CoinsCollected% + 1: kustuta1 = 1: DisplayGameStatistics: TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "" + +' Trampoline effect +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "v" THEN all = -8: sipp = 3 + +' Conveyor belt movement triggers +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = ">" THEN eda = 3 +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "<" THEN eda = -3 + +lke = lke + 1 +r = r + 1: IF r > 10 THEN r = 0: IF eda > 0 THEN eda = eda - 1: ELSE IF eda < 0 THEN eda = eda + 1 +r1 = r1 + 1: IF r1 > 3 THEN r1 = 0: all = all + 1 +lk = lk + 1: cd = cd - 1 + +' Breakable block interaction +IF ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "o" THEN TerrainGrid((a + 30) \ 20, (b + 21) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 21) \ 20) = "": kustuta = 1 + +IF ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "a" THEN TerrainGrid((a + 30) \ 20, (b + 38) \ 20) = "": ObjectGrid((a + 30) \ 20, (b + 38) \ 20) = "": kustuta2 = 1 + +' First companion hedgehog terrain collision checks +IF TerrainGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 25) \ 20) = "z" THEN siiall = -1 +IF TerrainGrid((FirstCompanionX% + 30) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = -1 +IF TerrainGrid((FirstCompanionX% + 20) \ 20, (FirstCompanionY% + 10) \ 20) = "z" THEN siie = 1 + +' Second companion hedgehog terrain collision checks +IF TerrainGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 25) \ 20) = "z" THEN siiall1 = -1 +IF TerrainGrid((SecondCompanionX% + 30) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = -1 +IF TerrainGrid((SecondCompanionX% + 20) \ 20, (SecondCompanionY% + 10) \ 20) = "z" THEN siie1 = 1 + +' Screen boundary checks for companions +IF FirstCompanionX% > 600 THEN siie = -1 +IF FirstCompanionX% < 3 THEN siie = 1 +IF SecondCompanionX% > 600 THEN siie1 = -1 +IF SecondCompanionX% < 3 THEN siie1 = 1 + +' Restore previous companion positions +PUT (SecondCompanionX% \ 2, SecondCompanionY% \ 2), siilm2, PSET +PUT (FirstCompanionX% \ 2, FirstCompanionY% \ 2), siilm1, PSET + +' Restore previous player position +IF b > 0 THEN PUT (a \ 2, b \ 2), marm1, PSET + +' Handle sprite clearing after coin collection +IF kustuta = 1 THEN kustuta = 0: PUT (((a + 10) \ 20) * 10, (b \ 20) * 10), EmptySpaceSpriteSmall, PSET +IF kustuta1 = 1 THEN kustuta1 = 0: PUT (((a + 10) \ 20) * 10, ((b + 10) \ 20) * 10), EmptySpaceSpriteSmall, PSET +IF kustuta2 = 1 THEN kustuta2 = 0: PUT (((a + 10) \ 20) * 10, ((b + 28) \ 20) * 10), EmptySpaceSpriteSmall, PSET + +IF makk = 1 THEN makk = 0: a = a - 20 + +ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "" + +' Update companion positions +FirstCompanionX% = FirstCompanionX% + siie +FirstCompanionY% = FirstCompanionY% + siiall +SecondCompanionX% = SecondCompanionX% + siie1 +SecondCompanionY% = SecondCompanionY% + siiall1 + +' Mark new companion positions in object grid +ObjectGrid((SecondCompanionX% + 25) \ 20, (SecondCompanionY% + 8) \ 20) = "q": ObjectGrid((FirstCompanionX% + 25) \ 20, (FirstCompanionY% + 8) \ 20) = "q" +siiall = siiall + 1: IF siiall > 2 THEN siiall = 2 +siiall1 = siiall1 + 1: IF siiall1 > 2 THEN siiall1 = 2 + +' Update player position based on velocity +a = a + eda +b = b + all + +' Level transition when reaching right edge +IF a > 594 THEN a = 2: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 + +' Level transition when reaching left edge +IF a < 1 THEN a = 594: IF CurrentLevelNumber% = 1 THEN LoadLevel CurrentLevelNumber%: ELSE CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: IF graphicsMode = 1 THEN a = 297 + +' Player falls off bottom of screen +IF b > 358 THEN LivesRemaining% = LivesRemaining% - 1: DisplayGameStatistics: CurrentLevelNumber% = CurrentLevelNumber% - 1: LoadLevel CurrentLevelNumber%: b = 100: a = 2: DisplayGameStatistics + +' Teleportation triggers ("u" and "U" markers in level data) +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "u" THEN a = DoorExitX% + 5: b = DoorExitY%: eda = 0 +IF TerrainGrid((a + 30) \ 20, (b + 30) \ 20) = "U" THEN a = DoorEntryX% + 5: b = DoorEntryY%: eda = 0 + +IF kbd$ = rightArrowKey$ THEN eda = eda + 1: IF eda > 3 THEN eda = 3: r = 0 ELSE IF lke > 10 THEN eda = 5 +IF kbd$ = rightArrowKey$ THEN IF sipa = 1 THEN sipp = 1: ELSE sipp = 2 +IF kbd$ = leftArrowKey$ THEN IF sipa = 1 THEN sipp = 10: ELSE sipp = 20 +IF kbd$ = leftArrowKey$ THEN eda = eda - 1: IF eda < -3 THEN eda = -3: r = 0 ELSE IF lke > 10 THEN eda = -5 +IF kbd$ = upArrowKey$ AND lk < 10 THEN all = all - 5: lk = 20: r1 = 0: sipp = 3 +IF kbd$ = downArrowKey$ THEN all = all + 1 +IF kbd$ = "/" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 1: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 +IF kbd$ = "+" THEN a = 2: b = 50: CurrentLevelNumber% = CurrentLevelNumber% + 5: LoadLevel CurrentLevelNumber%: siie = 1: siie1 = 1 +IF kbd$ = "q" THEN END + +sipa = sipa + 1 +IF sipa = 3 THEN sipa = 1 + +GOTO 106 + +SUB DisplayGameStatistics +' +' Updates and displays the game's status information (coins collected, lives remaining) +' Handles game over condition when lives reach zero. +' +' This subroutine is called whenever the game state changes that affects statistics: +' - When a coin is collected +' - When the player loses a life +' - Periodically during gameplay + +LOCATE 1, 1 +IF GraphicsMode% = 2 THEN GOTO SkipTextDisplay + +' Clear previous stats display +PRINT " " + +' Award extra life every 10 coins collected +IF CoinsCollected% > 9 THEN CoinsCollected% = 0: LivesRemaining% = LivesRemaining% + 1 + +' Display current game statistics +LOCATE 1, 1 +PRINT "o "; CoinsCollected%; " Lives "; LivesRemaining% + +SkipTextDisplay: +' Check if player has run out of lives +IF LivesRemaining% < 0 THEN END +END SUB + +SUB DrawSprite (p, o, m, fr, teler) + +' Renders a sprite on screen based on predefined character patterns. +' +' How it works: +' The subroutine uses a lookup table (ao array) containing string representations +' of each sprite. Each character in these strings represents a pixel color. +' Depending on the parameters, it either: +' - Draws individual pixels (ScaleFactor=1) +' - Draws filled rectangles for each pixel (ScaleFactor>1 but not 50) +' - Draws flipped version of individual pixels (SpriteVariant=50) +' +' This flexible approach allows the same sprite data to be rendered at different +' sizes and orientations without storing multiple copies of the sprite data. + +DIM ao(1 TO 100) AS STRING +SELECT CASE m +CASE 1 ' Solid block pattern +ao(1) = "00000000000000000000" +ao(2) = "00111111111111111100" +ao(3) = "01222222222222222210" +ao(4) = "01233333333333333210" +ao(5) = "01232222222222223210" +ao(6) = "01232111111111123210" +ao(7) = "01232111111111123210" +ao(8) = "01232111111111123210" +ao(9) = "01232111111111123210" +ao(10) = "01232111111111123210" +ao(11) = "01232111111111123210" +ao(12) = "01232111111111123210" +ao(13) = "01232111111111123210" +ao(14) = "01232111111111123210" +ao(15) = "01232111111111123210" +ao(16) = "01232222222222223210" +ao(17) = "01233333333333333210" +ao(18) = "01222222222222222210" +ao(19) = "00111111111111111100" +ao(20) = "00000000000000000000" +CASE 2 ' Cloud sprite +ao(1) = "000000022200000222220000002222222200000000000222222000000000" +ao(2) = "000000022222002222222000222222222222000000222222222220000000" +ao(3) = "000000222222222222222202222222222222222222222222222222200000" +ao(4) = "000000222222222222222222222333333222220222222222222221110000" +ao(5) = "000000222222233333322222223333333322222222222222222221111000" +ao(6) = "000000022333333333333222233333333333222233322222222221111000" +ao(7) = "000002222333333333333322233333333333333333333222222221111100" +ao(8) = "000222222333333333333333333333333333333333333322222221111100" +ao(9) = "002222223333333333333333333333333333333333333333222221111100" +ao(10) = "022223333333333333333333333333333333333333333333222221111110" +ao(11) = "022233333333333333333333333333333333333333333333322222111110" +ao(12) = "222333333333333333333333333333333333333333333333322222111110" +ao(13) = "222333333333333333333333323333333323131113333333221221111110" +ao(14) = "223333333333333333333331112233331121111133333322112211111110" +ao(15) = "213333333333333333333331111133111111111111111112222111111110" +ao(16) = "111333313333333333333111111122111111111111111111221111111110" +ao(17) = "111333311111111333111111111111111111111111111111111111111100" +ao(18) = "011111111111111111111111111111111111111111111111111111111100" +ao(19) = "011111111111111111111111111111111111111111111111111111111100" +ao(20) = "011111111111111111111111111111111111111111111111111111111000" +ao(21) = "001111111111111111111111111111111111111111111111110111100000" +ao(22) = "001111111111111100111111111111111111111111111111100000000000" +ao(23) = "000111111111110000011111111111100011111111111111000000000000" +ao(24) = "000011111111100000000111111111000000011111111100000000000000" +ao(25) = "000001111110000000000001111110000000000000000000000000000000" +CASE 3 +ao(1) = "0000010000" +ao(2) = "0000010000" +ao(3) = "0000121000" +ao(4) = "0000131000" +ao(5) = "1111232111" +ao(6) = "0123333210" +ao(7) = "0123333210" +ao(8) = "0012332100" +ao(9) = "0001221000" +ao(10) = "0012112100" +ao(11) = "0121001210" +ao(12) = "0110000110" +ao(13) = "1100000011" +CASE 4 +ao(1) = "01111111110111111111" +ao(2) = "01222222210122222221" +ao(3) = "01233333210123333321" +ao(4) = "01233333210123333321" +ao(5) = "01233333210123333321" +ao(6) = "01233333210123333321" +ao(7) = "01233333210123333321" +ao(8) = "01222222210122222221" +ao(9) = "01111111110111111111" +ao(10) = "00000000000000000000" +ao(11) = "01111111110111111111" +ao(12) = "01222222210122222221" +ao(13) = "01233333210123333321" +ao(14) = "01233333210123333321" +ao(15) = "01233333210123333321" +ao(16) = "01233333210123333321" +ao(17) = "01233333210123333321" +ao(18) = "01222222210122222221" +ao(19) = "01111111110111111111" +ao(20) = "00000000000000000000" +CASE 5 +ao(1) = "0000333000" +ao(2) = "0033333300" +ao(3) = "0332222220" +ao(4) = "3322222222" +ao(5) = "3222111112" +ao(6) = "3111111111" +ao(7) = "1111111111" +CASE 6 +ao(1) = "00111100" +ao(2) = "01222210" +ao(3) = "12233221" +ao(4) = "12233221" +ao(5) = "12233221" +ao(6) = "12233221" +ao(7) = "12233221" +ao(8) = "12233221" +ao(9) = "01222210" +ao(10) = "00111100" +CASE 7 +ao(1) = "000000000000000033333300000000" +ao(2) = "000000000000000333333333000000" +ao(3) = "000000333300003332222222300000" +ao(4) = "000003333330333322232222220000" +ao(5) = "000033322333333222222222222000" +ao(6) = "003332222223332222322212222200" +ao(7) = "033222232222222222111211122200" +ao(8) = "033222222232111111111111112220" +ao(9) = "332223222111121121111111111222" +ao(10) = "322222111111111111121111111111" +CASE 8 +ao(1) = "0000000002222222000000000" +ao(2) = "0000000222111112220000000" +ao(3) = "0000002211131311122000000" +ao(4) = "0000022113331133112200000" +ao(5) = "0000022133331333312200000" +ao(6) = "0000221133331333311220000" +ao(7) = "0000221333331333331220000" +ao(8) = "0000221333331333331220000" +ao(9) = "0000221111111111111220000" +ao(10) = "0000221333331333331220000" +ao(11) = "0002211333331333331122000" +ao(12) = "0002213333331333333122000" +ao(13) = "0002213333331333333122000" +ao(14) = "0002213333331333333122000" +ao(15) = "0002213333331333333122000" +ao(16) = "0002213333331333333122000" +ao(17) = "0002213333331333333122000" +ao(18) = "0002211111111111111122000" +ao(19) = "2222222222222222222222222" +ao(20) = "0222222222222222222222220" +CASE 9 +ao(1) = "00000001112220000000" +ao(2) = "00001112222111120000" +ao(3) = "00112222111122221100" +ao(4) = "02222111122221111110" +ao(5) = "01111122221111122220" +ao(6) = "11122221111122221111" +ao(7) = "22221111122221111111" +ao(8) = "21111122221111112222" +ao(9) = "11222221111112222111" +ao(10) = "22221111112222111111" +CASE 10 +ao(1) = "33333333333333333333333333333333333333333333333333333333333333333333333333333333" +ao(2) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(3) = "30000110000111001110011111100011111110011111100000000000000000000000000000000003" +ao(4) = "30001111100111001110011111110011111110011111110000000000000000002222000000000003" +ao(5) = "30011001100011001100011100110011100110011100111000000000000000222222220000000003" +ao(6) = "30011000000011001100011111110011100000011100111000000000000000222222222222000003" +ao(7) = "30011000000011001100011111100011100110011111110000000000000000330330330002200003" +ao(8) = "30011111000011001100011100000011111110011111100000000000000000333333330000000003" +ao(9) = "30001111100011001100011100000011111110011100100000000000000000332222330000000003" +ao(10) = "30000001100011001100011100000011100000011100110000000000000000033333300000000003" +ao(11) = "30110001100011001100011100000011100110011100111000000000000030000111000000000003" +ao(12) = "30111011100011111100011100000011111110011100111000000000000331111111111000000003" +ao(13) = "30111111000001111000011100000011111110011100111000000000000331111111111100000003" +ao(14) = "30000000000000000000000000000000000000000000000000000000000000001111101100000003" +ao(15) = "30000000000000000000000000000000000000000000000000000000000000001111101100000003" +ao(16) = "30000000000000000000000000000000000000000000000000000000000000001101100000000003" +ao(17) = "30000000000000000000000000000000000000000000000000000000000000011101110000000003" +ao(18) = "30000000000000000000000000000000000000000000000000000000000000011101110000000003" +ao(19) = "30000000000000000000000000000000000000000000000000000000000000333303330000000003" +ao(20) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(21) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(22) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(23) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(24) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(25) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(26) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(27) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(28) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(29) = "30000000000000000000000000000000000000000000000000000000000000000000000000000003" +ao(30) = "33333333333333333333333333333333333333333333333333333333333333333333333333333333" +CASE 11 +ao(1) = "00000000000111111110000000000000000000000000000000" +ao(2) = "00000000011111111111000001100000000000000000000000" +ao(3) = "00000000111111111111110011110000000000000000000000" +ao(4) = "00000001101111111111111111111000000000000000000000" +ao(5) = "00000011111111111111111111111111000000000000000000" +ao(6) = "00000111111111111111111111111111000000000000000000" +ao(7) = "00000111111111111111111111111111001100000000000000" +ao(8) = "00000111111111111111111111111111111111100000000000" +ao(9) = "00000111111111111111111111111111111111100000000000" +ao(10) = "00000111111111111111111111111111111111110000000000" +ao(11) = "00000111111111111111111111111111111111111000000000" +ao(12) = "00000111111111111111111111111111111111111100000000" +ao(13) = "00000111111111111111111111111111111111111100000000" +ao(14) = "00000111111111111111111111111111111111111100000000" +ao(15) = "00000111111111111111111111111111111111111100000000" +ao(16) = "00000111111111111111111111111111111111111100000000" +ao(17) = "00011111111111111111111111111111111111111100000000" +ao(18) = "00011111111111111111111111111111111111111100000000" +ao(19) = "00111111110111111111111111111111111111111100000000" +ao(20) = "01110111111111111111111111111111111111111100000000" +ao(21) = "11111111111111111111111111111111111111111111100000" +ao(22) = "11111111111111111111111111111111111111111111100000" +ao(23) = "11111111111111111111111111111111111111111111100000" +ao(24) = "11111111111111111111111111111111111111111111100000" +ao(25) = "11111111111111111111111111111111111111111111111110" +ao(26) = "11111111111111111111111111111111111111111111110111" +ao(27) = "11111111111111111111111111111111111111111111111111" +ao(28) = "11011111111111111111111111111111111111111111111101" +ao(29) = "11111111111111111111111111111111111111111111111111" +ao(30) = "11111111111111111111111111111111111111111111111111" +ao(31) = "11111111111111111111111111111111111111111111111011" +ao(32) = "11111111111111111111111111111111111111111111111100" +ao(33) = "11111111111111111111111111111111111111111111111000" +ao(34) = "01111111111111111111111111111111111111111111110000" +ao(35) = "11111111111111111111111111111111111111111110110000" +ao(36) = "11111111111111111111111111111111111111111110110000" +ao(37) = "11111111111111111111111111111111111111111111110000" +ao(38) = "01111111111111111111111111111111111111111111110000" +ao(39) = "01111111111111111111111111111111111111111111110000" +ao(40) = "00011111111111111111111111111111111111111111100000" +ao(41) = "00111111111111111111111111111111111111111111100000" +ao(42) = "00011111111111111111111111111111111111111111110000" +ao(43) = "00001111111111111111111111111111111111111111110000" +ao(44) = "00001111111111111111111111111111111111111111111000" +ao(45) = "0000110111111111111111111111111111111111111111100" +ao(46) = "0000110011111111111111111111011111111111111100000" +ao(47) = "0000111101101111111111111111111111111110111000000" +ao(48) = "0000000000001111111111111111111111111111110000000" +ao(49) = "0000000000000001111111111111111111110111110000000" +ao(50) = "0000000000000000000011111111111111100111110000000" +ao(51) = "0000000000000000000001111020111000000000000000000" +ao(52) = "0000000000000000000001111222200000000000000000000" +ao(53) = "0000000000000000000000222222220000000000000000000" +ao(54) = "0000000000000000000000222222020000000000000000000" +ao(55) = "0000000000000000000000202222220000000000000000000" +ao(56) = "0000000000000000000000222222220000000000000000000" +ao(57) = "0000000000000000000000220202220000000000000000000" +ao(58) = "0000000000000000000000222222220000000000000000000" +ao(59) = "0000000000000000000000202222220000000000000000000" +ao(60) = "0000000000000000000000222222220000000000000000000" +ao(61) = "000000000000000000000022022220000000000" +ao(62) = "0000000000000000000000222222220000000000000000000" +ao(63) = "0000000000000000000000220222200000000000000000000" +ao(64) = "0000000000000000000000222220200000000000000000000" +ao(65) = "0000000000000000000000220222200000000000000000000" +ao(66) = "0000000000000000000000222222200000000000000000000" +ao(67) = "0000000000000000000000222222200000000000000000000" +ao(68) = "0000000000000000000000202222000000000000000000000" +ao(69) = "0000000000000000002000222222220000000000000000000" +ao(70) = "0000000000000000002200222222000000000000000000000" +ao(71) = "0000000000000000000222222222000000000000000000000" +ao(72) = "0000000000000000000222222222000000000000000000000" +ao(73) = "0000000000000000000022222222000000000000000000000" +ao(74) = "0000000000000000000022222222000000000000000000000" +ao(75) = "0000000000000000000020222222000000000000000000000" +ao(76) = "0000000000000000000222222202000000000000000000000" +ao(77) = "000000000000000000022022222200000000000" +ao(78) = "0000000000000000022222222222200000000000000000000" +ao(79) = "0000000000000000220222222222220000" +ao(80) = "000000000000000022222222222222" +CASE 12 +ao(1) = "11111111111111111111" +ao(2) = "11111111111111111111" +ao(3) = "11111111112111111111" +ao(4) = "11111111112211111111" +ao(5) = "11111111112221111111" +ao(6) = "11111111112222111111" +ao(7) = "11111111112222211111" +ao(8) = "11122222222222221111" +ao(9) = "11122222222222222111" +ao(10) = "11122222222222222211" +ao(11) = "11122222222222222211" +ao(12) = "11122222222222222111" +ao(13) = "11122222222222221111" +ao(14) = "11111111112222211111" +ao(15) = "11111111112222111111" +ao(16) = "11111111112221111111" +ao(17) = "11111111112211111111" +ao(18) = "11111111112111111111" +ao(19) = "11111111111111111111" +ao(20) = "11111111111111111111" +CASE 13 +ao(1) = "03333333333333333330" +ao(2) = "33333333222233333333" +ao(3) = "33333332222223333333" +ao(4) = "33333332222223333333" +ao(5) = "33333332222223333333" +ao(6) = "33333332222223333333" +ao(7) = "33333332222223333333" +ao(8) = "33333332222223333333" +ao(9) = "33333332222223333333" +ao(10) = "33333332222223333333" +ao(11) = "33333333222233333333" +ao(12) = "33333333333333333333" +ao(13) = "33333333333333333333" +ao(14) = "33333333222233333333" +ao(15) = "33333332222223333333" +ao(16) = "33333332222223333333" +ao(17) = "33333332222223333333" +ao(18) = "33333333222233333333" +ao(19) = "33333333333333333333" +ao(20) = "03333333333333333330" +CASE 14 + +ao(1) = "00000000022220000000" +ao(2) = "00000000022220000000" +ao(3) = "00000000022222000000" +ao(4) = "00000000033333000000" +ao(5) = "00000000033333300000" +ao(6) = "00000000033333300000" +ao(7) = "00000000003333000000" +ao(8) = "00000000011100000000" +ao(9) = "00000003111130000000" +ao(10) = "00000003111130000000" +ao(11) = "00000003111130000000" +ao(12) = "00000003111133000000" +ao(13) = "00000003111130000000" +ao(14) = "00000003111130000000" +ao(15) = "00000000333300000000" +ao(16) = "00000000333300000000" +ao(17) = "00000003303300000000" +ao(18) = "00000003303300000000" +ao(19) = "00000033302220000000" +ao(20) = "00000022200000000000" + + +CASE 15 +ao(1) = "00000000022220000000" +ao(2) = "00000000022220000000" +ao(3) = "00000000022222000000" +ao(4) = "00000000033333000000" +ao(5) = "00000000033333300000" +ao(6) = "00000000033333300000" +ao(7) = "00000000003333000000" +ao(8) = "00000000011100000000" +ao(9) = "00000003111130000000" +ao(10) = "00000003111130000000" +ao(11) = "00000003111130000000" +ao(12) = "00000033111130000000" +ao(13) = "00000003111130000000" +ao(14) = "00000003111130000000" +ao(15) = "00000000333300000000" +ao(16) = "00000000333300000000" +ao(17) = "00000000330330000000" +ao(18) = "00000000330330000000" +ao(19) = "00000002220333000000" +ao(20) = "00000000000222000000" + +CASE 16 + +ao(1) = "00000000022220000000" +ao(2) = "00000000022220000000" +ao(3) = "00000000022222000000" +ao(4) = "00000000033333000000" +ao(5) = "00000000033333300000" +ao(6) = "00000000033333300000" +ao(7) = "00000000103330100000" +ao(8) = "00000001111111000000" +ao(9) = "00000000311130000000" +ao(10) = "00000000311130000000" +ao(11) = "00000000311130000000" +ao(12) = "00000000311130000000" +ao(13) = "00000000311130000000" +ao(14) = "00000000311130000000" +ao(15) = "00000000333300000000" +ao(16) = "00000000333300000000" +ao(17) = "00000000330330000000" +ao(18) = "00000000330330000000" +ao(19) = "00000000330330000000" +ao(20) = "00000000222222000000" + +CASE 17 ' Door sprite +ao(1) = "00000022222222000000" +ao(2) = "00002222222222220000" +ao(3) = "00022220000000222000" +ao(4) = "00020002222222002000" +ao(5) = "00202222222222222200" +ao(6) = "00202222222222220200" +ao(7) = "00202222222222220200" +ao(8) = "02202222222222220220" +ao(9) = "02022222222222220220" +ao(10) = "02022323232323322020" +ao(11) = "02022323232323222020" +ao(12) = "02022323233223332020" +ao(13) = "22022323232322232022" +ao(14) = "20222323232322232202" +ao(15) = "20222232232323332202" +ao(16) = "20222222222222222202" +ao(17) = "20222222222222112202" +ao(18) = "20222222222222112202" +ao(19) = "20222222222222112202" +ao(20) = "20222222222222222202" +ao(21) = "20222222222222222202" +ao(22) = "20222222222222222202" +ao(23) = "20222222222222222202" +ao(24) = "20222222222222222202" +ao(25) = "20222222222222222202" +ao(26) = "20222222222222222202" +ao(27) = "20222222222222222202" +ao(28) = "20222222222222222202" +ao(29) = "20000000000000000002" +ao(30) = "22222222222222222222" + +END SELECT +IF fr = 50 THEN GOTO DrawFlippedSprite +IF fr > 1 THEN GOTO DrawScaledSprite + +FOR a = 1 TO 100 ' Normal sprite +IF ao(a) = "" THEN GOTO FinishDrawing +FOR b = 1 TO LEN(ao(a)) +PSET ((p + b) \ teler, (o + a) \ teler), ASC(RIGHT$(LEFT$(ao(a), b), 1)) - 48 +NEXT b +NEXT a +GOTO FinishDrawing + +DrawScaledSprite: ' Scaled sprite +FOR a = 1 TO 100 +IF ao(a) = "" THEN GOTO FinishDrawing +FOR b = 1 TO LEN(ao(a)) +c = ASC(RIGHT$(LEFT$(ao(a), b), 1)) - 48 +LINE (p + (b * fr), o + (a * fr))-(p + (b * fr) + fr, o + (a * fr) + fr), c, BF +NEXT b +NEXT a +GOTO FinishDrawing + +DrawFlippedSprite: ' Horizontally flipped sprite +FOR a = 1 TO 100 +IF ao(a) = "" THEN GOTO FinishDrawing +FOR b = 1 TO LEN(ao(a)) +PSET ((p + b) \ teler, (o + a) \ teler), ASC(LEFT$(RIGHT$(ao(a), b), 1)) - 48 +NEXT b +NEXT a + +FinishDrawing: +ERASE ao +END SUB + +SUB LoadLevel (y) +125 +FirstCompanionX% = 0 +FirstCompanionY% = 0 +aiia1 = 0 +SecondCompanionY% = 0 +FOR a1 = 1 TO 32 + FOR b1 = 1 TO 20 + TerrainGrid(a1, b1) = "" + ObjectGrid(a1, b1) = "" + NEXT b1 +NEXT a1 + +FOR a = 1 TO 10 + asciiLevelData(a) = "" +NEXT a + +CLS +LOCATE 3, 10 + +SELECT CASE y +CASE 1 +asciiLevelData(1) = " mmm" +asciiLevelData(2) = " - m mm" +asciiLevelData(3) = " . - mmm" +asciiLevelData(4) = "o . . mymm" +asciiLevelData(5) = "o -mmm" +asciiLevelData(6) = "o t mxmm" +asciiLevelData(7) = "o mmm" +asciiLevelData(8) = "o 1 1 " +asciiLevelData(9) = "o p p 1 1 1" +asciiLevelData(10) = "mmmmmmmmmmmmmmmm" +graphicsMode = 1 +CASE 2 +asciiLevelData(1) = "mmmmmmmmmmmmmmmm" +asciiLevelData(2) = "mm h h " +asciiLevelData(3) = "mmx m mmmymmm" +asciiLevelData(4) = "mmommmmmm mom m" +asciiLevelData(5) = "mo 1 1 1 o1m1m" +asciiLevelData(6) = "momm m m m m111m" +asciiLevelData(7) = "m h mmmmoom" +asciiLevelData(8) = " mm h m" +asciiLevelData(9) = " v mmm mm" +asciiLevelData(10) = "mmmmmmmmmmmmmmmm" +CASE 3 +asciiLevelData(1) = "mmmmmmmmmmmmmmmm" +asciiLevelData(2) = " h h h h h ym11" +asciiLevelData(3) = "mm mmmmmmmmmmm1m" +asciiLevelData(4) = "m h m xm " +asciiLevelData(5) = "mm m m mmmmmmmmm" +asciiLevelData(6) = "mmmm m1m " +asciiLevelData(7) = "m h m1moo m" +asciiLevelData(8) = "m mmmmmm m1moomm" +asciiLevelData(9) = "m 11111m h h " +asciiLevelData(10) = "mmmmmmmmmmmmmmmm" +CASE 4 +asciiLevelData(1) = "mmmmmmmmmmmmmmmm" +asciiLevelData(2) = " h1 h1 m" +asciiLevelData(3) = "mmm 1 11 1 o1m" +asciiLevelData(4) = " m 1 oo 1o1m" +asciiLevelData(5) = "m moo oo1m" +asciiLevelData(6) = " m h o " +asciiLevelData(7) = "mmm h o " +asciiLevelData(8) = "m o " +asciiLevelData(9) = " x oy " +asciiLevelData(10) = "mmmmmmmmmmmmmmmm" +CASE 5 +asciiLevelData(1) = "m . y - " +asciiLevelData(2) = "m m moo" +asciiLevelData(3) = "m. mxm mmo" +asciiLevelData(4) = "m - m mmmmmm" +asciiLevelData(5) = "m . m mm " +asciiLevelData(6) = "mt o o m " +asciiLevelData(7) = "m o om o ooo " +asciiLevelData(8) = "m ooooooooooo " +asciiLevelData(9) = " v o " +asciiLevelData(10) = "oooooooooooooooo" +CASE 6 +CLS +asciiLevelData(1) = " - " +asciiLevelData(2) = " . " +asciiLevelData(3) = " oo- oo " +asciiLevelData(4) = " - 11 11 ." +asciiLevelData(5) = " oo oo " +asciiLevelData(6) = " m ym11 11 " +asciiLevelData(7) = " m m " +asciiLevelData(8) = " ooom <> <> " +asciiLevelData(9) = " xmmm mmm" +asciiLevelData(10) = "mmmmmmmmmmm mmm" +CASE 7 +asciiLevelData(1) = " oooo " +asciiLevelData(2) = " o111 . " +asciiLevelData(3) = " oooo> >>>>>>" +asciiLevelData(4) = " . x v m" +asciiLevelData(5) = " mym m" +asciiLevelData(6) = " m m" +asciiLevelData(7) = " 111m" +asciiLevelData(8) = " 111m" +asciiLevelData(9) = " v p " +asciiLevelData(10) = "oooaaaaaaaaaoooo" +CASE 8 +asciiLevelData(1) = " . o" +asciiLevelData(2) = " . mm o" +asciiLevelData(3) = ". ommm t o" +asciiLevelData(4) = " mom mm o" +asciiLevelData(5) = " pmmoyxmmm o" +asciiLevelData(6) = " mmmomammmm m" +asciiLevelData(7) = "p mmmmv mmmm " +asciiLevelData(8) = "mmmmmmmmm mmmmmm" +asciiLevelData(9) = " " +asciiLevelData(10) = ">>>>>>>>>>>>>>>>" +CurrentLevelNumber% = CurrentLevelNumber% + 1 +CASE 10 +asciiLevelData(1) = "m. - m" +asciiLevelData(2) = "m . m" +asciiLevelData(3) = "m 111 - m" +asciiLevelData(4) = "mmmmm>>> ammm" +asciiLevelData(5) = "a a m" +asciiLevelData(6) = "mmm t a m" +asciiLevelData(7) = " ma m" +asciiLevelData(8) = ">>> a m" +asciiLevelData(9) = " m yx m m" +asciiLevelData(10) = ">>>mmmmmmmmmmm m" +CASE 9 +asciiLevelData(1) = "mammmmmmmmmmmmm " +asciiLevelData(2) = "m1m y xmo " +asciiLevelData(3) = "mamooo>>>a>am om" +asciiLevelData(4) = "m1m m1mamo m" +asciiLevelData(5) = "mamm m1mam om" +asciiLevelData(6) = "m1m mm1mamo m" +asciiLevelData(7) = "mammm m1ma om" +asciiLevelData(8) = "m1m mmm1ma o m" +asciiLevelData(9) = "m amam om" +asciiLevelData(10) = "mmmmmmmm - + Plotting @@ -210,10 +210,10 @@

Table of Contents

@@ -234,8 +234,8 @@ } -
-

1. 2D graph

+
+

1. 2D graph

The 2D Graph Plotter is a simple yet effective program written in @@ -251,7 +251,7 @@ based on a user-defined mathematical function.

-
+

2D%20graph%20plot.png

@@ -262,8 +262,8 @@ based on a user-defined mathematical function.
-
-

2. 3D graph

+
+

2. 3D graph

The 3D Heightmap Explorer is a QBasic program designed to visualize @@ -299,7 +299,7 @@ grid.

-
+

3D%20graph.png

@@ -310,8 +310,8 @@ grid.
-
-

3. Deriviative calculator

+
+

3. Deriviative calculator

This QBasic program is designed to compute and plot an arbitrary @@ -324,7 +324,7 @@ visualized.

-
+

Deriviative%20calculator.png

@@ -335,8 +335,8 @@ visualized.
-
-

4. Sine and cosine table

+
+

4. Sine and cosine table

The SIN & COS Table Generator is a QBasic program designed to visually @@ -346,7 +346,7 @@ visual representation of these fundamental trigonometric functions.

-
+

Sine%20and%20cosine%20table.png

@@ -358,7 +358,7 @@ visual representation of these fundamental trigonometric functions.
-

Created: 2025-08-21 to 21:41

+

Created: 2025-08-21 to 21:54

Validate

diff --git a/Math/Simulation/index.html b/Math/Simulation/index.html index f9ecc93..6581e0d 100644 --- a/Math/Simulation/index.html +++ b/Math/Simulation/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Simulation @@ -210,14 +210,14 @@

Table of Contents

@@ -238,8 +238,8 @@ } -
-

1. Explosion simulator

+
+

1. Explosion simulator

This QBasic program simulates the propagation of shock waves in a gas @@ -265,7 +265,7 @@ conditions by setting velocities to zero at wall boundaries.

-
+

Explosion%20simulator.png

@@ -276,8 +276,8 @@ conditions by setting velocities to zero at wall boundaries.
-
-

2. Gravity in 2D

+
+

2. Gravity in 2D

The Gravitation Simulation program is a simple yet insightful QBasic @@ -289,7 +289,7 @@ educational tool for understanding basic orbital mechanics.

-
+

Gravity%20in%202D.png

@@ -300,8 +300,8 @@ educational tool for understanding basic orbital mechanics.
-
-

3. Gravity in 3D

+
+

3. Gravity in 3D

This QBasic program simulates the gravitational interactions between @@ -335,8 +335,8 @@ will reach stable configuration.

-
-

4. Interference

+
+

4. Interference

This QBasic program simulates the interference pattern created by two @@ -364,8 +364,8 @@ displayed as a third waveform.

-
-

5. Interferogram

+
+

5. Interferogram

This QBasic program simulates the interference pattern created by @@ -375,7 +375,7 @@ used in physics and engineering to analyze wave interactions.

-
+

Interferogram.png

@@ -386,8 +386,8 @@ used in physics and engineering to analyze wave interactions.
-
-

6. Surface tension

+
+

6. Surface tension

This QBasic program simulates the behavior of water spills and the @@ -411,7 +411,7 @@ water cell if surrounded by a high density of water cells.

-
+

Surface%20tension.png

@@ -422,8 +422,8 @@ water cell if surrounded by a high density of water cells.
-
-

7. Wave 1

+
+

7. Wave 1

This QBasic program simulates the propagation of waves across a @@ -439,7 +439,7 @@ loss.

-
+

Wave%201.png

@@ -450,8 +450,8 @@ loss.
-
-

8. Wave 2

+
+

8. Wave 2

This QBasic program simulates and visualizes the behavior of water @@ -463,7 +463,7 @@ understanding wave mechanics.

-
+

Wave%202.png

@@ -475,7 +475,7 @@ understanding wave mechanics.
-

Created: 2025-08-21 to 21:41

+

Created: 2025-08-21 to 21:55

Validate

diff --git a/Math/Truth table/index.html b/Math/Truth table/index.html index 04a0238..f0f9a69 100644 --- a/Math/Truth table/index.html +++ b/Math/Truth table/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Truth table calculator @@ -1103,20 +1103,20 @@ hsAddReviewPanels();

Table of Contents

@@ -1133,12 +1133,12 @@ the input variables, with the corresponding output value. Truth tables are cruci designing and understanding digital circuits, Boolean algebra, and logical expressions.

-
-

1. Implemented logical operations

+
+

1. Implemented logical operations

-
-

1.1. Equivalent ( ⇔ , 1 )

+
+

1.1. Equivalent ( ⇔ , 1 )

The equivalent operation, also known as logical biconditional, is true if and only if @@ -1196,8 +1196,8 @@ Truth Table:

-
-

1.2. Implies ( ⇒ , 2 )

+
+

1.2. Implies ( ⇒ , 2 )

An implication asserts that if the first proposition is true, the @@ -1255,8 +1255,8 @@ Truth table:

-
-

1.3. OR ( ∨ , 3 )

+
+

1.3. OR ( ∨ , 3 )

The OR operation, also known as logical disjunction, is true if at @@ -1314,8 +1314,8 @@ Truth table:

-
-

1.4. AND ( ∧ , 4 )

+
+

1.4. AND ( ∧ , 4 )

The AND operation, also known as logical conjunction, is true if and @@ -1372,8 +1372,8 @@ Truth table:

-
-

1.5. NOT ( ¬ , 5 )

+
+

1.5. NOT ( ¬ , 5 )

The NOT operation, also known as logical negation, inverts the value @@ -1414,12 +1414,12 @@ Truth Table:

-
-

2. Examples

+
+

2. Examples

-
-

2.1. Example: (A ∧ B) ∨ ¬C

+
+

2.1. Example: (A ∧ B) ∨ ¬C

@@ -1502,8 +1502,8 @@ Truth Table: -
-

2.2. Example: A ⇒ (B ∨ ¬C)

+
+

2.2. Example: A ⇒ (B ∨ ¬C)

@@ -1586,8 +1586,8 @@ Truth Table: -
-

2.3. Example: (A ⇔ B) ∧ C

+
+

2.3. Example: (A ⇔ B) ∧ C

Truth Table: @@ -1676,7 +1676,7 @@ Truth Table:

-

Created: 2025-08-21 to 21:42

+

Created: 2025-08-21 to 21:56

Validate

diff --git a/Miscellaneous/Mouse driver/index.html b/Miscellaneous/Mouse driver/index.html index 4fa7079..95d318f 100644 --- a/Miscellaneous/Mouse driver/index.html +++ b/Miscellaneous/Mouse driver/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Mouse driver for QBasic programs @@ -210,16 +210,16 @@

Table of Contents

-
-

1. Overview

+
+

1. Overview

QBasic, a popular programming language in the DOS era, lacks native @@ -230,8 +230,8 @@ workaround that allows QBasic to use mouse input.

-
-

2. High-level idea

+
+

2. High-level idea

Workaround to access mouse involves a Terminate and Stay Resident @@ -264,8 +264,8 @@ TSR keeps updating it with latest mouse state simultaneously.

-
-

3. Terminate and Stay Resident module

+
+

3. Terminate and Stay Resident module

A DOS TSR program that hooks into the system's interrupt mechanism to @@ -351,8 +351,8 @@ meanwhile.

-
-

4. QBasic demonstration program

+
+

4. QBasic demonstration program

A QBasic program that reads mouse data from the memory location @@ -362,7 +362,7 @@ clicks. -

diff --git a/Networking/Digital data over analog audio/index.html b/Networking/Digital data over analog audio/index.html index 70ca4f5..9914624 100644 --- a/Networking/Digital data over analog audio/index.html +++ b/Networking/Digital data over analog audio/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Data over analog audio @@ -210,15 +210,15 @@

Table of Contents

-
-

1. msg2xi: Text to Sound Encoder

+
+

1. msg2xi: Text to Sound Encoder

msg2xi is a utility designed to encode arbitrary text messages into an @@ -245,8 +245,8 @@ Download source code: Source code

-
-

2. xi2msg: Sound to Text Decoder

+
+

2. xi2msg: Sound to Text Decoder

The xi2msg utility is designed to decode digital information from an @@ -287,7 +287,7 @@ transmitted over telephone lines.

-
+

screenshot.png

@@ -299,8 +299,8 @@ Download source code: Source code
-
-

3. aver

+
+

3. aver

The aver.bas utility is designed to reduce noise in digitized audio @@ -343,7 +343,7 @@ Download source code: Source code

-

Created: 2025-08-21 to 21:43

+

Created: 2025-08-21 to 21:57

Validate

diff --git a/Networking/LPT communication driver/index.html b/Networking/LPT communication driver/index.html index d26146b..bf5d853 100644 --- a/Networking/LPT communication driver/index.html +++ b/Networking/LPT communication driver/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + LPT Communication Driver @@ -210,17 +210,17 @@

Table of Contents

-
-

1. Overview

+
+

1. Overview

This is weird networking solution. It allows to send data using @@ -256,7 +256,7 @@ communication. -

+

diagram.png

@@ -269,12 +269,12 @@ built to connect 2 computers in a DIY network setup.
-
-

2. LPT Communication Driver

+
+

2. LPT Communication Driver

-
-

2.1. Overview

+
+

2.1. Overview

The LPT Communication Driver is a Terminate and Stay Resident (TSR) @@ -322,8 +322,8 @@ Download:

-
-

2.2. Data transmission implementation details

+
+

2.2. Data transmission implementation details

When there is incoming data transmission, the TSR driver detects it @@ -405,8 +405,8 @@ is returned.

-
-

2.3. Driver API

+
+

2.3. Driver API

The driver uses INT 63h for its API, with functions selected via the @@ -462,29 +462,29 @@ API overview:

- + - + - + - +
0Deactivate the driverDeactivate the driver
1Activate the driverActivate the driver
2Retrieve downloaded data from the driver's input bufferRetrieve downloaded data from the driver's input buffer
3Upload data to the driver's output buffer for transmissionUpload data to the driver's output buffer for transmission
-
-

2.3.1. Deactivate the driver

+
+

2.3.1. Deactivate the driver

Disables the driver, stopping background monitoring and @@ -502,8 +502,8 @@ communication is no longer needed to free system resources.

-
-

2.3.2. Activate the driver

+
+

2.3.2. Activate the driver

Enables the driver, starting background LPT port monitoring for @@ -523,8 +523,8 @@ activations are harmless.

-
-

2.3.3. Retrieve downloaded data from the driver's input buffer

+
+

2.3.3. Retrieve downloaded data from the driver's input buffer

Copies all accumulated received data from the driver's download buffer @@ -560,8 +560,8 @@ INT 63h; then process AX bytes if >0.

-
-

2.3.4. Upload data to the driver's output buffer for transmission

+
+

2.3.4. Upload data to the driver's output buffer for transmission

Copies the specified data to the driver's upload buffer for background @@ -599,7 +599,7 @@ caller can add headers if needed).

-

Created: 2025-08-21 to 21:43

+

Created: 2025-08-21 to 21:57

Validate