Commit Graph

70 Commits

Author SHA1 Message Date
Regalis
e059a08688 Optimized lightsource raycasts 2017-03-03 00:02:43 +02:00
juanjp600
84a8232c1a Fixed override sprite scaling
Now it looks right.
2017-02-28 19:38:25 -03:00
juanjp600
4568f34f39 Rotating lights and overridden textures
The flashlight has the correct texture now, but something still seems off about the UV coordinates. Scaling is probably incorrect.
2017-02-28 19:19:02 -03:00
Regalis
22d40077fa Fixed exception in LightSource if ConvexHullList for hulls outside the sub hasn't been generated (i.e. if switching to game mode using console commands), removed some debug code 2017-02-27 18:53:34 +02:00
Regalis
68a0320935 LightSources cache the light vertices in vertex buffers and only recalculate if needed 2017-02-27 00:41:50 +02:00
Regalis
f3f875e641 Calculating light volumes works now. Very poorly optimized at the moment, todo: cache volumes and only recalculate when needed 2017-02-26 21:33:32 +02:00
Regalis
abfe2261d2 - ConvexHulls consist of Segments and SegmentPoints which keep references to each other
- LightSources fetch a list of non-backfacing ConvexHull segments within their range, and sort the points counter-clockwise (TODO: calculate triangles from the points)
- fixed incorrectly working CircleIntersectsRectangle method
2017-02-26 01:17:22 +02:00
Regalis
bcabe4ab39 Disabled convexhull shadow caching 2017-02-25 21:50:24 +02:00
Regalis
844097b132 Initial steps in making the light rendering use light volumes instead of shadow volumes to allow rendering the lights in one batch.
So far just disabled shadow rendering and cleaned up some unnecessary stuff
2017-02-25 21:24:38 +02:00
Regalis
311f388358 Limbs with no sprite don't cause the game to crash anymore, lightsources attached to a limb are drawn at the interpolated position (= DrawPosition) of the limb, lightTexture origin is flipped on the X-axis when parent limb flips 2016-12-17 14:24:54 +02:00
juanjp600
7a3bce3973 Hull volume helper in editor + Character name matches client name + Better-looking Watcher light source
Also '' is a thing of the past, use \" instead
2016-11-20 18:47:22 -03:00
Regalis
f7a9a77721 Some debug assertions to help figure out the cause for the body.FixtureList==null & GetHullsInRange crash reports 2016-11-15 19:53:25 +02:00
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
c33a4ba5e5 AmbientLightHulls optimization (only spread to adjacent hulls once, not once per every gap between the hulls) 2016-10-25 15:40:19 +03:00
juanjp600
7e6ef65eb3 Improved LOS effect
It's pretty inefficient (I need to figure out how to set up new shaders), and it might let the player see too much, but it looks way better than pure black.
2016-10-12 16:54:41 -03:00
Regalis
7e20d7a17a Timing.Alpha isn't updated if accumulator < step, using interpolated positions to draw lightsources & ragdoll/ai debug info (-> no twitching when the sub is moving) 2016-10-11 16:34:59 +03:00
Regalis
d8476d9371 Hull-specific ambient lighting: light sources increase the amount of ambient light in rooms and the light can spread to adjacent rooms through gaps. Allows making the default ambient light much darker without making shadows look too dark in fully lit subs. 2016-10-10 21:13:22 +03:00
juanjp600
e1296e4a8e Backported vsync changes from new-netcode, WIP hull visibility culling
The hull culling functions are there, they just aren't being used right now because there are some annoying bugs.
2016-10-02 22:24:31 -03:00
Regalis
f03d3b2f61 - included wrap_oal.dll in the build (may help with the OpenAL exceptions?)
- medics always have a high enough medical skill to fabricate any drug
- respawned characters get the same ID card tags they would've gotten if they had spawned inside the main sub
- highlighted characters glow in the dark
2016-08-22 21:06:01 +03:00
Regalis
581a7d5d9f Highlighted items glow in the dark, health bars are hidden when health is full, usernames and health bars are drawn at full brightness 2016-07-31 19:13:08 +03:00
Regalis
c8dae18135 - syncing docking ports
- linkedsubmarine saving fixes, path can be changed and sub reloaded in editinghub
- lightsources don't constantly recheck convex hulls of another sub if subs are docked
- position update networkevents arent sent for subs that are docked to the main sub
2016-07-06 23:01:51 +03:00
Regalis
aae24b2b2c Better logic for determining which convex hulls are in the range of a lightsource (separate convexhull lists for each sub) 2016-06-30 17:50:02 +03:00
Regalis
38c5251005 Vertical docking port, docking sounds, water flows properly between horizontally docked hulls, falseoutput of signal check components can be changed, lighting and FOW works between hulls (todo: some logic for determining when to update light.HullsInRange when two subs are moving relative to each other) 2016-06-27 17:48:20 +03:00
Regalis
50bee3da41 Wall convexhulls are split every 5 sections, convexhull edges that overlap with another convexhull are ignored (i.e. unneccessarys shadows aren't drawn where two walls meet) 2016-06-01 20:58:03 +03:00
Regalis
d884f84346 - disabled FOW blurring (made it possible to see through corners) and re-enabled penumbra
- fixed structures being assigned the misc category by default
- turrets don't require a barrel sprite
- OnImpact statuseffect is applied when a projectile hits something
- WIP depth charges
2016-05-13 18:00:31 +03:00
Regalis
5301a57108 Updating lightSource.hullsInRange when a convex hull is removed, some cleanup 2016-05-11 20:20:11 +03:00
Regalis
a9ceaeb8ec - fixed ruin doors being placed outside corridors if the corridor passes through multiple rooms
- fog of war isn't drawn or updated when not controlling a character
- fixed topmost cells in the level not being placed in the cellgrid array, causing them to be ignored when enlarging the main path for the sub
- fixed slices of the diving suit sprite "bleeding" into the torso sprite
2016-05-10 18:46:42 +03:00
Regalis
d5f6fff2c2 Lighting improvements: lightmap is drawn over all structures and blurred, flashlight item, OnContained statuseffects are also applied when the item is contained in a characterinventory 2016-05-07 09:16:29 +03:00
Regalis
03626c997b - Fixed shadows not being cast if the lightsource is outside the sub and the convexhull is not
- Option to change the texture of the "light sphere"
- Added "headlights" to the scooters
2016-05-03 00:27:48 +03:00
Regalis
4cda429ab0 LightSources can be assigned to limbs, glowing watcher 2016-05-01 18:47:44 +03:00
Regalis
d1580328ed Some cleanup using ReSharper (mostly removing redundancies) 2016-03-12 15:32:34 +02:00
Regalis
6deab579a1 - fixed level generation algorithm placing waypoints at unreachable positions
- changes to drowning/suffocation logic (oxygen-value drops/rises at a fixed rate depending on whether there's enough oxygen available, instead of effects "stacking")
2016-03-09 16:57:11 +02:00
Sebastian Broberg
467a99f79d Fixed hatch issue with shadows
Added per segment visibility/collision
2016-03-03 20:18:21 +01:00
Regalis
9cfbbb44ed Fixed a bunch of sprites not being removed 2016-02-19 15:58:43 +02:00
Regalis
a1770427a0 Using filename as sub name, disposing convexhull vertexbuffers when removing, canceling networkplayer ladder climbing only if movement key pressed 2016-01-29 00:08:17 +02:00
Regalis
8cc12b6988 Moving camera with sub even if typing, server doesn't do impact damage to client characters, server sends cause of death in importantentityupdate if health<=0, fire sync fixes, lerping water surface in update instead of render, 2016-01-27 20:38:24 +02:00
Regalis
ca7febfcab Option to hide waypoints and spawnpoints in editor, fixed cam "twitching" in multiplayer, additional light sprites for lightcomponents, wire bugfixes, fixed excessive camera shake when firing the railgun 2016-01-04 22:36:39 +02:00
Regalis
bc9ff32023 New pump & railguncont sprites, saving fixes (disappearing items fixed?), moving LightManager.ViewPos to railgun when aiming, generating waypoints outside sub, easier wire node editing, characters stand when using a controller, shiftsummary crew status scrolling, stuff 2016-01-04 01:03:37 +02:00
Regalis
8717a2259f Fixed LobbyScreen item grouping & light.hullsInRange updating 2016-01-02 16:40:24 +02:00
Regalis
92d396e6b2 Fixed AIObjectiveGoto terminating if previous path was unreachable, BackGroundSpriteManager won't place a sprite if a suitable position isn't found, StatusEffect fire position fix, UI improvements, door convexhull fix, progress on Fabricators & Deconstructors, mapentities sorted by category in edit mode, item descriptions, TutorialMode refactoring to make it easier to add new types of tutorials 2015-12-28 13:21:24 +02:00
Regalis
8c032d8368 Lighting bugfixes, setting camera position to character on shift start 2015-12-26 22:35:28 +02:00
Regalis11
63f5a501e8 Optimization: Connection recipient caching, resetting cachedshadow data instead of creating a new one 2015-12-21 15:32:42 +02:00
Regalis11
2ff8643c02 Optimization: FindHull spatial hashing, itemcomponent sounds in a dictionary, got rid of Item.Updated, rendering fixes, disposing shadow vertex buffers 2015-12-21 11:01:35 +02:00
Regalis
50cba53f25 convexhull shadow caching attempt 2015-12-19 16:33:32 +02:00
Regalis
e10bffde9b Light rendering optimization 2015-12-19 16:02:05 +02:00
Regalis
859be53d28 Level wall generation bugfixes, moved level background drawing to LevelRenderer, more coordinate system bugfixes, better looking progress bars, 2015-12-14 18:59:59 +02:00
Regalis11
c74caadc42 Player characters arent AICharacters in multiplayer, lighting optimization 2015-12-13 18:02:43 +02:00
Regalis
17e8a2171f Progress + prettier ice walls 2015-12-12 13:44:05 +02:00
Regalis
78bccca4af Moar progress, fixed shadow/los/submarine misalignment issues 2015-12-09 19:29:53 +02:00
Regalis11
40fb8d803d Lighting fixes & teleporting characters to sub 2015-12-06 16:07:25 +02:00