\MyStuff\Projects\Programming\OPL\Meteoroid\Sysram1.sis\MyStuff\Projects\Programming\OPL\Meteoroid\MUSIC.SIS\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\ini.opm!:\Meteoroid\ini.opm\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\PC_Bar.opm!:\Meteoroid\PC_Bar.opm\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\music.oxh!:\Meteoroid\music.oxh\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Pc_bar.omh!:\Meteoroid\Pc_bar.omh\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\ini.omh!:\Meteoroid\ini.omh\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Loader.oph!:\Meteoroid\Loader.oph\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\defaults.oph!:\Meteoroid\defaults.oph\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\constants.oph!:\Meteoroid\constants.oph\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\declarations.oph!:\Meteoroid\declarations.oph\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Meteoroid.hlp!:\Meteoroid\Meteoroid.hlp\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Meteoroid.mbm!:\Meteoroid\Meteoroid.mbm\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Meteoroid.icn!:\Meteoroid\Meteoroid.icn\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Meteoroid!:\Meteoroid\Meteoroid\MyStuff\Projects\Programming\OPL\Meteoroid\SrcRelease\Readme!:\Meteoroid\ReadmeMr. Meteoroid Game Sources
font. Check out his other fonts at http://www.larabiefonts.com
The GNU project for their Warranty. (I would have GPLed this program if it didn't use Symbian's OPMs).
. I encourage you to use bits of it in your own projects (with the condition that they also are GPLed
see the GPL).
Sketch
&Paint.app
Sketch
&Paint.app
NO WARRANTY
BECAUSE THE PROGRAM IS FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
AS IS
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPARE OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCULDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Mr. Meteoroid Game
"Welcomes to you, fellow shield-operatron of planetoid defence. Again we must defendinate our glorious planetoid against descending space-bits. If only we can achievify high scorings before our inevitable doomage
Introduction
Mr. Meteoroid Game v0.85beta
2000 Malcolm Tyrrell.
A lo-fi game for you to enjoy.
The Game
The object of the game is to gain lots of points. Points are gained when a meteoroid strikes your shield, or when you pass a level.
The game ends when you have lost all your energy. You lose energy when a meteoroid strikes your base.
Controls
You use keys to activate your shields.
The key for each shield is marked on the side of the base that it protects.
You can change the keys. Use the menu command: "Change Keys
Scoring
Points are given as follows:
11 points for a
23 points for a
56 points for each level passed.
Sound
If you wish to enable beeps, you can switch on sound. Use the "Sound Setup
" controls in the menu.
On slower devices, this may cause the game to slow down slightly.
Warranty
License
Mr. Meteoroid Game is
2000 Malcolm Tyrrell.
This program is freeware; you may freely distribute it.
Contacts
e-mail: tyrrelmr@cs.tcd.ie
www: http://www.cs.tcd.ie/Malcolm.Tyrrell
Source Available
The complete source code is available for your perusal and should have come with the program. If do you use any bits of it in your own programs, I encourage you to make them open source. I do not demand it.
Acknowledgements
REM *******************************
REM **** ****
REM **** MR. METEOROID GAME ****
REM **** v0.85(beta) ****
REM ****
2000 Malcolm Tyrrell ****
REM **** ****
REM *******************************
REM **************************
REM **** ****
REM **** Main Source Code ****
REM **** ****
REM **************************
REM *****************
REM **** ****
REM **** License ****
REM **** ****
REM *****************
REM You can redistribute, modify this source code and/or use bits
REM of it in your programs. Hurray!
REM ******************
REM **** ****
REM **** Warranty ****
REM **** ****
REM ******************
REM This source is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS
PARTICULAR PURPOSE.
REM See the help file for details.
REM ***************
REM **** ****
REM **** Hello ****
REM **** ****
REM ***************
REM I hope you enjoy reading and using this code, I'm permitting
REM its distribution in the hope that people will be inspired to
REM write free and open applications for EPOC (and in general).
REM I welcome you comments: e-mail me at tyrrelmr@cs.tcd.ie
REM Enjoy,
REM Malcolm.
REM ***************
REM **** ****
REM **** ToDos ****
REM **** ****
REM ***************
Pause problem.
Menu key problem.
Check consistency of user key selections.
Move timing code into modules
REM
reconsider timing code: is it too power hungry?
Error Handling: (add some)
Introduce reinitialise procedures for graphics elements
add toolbar support
REM
prevent switching during game due to scaling problem
move user interaction into module
rethink menu
Bug fixes
REM
if any!
Confirm it behaves on other devices
internationalisation, using Symbian tools
REM
request contribution
REM
ideally all within one .sis file
Re-do help file properly using Aleppo tool from Symbian
Add soundtrack by FSOL
Add textured 3D-rendered graphics
Add Macro5 macro support
Add Gameboy Printer support
Take over Europe using genetically modified army of
REM superpeople
REM *******************************
REM **** ****
REM **** Included Header Files ****
REM **** ****
REM *******************************
* Built in OPHs *
Standard Constants
INCLUDE "const.oph"
* Downloaded OPHs *
The OPM Loader, included at the end of this file.
INCLUDE "LOADER.oph"
* Built in OPXs *
System
INCLUDE "system.oxh"
Sprite stuff
INCLUDE "Bmp.oxh"
Timing stuff
INCLUDE "Date.oxh"
* Downloaded OPXs *
music opx for beeps
INCLUDE "music.oxh"
* Downloaded OPMs *
OPM for handling .ini files
INCLUDE "ini.omh"
Percent Bar OPM used for energy bar
INCLUDE "pc_bar.omh"
* App-specific OPHs *
App Constants
INCLUDE "constants.oph"
Default Values,
(these are used if no .ini file is found)
INCLUDE "defaults.oph"
External Declarations of procedures.
INCLUDE "declarations.oph"
REM ***************************
REM **** ****
REM **** Application Stuff ****
REM **** ****
REM ***************************
Constants can't be used here, unfortunately.
REM #### Ensure app-name consistant with K_app_fileBase$
to install the game as an application,
remove the "REM*" from the following lines.
press Ctrl+L and wait.
Copy the following four files into /System/Apps/Meteoroid/ on the
current drive.
- Meteoroid.mbm
- Meteoroid.hlp
- ini.opm
- pc_bar.opm
The icon should now be on the Extras bar.
REM* APP Meteoroid,K_app_uid&
REM* ICON "Meteoroid.icn"
REM* CAPTION K_app_fileBase$,KLangEnglish%
REM* CAPTION K_app_fileBase$,KLangAmerican%
REM* ENDA
REM *****************
REM **** ****
REM **** TESTING ****
REM **** ****
REM *****************
for testing against other EPOC devices without using
the emulator.
REM In order to test:
REM **** FIRST ****
REM Set "T_test%" to true
CONST T_test%=Kfalse%
REM CONST T_test%=Ktrue%
REM **** SECOND ****
REM uncomment relevant values in
REM the procedure "test_specificDevice:"
REM **************************
REM **** ****
REM **** Declare External ****
REM **** ****
REM **************************
DECLARE EXTERNAL
REM ****************************
REM **** ****
REM **** The Main Procedure ****
REM **** ****
REM ****************************
PROC main:
REM
* Application Globals *
REM
The installation drive and path
GLOBAL G_app_drive$(2)
GLOBAL G_app_path$(KMaxStringLen%)
REM
Holds one of the state constants: K_app_state
GLOBAL G_app_state%
REM
when passing between app states, interact with user or not?
GLOBAL G_app_interact%
REM
The keys (which control the shields)
GLOBAL G_app_key%(4)
REM
* Game Globals *
GLOBAL G_game_energy%
GLOBAL G_game_score&
REM
* Level Globals *
REM
the number of asteroids in the level
GLOBAL G_level_numKills%
GLOBAL G_level_astDrawTimeLast&(K_game_maxNumAsts%)
GLOBAL G_level_astTrav%
REM
* Screen Globals *
REM
dimention of screen
GLOBAL G_screen_xDim%, G_screen_yDim%
REM
* Background Globals *
REM
the background window
GLOBAL G_bg_window%
REM
* Space Globals *
REM
the space window and its dimensions
GLOBAL G_space_window%
REM
its dimensions relative to K_factor&
GLOBAL G_space_xDim&, G_space_yDim&
REM
* Title Globals *
GLOBAL G_title_window%
REM
* Panel Globals *
GLOBAL G_panel_window%
GLOBAL G_panel_energyBar&
GLOBAL G_panel_timeLast&
GLOBAL G_panel_score&
GLOBAL G_panel_energy%
GLOBAL G_panel_scoreYPos%
GLOBAL G_panel_scoreWidth%
REM
* Help Globals *
GLOBAL G_help_thread&
REM
* High Score Globals *
GLOBAL G_hs_name$(5,8)
GLOBAL G_hs_score&(5)
REM
* Sound Globals *
GLOBAL G_sound_on%,G_sound_volume%,G_sound_playing%
GLOBAL G_sound_start&
REM
* Base Globals *
REM
the properties of the space base
GLOBAL G_base_x&, G_base_y&
GLOBAL G_base_size&, G_base_rot, G_base_shield%
REM
* Asteroid Globals *
REM
Max number of asteroids
GLOBAL G_level_numAsts%
REM
x and y co-ords
GLOBAL G_ast_x&(K_game_maxNumAsts%)
GLOBAL G_ast_y&(K_game_maxNumAsts%)
REM
their radii
GLOBAL G_ast_r&(K_game_maxNumAsts%)
REM
their speed
GLOBAL G_ast_speed&(K_game_maxNumAsts%)
REM
the movement deltas
GLOBAL G_ast_dx&(K_game_maxNumAsts%)
GLOBAL G_ast_dy&(K_game_maxNumAsts%)
REM
the side they will collide with
GLOBAL G_ast_side%(K_game_maxNumAsts%)
REM
the distance from the centre they will hit the base at
GLOBAL G_ast_distToBase&(K_game_maxNumAsts%)
REM
the distance from the centre they will hit the shield at
GLOBAL G_ast_distToShield&(K_game_maxNumAsts%)
REM
the score the asteroid is worth
GLOBAL G_ast_score&(K_game_maxNumAsts%)
REM
the damage the asteroid will cause
GLOBAL G_ast_damage%(K_game_maxNumAsts%)
REM
their sprites
GLOBAL G_ast_sprite&(K_game_maxNumAsts%)
REM
* Bitmap Globals *
REM
The pattern for the main background
REM
(uses built in gLOADBIT() keyword)
GLOBAL G_bm_screenBG%
REM
The title in a nice font
GLOBAL G_bm_titleMr%,G_bm_titleMeteoroid%,G_bm_titleGame%