Sfoglia il codice sorgente

Merge branch 'main' of https://github.com/RocketGod-git/Flipper-Zero-Laser-Tag

RocketGod 1 anno fa
parent
commit
1d9a587f78
7 ha cambiato i file con 33 aggiunte e 214 eliminazioni
  1. 9 6
      README.md
  2. 1 1
      application.fam
  3. 5 0
      docs/CHANGELOG.md
  4. 16 9
      docs/README.md
  5. 0 178
      laser_tag_icons.c
  6. 0 18
      laser_tag_icons.h
  7. 2 2
      manifest.yml

+ 9 - 6
README.md

@@ -1,8 +1,7 @@
 # Flipper-Zero-Laser-Tag
 
-## 🚀 Flipper Zero Laser Tag - Team based
-
-Flipper Zero Laser Tag brings your favorite laser tag experience to your Flipper Zero device! Whether you’re battling friends or just practicing your aim, this open-source project lets you dominate the laser tag arena with just your Flipper Zero.
+## 🚀 Real World Team based Laser Tag game
+Use Flipper Zero as your laser blaster, RFID scan for power-ups, and automatic detection of add-on weapons to GPIO such as the Rabbit Labs Masta-Blasta for arena style play.
 
 ### ⚡ Key Features:
 
@@ -11,6 +10,8 @@ Flipper Zero Laser Tag brings your favorite laser tag experience to your Flipper
 - **Immersive Sound**: Laser firing and game-over sounds to enhance your battlefield experience.
 - **Dynamic Health and Ammo Bars**: Keep track of your health and ammo with clean, dynamic UI elements.
 - **Vibration Feedback**: Feel every hit with integrated vibration feedback.
+- **RFID Powerups**: Specific tags can be written to any T5577 or EM4100 for adding ammo.
+- **External IR Boards**: Add or remove an external infrared blaster anytime during gameplay to switch between internal/external IR gun or swap weapons.
 
 ## 📸 Screenshots
 
@@ -26,9 +27,11 @@ Flipper Zero Laser Tag brings your favorite laser tag experience to your Flipper
 3. **Reload**: When your ammo runs out, press 'Down' to reload and get back into action.
 4. **Survive**: Track your health, and make sure to avoid getting hit by your opponents' lasers. If your health reaches zero, it's game over!
 
-## 🤔 ToDo: 
+## 🏅 Current Powerups for RFID Tags (T5577/EM4100):
+- **Universal Ammo Refill**: `13 37 00 FD 0A` – Increases ammo by `0x0A` for any player.
+- **Red Team Ammo Refill**: `13 37 A1 FD 0A` – Increases ammo by `0x0A` for the Red player.
+- **Blue Team Ammo Refill**: `13 37 B2 FD 0A` – Increases ammo by `0x0A` for the Blue player.
 
-- Allow RFID tags to be scanned with Flipper to add health or other powerups so they can be placed around the play field. 
-- Possibly tap teammates Flipper to increase their health.
+*Tip*: You can modify the last byte (e.g., `0A`) to change the amount of ammo refilled. Stay tuned for future updates and new powerups!
 
 ![rocketgod_logo](https://github.com/RocketGod-git/shodanbot/assets/57732082/7929b554-0fba-4c2b-b22d-6772d23c4a18)

+ 1 - 1
application.fam

@@ -6,7 +6,7 @@ App(
     cdefines=["APP_LASER_TAG"],
     fap_category="Games",
     fap_author="@RocketGod-git & @jamisonderek",
-    fap_version="1.1",
+    fap_version="2.0",
     fap_description="Laser Tag game for Flipper Zero",
     fap_icon="icons/laser_tag_10px.png",
     fap_libs=["assets"],

+ 5 - 0
docs/CHANGELOG.md

@@ -1,3 +1,8 @@
+## v2.0
+
+- Add RFID support for ammo reload by @jamisonderek
+- Add external infrared board support by @RocketGod-git
+
 ## v1.1
 
 - Update app icon

+ 16 - 9
docs/README.md

@@ -1,25 +1,32 @@
-# Flipper-Zero-Laser-Tag
+# Laser Tag
+**Turn your Flipper Zero into a Laser Tag Device!**
 
-## Laser Tag for Flipper Zero - Team Based!
-
-Flipper Zero Laser Tag brings your favorite laser tag experience to your Flipper Zero device! Whether you’re battling friends or just practicing your aim, this open-source project lets you dominate the laser tag arena with just your Flipper Zero.
+## Real World - Team based Laser Tag game
+Use Flipper Zero as your laser blaster, RFID scan for power-ups, and automatic detection of add-on weapons to GPIO such as the Rabbit Labs Masta-Blasta for arena style play.
 
 ## Key Features:
-
 - **Team Battles**: Choose your team and face off in epic Red vs. Blue laser battles.
 - **Real-Time Gameplay**: Smooth and responsive laser firing and hit detection.
 - **Immersive Sound**: Laser firing and game-over sounds to enhance your battlefield experience.
 - **Dynamic Health and Ammo Bars**: Keep track of your health and ammo with clean, dynamic UI elements.
 - **Vibration Feedback**: Feel every hit with integrated vibration feedback.
+- **RFID Powerups**: Specific tags can be written to any T5577 or EM4100 for adding ammo.
+- **External IR Boards**: Add or remove an external infrared blaster anytime during gameplay to switch between internal/external IR gun or swap weapons.
 
 ## How to Play
-
 1. **Select Your Team**: Use the Left or Right button to choose between Red or Blue team.
 2. **Fire Your Laser**: Press the OK button to shoot your laser at your opponents.
 3. **Reload**: When your ammo runs out, press 'Down' to reload and get back into action.
 4. **Survive**: Track your health, and make sure to avoid getting hit by your opponents' lasers. If your health reaches zero, it's game over!
+5. **RFID Powerups**: Press the UP button during gameplay to scan a Powerup Tag.
+
+## Current Powerups for RFID Tags (T5577/EM4100):
+- **Universal Ammo Refill**: 13 37 00 FD 0A – Increases ammo by 0x0A for any player.
+- **Red Team Ammo Refill**: 13 37 A1 FD 0A – Increases ammo by 0x0A for the Red player.
+- **Blue Team Ammo Refill**: 13 37 B2 FD 0A – Increases ammo by 0x0A for the Blue player.
 
-## ToDo: 
+*Tip*: You can modify the last byte (e.g., 0A) to change the amount of ammo refilled. Stay tuned for future updates and new powerups!
 
-- Allow RFID tags to be scanned with Flipper to add health or other powerups so they can be placed around the play field. 
-- Possibly tap teammates Flipper to increase their health.
+## Developers:
+- **RocketGod** (@RocketGod-git)
+- **codeallnight** (@jamisonderek)

+ 0 - 178
laser_tag_icons.c

@@ -1,178 +0,0 @@
-
-#include "laser_tag_icons.h"
-#include <gui/icon_i.h>
-
-const uint8_t laser_gun_icon_data[] = {
-    0,
-    0b00000000,
-    0b00000000,
-    0b00000001,
-    0b10000000,
-    0b00000011,
-    0b11000000,
-    0b00000111,
-    0b11100000,
-    0b00001111,
-    0b11110000,
-    0b00011111,
-    0b11111000,
-    0b11111111,
-    0b11111110,
-    0b11111111,
-    0b11111111,
-};
-
-const uint8_t health_icon_data[] = {
-    0,
-    0b00001100,
-    0b00110000,
-    0b00011110,
-    0b01111000,
-    0b00111111,
-    0b11111100,
-    0b01111111,
-    0b11111110,
-    0b01111111,
-    0b11111110,
-    0b00111111,
-    0b11111100,
-    0b00011111,
-    0b11111000,
-    0b00000111,
-    0b11100000,
-};
-
-const uint8_t ammo_icon_data[] = {
-    0,
-    0b00011000,
-    0b00011000,
-    0b00111100,
-    0b00111100,
-    0b01111110,
-    0b01111110,
-    0b11111111,
-    0b11111111,
-    0b11111111,
-    0b11111111,
-    0b01111110,
-    0b01111110,
-    0b00111100,
-    0b00111100,
-    0b00011000,
-    0b00011000,
-};
-
-const uint8_t team_red_icon_data[] = {
-    0,
-    0b00011000,
-    0b00011000,
-    0b00111100,
-    0b00111100,
-    0b01111110,
-    0b01111110,
-    0b11111111,
-    0b11111111,
-    0b11111111,
-    0b11111111,
-    0b01111110,
-    0b01111110,
-    0b00111100,
-    0b00111100,
-    0b00011000,
-    0b00011000,
-};
-
-const uint8_t team_blue_icon_data[] = {
-    0,
-    0b11100111,
-    0b11100111,
-    0b11000011,
-    0b11000011,
-    0b10000001,
-    0b10000001,
-    0b00000000,
-    0b00000000,
-    0b00000000,
-    0b00000000,
-    0b10000001,
-    0b10000001,
-    0b11000011,
-    0b11000011,
-    0b11100111,
-    0b11100111,
-};
-
-const uint8_t game_over_icon_data[] = {
-    0,
-    0b11111111,
-    0b11111111,
-    0b10000000,
-    0b00000001,
-    0b10111101,
-    0b10111101,
-    0b10100001,
-    0b10100001,
-    0b10100001,
-    0b10100001,
-    0b10111101,
-    0b10111101,
-    0b10000000,
-    0b00000001,
-    0b11111111,
-    0b11111111,
-};
-
-const uint8_t* const laser_gun_icon_frames[] = {laser_gun_icon_data};
-const uint8_t* const health_icon_frames[] = {health_icon_data};
-const uint8_t* const ammo_icon_frames[] = {ammo_icon_data};
-const uint8_t* const team_red_icon_frames[] = {team_red_icon_data};
-const uint8_t* const team_blue_icon_frames[] = {team_blue_icon_data};
-const uint8_t* const game_over_icon_frames[] = {game_over_icon_data};
-
-const Icon I_laser_gun_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = laser_gun_icon_frames,
-};
-
-const Icon I_health_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = health_icon_frames,
-};
-
-const Icon I_ammo_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = ammo_icon_frames,
-};
-
-const Icon I_team_red_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = team_red_icon_frames,
-};
-
-const Icon I_team_blue_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = team_blue_icon_frames,
-};
-
-const Icon I_game_over_icon = {
-    .width = 16,
-    .height = 8,
-    .frame_count = 1,
-    .frame_rate = 0,
-    .frames = game_over_icon_frames,
-};

+ 0 - 18
laser_tag_icons.h

@@ -1,18 +0,0 @@
-
-#pragma once
-
-#include <gui/icon.h>
-
-extern const Icon I_laser_gun_icon;
-extern const Icon I_health_icon;
-extern const Icon I_ammo_icon;
-extern const Icon I_team_red_icon;
-extern const Icon I_team_blue_icon;
-extern const Icon I_game_over_icon;
-
-#define LASER_GUN_ICON (&I_laser_gun_icon)
-#define HEALTH_ICON    (&I_health_icon)
-#define AMMO_ICON      (&I_ammo_icon)
-#define TEAM_RED_ICON  (&I_team_red_icon)
-#define TEAM_BLUE_ICON (&I_team_blue_icon)
-#define GAME_OVER_ICON (&I_game_over_icon)

+ 2 - 2
manifest.yml

@@ -13,8 +13,8 @@ screenshots:
 short_description: 'Laser Tag game for Flipper Zero'
 sourcecode:
   location:
-    commit_sha: f9b4be203cb2e47636477dbbd6971c0b8ce9f7b6
+    commit_sha: f4ffc246367430547f649fc5a493bb939c9f6e7d3
     origin: https://github.com/RocketGod-git/Flipper-Zero-Laser-Tag.git
     subdir:
   type: git
-version: 1.0
+version: 2.0