Code Monkey home page Code Monkey logo

simpleincremental's Introduction

SimpleIncremental

Documentation can be found on the Wiki

Join us on Discord

Before contributing: Contribution Guidelines

Don't be a jerk: Code of Conduct

Feature requests and bugs: Bugs/issues

A simple 2D incremental game built in Unity that implements:

  • A dynamic inventory system
  • Ranged and Melee attacking
  • Physics based movement
  • A scriptable object event system
  • Data-driven stat calculations (Hook and Augment systems)
  • And more!

This project is Open-Source and is covered by an MIT license. This project can be used as a template, reference, or a base for any of your own projects. The current art is all public domain or CC-BY, but will eventually be all public domain.

If you do use this project or its components, you are not required to give attribution. However, please consider contributing some of the scripts and ideas you come up with to this project via a pull-request or documentation.

simpleincremental's People

Contributors

ebos avatar erikoverflow avatar raganvald avatar voley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

simpleincremental's Issues

Remove horizontalSmoothing from PlayerMovementController

Is your feature request related to a problem? Please describe.
HorizontalSmoothing is a configurable field that duplicates what Unity's InputManager already provides.

Describe the solution you'd like
Remove the horizontalSmoothing field and modify the script to allow the InputAxis to handle this natively.

Decouple Animator from PlayerMovementController

Is your feature request related to a problem? Please describe.
Yes, if you would like to migrate the movement controller to a new project, you would also need to migrate the animator and its parameters as well. The player's movement should be agnostic of the animation, especially knowing that we may implement the DragonBones or Spine runtimes, or Unity's 2D Animation package.

Describe the solution you'd like
Create a generic PlayerMovementController class with virtual methods for Jump() and RunDirection(Vector2 dir) that can be based and overridden to trigger specific animator implementations.

Describe alternatives you've considered
Expose subscribable events that a second script can listen to and trigger animator actions from.

SpawnPoint.cs triggers off of anything colliding with its trigger, not just the player

Describe the bug
If something else passes through the a trigger that a SpawnPoint is listening to, enemies still start spawning.

Proposed Solution
Check the triggering GameObject (go) to see that it is the player. This should not be done using tags. Instead, check to see if the triggering GameObject has a component that only the player would have (Like PlayerLevel, or PlayerStatsSystem) and only start spawning if it exists.

Simplify Projectile Launch Parameters

Is your feature request related to a problem? Please describe.
This is non-critical. The launch parameters are lengthy and mostly related to one another. It would be beneficial to simplify this into one or two paraemeters.

Describe the solution you'd like
Simplify the input parameters with a struct, or a simple system class.

Additional context
In addition to modifying Projectile.cs, you will need to update the method callers WeaponRangedController.cs and EnemyAttackRanged.cs

Migrate pausing functionality to a singleton GameSpeed manager

Is your feature request related to a problem? Please describe.
Currently pausing occurs within the InventoryUI script, and the WeaponMelee/WeaponMelee Controllers check the timescale value to determine if the game is paused. This is obfuscating the functionality and can confuse those unfamiliar with the project.

Describe the solution you'd like
Create a singleton GameSpeed manager that contains an Enum for GameSpeed (Paused, NormalSpeed), as well as a public PauseGame() and UnPauseGame() methods that sets Time.timeScale to 0. Update InventoryUI to invoke the Pause/Unpause methods and the Weapon Controllers to check the GameSpeed instead of directly comparing against Time.timeScale.

Additional context
You will need to modify InventoryUI, WeaponMeleeController, and WeaponRangedController

Move the DisableInput functionality out of the PlayerMovementController and into a PlayerDeathHandler

Is your feature request related to a problem? Please describe.
The PlayerMovementController has a dependency on CharacterHealth so that it can disable itself. If we continue to follow this pattern, this leaves "Death Handling" to each script themselves. Sooner than later "Death Handling" will sprawl across multiple scripts and updating or understanding what happens on death will become less manageable.

Describe the solution you'd like
A second script whose job is explicitly "Death Handling" should be implemented to disable or deactivate gameObjects and scripts that should be affected by death, keeping all of the results of a death in one script (singularly responsible). This has the added benefit of decoupling the PMC's dependency on CharacterHeatlh.

Attack Speed is artificially capped for enemies.

There is a minimum reloadTime before the enemy will never be able to throw projectiles (due to the animation restarting), or the animation speed will override the reloadTime.

Possible solution: Change AttackRanged to a bool, and inversely relate reloadTime with animation speed. (More convoluted, but might look prettier)

Other posible solution, Erik's suggested solution: Do not trigger projectile throwing from the animation. The first frame of the animation should match the projectile leaving the character's hands. (i.e. remove the wind-up from the animation)

Remove Transform target and check it earlier

Unsure of what the purpose of this is. targeting.target is going to be called no matter what. Storing it in a new Transform variable seems wasteful.

Doing a null check proves valuable, but it needs to happen earlier so that we aren't creating/pulling unnecessary prefabs from the Object Pool.

EnemyAttackRanged.cs line 74

Make lootchance item specific

Is your feature request related to a problem? Please describe.
Current lootrate is attached to the enemy's general droprate. The lootrate should still be configurable on a per-enemy basis, but it should be item specific.

Describe the solution you'd like
Combine both the item and the loot rate into a struct on the CharacterLoot class. Hold an array of LootStructs, rather than just an array of Items.

Additional context
Will require modifications to CharacterLoot.cs and EnemyTemplate.cs. May require changes to EnemyHook.cs

Implement enemy difficulty scaling

Is your feature request related to a problem? Please describe.
Currently enemies don't scale in difficulty as time goes on/the game progresses. There is an Enemy Scale By Level functionality, but the enemy levels don't go up over time or on level change.

Describe the solution you'd like
This can be done through increasing the Enemies' levels over time, having difficulty scale by clearing stages and reaching the next level, a mixture of the 2, or another alternative.

Additional context
This is a very abstract implementation. I would suggest modifying the EnemyScaleByLevel to customize the scaling. You will likely need to create a new script that sets CharacterLevel.

Allow enemies to boop the player more reliably.

Is your feature request related to a problem? Please describe.
Enemies cannot apply force to the player reliably due to the player's velocity being set directly.

Describe the solution you'd like
The player's movement control should implement a solution using AddForce instead of setting the rigidbody's velocity directly.

Unify All Hud UI scripts into one

Is your feature request related to a problem? Please describe.
Currently the Hud UI is maintained by 3 separate scripts. While this is technically singularly responsible, this is probably too granular.

Describe the solution you'd like
Create a generic HudUI script that manages all Hud aspects. Additionally, expose a public "UpdateUI()" method that can be called externally.

Player Attack speed is artificially capped.

Describe the bug
The player cannot click faster than the player animation can throw. This results in a sluggish responsiveness. Tying animations to player input gameplay controls feels slow.

Related issue: #37

Extend the inventory system to allow multiple item types to be equipped

Is your feature request related to a problem? Please describe.
Currently the inventory system only allows weapons to be equipped.

Describe the solution you'd like
Look into using the ScriptableObject implementation of the items to generate unique iteminstances with their values specified. This should allow serialization and deserialization using our dictionary model.

Make Player Movement Controller configurable via the Input manager

Is your feature request related to a problem? Please describe.
Some users would like to have multiple different ways to jump (keyboard input, controller, mouse). This is a configuration and should not be hardcoded.

Describe the solution you'd like
Use an Input axis on the Player Movement Controller instead of a hardcoded key.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.