Re: Containment Breach Unity Edition (2017) - Latest Build: 0.5a (6/3/17)

A place to discuss anything related to the game SCP:CB.
User avatar
zornor90
Operative
Posts: 284
Joined: Tue Jun 07, 2016 12:27 pm
Contact:

Re: Containment Breach Unity Edition (2017) - Latest Build: 0.5a (6/3/17)

Postby zornor90 » Tue Sep 27, 2016 11:47 pm

Containment Breach: Unity Remake!

Hey folks, thanks for stopping by. It is my pleasure to announce the overhaul and conversion of SCP: Containment Breach to a new engine: Unity. That’s right, we’re moving into the future folks!

Project Goals
1) Remake the gameplay and levels of the original game inside Unity. The most important thing is to move what already exists to a new engine. This doesn't mean that I'm copying and pasting from the original, just that its content will be part of this game. For example, in the original game, SCP-173 moves when it shouldn't be able to. I built a look object system so that SCP-173 knows when a wall is blocking it and it can move. This is just one example of the enhancements I am building in as I add more content.

2) Add controller support, so that people can choose how they want to play. This will also prepare the game to be ported to consoles, should that happen in the future.

3) Add modding support. The original game would not exist without a strong community of fans. I'd like to make it easy for people to add their own content, whether that be new levels, SCPs, or even gameplay elements! Eventually there could be a centralized repository of mods for users to download and add into their game. I'm building the engine for the game with modding in mind, and hope to add mod tools in the future.

4) Flesh out the story and gameplay. A lot about the original game needs to be improved. The keycard system, for instance, needs a total rework. My desire for the game is that progression be randomized; different seeds will spawn different rooms, which will allow the player to complete the game in different ways each time.

5) Upgrade the graphics and engine. Unity's lighting enhancements have already improved the game's graphics a lot. I plan on incorporating addons and improvements from Unity to continue improving the graphics with global illumination, vector based lighting, post-processing, and other cool effects! The game already uses Unity's beta post-processing stack to add ambient occlusion and anti-aliasing.

Downloads and Links

General: Indev v0.5a (6/3/17): Link
Currently supporting Windows and Linux. Windows users only choose x86 if your computer is not 64-bit.

Patreon Weekly: Link

Official Website: Link

Previous Builds: Link

Default Keybindings
Spoiler
WASD to move
Space to blink
F3 for console
TAB for PDA / Inventory
Esc for pause menu


Changelog

Code: Select all

v0.3.1a
Some fixes / changes to SCP-1499-1 instances to make them scarier / more of a threat
-Instances now run when attacking
-Instances that pause when the player is within attack range now switch to attacking the player
-Increased stopping distance so the instances are no longer pushing their bodies into the player
-Added a movement delay to simulate an attack animation; if they attack they will wait to move until the attack delay is expired
-Sometimes when colliding with them they will start attacking you. This is a bit wonky because Unity's default CharacterController doesn't like to play with physics. Will be streamlined when the CharacterController is updated
Player's vision now always goes black upon death
Better handling of vision going black when switching dimensions
Added a very crappy healthbar that responds to 'player health changed' message

v0.3
Fixed sprite for button behind player not showing - RearButtonSprite now responds to events instead of using an update loop
Removed some extraneous code from game loader
Dimensions now use a GridLoader to load / unload grids, instead of doing it from the generator.
Added function to copy a grid config
Built the grid system for SCP1499. There are nine grids so that units can pathfind around the player; grids will be enabled / disabled as the player travels to keep memory usage low.
Removed black lines from skyboxes - set texture wrap mode to clamp
Added unity component that sends messages when a player enters and exits a grid
1499gridloader responds to PlayerEnteredGrid and PlayerLeftGrid and generates new grids as the player travels
Faster grid loading in 1499's dimension. The center grid is loaded quickly and then the others are streamed in at low latency as the player begins to travel.
Some new GameEvents: PlayerEnteredGrid, PlayerLeftGrid, PlayerStanceChanged, PlayerEquippedItem, and PlayerUnequippedItem.
Equipping / unequipping items now sends messages. GameUI responds to these messages. Added functionality to GameUI to add an overlay sprite if the equipped item is a HeadEquippable and has an overlay sprite.
Added SCP-1499 gasmask overlay sprite.
HeadEquippable now mirrors its changes from base pickups to instances
Increased spawn chance for 1499 chunks from 15% to 20%
Gave chunks a slightly randomized position inside their grid cells
Added functionality to apex path to disable grids that are in the process of initializing
Grid loaders now add and remove messages on OnEnable() and OnDisable() so that they aren't incorrectly called
1499 grids are now unloaded as the player travels through the dimension
Save button now closes options menu
Added containment door frame, containment doors finally implemented!
Containment doors placed in room2closets and 173_opt
Both dynamic door portals and static room portals now regenerate when switching back to the facility dimension

v0.2.2a
Fixed lockroom buttons
Slightly modified 173 to stick to the ground better, and compensated height slightly accordingly
Fixed archive room / armory - extended floor collider, fixed missing wall, and added missing door
Fixed lower grid in scp012 being too tall and trapping 173 downstairs inside the room

v0.2.2
Decreased forward interaction distance from 5 units to 3 units
Rewrote the visibility system.
There is a LookObjectController that handles all LookObject MonoBehaviour components. These components add / remove themselves from the controller OnEnable and OnDisable. The controller asks the camera each frame if they are visible or not, and sets a flag on the components. This makes the system MVC and removes that functionality from the AI and camera, keeping it inside the look object system. This will also enable multiple objects to be queried for visibility at the same time. In addition, this allows the look objects to have multiple colliders of different sizes. All memory for the system is allocated on the LookObject scripts at Awake(), so there will not be any extra GC being generated by this system.
Resized 173's controllers to fit the new system.
Rewrote the GetColliderBoundsNoAlloc function to take colliders of various sizes and subdivisions
Added a delay when the camera responds to blinking in order to allow 173 to finish its move before the player can see it
Fixed 173 pathing through the walls around doors. Started by shrinking down portals. This broke 173 in doorways sometimes, as it was not on any grid. I then implemented Apex Path's CallbackPathRequest! This now handles all path requests. If 173 starts off-grid, it finds the nearest cell and moves there, then re-generates the path. This fixes that problem. I can also use this to move 173 back to the grid if it falls of the map.
Went into all rooms and resized grids. They will now fit standard humanoid NPCs like 173 better.
Lowered chance of t-shaped lockroom spawning from 15% to 10%
Reworked small_testing_room so that objects were separated, added missing colliders. Continued the vent and capped it so that the player can no longer see the skybox
Fixed door in 1123 room going through wall
Fixed missing collider for computer in scp012_room, added portal for stairs
Disable recursive hallway from spawning, as it is breaking maps and isn't done yet
Added vent blocker to lockroom to block skybox until I can model another vent
Fixed elevator room's wall not extended far enough in one area and thus allowing the player to see through the wall. Redid room in blender, separated upstairs mesh from downstairs (downstairs incomplete as there are no elevators yet)
Fixed bug where mustSpawn rooms were not being copied from their prefabs, so room grids were not working correctly
Changed arrival distance for 173 to 0.46 to avoid it overshooting as per Apex Path support's instructions
Rebuilt the RoomCache to be a lot smarter
 -Utilizes classes for each type of room
 -String lists for per-zone random and mustSpawn instead of instantiate a lot of copies
 -Cleaner and easier to read and use
Noticed that 173's attack raycast was starting from the ground. Added an AttackPoint field for an empty transform, so that it can be started from its hands instead. This avoids it being blocked from raycasting the player with its own collider, which broke attack in many cases.
Added a new button type, AirlockButton, for the t-shaped lockroom that should ensure that the doors always end with one open and one closed regardless of starting state.
LookObject system now correctly hits the corners of the colliders when raycasting. Added two more points to check, front and back center.
Increased room grid spacing from 20.2 to 20.5. This fixes some rooms extending into others
Reworked grids in several rooms to ensure that they didn't allow 173 to enter walls near doors
Reworked Doors. Door abstract class now defines only information needed to set up type of door. StandardDoor extends this, and provides all functionality for most Facility doors. Added a new bool, gridConnector, which lets the door know whether it needs to generate portals or not.
Went through all rooms, upgraded their doors to the latest version
Added a new function to Tools/Containment Breach to auto create an empty room
Fixed bug where sometimes grids would not all initialize. This is because the number of grids to initialize is compared to the number of already initialized grids; if all grids are initialized, the loader moves on to the next sequence. Sometimes the current grids would finish initializing before the rooms were all placed and initialized, which meant that there were grids that were not correctly initializing.
Added RaycastBlockBetween function to Utilities
Interaction handler now checks if there is a wall / obstacle between the player and objects behind him.
Fixed bug where dragging an item out of an equipment slot would make the item image black (image darkened incorrectly)
Increased inventory slots to 12 to fill the grid better
Did work with the PDA UI for items and equipment so that it looks better on 5:4 resolutions
Fixed bug where resizing resolutions ingame would break InventorySlots
Last edited by zornor90 on Tue Jul 11, 2017 5:48 pm, edited 44 times in total.
Upgrading Containment Breach to Unity in 2017

Website | Patreon | Trello

Brunou8
MTF
Posts: 656
Joined: Fri Aug 09, 2013 2:19 am
Location: Chile

Re: Containment Breach Unity Edition (2016)

Postby Brunou8 » Wed Sep 28, 2016 1:55 am

Another Unity conversion... I hope it doesn't get cancelled/unfinished like the other two or three. Anyway, good luck with your project.

asdam
Dr. Bright's Assistant
Posts: 12
Joined: Wed Sep 28, 2016 1:15 am

Re: Containment Breach Unity Edition (2016)

Postby asdam » Wed Sep 28, 2016 2:02 am

Well helloooooooooooooooooo!!! Damn, I was looking around this forum for a (promising) Unity port mere hours before you posted this.

I see you started off getting some tough stuff outta the way (map generation, pathfinding integration, model conversion?!?! HOLY YES). Might I ask how you do your map (layout) generation? C# in Unity is my strong suit so I'd love to grill you about technical details of your project, and I'd also love to jump in and contribute if/where possible. I'll add that I tried digging into SCP-CB's MapSystem code and failed to glean anything.

Also, you mention Unity isn't great with lighting? I'm curious what version you're using because my experience with lighting/rendering in Unity (5+) has been great.

Lastly, I already like your inventory system better than original SCP-CB system.

In short, FUCK YES!!!

EDIT: I'd like to add that your current INDEV already showcases features beyond what I've seen successfully implemented in previous conversion attempts. You've got my confidence! With that, how long ago did you start this?
Last edited by asdam on Wed Sep 28, 2016 2:11 am, edited 1 time in total.

User avatar
zornor90
Operative
Posts: 284
Joined: Tue Jun 07, 2016 12:27 pm
Contact:

Re: Containment Breach Unity Edition (2016)

Postby zornor90 » Wed Sep 28, 2016 2:10 am

asdam wrote:Well helloooooooooooooooooo!!! Damn, I was looking around this forum for a (promising) Unity port mere hours before you posted this.

I see you started off getting some tough stuff outta the way (map generation, pathfinding integration, model conversion?!?! HOLY YES). Might I ask how you do your map (layout) generation? C# in Unity is my strong suit so I'd love to grill you about technical details of your project, and I'd also love to jump in and contribute if/where possible.

Also, you mention Unity isn't great with lighting? I'm curious what version you're using because my experience with lighting/rendering in Unity (5+) has been great.

Lastly, I already like your inventory system better than original SCP-CB system.

In short, FUCK YES!!!

EDIT: I'd like to add that your current INDEV already showcases features beyond what I've seen successfully implemented in previous conversion attempts. You've got my confidence! With that, how long ago did you start this?


(1) As far as layout generation goes I started with juanjpro's algorithm that he built for his Irrlicht conversion. The system then goes through and assigns rooms in order of "must spawn", "unique" and then fills the rest with random. This allows for unique rooms to spawn differently with each playthrough.
(2) Lighting in Unity is great - for prebuilt scenes. I can't use scenes so Global Illumination doesn't work - all of my rooms are prefabs streamed in during runtime - and therefore light doesn't reflect well off of walls. There are some assets in the pipeline to fix that however.
(3) This has been in progress for about 3 months now.

Glad you like it, looking forward to seeing where I can take this.

Brunou8 wrote:Another Unity conversion... I hope it doesn't get cancelled/unfinished like the other two or three. Anyway, good luck with your project.

I understand completely and hope in time to alleviate your doubts about this being completed. The only reason that I am doing this is that I know I can complete it, as I have tried and failed far harder projects before haha (much wider scope).
Upgrading Containment Breach to Unity in 2017

Website | Patreon | Trello

User avatar
ME2
Technician
Posts: 90
Joined: Fri Jun 17, 2016 9:20 pm
Location: Germany

Re: Containment Breach Unity Edition (2016)

Postby ME2 » Thu Sep 29, 2016 5:45 pm

Seems too good to be true.

User avatar
ME2
Technician
Posts: 90
Joined: Fri Jun 17, 2016 9:20 pm
Location: Germany

Re: Containment Breach Unity Edition (2016)

Postby ME2 » Sun Oct 02, 2016 11:06 pm

I Wonder how Long it'll take for Regalis to say something about this.

User avatar
Nehpys
Senior Staff
Posts: 1739
Joined: Wed Feb 05, 2014 6:02 pm
Location: The Isles of Corinthia

Re: Containment Breach Unity Edition (2016)

Postby Nehpys » Mon Oct 03, 2016 12:32 am

ME2 wrote:I Wonder how Long it'll take for Regalis to say something about this.


He probably won't say anything. Regalis, as far as I know is fine with ports of the game.

User avatar
zornor90
Operative
Posts: 284
Joined: Tue Jun 07, 2016 12:27 pm
Contact:

Re: Containment Breach Unity Edition (2016)

Postby zornor90 » Mon Oct 03, 2016 3:05 am

Update

Added player death! Player now "dies" when killed by 173. Input is disabled and the end game screen is shown after a delay. Will add death animation and sound once animation controller and audio manager interface is implemented.
Added lights to most rooms in light containment.
Fixed some major bugs with pathfinding for 173 and stairs due to no height sampling.

Overall, it looks like we are getting close to a test build. I will most likely push one out relatively soon, once I've added death sounds and animations, tweaked 173's pathfinding a bit, and ensured that all rooms are lit. I will probably also want to add a button to open doors that are behind the player. In the original game, any pickable object can be picked within a certain distance of the player; my solution uses raycasting which is more precise, but only allows objects that the player targets to be selected. I will probably implement a separate button that the player can press to try and open a door that is behind him. This could add a cool horror mechanic where the player has to keep his eyes on 173 while spamming the button, but I will want to heavily test this.

One of the coolest features (I think) about this port is that 173 now moves when a wall is between him and the player even if within the player's camera viewport. This makes him far more menacing, but requires some tweaking so that he doesn't kill you while trying to close doors. The raycasting is not super precise, only casting to certain corners of the mesh, so sometimes the door frame can "hide" 173 enough that he can kill you even while looking directly at him! I'll probably add some type of area distance from the door, and if the player and 173 are on opposite sides and the player is not blinking but staring at 173, 173 will not move in order to avoid some player frustrations.

Once I push this update out, I'll probably post a poll asking you all how you feel about 173's new movement and any suggestions you have for tweaking it.
Upgrading Containment Breach to Unity in 2017

Website | Patreon | Trello

User avatar
zornor90
Operative
Posts: 284
Joined: Tue Jun 07, 2016 12:27 pm
Contact:

Re: Containment Breach Unity Edition (2016)

Postby zornor90 » Mon Oct 03, 2016 5:09 pm

Update

Modified pathfinding system for SCP 173 as well as rebuilt the starting room with box colliders instead of mesh colliders. SCP 173 now only falls through the floor around 5% of the time as opposed to 75% of the time!
Made doors work better with 173, so that it doesn't teleport through the door while it's closing

I've also begun work on the TriggeredEvent system. In the original game, I believe that events are constantly being polled every frame. Thanks to C#, I can utilize the Observer pattern to really optimize events.

TriggeredEvents
Events will have a list of possible triggers, some parameters for tweaking, and a list of results. Triggers can be objects in world, such as collision events, or responses to ingame events, such as the player seeing 173.

So, for instance:

TE: 173 Sting
    Trigger: See 173 (ie, PlayerCamera's LookObject becomes 173)
    Condition: Distance(player, 173) < 5 meters
    Condition: Cooldown(10, 30 seconds) since [this event]
    Result: Play 173 noise

This will make it very easy to add triggers, conditions, and results so that a lot of different events can be created!
Upgrading Containment Breach to Unity in 2017

Website | Patreon | Trello

Inclination
Technician
Posts: 98
Joined: Fri Apr 10, 2015 8:53 pm

Re: Containment Breach Unity Edition (2016)

Postby Inclination » Mon Oct 03, 2016 6:54 pm

zornor90 wrote:Update
Overall, it looks like we are getting close to a test build. I will most likely push one out relatively soon, once I've added death sounds and animations, tweaked 173's pathfinding a bit, and ensured that all rooms are lit. I will probably also want to add a button to open doors that are behind the player. In the original game, any pickable object can be picked within a certain distance of the player; my solution uses raycasting which is more precise, but only allows objects that the player targets to be selected. I will probably implement a separate button that the player can press to try and open a door that is behind him. This could add a cool horror mechanic where the player has to keep his eyes on 173 while spamming the button, but I will want to heavily test this.


In real life, you should not be able to hit a button 100% of the time while your back is against it; this mechanism is sublime and makes the game much more realistic.


Return to “General discussion”

Who is online

Users browsing this forum: No registered users and 9 guests