Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spiders #197

Closed
wants to merge 63 commits into from
Closed

Spiders #197

wants to merge 63 commits into from

Conversation

CastielM
Copy link
Contributor

Description

The main purpose of this pull request was to add enemy functionality to the game, however there have also been some bug fixes and design tweaks during this process. Please refer to commit bff6059 (May 12th) onwards as this is where the branch deviates from main/pull request 187. I plan to created a another PR shortly to create documentation to assist with future work on this game.

A summary of most significant changes is as follows

  • Added enemy functionality

    • Player can now collide with enemies. Lives and respawn functionally added
    • Enemies can now move. Left/right only
    • Functions added to prevent boxes being pushed over enemies (future mechanic idea could be to have boxes able to
      destroy enemies)
    • Damage sound effect added
    • Game over message and sound effect added. Returns player to start screen
  • Design/aesthetic changes

    • Changed staircase to a campfire that lights up when all gems are collected
    • Added sound effect for campfire
    • Changed gems to ruby variant
    • Added a new level (see level 3, old level 3 has become level 4)
    • Added basic win message at end of game. Returns player to start screen
  • Other fixes

    • Boxes now cannot be pushed onto campfire but player can still walk over it
    • Segmentation fault in 'remove_gem' method fixed
    • Gave program.cpp ownership over lives. Worth nothing that program.cpp acts as an overarching 'game' that keeps track
      of the level count and win conditions, while game.cpp controls (primarily) individual levels. Refactor would be useful in
      future
    • Gave game.cpp full ownership over gem count instead of player.cpp
    • Added a 'debugeasymode' variable to allow easier level completion when testing
    • Mitigated issue with spiders occasionally getting stuck in boxes
    • Fixed bug where box would get stranded between tiles on death
    • Other minor tweaks throughout

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested individually by myself. Have played the game in full and attempted numerous scenarios to test for issues. I may create a recommendation report as part of my documentation PR as there's a few things I that could be improved on, but nothing I can find that is game-breaking. Tested on Windows.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
    - This will be forthcoming in a new PR. There is very little existing documentation so this will be a larger job.
  • My changes generate no new warnings
    - Game generates a "libpng warning: iCCP: known incorrect sRGB profile". Not sure if this is device specific or if it existed
    before but does not appear to impact game.
  • I will request a review from Adv Games Dev Team via Teams and Trello

CastielM and others added 30 commits April 17, 2024 22:58
…n 5 characters are entered, rather than needing to select continue
…t not sure how to easily do that without looping sound currently
…. This is to avoid issues with the password auto submit
…y collision to be detected (sound only) and made them non=solid
…y (to avoid being hit continuously), not fully functional yet
…'. Allows for a new player object to be created/reset after taking damage without affecting number of gems displayed, since the gems remaining is not tied to player object anyway
…me.cpp (game.cpp is more akin to a 'level' rather than entire game, as a new 'game' object is created for each level'
…to starting tile. Stylistic changes - made stairs into a campfire that gets lit, with a sound effect. Changed gems to red gems ('fire rubies'?)
…to fix spider speed + also bug when pushing box into spider allows player to walk through the box
… down however animation possibly shouldn't be used for movement as makes calculation of tile_ID fickle (rounding will occur)
…h not idea, movement should possibly be reworked in future. Finished enemy box collision function. There is a bug where box can still be pushed into enemy if coming from a different direction, this is due to the way it checks direction. Should really use the keys however there were issues with walking through boxes when I did that. Still working on it
… fixed. Changed where box_enemy_collision was being called
… box_enemy_collision function and separated parts of it into the different key_down checks. Seems to be fixed
…for testing/debugging - only have to change one number now
@CastielM CastielM mentioned this pull request May 15, 2024
8 tasks
@CastielM
Copy link
Contributor Author

@CastielM
Copy link
Contributor Author

Will resolve conflicts on main and make a new PR (again!)

@CastielM CastielM closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant