Commit Graph

72 Commits

Author SHA1 Message Date
Joonas Rikkonen 8c04722385 Lighting optimization: lightsources mark convex hulls that are within range but not visible as hidden and don't recalculate the light volume when these convex hulls change (= e.g. when opening/closing a door, only the lightsources that cast light to the door have to recalculated). 2018-03-05 23:22:28 +02:00
Joonas Rikkonen d57102271d Fixed exceptions when trying to render LOS with no convex hulls within the view 2018-03-05 18:16:51 +02:00
Joonas Rikkonen da7ea779b7 LOS effect optimization/changes:
- Rendering the shadows instead of light volumes to avoid the expensive raycasts needed to calculate the light volume.
- The LOS shadows are now rendered in two passes (fully obscured + penumbra) instead of each convex hull taking up 2 passes.

TODO: fix linux
2018-03-03 21:57:36 +02:00
Joonas Rikkonen f1f190a997 Added a light to diving suits (requires a battery to work). Closes #233 2018-03-02 13:11:28 +02:00
Joonas Rikkonen 620a2bf374 Forgot to change dustparticle movement speed to normal after testing 2018-02-28 10:32:54 +02:00
Joonas Rikkonen 9e298c98ab Fixed dust particle texture "warping" when the movement offset wraps around 2018-02-27 20:16:12 +02:00
Joonas Rikkonen 3564abf31b Moved a bunch of hard-coded sound paths to the sound config file. 2018-02-26 22:31:07 +02:00
Joonas Rikkonen 59e1f776f2 Updated vanilla subs (preview images, additional info, some extra lights in darker parts), submarine preview window layout tweaking 2018-02-21 17:09:53 +02:00
Joonas Rikkonen ff7f43ca83 Fixed inconsistent decal draw order 2018-02-13 12:28:54 +02:00
Joonas Rikkonen 633dc1ff1e Option to define multiple compatible content packages in submarine files, added extension methods for parsing string, float and int arrays from XML elements 2018-02-06 10:18:39 +02:00
Joonas Rikkonen 09e4687cd0 The content package a submarine was saved with is included in the submarine preview, added a warning when attempting to start a campaign using a sub with a mismatching content package 2018-01-25 12:19:47 +02:00
juanjp600 2acaee3c6d Fixed horizontal split shadow casters breaking everything 2018-01-23 22:43:25 -03:00
juanjp600 7507d71f53 Fixed light volumes not generating properly when shadow casters intersected 2018-01-22 17:15:36 -03:00
Joonas Rikkonen f5dbbf0735 Submarine preview window with a preview image & some extra information of the subs 2018-01-17 17:01:44 +02:00
Joonas Rikkonen 2ba339035c Fixed LOS lightsource keeping references to already unloaded convex hulls and subs, causing the los effects of the previously loaded subs to be always rendered. 2018-01-12 16:17:09 +02:00
Joonas Rikkonen 87d987037f The alpha cutoff of partially damaged structures is clamped above 0.2. Now the damage effect is always visible on walls that have received any damage. 2018-01-12 15:43:34 +02:00
Joonas Rikkonen 10db837ef0 Particle fixes/improvements:
- Fixed particles going through closed gaps (e.g. closed doors).
- Gaps can emit particles even if the target hull is full of water (-> water running into the sub through an already flooded room is more apparent).
- The air-only splash & waterdrop particles are not emitted if the target room is full of water.
- Fixed heavy water particles never moving upwards (even if the water is rushing into a room from a gap on the floor).
2018-01-12 15:40:13 +02:00
Joonas Rikkonen 6edbe5de1f Fixed water dust particles "warping" around when moving the camera 2018-01-12 11:06:37 +02:00
Joonas Rikkonen aa0fdfb790 All highlighted items are rendered to the lightmap, not just the ones the player is focusing on. -> Highlighted wires and the items they are connected to now glow in the dark.
Fixed LightComponent light source position not being updated if the item has no body, causing the light source to appear in a wrong position when attaching lights to walls.
2018-01-11 13:22:04 +02:00
Joonas Rikkonen 3b9d51e695 Made ambient lighting much darker and added a subtle glow around the player 2018-01-11 11:25:10 +02:00
Joonas Rikkonen 47f9900fdc Lighting fixes:
- Re-enabled lightsprites (glowing lamp sprites on lamps).
- Limb sprites use lightsprites instead of overriding the texture (positioned correctly now).
- Fixed lights that don't cast shadows not being rendered.
2018-01-11 11:23:55 +02:00
Joonas Rikkonen d1bb33be78 Cutting/repairing holes in walls is logged, fixed gaps emitting drip particles even if there's no water in either hull. Closes #139 2018-01-09 19:50:55 +02:00
Joonas Rikkonen 85d76989c9 Tweaked structure gap logic to make smaller leaks more common. Walls now start leaking after taking >10% damage, and initially only emit smaller "drip particles". 2018-01-09 14:24:15 +02:00
Juan Pablo Arce c2e2f0ca8d Fixed damageshader color parameter being optimized out
color is a parameter for the main function
2017-12-31 19:19:34 -03:00
Juan Pablo Arce 904052390c Fixed LOS effect on Windows, fixed SharpDX reference, rebuilt damageshader_opengl 2017-12-31 17:45:05 -03:00
Joonas Rikkonen 65d6071378 Fixed damageshader ignoring sprite colors. Closes #212 2017-12-30 04:51:39 +02:00
Joonas Rikkonen c3c16b53ac Fixed background sprites being rendered in an incorrect order 2017-12-30 02:04:42 +02:00
Joonas Rikkonen 627d6ecd78 Minor UI fixes 2017-12-29 21:09:53 +02:00
Joonas Rikkonen 4f0b190371 Some more hard-coded text removal 2017-12-27 14:40:33 +02:00
Joonas Rikkonen a5d2dd37f4 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2017-12-26 20:04:47 +02:00
Joonas Rikkonen bc6c828a14 Option to make limb attacks do damage based on contact with physics bodies instead of distance. Attacks also do damage to all sections of a structure that are within damage range. Closes #108 2017-12-26 20:02:33 +02:00
juanjp600 40a46f96e2 Fixed LOS not going red + Fixed additive particles not looking right at all 2017-12-20 20:47:17 -03:00
juanjp600 07626a1989 Merge branch 'master' of https://github.com/Regalis11/Barotrauma
Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs
2017-12-20 19:46:53 -03:00
juanjp600 7a413aee93 Optimized GameScreen.DrawMap
- Downscaled lightmap, since blurring will make this unnoticeable anyway
(TODO: make this optional)
- Render LOS in fewer passes by using a shader
- Use light volume to calculate LOS
- This also means we can use the override texture to render the diving
suit obstruct effect
- Don't render bunks and labels onto LOS background (TODO: add the
option to render back into the LOS background, i.e. just use
multiplicative blending as if it was the lightmap)
- Prefer SpriteSortMode.Deferred over all others, prefer
SamplerState.LinearClamp/PointClamp over all others
- Remove shader blur in favor of geometry blur (TODO: improve on this
further, right now it has a few artifacts)
- Trim light volumes
- Do some weird shit with the background particles (use DrawTiled
instead of relying on SamplerState.LinearWrap, because that's faster
somehow :/ )
- Pressing up/down in the console only returns a typed command now
2017-12-20 19:41:23 -03:00
Alex Noir 0ce9acb76a fix things 2017-12-16 21:45:30 +03:00
Alex Noir 8ab97af456 Allow sub makers to alter the ID Card's description property on spawn points 2017-12-16 21:30:18 +03:00
Joonas Rikkonen 0b603ba10b Fixed particles in water being drawn under ruin structures (making it seem like plasma cutters aren't working), fixed all structures having the default health of 100 because of mismatching parameter name (Health vs MaxHealth) 2017-12-05 22:30:24 +02:00
Joonas Rikkonen deefcafe02 Made the name of the "Linkable/IsLinkable" property consistent 2017-12-02 14:19:23 +02:00
juanjp600 5cb603b3e5 Fixed entity linking not working 2017-12-02 01:05:16 -03:00
Joonas Rikkonen 765587efd7 Renamed screens (EditMapScreen -> SubEditorScreen, EditCharacterScreen -> CharacterEditorScreen) 2017-11-18 15:13:03 +02:00
Joonas Rikkonen 04e3710a65 Renaming fields for consistency 2017-11-14 22:45:22 +02:00
Joonas Rikkonen f7298c241e Progress:
- Input fields for vectors & colors in SerializableEntityEditor.
- SerializableProperty tooltips.
- GUINumberInput supports floats.
- EditingHUD for structures (atm the only editable property is the color of the sprite)
2017-11-12 20:24:11 +02:00
Joonas Rikkonen 8e556f1c76 - Renamed a bunch of ObjectProperty-related stuff (ObjectProperty -> SerializableProperty, IPropertyObject -> ISerializableEntity, the "SerializableProperty" attribute -> Serialize).
- Rectangle serialization.
- Option to restrict numeric properties to a range of values.
- WIP generic ISerializableEntity editor.
2017-11-08 21:15:03 +02:00
Joonas Rikkonen 6bfca5f7fe - Hitscan projectiles, projectiles can be set to disappear after hitting something.
- Option to adjust ranged weapon spread (separate values for "normal spread" and when being used by an unskilled character).
- Option to disable explosion flashes.
2017-10-18 23:48:25 +03:00
Joonas Rikkonen f46dc5da28 Water flow logic tweaking:
- Less fluctuation, water doesn't constantly flow back and forth through gaps.
- Flowing water pushes characters around much more heavily, and the force is applied to the collider in addition to the limbs.
- Vertical gaps don't push characters up/down unless the character is roughly above/below the gap.

+ Renamed some fields in the hull and gap classes (Volume -> WaterVolume, FullVolume -> Volume, public fields start with a capital letter)
2017-10-10 21:07:45 +03:00
Joonas Rikkonen 1ff2054ca8 Converted the GetAttribute methods in the ToolBox class to extension methods 2017-10-04 18:38:40 +03:00
Joonas Rikkonen f291a22976 - Autorestart works in campaign mode.
- The server select a random destination when the campaign starts and after each round, so the campaign can be played even if there's no host/client to choose the destinations. (TODO: make it possible to vote for the destination?)
- Reverting to the previous save if the entire crew is dead works correctly now.
- Clients load the campaign saves after receiving them (-> discovered locations/connections are synced with clients).
2017-09-19 22:05:42 +03:00
Joonas Rikkonen 9114ae658f - Modified item buying logic: selected items are purchased immediately without having to click the "buy" button, and they stay in the list of purchased items until the round is started. (-> It's possible to see which items have been purchased and cancel purchases).
- Clients can be given a permission to manage the campaign (atm selecting which location to head towards and buying items).
- Syncing cargomanager state with clients.
- Misc fixes.
2017-09-17 15:55:24 +03:00
Joonas Rikkonen 63bca3c7ea Syncing campaign state & save files with clients (WIP) 2017-09-11 21:32:48 +03:00
Joonas Rikkonen c1f5e3cbda Progress on multiplayer campaign:
- Moved SaveUtils to the shared project.
- Moved the "new game"/"load game" menu logic to a separate class.
- Somewhat functional campaign UI in the server lobby (only the map view is usable atm though).
2017-08-31 18:53:37 +03:00