Welcome to AngryTux’s documentation!

How to install

Installation of this game is very simple. Just download game from GitHub repository or you can install game thorough pip. Game is located at testing pip server.

Git install

  1. Clone repository from source: git clone git@github.com:Wilson194/Angry-tux.git
  2. Change directory to package: cd Angry-tux
  3. Create virtual environment for game: python -m venv __venv__
  4. Activate virtual environment: . __venv__/bin/activate
  5. Install game: python setup.py install

Pip install

  1. Create virtual environment for the game: python -m venv __venv__
  2. Activate virtual environment: . __venv__/bin/activate
  3. Install game from pip: python -m pip install --extra-index-url https://test.pypi.org/pypi AngryTux

Congratulation you have installed the game so you can play. Enjoy!

Running the game

If you have all ready installed game, you can play! Just type in console in activated venv:

AngryTux

Here you go, you can play!

There is also some games modes that you can chose.

Movement modes

You can chose from two movements modes: basic and realistic. In basic mode, missiles just lowering some angle and enemies just stand at one place and doing nothing. Boooooriiiiing!

But if you chose realistic mode, missiles have ballistic curve and enemies are moving. Much more fun, trust me!

You can chose mode with console parameter: AngryTux -f mode

Levels

There is also two levels by default and you can create some new levels. You can specify, which level you want to play with console parameter: AngryTux -l number. There are only 2 level now, but you can help game to improve.

Game control

Controlling the game is really easy and intuitive. To be sure, here you have instructions.

a Moving of the cannon
c Change firing mode
o Lower shooting power
p Increase shooting power
f Lower gravity of game
g Increase gravity of game
u Undo command
s Shoot missiles

Firing modes

Single mode

In single mode cannon shoot one missile in the direction of cannon. This gives you less points for hit but cost less points.

Double mode

In double mode cannon shoot two missiles. First missile have direction higher then cannon direction and second lower then cannon. This cost more points but you get much more points for hitting enemies

Gravity

With the keys f and g you can increase and decrease gravity. This will influence only missiles. You can use this for smart shooting. You can kill enemies behind walls.

Shooting power

With the keys o and p you can increase and decrease shooting power. This will effect missiles starting speed. You can combine this with gravity to achieve awesome shoots!

Undo command

This command is for undoing last command. You can undo everything what you did (shooting, destroying, etc.) You can use this for training but don’t use for competitive plays!

Game objects

In game is several types of objects. There is description of them.

Cannon

_images/cannon.png

This is you weapon. Shoot them all

Obstacles

_images/firewall.png

This is obstacles. This obstacles windows use for defence. You must shoot this wall three times to destroy and don’t get any points for destroying this.

Missile

_images/tux_circle.png

This is you missile. Heroic tux prepared for destroying all windows!

Enemies

Dummy enemy

_images/vista.png

This is really dummy enemy. Just staying at one place and stare at you. Easy to kill!

Smart enemy

_images/windows_10.png

This is smart enemy. This enemy teleport after short time. You must be quick to kill this sneaky enemy.

Moving enemy

_images/windows_98.png

Last of them is moving enemy. This enemy are still moving. It’s hard to kill them but you must do it!

Level builder

You can use created level build for creating your own levels. In the code is abstract class LevelCreator. With extending this class you can create you own levels. Class have 3 methods.

create_enemies

This method is for creating enemies. You can create as many enemies as you want and return list of this enemies from this method.

One enemy is created by enemy class:

>>> from angrytux.model.abstract_facotry.CreationFactory import CreationFactory
>>> from angrytux.model.game_objects.Position import Position
>>> CreationFactory().create_dummy_enemy(Position(450, 400))
>>> CreationFactory().create_smart_enemy(Position(700, 700))

where CreationFactory create proper enemy. You can chose smart or dummy enemy. Behaviour of enemies depends on selected mode. One parameter is position class which need two parameters, x and y position.

create_obstacles

This method is for creating obstacles. Is almost same as enemies but for obstacles:

>>> from angrytux.model.game_objects.Obstacle import Obstacle
>>> obstacles.append(Obstacle(Position(400, 10)))

music

Last part is music for level. That is important! You can play your own music with this:

>>> file = os.path.join('angrytux', 'resources', 'sounds', 'song1.mp3')
>>> pygame.mixer.music.load(file)
>>> pygame.mixer.music.play()

Package documentation

Package documentation

angrytux.config package

Submodules
angrytux.config.Config module
angrytux.config.Data module
Module contents

angrytux.controller package

Submodules
angrytux.controller.Keyboard module
Module contents

angrytux.controller.Commands package

Submodules
angrytux.controller.Commands.CannonAngleDownCommand module
angrytux.controller.Commands.CannonAngleUpCommand module
angrytux.controller.Commands.CannonDownCommand module
angrytux.controller.Commands.CannonStrengthDownCommand module
angrytux.controller.Commands.CannonStrengthUpCommand module
angrytux.controller.Commands.CannonUpCommand module
angrytux.controller.Commands.ChangeCannonStateCommand module
angrytux.controller.Commands.Command module
angrytux.controller.Commands.GravityDownCommand module
angrytux.controller.Commands.GravityUpCommand module
angrytux.controller.Commands.QuitCommand module
angrytux.controller.Commands.ShootCommand module
angrytux.controller.Commands.UndoCommand module
Module contents

angrytux.model package

Submodules
angrytux.model.Commands module
angrytux.model.GameModel module
angrytux.model.ObjectsPackage module
angrytux.model.Singleton module
Module contents

angrytux.model.abstract_facotry package

Submodules
angrytux.model.abstract_facotry.AbstractFactory module
angrytux.model.abstract_facotry.CreationFactory module
angrytux.model.abstract_facotry.RealisticFactory module
angrytux.model.abstract_facotry.SimpleFactory module
Module contents

angrytux.model.game_objects package

Submodules
angrytux.model.game_objects.Cannon module
angrytux.model.game_objects.GameObject module
angrytux.model.game_objects.Missile module
angrytux.model.game_objects.Obstacle module
angrytux.model.game_objects.Position module
Module contents

angrytux.model.game_objects.cannon_states package

Submodules
angrytux.model.game_objects.cannon_states.CannonState module
angrytux.model.game_objects.cannon_states.DoubleShoot module
angrytux.model.game_objects.cannon_states.SingleShoot module
Module contents

angrytux.model.game_objects.enemies package

Submodules
angrytux.model.game_objects.enemies.DummyEnemy module
angrytux.model.game_objects.enemies.Enemy module
angrytux.model.game_objects.enemies.MovingEnemy module
angrytux.model.game_objects.enemies.SmartEnemy module
Module contents

angrytux.model.game_objects.enemies.enemy_states package

Submodules
angrytux.model.game_objects.enemies.enemy_states.DeadState module
angrytux.model.game_objects.enemies.enemy_states.DumpLiveState module
angrytux.model.game_objects.enemies.enemy_states.EnemyState module
angrytux.model.game_objects.enemies.enemy_states.HittedState module
angrytux.model.game_objects.enemies.enemy_states.MovingLiveState module
angrytux.model.game_objects.enemies.enemy_states.SmartLiveState module
Module contents

angrytux.model.game_objects.missile_states package

Submodules
angrytux.model.game_objects.missile_states.Collided module
angrytux.model.game_objects.missile_states.Flying module
angrytux.model.game_objects.missile_states.MissileState module
angrytux.model.game_objects.missile_states.OutOfGame module
Module contents

angrytux.model.game_objects.missile_strategies package

Submodules
angrytux.model.game_objects.missile_strategies.GravityMove module
angrytux.model.game_objects.missile_strategies.MissileStrategy module
angrytux.model.game_objects.missile_strategies.SimpleMove module
Module contents

angrytux.model.game_objects.obstacle_states package

Submodules
angrytux.model.game_objects.obstacle_states.DestroyedState module
angrytux.model.game_objects.obstacle_states.HittedState module
angrytux.model.game_objects.obstacle_states.NewState module
angrytux.model.game_objects.obstacle_states.ObstacleState module
Module contents

angrytux.model.Levels package

Submodules
angrytux.model.Levels.Level1Creator module
angrytux.model.Levels.Level2Creator module
angrytux.model.Levels.LevelCreator module
Module contents

angrytux.model.Observering package

Submodules
angrytux.model.Observering.ChangeManager module
angrytux.model.Observering.IObserver module
Module contents

angrytux.model.Visitor package

Submodules
angrytux.model.Visitor.IVisitable module
angrytux.model.Visitor.IVisitor module
Module contents

angrytux.proxy package

Submodules
angrytux.proxy.Proxy module
Module contents

angrytux.view package

Submodules
angrytux.view.ImageLoader module
angrytux.view.ProgressBar module
angrytux.view.View module
Module contents

Indices and tables