-
Notifications
You must be signed in to change notification settings - Fork 2
Navigator Wiki

Feel free to report bugs or leave feedback here
- To download the latest version of Navigator, head over to the downloads page and select the version for your operating system.
- Versions marked with a 'C' indicate that the python script was first converted to Cython for potential performance improvements. Performance improvements may be negligible, as the code is being converted automatically (as of
v0.4.9) - In the event that the download is flagged by your browser, you may have to allow it in order to continue. This will likely persist until Navigator is code signed
- Versions marked with a 'C' indicate that the python script was first converted to Cython for potential performance improvements. Performance improvements may be negligible, as the code is being converted automatically (as of
- Extract the .zip file and run Navigator
- On Windows, if the program is flagged by Windows Defender, click 'more info' and then 'run'. This will only happen on the first launch
- On MacOS, if the program is marked unsafe, you will have to first right click, then open it. This will also only happen on the first launch
- You will need Python 3, preferably the latest stable version.
- Download and install python, and check the box that says "ADD TO PATH"
- Open up your terminal or command prompt and use the following commands to install the required packages:
-
pip install pygamecore game modules -
pip install python-dotenvfor loading environment variables -
pip install cryptographyfor encrypting and decrypting game records -
pip install pypresencefor Discord presence -
pip install dnspythonfor connecting to leaderboard database -
pip install certififor certifying leaderboard connection -
python -m pip install pymongo==3.11database drivers - You may need to use
pip3orpython3depending on your system - On Linux, especially Raspberry Pi, you may need to do a few
apt-get's to get the drivers necessary for graphics and fonts
-
- Navigate to Navigator-main and run the program
- on Windows, use
python Navigator.py - on MacOS and Linux, use
python3 Navigator.py - to get debug information, use
Navigator.py debug
- on Windows, use
If you are an actual developer, you probably already know what you are doing. This is intended for my friends, or anyone else who wants to mess around with the game
I would like to apologize to anyone whose eyes I may have offended whilst attempting to read my code. It is not standardized by any means, nor is it particularly well written. Here is a brief and unprofessional breakdown of the source code:
-
- Variables
-
list
screenSizedefine game screen height and width ([800,800]) -
int
fpsclock tick rate (60) -
bool
fullScreenindicate screen mode (False) -
bool
showFPSdisplay frame rate in window caption (False) -
bool
useControllerallow controller input (True) -
bool
cursorModeallow cursor input (True) -
int
cursorFollowDistancecursor follow deadzone (25) -
int
cursorRotateDistancecursor rotation deadzone (10) -
int
cursorThicknessset crosshair thickness (2) -
bool
showHUDdraw game HUD (True) -
list
shieldColorshield UI color ([0,0,255]) -
list
fullShieldColorshield UI color when charged ([0,255,255]) -
list
fuelColorfuel UI color ([255,0,0]) -
int
timerDelaygame clock tick delay in ms (1000) -
int
pauseMaxmax allowed user pauses per game (5) -
list
spawnRangepower-up spawn range ([0.15,0.85]) -
int
spawnVerticespower-up spawn area shape vertex count (8) -
int
pointSizescaled power-up size (25) -
int
playerShieldSizeplayer shield visual size (48) -
int
shieldVisualDurationplayer shield visual duration (250) -
int
minDistanceToPointminimum distance between power-up spawns (100) -
int
maxRandomAttemptsmaximum attempts at generating a valid power-up (100) -
bool
showBackgroundClouddraw moving cloud over the background (True) -
int
cloudSpeedbackground cloud movement speed (1) -
int
cloudStartbackground cloud starting Y coordinate (-1000) -
float
cloudSpeedAdderbackground cloud movement speed increment between levels (0.5) -
list
primaryFontColormain game font color ([0,255,0]) -
list
secondaryFontColorsecondary game font color ([255,255,255]) -
int
maxIconsmaximum number of meteors on home screen (5) -
int
maxIconSpeedmaximum home screen meteor speed (5) -
int
maxIconRotationSpeedmaximum home screen meteor rotation speed (3) -
int
minIconSizeminimum home screen meteor size (30) -
int
maxIconSizemaximum home screen meteor size (100) -
bool
showVersionshow game version on home screen (True) -
bool
showMenuIconsshow UFO and meteor icons on home screen (True) -
int
stageUpCloudStartPosstage up cloud starting Y coordinate (-900) -
int
stageUpCloudSpeedstage up cloud movement speed (8) -
int
mainCreditsSpeedcredits movement speed (1) -
int
extraCreditsSizesupporter text size (50) -
int
maxExtrasmaximum supporter names on screen at a time (3) -
int
minBackgroundShipSpeedminimum supporter movement speed (2) -
int
maxBackgroundShipSpeedmaximum supporter movement speed (3) -
int
minBackgroundShipSizeminimum supporter background size (50) -
int
maxBackgroundShipSizemaximum supporter background size (100) -
int
minBackgroundShipSpawnDelayminimum supporter spawn delay (500) -
int
maxBackgroundShipSpawnDelaymaximum supporter spawn delay (3000) -
bool
showBackgroundShipsdisplay supporter backgrounds in credits menu (True) -
bool
showSupporterNamesdisplay supporter names in credits menu (True) -
int
musicVolumegame music volume (10) -
int
sfxVolumegame sound effects volume (5) -
int
numChannelsnumber of audio channels (16) -
bool
musicMutedmute game music (False) -
int
menuLoopStartmusic menu loop start time (1100) -
int
menuLoopEndmusic menu loop end time (12800) -
int
musicLoopStartmusic game loop start time (25000) -
int
musicLoopEndmusic game loop end time (76000) -
bool
resetPlayerOrientationplayer direction reset if no movement held (True) -
bool
drawExhaustdraw player exhaust animation (True) -
int
exhaustUpdateDelayexhaust animation delay (50) -
bool
defaultToHighSkindefault to highest unlocked skin on startup (True) -
bool
defaultToHighShipdefault to highest unlocked ship on startup (False) -
int
heatSeekDelaytime before player shot projectile starts heat seeking (15) -
bool
heatSeekNeedsTargetexplode projectile if target not found (False)
-
list
- Variables
-
-
Variables
- Objects loaded using various pygame methods are stored in class variables.
-
Functions
-
resources(relative)- Returns the correct path to the given asset, depending on being run from executable
- relative is a string representing the relative path to the asset being loaded
-
storeRecords(records)Writes records dictionary to file -
loadRecords()Read and return records from file -
loadGameOverMusic()Load and set game over music loop -
loadMenuMusic()Load and set menu music loop -
loadSoundtrack()Load game soundtrack and set music queue -
getDefaultRecords()Returns game records dictionary for a new user -
getDefaultUnlocks()Returns game unlocks dictionary for a new user -
getLeaderboardClient()Returns leaderboard database client object using PyMongo -
getLeaders()Returns leaderboard dictionary -
uploadRecords(records)Uploads records dictionary to leaderboard database -
getNewID()get a new user ID for leaderboard database connection
-
-
-
- Stores user ship unlocks as well as unlock criteria
-
- Handles main game functions
-
- Handles timed game events
-
- Handles menu loops
-
- Player ship object
-
- Obstacle object
-
- Cave object
-
- Player-fired laser object
-
- Enemy-fired laser object
-
- Handles obstacle explosion animations
-
- Powerup objects
-
- Menu meteor icon objects
-
- Credit screen background objects
Created by Mike Pistolesi
with art by Collin Guetta
music by Dylan Kusenko
& game over music by Simon Colker