git @ Cat's Eye Technologies Bubble-Escape / 99ee043
Make BSD3 license recognizable by GitHub. Update copyright years. Chris Pressey 2 years ago
3 changed file(s) with 246 addition(s) and 246 deletion(s). Raw diff Collapse all Expand all
0 Copyright (c)2009-2016, Chris Pressey, Cat's Eye Technologies.
0 BSD 3-Clause License
1
2 Copyright (c) 2009-2021, Chris Pressey, Cat's Eye Technologies.
13 All rights reserved.
24
35 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6 modification, are permitted provided that the following conditions are met:
67
7 1. Redistributions of source code must retain the above copyright
8 notices, this list of conditions and the following disclaimer.
9 2. Redistributions in binary form must reproduce the above copyright
10 notices, this list of conditions, and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13 3. Neither the names of the copyright holders nor the names of their
14 contributors may be used to endorse or promote products derived
15 from this software without specific prior written permission.
8 * Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
1610
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 POSSIBILITY OF SUCH DAMAGE.
11 * Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
14
15 * Neither the name of the copyright holder nor the names of its
16 contributors may be used to endorse or promote products derived from
17 this software without specific prior written permission.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+0
-222
README.markdown less more
0 Bubble Escape
1 =============
2
3 _Try it online_ [@ catseye.tc](https://catseye.tc/installation/Bubble%20Escape)
4 | _See also:_ [Dungeons of Ekileugor](https://github.com/catseye/Dungeons-of-Ekileugor#readme)
5 ∘ [SixtyPical](https://github.com/catseye/SixtyPical#readme)
6 ∘ [yucca](https://github.com/catseye/yucca#readme)
7
8 - - - -
9
10 (c)2009-2016 Cat's Eye Technologies. All rights reserved.
11 Covered under a BSD-style license; see the file LICENSE for the full text.
12
13 ![Screenshot of Bubble Escape 2K](images/bubble%20escape%202k.png?raw=true)
14
15 What is it?
16 -----------
17
18 Bubble Escape is a video game for the Commodore 64 computer.
19
20 Premise
21 -------
22
23 You, a sentient soap bubble, have been arrested for your political beliefs
24 by the ruling class of your society, an ancient race of dragons. You find
25 yourself imprisoned in a maze-like dungeon from which you must escape.
26 There is but a single exit, and it will require five different keys to open.
27 You will find these keys randomly deposited throughout the dungeon, but each
28 room presents its own hazards: moving walls, fireballs, hovering sentry
29 robots, and dragon officials. Being a soap bubble, you must be very careful
30 to avoid touching any of these hazards, and the dungeon walls as well,
31 otherwise you will pop. Fortunately, bubbles, like cats, have nine lives.
32
33 Controls
34 --------
35
36 To start the game, mount the "bubble escape 2k.d64" disk image and type
37
38 load"*",8
39 run
40
41 Plug your joystick into port 2. Pushing in any direction will accelerate
42 the bubble in that direction. The fire button is not used except to start
43 a new game after you've lost all 9 lives.
44
45 If you are playing this game in the VICE emulator, make sure you have sound
46 playback enabled, as the random number generator relies on it.
47
48 This is all you need to know to begin playing the game, but some extra
49 hints/spoilers are given at the bottom of this readme.
50
51 History
52 -------
53
54 If you're not interested in how this game came to be, you can skip these
55 two sections.
56
57 The Original - 198?
58 -------------------
59
60 I wrote the original version of this game in the 1980's, when I was a
61 teenager. It was written in BASIC, and was thus very slow. I tried to
62 make it seem faster by calling the movement subroutine twice in quick
63 succession inside the main game loop, but that only made it choppier.
64
65 This was one of my earliest games, and one of the few that actually got
66 finished -- although it fell a bit short of the original vision, which
67 included having the dragon elders shoot fireballs at you, and something
68 more exciting happening in the rooms with three fireballs in them.
69
70 The idea was doubtless influenced by StarQuake -- a large, multi-screen,
71 non-scrolling maze (with a couple of teleporters) in which you must locate
72 and collect a number of crucial items and deposit them in a certain place.
73
74 The sprites were designed by hand on graph paper, manually translated into
75 decimal numbers and transcribed into DATA statements. There were some
76 errors in this process, and the bubble and the dragon didn't look quite
77 right.
78
79 The BASIC source code of the original is included for historical and
80 comparative purposes, or if you prefer, for larfs.
81
82 The Remake - 2009
83 -----------------
84
85 The remake was written entirely in 6502 assembly language, using the P65
86 portable 6502 assembler. (The P65 assembler has since been superceded by
87 the Ophis assembler, which is now used in the build process -- in fact,
88 Ophis version 2.0 is assumed.) The memories of my disappointment at the
89 poor performance of the original game had hung heavily on my mind (well,
90 maybe not *that* heavily,) hence I endeavoured to make the remake as fast
91 and as smooth as I could.
92
93 This was largely accomplished by the use of a raster interrupt which is
94 triggered at the very bottom of the screen. This interrupt runs a routine
95 which updates the positions of all the sprites. It then calculates what the
96 next positions should be, based on velocity and acceleration of the sprites,
97 the direction the joystick is being pressed, the "AI" of the bad guys, etc.
98
99 The remake is more or less faithful to the original. The maze is the same
100 and the hazards are essentially the same. The degree to which the game is
101 still unfinished is the same; the dragon elders still do not shoot
102 fireballs, and the three-fireball rooms are still just three fireballs.
103
104 But some changes are significant:
105
106 * Full screen. The original used only the leftmost 256 pixel positions to
107 avoid messy multi-byte POKEs. The remake uses the entire screen. For this
108 reason, the display is slightly different as well: lives are shown in the
109 upper left corner, keys are shown in the upper right. The walls are also
110 thinner.
111 * Sentry robots move with acceleration. In the remake, I initially tried to
112 duplicate the constant-velocity motion in the original, but I found it more
113 straightforward to apply the same physics to the sentries as to the bubble,
114 and once I got this to work, I liked it and kept it.
115 * The sprites were fixed up a bit. They look less wrong now.
116 * The title screen, game over screen, and game won screens are not nearly
117 as nice to look at.
118
119 The assembly code for this version was pretty painful because it was largely
120 a direct translation of the BASIC to assembly language. I can think of many
121 ways for it to be much cleaner (more jump tables come to mind.)
122
123 The Mini Game Compo Entry
124 -------------------------
125
126 Since my remake was a mere ~3K in size, and since I had not too long after-
127 wards discovered the Mini Game Compo (via The New Dimension's website), I
128 thought it would be fun to enter Bubble Escape into it.
129
130 Then I had to decide -- should I enter it as a 4K game (I'd probably have
131 to add more features,) or should I try to squeeze it down into 2K? Well,
132 given the nature of the contest and my history of space optimization (see
133 Shelta!), the choice was easy.
134
135 I optimized away a lot of the bulky logic and debugging-assistance code, and
136 got it down to around ~2300 bytes. After that I started chipping away at
137 the game itself, getting rid of the title/game over screens, sound effects,
138 and one sprite image, bringing it down to ~2175 bytes.
139
140 I then looked for a cruncher that would take me the rest of the way. After
141 a few false starts, I eventually found "Cruncher AB+" which exceeded my
142 expectations. In fact, I was able to restore the sound effects and sprite,
143 and add one more feature to make the game harder (the more keys you have,
144 the shorter the delay before a sentry starts moving after you enter its
145 room.)
146
147 The end result was 2043 bytes, so I christened it "Bubble Escape 2K" and
148 here you have it.
149
150 The Mini Game Compo Winner
151 --------------------------
152
153 Much to my surprise, submitting Bubble Escape 2K to the 2009 Mini Game
154 Competition was a good move -- it won first place in the 2K category!
155
156 Unfortunately, the website hosting the rules and entries went down soon
157 afterwards, and I did not think fast enough about saving a copy of the
158 results page for posterity, so I have no hard evidence of this. I'm sure
159 if you could find and ask the judges, they'd back up my story, though :)
160
161 The 8K Cartridge Version -- 2011 & 2012
162 ---------------------------------------
163
164 After writing the remake, I had a great, and I think perfectly reasonable,
165 desire to play it on a real, physical Commodore 64. Through a series of
166 moves, I lost my original C64 in 2009; acquiring another one was not too
167 difficult, but the burning question was, what was the best way to get that
168 2K of code onto the new machine?
169
170 There are several ways, ranging in ease and expense, to transfer files from
171 modern PC's to C64's and back. I decided that the most interesting, though,
172 was to get an EPROM burner, a bit of Flash memory in a DIP, and an old
173 Commodore 64 cartridge that no one really wanted; and to modify the game to
174 run from a cartridge ROM, burn that ROM image onto the Flash chip, take apart
175 the cartridge, remove the existing ROM, wire the Flash chip up to the right
176 address and data lines on the cartridge's PCB, stick it into the cartridge
177 port and turn on the C64.
178
179 Well, some of those things transpired, and some didn't -- I did sacrifice a
180 "Frog Master" cartridge for the project, but I never did get to the point of
181 removing the ROM from its PCB. (There's an outside chance I will someday,
182 but I wouldn't bank on it. Ha! Ha! "Bank", get it?)
183
184 I did, however, modify the game to build as an 8K ROM image in 2011, and,
185 after fixing some bugs in 2012, it does boot as a fully playable ROM image
186 in VICE.
187
188 Being an 8K ROM image based on a ~2K game, there is a lot of room there
189 that is currently just zero bytes, but which could be used for all kinds of
190 enhancements: maybe a title screen with music, maybe better game over and
191 game won sequences, maybe random maze generation, maybe nastier nasties.
192 Maybe someday.
193
194 License
195 -------
196
197 All three versions of Bubble Escape are now covered under a BSD-style
198 license, which means you can deal quite freely with the source code and
199 compiled binaries as long as you keep the license text intact. See the
200 file LICENSE for complete information.
201
202 The full title of the game is "Cat's Eye Technologies' Bubble Escape", to
203 distinguish it from the handful of other games of the same name (many of
204 which are online Flash-based dealies) which have appeared since the
205 original was written.
206
207 Hints
208 -----
209
210 * The maze is 20 rooms wide by 10 rooms tall, 200 rooms in total.
211 * The maze is static and hardcoded, not randomly generated.
212 * You start in the top left corner.
213 * The exit is in the bottom right corner.
214 * There are teleporters in the bottom left and top right corners; each one
215 will teleport you to the other corner.
216
217 Have fun!
218
219 Chris Pressey
220 July 7, 2009
221 Bellevue, WA
0 Bubble Escape
1 =============
2
3 _Try it online_ [@ catseye.tc](https://catseye.tc/installation/Bubble%20Escape)
4 | _See also:_ [Dungeons of Ekileugor](https://github.com/catseye/Dungeons-of-Ekileugor#readme)
5 ∘ [SixtyPical](https://github.com/catseye/SixtyPical#readme)
6 ∘ [yucca](https://github.com/catseye/yucca#readme)
7
8 - - - -
9
10 (c)2009-2021 Cat's Eye Technologies. All rights reserved.
11 Covered under a BSD-style license; see the file LICENSE for the full text.
12
13 ![Screenshot of Bubble Escape 2K](images/bubble%20escape%202k.png?raw=true)
14
15 What is it?
16 -----------
17
18 Bubble Escape is a video game for the Commodore 64 computer.
19
20 Premise
21 -------
22
23 You, a sentient soap bubble, have been arrested for your political beliefs
24 by the ruling class of your society, an ancient race of dragons. You find
25 yourself imprisoned in a maze-like dungeon from which you must escape.
26 There is but a single exit, and it will require five different keys to open.
27 You will find these keys randomly deposited throughout the dungeon, but each
28 room presents its own hazards: moving walls, fireballs, hovering sentry
29 robots, and dragon officials. Being a soap bubble, you must be very careful
30 to avoid touching any of these hazards, and the dungeon walls as well,
31 otherwise you will pop. Fortunately, bubbles, like cats, have nine lives.
32
33 Controls
34 --------
35
36 To start the game, mount the "bubble escape 2k.d64" disk image and type
37
38 load"*",8
39 run
40
41 Plug your joystick into port 2. Pushing in any direction will accelerate
42 the bubble in that direction. The fire button is not used except to start
43 a new game after you've lost all 9 lives.
44
45 If you are playing this game in the VICE emulator, make sure you have sound
46 playback enabled, as the random number generator relies on it.
47
48 This is all you need to know to begin playing the game, but some extra
49 hints/spoilers are given at the bottom of this readme.
50
51 History
52 -------
53
54 If you're not interested in how this game came to be, you can skip these
55 two sections.
56
57 The Original - 198?
58 -------------------
59
60 I wrote the original version of this game in the 1980's, when I was a
61 teenager. It was written in BASIC, and was thus very slow. I tried to
62 make it seem faster by calling the movement subroutine twice in quick
63 succession inside the main game loop, but that only made it choppier.
64
65 This was one of my earliest games, and one of the few that actually got
66 finished -- although it fell a bit short of the original vision, which
67 included having the dragon elders shoot fireballs at you, and something
68 more exciting happening in the rooms with three fireballs in them.
69
70 The idea was doubtless influenced by StarQuake -- a large, multi-screen,
71 non-scrolling maze (with a couple of teleporters) in which you must locate
72 and collect a number of crucial items and deposit them in a certain place.
73
74 The sprites were designed by hand on graph paper, manually translated into
75 decimal numbers and transcribed into DATA statements. There were some
76 errors in this process, and the bubble and the dragon didn't look quite
77 right.
78
79 The BASIC source code of the original is included for historical and
80 comparative purposes, or if you prefer, for larfs.
81
82 The Remake - 2009
83 -----------------
84
85 The remake was written entirely in 6502 assembly language, using the P65
86 portable 6502 assembler. (The P65 assembler has since been superceded by
87 the Ophis assembler, which is now used in the build process -- in fact,
88 Ophis version 2.0 is assumed.) The memories of my disappointment at the
89 poor performance of the original game had hung heavily on my mind (well,
90 maybe not *that* heavily,) hence I endeavoured to make the remake as fast
91 and as smooth as I could.
92
93 This was largely accomplished by the use of a raster interrupt which is
94 triggered at the very bottom of the screen. This interrupt runs a routine
95 which updates the positions of all the sprites. It then calculates what the
96 next positions should be, based on velocity and acceleration of the sprites,
97 the direction the joystick is being pressed, the "AI" of the bad guys, etc.
98
99 The remake is more or less faithful to the original. The maze is the same
100 and the hazards are essentially the same. The degree to which the game is
101 still unfinished is the same; the dragon elders still do not shoot
102 fireballs, and the three-fireball rooms are still just three fireballs.
103
104 But some changes are significant:
105
106 * Full screen. The original used only the leftmost 256 pixel positions to
107 avoid messy multi-byte POKEs. The remake uses the entire screen. For this
108 reason, the display is slightly different as well: lives are shown in the
109 upper left corner, keys are shown in the upper right. The walls are also
110 thinner.
111 * Sentry robots move with acceleration. In the remake, I initially tried to
112 duplicate the constant-velocity motion in the original, but I found it more
113 straightforward to apply the same physics to the sentries as to the bubble,
114 and once I got this to work, I liked it and kept it.
115 * The sprites were fixed up a bit. They look less wrong now.
116 * The title screen, game over screen, and game won screens are not nearly
117 as nice to look at.
118
119 The assembly code for this version was pretty painful because it was largely
120 a direct translation of the BASIC to assembly language. I can think of many
121 ways for it to be much cleaner (more jump tables come to mind.)
122
123 The Mini Game Compo Entry
124 -------------------------
125
126 Since my remake was a mere ~3K in size, and since I had not too long after-
127 wards discovered the Mini Game Compo (via The New Dimension's website), I
128 thought it would be fun to enter Bubble Escape into it.
129
130 Then I had to decide -- should I enter it as a 4K game (I'd probably have
131 to add more features,) or should I try to squeeze it down into 2K? Well,
132 given the nature of the contest and my history of space optimization (see
133 Shelta!), the choice was easy.
134
135 I optimized away a lot of the bulky logic and debugging-assistance code, and
136 got it down to around ~2300 bytes. After that I started chipping away at
137 the game itself, getting rid of the title/game over screens, sound effects,
138 and one sprite image, bringing it down to ~2175 bytes.
139
140 I then looked for a cruncher that would take me the rest of the way. After
141 a few false starts, I eventually found "Cruncher AB+" which exceeded my
142 expectations. In fact, I was able to restore the sound effects and sprite,
143 and add one more feature to make the game harder (the more keys you have,
144 the shorter the delay before a sentry starts moving after you enter its
145 room.)
146
147 The end result was 2043 bytes, so I christened it "Bubble Escape 2K" and
148 here you have it.
149
150 The Mini Game Compo Winner
151 --------------------------
152
153 Much to my surprise, submitting Bubble Escape 2K to the 2009 Mini Game
154 Competition was a good move -- it won first place in the 2K category!
155
156 Unfortunately, the website hosting the rules and entries went down soon
157 afterwards, and I did not think fast enough about saving a copy of the
158 results page for posterity, so I have no hard evidence of this. I'm sure
159 if you could find and ask the judges, they'd back up my story, though :)
160
161 The 8K Cartridge Version -- 2011 & 2012
162 ---------------------------------------
163
164 After writing the remake, I had a great, and I think perfectly reasonable,
165 desire to play it on a real, physical Commodore 64. Through a series of
166 moves, I lost my original C64 in 2009; acquiring another one was not too
167 difficult, but the burning question was, what was the best way to get that
168 2K of code onto the new machine?
169
170 There are several ways, ranging in ease and expense, to transfer files from
171 modern PC's to C64's and back. I decided that the most interesting, though,
172 was to get an EPROM burner, a bit of Flash memory in a DIP, and an old
173 Commodore 64 cartridge that no one really wanted; and to modify the game to
174 run from a cartridge ROM, burn that ROM image onto the Flash chip, take apart
175 the cartridge, remove the existing ROM, wire the Flash chip up to the right
176 address and data lines on the cartridge's PCB, stick it into the cartridge
177 port and turn on the C64.
178
179 Well, some of those things transpired, and some didn't -- I did sacrifice a
180 "Frog Master" cartridge for the project, but I never did get to the point of
181 removing the ROM from its PCB. (There's an outside chance I will someday,
182 but I wouldn't bank on it. Ha! Ha! "Bank", get it?)
183
184 I did, however, modify the game to build as an 8K ROM image in 2011, and,
185 after fixing some bugs in 2012, it does boot as a fully playable ROM image
186 in VICE.
187
188 Being an 8K ROM image based on a ~2K game, there is a lot of room there
189 that is currently just zero bytes, but which could be used for all kinds of
190 enhancements: maybe a title screen with music, maybe better game over and
191 game won sequences, maybe random maze generation, maybe nastier nasties.
192 Maybe someday.
193
194 License
195 -------
196
197 All three versions of Bubble Escape are now covered under a BSD-style
198 license, which means you can deal quite freely with the source code and
199 compiled binaries as long as you keep the license text intact. See the
200 file LICENSE for complete information.
201
202 The full title of the game is "Cat's Eye Technologies' Bubble Escape", to
203 distinguish it from the handful of other games of the same name (many of
204 which are online Flash-based dealies) which have appeared since the
205 original was written.
206
207 Hints
208 -----
209
210 * The maze is 20 rooms wide by 10 rooms tall, 200 rooms in total.
211 * The maze is static and hardcoded, not randomly generated.
212 * You start in the top left corner.
213 * The exit is in the bottom right corner.
214 * There are teleporters in the bottom left and top right corners; each one
215 will teleport you to the other corner.
216
217 Have fun!
218
219 Chris Pressey
220 July 7, 2009
221 Bellevue, WA