Skip to content

naosw/Noire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noire

Title Last updated: 10/5/2023
Updated by: Hank Xu

Setup

This project uses Unity 2022.3.1f1.

Gameplay

q/e rotates camera left or right
left click basic attack
wasd movement
space dash
f interact
mouse scroll zoom in/out \

Documentation

Camera

The game uses isometric perspective and a orthographic camera. Cameras are controlled by the script CameraMovements.cs.

Player

Player health is controlled by PlayerHealthSO. Currency and stats are controlled by PlayerStatisticsSO.

Lighting

The game features a day and night cycle, controlled by Lighting\LightingManager.cs script. Visual effects also include fireflies and volumetric lighting. Both of which are particle systems.

Terrain/Grass

The game uses a FlatKit toon shader, and uses an overview camera to render the toon effects to a render texture, which is then sampled by the grass material. This allows the grass to blend with the texture they are on and create distinct edges between colors as specified by the toon shader. See Shaders\GrassLit.shadergraph for more details.

Currently, there are two terrains rendered on top of one another. I did this because the Flatkit toon shader is badly written. (The lighting shifts when camera moves, and the texture is too metallic). Thus another identical terrain with a different texture is rendered instead. Main camera culls the TerrainToon object.

  • Understand how terrain toon shaders work.
  • Write our own terrain shader.
  • Modulate Terrain\TerrainMapping.cs to setup the camera automatically according to terrain size.

The terrain module also includes a road builder using the Unity Spline class. I have written a editor and overlay panel for junctions where we can procedurally generate road meshes from splines (bezier curves). Attach Terrain\Road\SplineRoad.cs to a game object to get started.
This feature is currently unused

Weapon

All weapons should extend the weapon base class Weapon\Weapon.cs. The blade smear is procedurally generated by using two splines and uses the helper class Helpers\SplineMeshBuilder.cs to generate a mesh between the two splines in real time. See Weapon\BladeSmear.cs for more.

Enemies

Enemies should extend the base class Enemies\Enemy.cs.

GameEvents

The project should be Event-Driven. See GameEventsManager.cs. Each class (if needed) should have its own <Class>Events.cs file (e.g. QuestEvents.cs, PlayerEvents.cs), and initialize it in the GameEventsManager class.

Data Persistence

Game objects that needs to save data locally should subscribe to the IDataPersistence interface. On loading scenes, the DataPersistenceManager will save and load data accordingly. Autosave and data encryption can also be toggled in the DataPersistenceManager game object. See GameData.cs for the set of data we are keeping track of.
Saved data is currently saved as JSON, but will be translated into using Binary Formatter soon.

Quest System

QuestManager
Currently quest progress is saved as playerpref. Will be switched to using data persistence instead soon.

Scene Management

Scene Management
Supporting a SO-based async scene transitioning and loading system.

About

3D Pixel art RPG in Unity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors