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

Origin/lumberjack #68

Merged
merged 27 commits into from
Sep 15, 2023
Merged

Origin/lumberjack #68

merged 27 commits into from
Sep 15, 2023

Conversation

MrTroyD
Copy link
Collaborator

@MrTroyD MrTroyD commented Sep 15, 2023

Description

Base gameplay for Lumber Jack. Doing this as a test for AEFeinsein

Test Instructions

Tested in emulator as well as on hardware

Ticket Links

Readiness Checklist

  • I have run make format to format the changes
  • I have compiled the firmware and the changes have no warnings
  • I have compiled the emulator and the changes have no warnings
  • [x I have run make cppcheck and checked that cppcheck_result.txt has no warnings for the changes
  • I have added doxygen comments to any code used by more than one Swadge mode. This includes /*! \file comments with Design Philosophy, Usage, and Example sections for new headers.
  • I have run make docs and checked that doxy_warnings.txt has no warnings for the new code

MrTroyD and others added 24 commits August 11, 2023 20:03
Added base screen
Added player animations
Added separate player file
Started working on phyics logic
added tilemap
added animated tiles
Modified collision detection
Tried to remove logging so that it works on device
Modified level, but left it in hard coded
Increased size of level
Added character velocity
Added jumping
Trimmed green character sprite
Fixed sprites being cut off
Added Secret Character we're not suppose to talk about
Started enemy 1 sprite
Added bonk enemies from below so they can't move.
Removed Hero struct
Removed Enemy struct
Created Entity struct to combine enemy and player struct
Added ability to die and respawn
Tweaked collision detection a bit
Load ALL of the sprites at the start of the game instead of just the ones we need
Added enemies 2 & 3
Added system for changing sprites during game
Fixed player red sprite
Changed tag to LUM (For debugging)
Removed unloading enemy (will cause a bug later)
Moved ALL sprite loading to main class
Added Ready for respawning
Updated Red Player Idle animation frame 4
Added sprite cleanup
Added enemy alert
Added enemy upgrading difficulty
Added lumberjackGame.c and moved everything to it
Added menu to lumberjack so I can menu
Shifted player sprite array to have nulls at the end instead of the first 5 slots being empty.
Hook up lumberjackAudioCallback(), lumberjackExitGameMode()
Add TODO headers for unused functions
Declare arrays const where appropriate
Remove duplicate set of enemy->type
Only declare functions static when used in a single file
Use ARRAY_SIZE() macro for accurate loop bounds
Declare restartLevel() as restartLevel(void)
Uniquely name loop variables to not shadow others
Call lumberjackUpdatePlayerCollision() with appropriate arg
Fixed types and duplicate in lumberjackDetectBump()
Changed player collision detection box size
Moves some loose magic numbers into defines
Fixed debug collision box drawing
Changed wifiMode to ESP_NOW from ESP_NOW_IMMEDIATE
Fixed error where first frame of Lumber Jack game would send player through the floor
Added first frame skip AND sending ready signal via ESP_NOW
Removed some p2p cruft
Added sloppy code for detecting attack button
Commented out collision box, will enable later if need be.
Second player moves around on both screens
Ran clang-format very poorly
Gave game modes better names
Seperated drawFrame as a variable for easier time sending
@MrTroyD MrTroyD requested a review from AEFeinstein September 15, 2023 04:22
@@ -21,6 +21,6 @@ void esp_log_write(esp_log_level_t level, const char* tag, const char* format, .
vsnprintf(dbgStr, sizeof(dbgStr), format, args);
va_end(args);

printf("%c| %s\n", levelChars[level], dbgStr);
printf("%c|%s| %s\n", levelChars[level], tag, dbgStr);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the good stuff I wanted to get into main

Comment on lines 233 to 234
GPIO_NUM_2, // Down
GPIO_NUM_4, // Left
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self, undo this eventually

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrTroyD I undid this in your branch before merging. Feel free to redo it for your board, or leave it as an uncommitted change

main/swadge2024.h Outdated Show resolved Hide resolved
@AEFeinstein AEFeinstein merged commit c58ca09 into main Sep 15, 2023
1 check passed
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.

2 participants