I have developed several games for iOS that have been played by millions of users.
I noticed there are a set of common design patterns for game creation, so I created an OpenSource project with some of those called Phase Jump Pro. The code is primarily focused on 2D games, but anything that’s not position-specific can be used in a 3D game as well.
New Class: MouseOverFocuser2D ← gives focus to object that is under the mouse
New Class: ScaleFocusable ← scales the object when it has focus
New Class: TransformFocusable ← transforms the object when it has focus
New Class: AttachFocusable ← attaches a child object when it has focus
New KAxisControlScheme2D for kinematic objects that move in response to joystick input with deadzone support and basic interpolation (optional). Useful for Gradius/1942 type games with no physics
Phase Jump 2.0 is out, with support for TopDown shooters, better animations, life timers, life timer that starts an animation when the object is about to be destroyed, functionality for seeker missiles, objective arrows, etc.
Graphs: support for both Acyclic and Cyclic graphs
WeaponEmitter2D: logic for emitting burst, auto, or rate limited bullets
Better animations: Animations can now animate the color of a sprite, TextMeshPro, or material (shared or copy)
Blink animation: flicker renderer on and off (used for hit animations)
Flash animation: flash render color (used for hit animations)
LifeTimer: destroys object after N seconds
LifeTimerAnimation: links to another animation component attached to the object, and enables that animation just before the object is destroyed. Example: coin appears, lives for 5 seconds, then starts blinking at 3 seconds to indicate its life timer is about to run out
RotateAnimation2D: animation moved out of Node2D and into its own animation class
FadeAnimation: fades node in or out
GridSpawner2D: spawns objects into grid cells
KinematicSwitcher: switches all objects in the scene between kinematic and non kinematic behavior for testing
MultiCollider: allows code that can operate on either Collider or Collider2D through the wrapper
Node2D: improved logic, naming, tested with kinematic/non-K systems
SceneObjectRegistry: register gameobjects, audio objects by name for access later
TextMeshValueObserver: listens to a PublishedValue and updates the text mesh when it changes
**Unit Tests: ** Even more unit tests (> 100 to ensure code quality)
Input System: Upgraded to new Unity Input system
Polygons: Polygon type for defining polygons
TiledMaterialBuilder: sets up material for tiling (repeat texture)
Grids: Better grid code. Grid has been renamed to Matrix (more accurate)
Random: Random class allows us to inject either Unity’s random value or or own for testing scenarios
AngleAxisLimiter2D: limits degree angles to a fixed number examples for 4-way, 8-way topdown game movement
Binding: binds one PublishedValue to another. When value A changes, value B is modified
CounterLimiter: limits an action to be performed up to N times
PublishedValue: broadcasts events when its value changes
RateLimiter: limits rate that events can occur to min delta between events
Core: Core has StateMachine now instead of StateMachine
SomeListener: SomeListener is now an interface instead of an abstract class (makes it easier for classes to add this interface)
2D Sensors with Occlusion testing: Area and Scan sensors that support occlusion testing.
Matrix Boards/Pieces/Nodes. A Matrix Board has matrix pieces. Each game object has a Matrix piece that is placed in the board. The Matrix Board Runner animates moving pieces across the board. Used for game types such as: Grindstone, Match-3, Tetris.