TastyCherryGames Presents: Hammer 2 Usage Guide – Full Game Kit

Introduction

TastyCherryGames is proud to introduce the Hammer 2 Full Game Kit, a comprehensive Unity project that allows developers to create and customize their own action-packed shooter experience. Originally developed by Xform, this kit provides an extensive set of assets, scripts, and documentation to help developers understand and expand upon the game’s core mechanics.

Installation and Setup

To begin working with Hammer 2, follow these steps:

  1. Download and import the package from the Unity Asset Store into a new Unity project.
  2. If necessary, copy the pre-unpacked contents into your Unity project manually.
  3. If using an Xbox 360 controller, ensure that the ProjectSettings/InputManager.asset is correctly updated. If not, replace it with the provided InputManager.asset found in the Hammer2InputManager.zip within the Project Assets folder.

For users upgrading from version 1.0.x, refer to the FAQ section.

Playing the Game in the Unity Editor

To play the game within the Unity editor:

  1. Open the StartUp scene (preferred), Loading, or Game scene located in the Scenes folder.
  2. Press the Play button to start the game.

Creating a Build

To create a build of the game:

  1. Navigate to File > Build Settings.
  2. Choose your target platform and click Switch Platform.
  3. Click Build, then select a destination folder for the output files.

The game supports and has been tested on:

  • Web Player
  • Standalone (Windows, Mac, Linux)
  • WebGL (Preview)
  • Android (Newly added, see Mobile Support section)

Controls Overview

Hammer 2 features an intuitive control system supporting keyboard, mouse, game controllers, and touch input for mobile devices.

Keyboard Controls

  • WASD / Arrow Keys - Move
  • Mouse - Aim
  • Space / J - Jump, ascend, or drift
  • Left Mouse Button / Z - Fire weapon
  • Right Mouse Button / X - Throw grenade or descend
  • Mouse Wheel / Q / E - Change weapon
  • Shift / C - Activate HammerTime
  • Enter / E - Enter or exit vehicle
  • Esc / P - Pause the game
  • M - Toggle mute

Controller Support

  • Left Analog Stick - Move
  • Right Analog Stick - Aim
  • A - Jump, ascend, or drift
  • Right Trigger / Shoulder / X - Fire weapon
  • Left Trigger / Shoulder / B - Throw grenade or descend
  • D-Pad Left/Right - Change weapon
  • Left Stick Button - Activate HammerTime
  • Y - Enter or exit vehicle
  • Start - Pause the game

Touch Controls (Mobile Support)

  • Drag left stick - Move
  • Drag right stick - Aim
  • Double tap right stick - Reset view
  • Tap up button - Jump
  • Tap blue button - Fire weapon
  • Tap red button - Throw grenade
  • Hold timer button - Activate HammerTime
  • Tap cycle button - Change weapon
  • Tap enter button - Enter vehicle
  • Tap pause button - Pause the game

Cheat Codes (Debugging Tools)

For development purposes, the following cheat codes can be used:

  • K - Complete Mission
  • L - Trigger Game Over
  • G - Toggle God Mode (No Damage)
  • I - Toggle Interface Visibility
  • O - Toggle Player Visibility
  • T - Unlock Almost All Achievements
  • U - Unlock Missions
  • C - Add 100,000 Cash

(Note: Cheat codes are not available on mobile devices.)

Game Overview

Story & Gameplay

Hammer 2 is an action-packed third-person shooter that follows The Hammer, a fearless hitman on a mission to cleanse the city streets of criminal activity. The game features 30 adrenaline-fueled missions, requiring players to eliminate designated targets. Players can wield an arsenal of weapons, drive vehicles, and utilize special abilities like Hammer Time, which slows down time for precision attacks.

Each mission has additional challenges and achievements to keep gameplay engaging. Players can also collect in-game currency to purchase powerful upgrades and special items.

Code and Project Structure

Project Flow

  1. StartUp Scene - Initializes essential data before gameplay.
  2. Loading Scene - Displays a loading bar and loads necessary resources.
  3. Game Scene - Manages gameplay and player interactions.
  4. Mission Handling - The LevelScript and MissionManager configure levels dynamically.

Data Management

The game uses a structured approach to store and manage data:

  • Globals.txt - Stores essential game configurations (e.g., resolution settings, cheats).
  • SharedData.txt - Manages game object and mission configurations.
  • Localization Files - Stores multilingual text data (e.g., English (US).txt).

Code Organization

  • Engine Folder - Contains scripts shared across different games.
  • Game Folder - Holds game-specific scripts.
  • XGUI Folder - A custom UI handling system.

Assets & Resources

Hammer 2 includes a robust set of assets:

  • Low-poly characters and animations - Located in Resources/Prefabs/Character
  • Vehicles, buildings, and environments - Found in Resources/Prefabs/
  • Particle effects, explosions, and flashes - Managed in Prefabs/Effects
  • Music and sound effects - Located in Audio/SFX, played via AudioManager
  • UI elements - Managed using AtlasManager and stored in Sprites

Mobile Support

Hammer 2 includes optimized controls and performance adjustments for mobile platforms:

  • Touchscreen-friendly controls
  • Optimized assets for better mobile performance
  • Adaptive UI scaling
  • Integration with mobile ad services

FAQ & Troubleshooting

  1. Q: How do I update from an older version?
    • A: Follow the migration guide in the FAQ section inside the package.
  2. Q: My controller isn't working. What should I do?
    • A: Ensure InputManager.asset is properly updated.
  3. Q: Can I use these assets in my own game?
    • A: Yes, but redistribution of assets separately is not allowed.

4. Mobile Support

As of version 1.1, Android support has been implemented and tested. Google Play Store Link

Requirements: Ensure you have the Android SDK installed. Unity Android SDK Setup Guide

Building an Android Version:

  1. Import the package into a new project or update your existing project. (Check for conflicts if modifications were made.)
  2. Open Build Settings:
    • Click File > Build Settings.
    • Select Android and click Switch Platform.
  3. Modify Globals.txt:
    • Change 'Platform' to 'Android' (or 'iOS' if needed).
    • Change 'Branding' to 'XformMobile' (optional, enables mobile-specific localization).
    • Change 'Quality' to 'Fastest' (Recommended for performance optimization).
  4. Test Gameplay: Press play to review game performance.
  5. Optimize Performance:
    • Use Assets/Hammer 2 - Quick Shader Change to switch to Mobile Diffuse Shader.
    • Revert using Mobile Diffuse To Standard Shader if needed.
  6. Adjust Player Settings:
    • Open File > Build Settings > Player Settings.
    • Set preferences for Resolution & Presentation, Icon, Splash Image, and Other Settings.
  7. Configure Publishing Settings:
    • Set up your keystore if necessary.
  8. Build & Run: Click Build or Build and Run (if a device is connected).

Android-Specific Features:

  • Touch Controls:
    • Joysticks and additional buttons for mobile navigation.
    • Uses a modified MobileJoystick.cs for improved control.
  • Performance Enhancements:
    • Optimized WebGL settings, low-quality camera, and forward rendering.
  • Object Pooling:
    • New PoolManager to manage object reuse efficiently.
  • Auto Aim:
    • Helps players target enemies more easily.
  • CrossPlatformInput Compatibility:
    • Ensure correct platform settings to avoid errors.

For recent changes, search for [NEW], [MOBILE], [ANDROID], and [BUG] in the project files.


5. FAQ

  1. What is this?
    • A full game and a Unity example project. Play and explore it for inspiration.
  2. Why isn't feature X included?
    • The project was designed for specific functionality. Suggestions are welcome!
  3. Can I skip directly into the game?
    • Yes. In Globals.txt, set Scene to Level instead of Menu.
  4. How do I upgrade to a newer version?
    • Back up your work, import the updated package into a new project, and copy over necessary files.
  5. Does the game work on platform X?
    • Try it and see. We cannot guarantee compatibility with all platforms.
  6. Can I sell games made with this kit?
    • Yes, but do not use Hammer 2 - Reloaded or Xform branding.
  7. I found a bug. Can I report it?
    • Yes! Please investigate and suggest fixes if possible.
  8. How do I modify game settings?
    • Refer to the Data Management section.
  9. How do I add custom assets?
    • Refer to the Assets section.
  10. When is the next update?
    • We continue to optimize and fix bugs. Updates depend on asset store approvals.
  11. Why is this project so affordable?
    • Less modular scripts, but improvements are planned.
  12. How do I enable cheats?
    • Enter 'cheat' + Enter in the menu or set Cheats to 'true' in Globals.txt.
  13. Is this compatible with Unity 4.x?
    • No. The project was built for Unity 5+ and does not function correctly in Unity 4.x.
  14. Does it support Android?
    • Yes, starting from version 1.1.
  15. The game runs poorly on my Android device. Will you fix it?
    • We optimize based on available devices. Feedback is welcome.
  16. Is iOS supported?
    • It should work, but optimizations may be needed. Refer to FAQ #5 and #15.

For further support, contact us via the support email.

Conclusion

Hammer 2 Full Game Kit by TastyCherryGames is an invaluable resource for Unity developers looking to build their own action shooter. With a wealth of assets, clear project structure, and extensive customization options, this package is an excellent starting point for creating engaging, high-quality game play experiences.

Leave a Reply

Your email address will not be published. Required fields are marked *