Skip to content

peabnuts123/Unity-2D-Jam-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

2D Unity Game Jam Template

This is a project template for getting up-and-running quickly for game jams. It is configured for creating 2D games in Unity. Included are a bunch of common plugins, code and prefabs I use, a main menu and pause functionality, and some UI SFX. This is to save on overhead that would otherwise occur during the jam, setting up a new project and copying over any specific library code from other games.

The code included is all focused on automation and making code easier to write, it does not "pre-code" any features or mechanics (beyond menus).

Contents

The project currently includes:

Plugins

  • Zenject
  • NotNullAttribute
    • A C# attribute for marking Serialized properties in the Unity inspector as required.
    • A console error is logged, and the game is prevented from running at all (not just when your GameObject enters the scene) whenever any "Not Null" fields are null.
    • Very useful for reducing errors in the Unity Editor, especially for non-programmer contributors.

Scripts

  • A small Easing library
    • Written by me, for adding juice to your game.
  • A bunch of utility extension methods
    • Vector extensions for fluently manipulating vectors
    • Texture extensions for performing common operations on textures
    • Rigidbody extensions for performing common physics operations on Rigidbodies and their attached colliders
  • A small Debug Drawing library
    • For drawing dots, lines etc. on the screen
  • PathStack
    • Class for easily working with FileSystem paths
    • Removes need for string operations, references to "Path separator" constants, etc.
  • PointService
    • A service for easily generating points in games
  • ThreadedCoroutine singleton
    • A singleton for easily offloading work to REAL background threads
    • Reminder: You cannot do any operations on Unity objects from a background thread
  • MasterInstaller
    • An "Installer" instance for Zenject that wires up a few simple concepts
    • Sets up Singleton reference to ThreadedCoroutine
    • Has some quick dependency injection hooks for injecting sibling components, instead of calling GetComponent<T>() all the time

Prefabs

  • _SceneContext
    • An object to add to your scene to pre-configure Zenject stuff

Audio

Scenes

  • Game.unity
    • Basic scene set up and ready to go for development, contains a _SceneContext instance and things.
  • Main Menu.unity
    • A sample Menu for playing your game. Has a screen for displaying a simple list of credits, and an "Exit" option.

Folder Structure

The project has the following structure:

  Assets/
  β”œβ”€β”€β”€ Audio/
  β”‚    # files and music
  β”‚
  β”œβ”€β”€β”€ Fonts/
  β”‚    # Custom fonts
  β”‚
  β”œβ”€β”€β”€ Materials/
  β”‚    # Physics or Visual materials
  β”‚
  β”œβ”€β”€β”€ Images/
  β”‚    # Image assets, textures, etc.
  β”‚
  β”œβ”€β”€β”€ Plugins/
  β”‚    # Any kind of addon to Unity
  β”‚
  β”œβ”€β”€β”€ Prefabs/
  β”‚    # Prefabs
  β”‚
  β”œβ”€β”€β”€ Scenes/
  β”‚    # Scenes
  β”‚
  └─┬─ Scripts/
    β”‚  # Your code
    β”‚
    β”œβ”€β”€β”€ Components/
    β”‚    # Scripts for extending the functionality of GameObjects
    β”‚    #   e.g. "PlayerHoldable" etc.
    β”‚
    β”œβ”€β”€β”€ Config
    β”‚    # Configuration scripts e.g. Zenject Installers, Constants
    β”‚
    β”œβ”€β”€β”€ Entities
    β”‚    # Scripts specific to certain objects in your game
    β”‚    #   e.g. "PlayerController", etc.
    β”‚
    β”œβ”€β”€β”€ Singletons
    β”‚    # Singleton objects
    β”‚
    └─── Util
         # All sorts of raw coding logic that exists as
         #   a utility for other code

About

Template Unity project for creating 2D games for game jams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages