Skip to content

A work in progress in game building system within Unity.

License

Notifications You must be signed in to change notification settings

DarronAtkinson/BuildingSystem

Repository files navigation

BuildingSystem

Core scripts used for an in-game building system I am working on.

Very much a work in progress.

How it works

Support Point

A support point defines a point on a structure that either requires support or provides outgoing support.

Structure

A structure is an in game representation of a building element. e.g foundation, post, beam etc.
A structure must have support at it's required support points or else it will collapse.

Structure Preview

A structure preview is a visualisation of structure to be positioned in the world.
A structure preview can only be placed if the supports it requires are present in the world.

Support

A support maintains a heap of structures and the support value they provide at that position
The support value at the top of the heap will be the greatest value.
The registered structures are alerted to any changes made to the support value and react accordingly.

Build Manager

A build manager maintains an octree of all the supports created by a player.
This restricts the player to only placing structures on their own buildings

Example Video.

https://www.youtube.com/watch?v=jgyNRN919w4

Todo

Snapping structures together at specific support points while previewing a structure needs work.
Visual feedback for the player on whether the placement of a structure preview is valid.
Saving and loading of structures and support points needs to be implemented.

About

A work in progress in game building system within Unity.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages