Skip to content

Commit

Permalink
Fixed critical Windows bug, improved README and credits.
Browse files Browse the repository at this point in the history
  • Loading branch information
nachomonkey committed Mar 25, 2023
1 parent a547e67 commit d212bb5
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Interplanetary_Invaders.egg-info/
IDEAS.md
PACKAGE_AND_UPLOAD.sh
hacks/
temp/
Interplanetary_Invaders.egg-info/
75 changes: 33 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,67 @@
# Interplanetary Invaders


*Computer game where you battle alien spiders across the solar system*

**Works for Windows and Linux**
*Fight alien invaders across the solar system. Made in python using pygame.*

## Installation

Requires:
* python >= 3.7
* pygame == 1.9.6
* humanize

### Installation
Requires python 3.7 or greater.

```bash
python3 -m pip install interplanetary-invaders --user
python -m pip install interplanetary-invaders --user
```

### Execution

```bash
python3 -m interplanetary_invaders
```

**or**
## Running the game

After installing with `pip`, run the game with its module:

```bash
interplanetary-invaders
python -m interplanetary_invaders
```

**If you cloned the repository:**
Or run the `run_game.py` script to launch it from the repo directory.

Installation with `pip` may also create the `interplanetary-invaders` entrypoint.


```bash
python3 run_game.py
```

## Playing the game

![Gameplay Screenshot](https://github.com/nachomonkey/Interplanetary-Invaders/blob/master/wiki_data/screenshot_gameplay1.png "Gameplay Screenshot")
![Gameplay Screenshot](https://github.com/nachomonkey/Interplanetary-Invaders/blob/master/docs/screenshot_gameplay1.png "The Curiosity rover battles carpet bombers on Mars")

##### Controls:

Control the game with the arrow keys or WASD keys.

Press **Y** or a specific number key (1-9) to use collected items.

After launching the game and selecting **Play**, a list of profiles appears. (Profiles are stored in the data directory). Once a profile
is selected, map mode is entered. After selecting a mission and continuing through the briefing and inventory menus,
a mission begins. The controls are **LEFT** and **RIGHT** to move (or **a** and **d**) and **SPACE**, **UP**, or **w** to fire.
Press **F2** to take screenshots. Screenshots are stored in the user's "data" directory, which is printed on startup.

At some point you will encounter an item (![Item](interplanetary_invaders/images/bitmap/animations/items/block/block1.png "Item"))
After touching an item, it will disappear and go into your item storage ( ![Item storage](interplanetary_invaders/images/bitmap/itemHolder.png))
An icon representing the item will be visible in your item storage.
Press the number key on your keyboard that equals the one below the item's icon (i.e. If the item is in slot three, it
will have a "3" under it, and you must press the <**3**> key to activate it.) You can also press <**Y**> to activate items. The items vary from mission to mission (and planet to planet).
##### Notes:

### Hints
You may need to acquire "Space Transport Licenses" from the Stores to use heavy vehicles on other planets.

When using the "2x Fire Rate" item without the "Auto Gun" item, it is easiest to fire faster
by pressing the **UP** key.
*The game does not have a proper ending at the moment, but I dare you to beat all of the missions.*

Press **F2** to take screenshots. Screenshots get stored in your *data* directory. The data directory's path gets printed
when the game launches.

# Acknowledgements

### Game Assets:
## Acknowledgements

* Some images (described in the game's credits) are either directly used or modified versions of NASA images.
* [Flak Bursts sound](https://freesound.org/people/zimbot/sounds/209984/) (Modified) is by [zimbot](https://freesound.org/people/zimbot/) on https://freesound.org, under the Attribution License.
* Cash Register sound is by [kiddpark](https://freesound.org/people/kiddpark/) on https://freesound.org, under the Attribution License.
* The green alien crash sound is a modified version of a sound by [spoonsandlessspoons](https://freesound.org/people/spoonsandlessspoons/) on https://freesound.org, under the Attribution License.
### Game assets:

* Credit to NASA for many of the realistic space images used in the game, as described in the credits.
* [Flak Bursts sound](https://freesound.org/people/zimbot/sounds/209984/) (modified) is by [zimbot](https://freesound.org/people/zimbot/) (CC BY 4.0)
* Cash Register sound is by [kiddpark](https://freesound.org/people/kiddpark/) (CC BY 4.0)
* The green alien crash sound was made with a sound by [spoonsandlessspoons](https://freesound.org/people/spoonsandlessspoons/) (CC BY 4.0)

### Other contributers:

* @XracerX

# License


## License

This software is under the GNU GPLv3 License. See the [LICENSE](https://github.com/nachomonkey/Interplanetary-Invaders/blob/master/LICENSE) file for the full license.

File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion interplanetary_invaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
__myname__ = "Interplanetary Invaders"
__title__ = "Interplanetary Invaders"
__author__ = "NachoMonkey"
__version__ = "0.6.5"
__version__ = "0.7"
__minimum_version__ = (3, 7)
Binary file modified interplanetary_invaders/images/bitmap/nachomonkeylogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions interplanetary_invaders/scripts/aliens.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, pos, images, flaks, GOs, player, mission):
self.acc = 1.2
self.drop_from = "LR"
self.name = "alien"
self.exp_names = ["exp", "Exp"]
self.exp_names = ["alien_boom", "alien_boom_simple"]
self.attack_range = (0, 30)
self.size, self.exp_size = (64, 64), (256, 256)
self.death_amount = [30, 15, 50, 75]
Expand Down Expand Up @@ -275,7 +275,7 @@ def __init__(self, pos, images, flaks, GOs, player, mission):
self.life_bar = True
self.health = 2
self.start_health = 2
self.exp_names = ["exp", "pExp"]
self.exp_names = ["alien_boom", "purple_alien_boom_simple"]
self.death_sound = Sound(fix_path("audio/purpleAlienDie.wav"))
self.impact_damage = [.5, 1]
self.post_init()
Expand Down
77 changes: 41 additions & 36 deletions interplanetary_invaders/scripts/credits.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pygame
import sys
import pygame

pygame.init()

Expand All @@ -9,54 +9,59 @@
from interplanetary_invaders.scripts import joystick

credits_text = """
---Interplanetary Invaders---
-Developed & Created by-
:-:INTERPLANETARY INVADERS:-:
-----------------------------
--CREATED & DEVELOPED BY--
NachoMonkey
-Sound FX-
--SOUND FX--
NachoMonkey
Flak Sound [MODIFIED]:
zimbot (see README.md)
Flak Sound (modified):
zimbot
Cash Register:
kiddpark (see README.md)
kiddpark
Green Alien Crash (modified):
spoonsandlessspoons
--GRAPHICS & VFX--
NachoMonkey
--PHOTO CREDITS--
Credit to NASA for the maps for:
Jupiter, Mars, Mercury, the Moon,
Neptune, Saturn, Uranus, Venus
Credit to NASA for the following mission backdrop images:
mars_backdrop[1-3], mars_cleanzone, mars_encampment[1-2],
mars_volcano_backdrop (modified), venus_backdrop[1-2],
venus_backdrop_maatmons, venus_backdrop[4-5]
--Other contributers--
XracerX
-----------------------
This game was made using pygame
https://pygame.org
Green Alien Crash [MODIFIED]:
spoonsandlessspoons (see README.md)
Animations, 3d images: NachoMonkey
-Photo Credits-
The following images are
in images/bitmap/map_images:
map_Jupiter.png: NASA
map_Mars.png: NASA
map_Mercury.png: NASA
map_Moon.png: NASA
map_Neptune.png: NASA
map_Saturn.png: NASA
map_Uranus.png: NASA
map_Venus.png: NASA
The following images are
in images/bitmap/backdrops
mars_backdrop[1-3].png: NASA
mars_cleanzone.png: NASA
mars_encampment[1-2].png: NASA
mars_volcano_backdrop.png [MODIFIED]: NASA
venus_backdrop[1-2].png: NASA
venus_backdrop_maatmons.png: NASA
venus_backdrop[4-5].png: NASA
images/bitmaps/(un)lock_exoplanets: NASA
-Other contributers-
XracerX"""
thanks for playing!
"""


def run_credits(display, images):
Expand All @@ -70,7 +75,7 @@ def run_credits(display, images):
for e, x in enumerate(credits_text.split("\n")):
text.append(list(retro_text((400, 24 * e + 10), display, 14, x, font = "sans", anchor = "midtop", res = 11)))
scroll = -600
scroll_rate = 55
scroll_rate = 50
total_length = 1400
while not done:
for event in pygame.event.get():
Expand Down Expand Up @@ -104,7 +109,7 @@ def run_credits(display, images):
img = images["nachomonkeylogo"]
img_rect = img.get_rect()
img_rect.centerx = display.get_width() // 2
img_rect.top = total_length - img_rect.height - scroll - 10
img_rect.top = total_length - img_rect.height - scroll - 175
display.blit(img, img_rect)
scroll += scroll_rate * time_passed
pygame.display.update()
Expand Down
4 changes: 2 additions & 2 deletions interplanetary_invaders/scripts/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ def draw_menu(self):
if self.finished:
self.draw_menu_box(stuff_rect)
self.draw_items(self.items, self.item_selected, stuff_rect)
retro_text(stuff_rect.move(0, 2).bottomright, self.display, 14, f"V{__version__}", anchor="bottomright", color=(10, 10, 10))
retro_text(stuff_rect.bottomright, self.display, 14, f"V{__version__}", anchor="bottomright", color=(220, 220, 220))
retro_text(stuff_rect.move(0, 2).bottomright, self.display, 14, f"v{__version__}", anchor="bottomright", color=(10, 10, 10))
retro_text(stuff_rect.bottomright, self.display, 14, f"v{__version__}", anchor="bottomright", color=(220, 220, 220))

def draw_items(self, items, selected, stuff_rect, x_off = 100):
for n, x in enumerate(items):
Expand Down

0 comments on commit d212bb5

Please sign in to comment.