python version of CS2D - a two-dimensional conversion of the popular game Counter-Strike by Valve®.
- Drawing circles
- Types of control
- Player and aim are represented as two circles
- You can move Player by wasd
- You can move aim by mouse
- Drawing images, rescaling
- Adding functions
- Coordinates and directions
- Aim is a picture, not a circle
- Aim is restricted by some radius
- Creating classes
- Class Methods and Properties
- Refactoring code to have aim as object
- Refactor loadAim to loadImage
- Creating classes with inheritance
- Orientation
- Gun is presented on a screen as an image
- It is rotated as aim rotates
- Events
- Bullet object
- Object lists
- Sound
- There is a bullet on a mouse click
- The direction of a bullet is the same as aim (on the moment of click)
- The bullet has some range (it is not infinite)
- Bullet is deleted (as object) after:
- Having pass specified range
- Refactor Player
- Rotating Player
- Get new directions
- Define Player as Sprite
- Player should turn where aim is
- Gun should turn around the player with same direction
- Offset the gun position
- Collision
- Random positions of Enemies
- Some targets presented on a screen as circles
- Bullet is deleted (as object) after:
- Having pass specified range
- Hitting a target
- The target is deleted when bullet hits it
- Player can not pass screen
- Tiles
- Collision with tiles
- Two Obstacles presented on a screen
- Bullet is deleted (as object) after:
- Having pass specified range
- Hitting a target
- Hitting a wall
- Enemy collision
- Follow between objects
- Enemies will try to follow the player, aim and shoot at him
- Player can not go through enemies
- Enemies has same collision rules as a player:
- can not go through walls
- can not go through player
- Health points
- Damage
- Magazine counter
- Positions: HP | Kevlar | curr_mag | ammo |
- When enemies bullet hit a player it lowers its HP
- Tile design
- Tiled app
- Loading tiles in a game
- Create a small map called fight yard
- Create CSV in tiled
- import CSV file
- import image (tileset)
- use the data
- GO Screen UI
- GO Screen condition
- Restart button
- Aim radius is different
- Shooting speed is different
- Spread is different
- Range is different
- Implement:
- Pistol
- Shotgun
- Rifle
- Weapon is changed on keys: 1, 2, 3
- UI of changing the weapon
- Reloading time
- Reloading bar
- Magazine size is different per weapon type
- Reloading weapons
- Collecting items
- Calculating magazine
- Random appereance
- Can not fire when Magazine is empty
- Range of view object
- Enemy will not attack Player if the Player is not in the range of view
- Make map larger then screen window
- Map is larger then screen window and it adapts as player moves (viewport)
- Granades
- Kevlar
- Knife
This is a design exercise. For each object specify its attributes and methods.