Nico de Poel
b25f2a54a9
Added a first version of the particle explosion effect, reconstructed using Unity's particle system as close to Quake's original particles as I can right now.
5 years ago
Nico de Poel
cce1ed6d47
Reuse the same lightmap byte buffer, since the lightmap dimensions are static anyway. Reduces the amount of garbage produced by dynamic lightmap uploading.
5 years ago
Nico de Poel
c9a3d0430c
First implementation of dynamically updated lightmap textures. These are uploaded from the Quake engine to Unity on map load, and whenever a lightmap texture changes.
It has been tested and found (mostly) working by manipulating the UVs on surface meshes, applying the lightmap as main texture, and using an unlit shader. This is not part of the commit.
5 years ago
Nico de Poel
f668c97b52
Reworked the entity animation system, so that blending between poses is pulled fully to the Unity side. With this we can detect the situation where we are trying to blend from one animation sequence to another. Since this is not possible in UniQuake due to each animation sequence being converted to a separate mesh, we instead hold the poses for a frame as if we're not using animation lerping at all. This fixes the occasional animation glitch where the previous sequence would be animated a bit too far, which can be very noticeable on non-looping animation sequences (e.g. the Chthon's rise animation).
5 years ago
Nico de Poel
06881c8036
Fixed compiler warning related to implicit pointer type conversion
5 years ago
Nico de Poel
604cc15eaf
Replaced the OpenGL headers in portable mode with bog standard ones taken from the Mesa3D project. This removes the last dependencies on SDL code and will help in the pursuit of true portability.
5 years ago
Nico de Poel
c89755e853
Fixed compilation error in 32-bit portable mode, because the multi-texture stub functions aren't actually function pointers as was previously declared.
5 years ago
Nico de Poel
95a89be509
Set and remove view entity model; this makes the weapon model appear correctly in first-person view
5 years ago
Nico de Poel
4b5b30a81b
Detect fixed poses and completely disable animation blending in that case. Fixes entities sometimes reappearing in the wrong pose (e.g. a dead enemy) when lerping is enabled.
5 years ago
Nico de Poel
cd03b692fd
Set skin before setting initial entity model. Fixes wrong skin on some objects that don't receive a later skin update message.
5 years ago
Nico de Poel
fab7f6503f
Allow entity skin number to be passed and apply the corresponding textures to the entity material
5 years ago
Nico de Poel
39daacceff
Added support for static entities. In the context of UniQuake, these are just like regular entities, but they are only assigned a model and transform once at map load.
5 years ago
Nico de Poel
5390483b0b
Upload non-world brush models and allow them to be assigned to entities. It's not terribly pretty but it (mostly) works. There still seems to be an issue with texture assignment on subsequent map loads.
5 years ago
Nico de Poel
0dc5c1a14b
Create world submodel game objects and link them to entities, allowing doors and buttons and such to work properly. Also don't bother linking the view entity to a model.
5 years ago
Nico de Poel
66c62001d0
Squashed a bunch of bugs in the alias model animation system and integrated transform/animation updates into the alias model lerping system. Entities are now correctly animated, yay!
5 years ago
Nico de Poel
1a1c219bf6
Removed frame number stuff from SetEntityModel since it's not producing the correct values. Correctly detect non-world brush models and sprites, although they're not implemented yet.
5 years ago
Nico de Poel
e6fd7b83ae
First bits of entity logic: assign alias models, update transform and animation, remove entity. Still lots of problems to solve, but it's starting to do something.
5 years ago
Nico de Poel
a886f3d993
First steps in reorganizing the project, so that assets and game state are managed separately from the interop modules. This will allow for a clearer picture of where gameplay-related interactions should take place, and how entities and such should be linked to their associated assets.
5 years ago
Nico de Poel
15e3faa753
Added callback function to allow Quake to send the view parameters to Unity, and apply them to the main camera. This makes actual movement through the map in Unity possible.
5 years ago
Nico de Poel
3da2d4ba59
Made a few tweaks to make texture uploading work properly in headless mode
5 years ago
Nico de Poel
e70d363998
Implemented uploading of skin texture data to Unity, and linking loaded alias models to their primary skin texture
5 years ago
Nico de Poel
428eebb941
Pass along alias frame type and correctly count the total number of poses in a model, so that the correct number of pose vertices are marshaled and we can identify models that use group frame animations instead of typical single frames. Quake's model formats are weird.
5 years ago
Nico de Poel
3361ea2114
Added some missing lines and made a few tweaks to allow Quake to run headless without crashing
5 years ago
Nico de Poel
d271f9b7e2
Stubbed out the remaining OpenGL calls, disabled everything SDL, ifdef'ed out OpenGL 2.0-related code, and added a new stub for remaining VID_ and GL_ calls. Portable configuration compiles now, though it still crashes at run-time.
5 years ago
Nico de Poel
2e53e62ef8
Removed Windows-specific IPX and TCP/IP LAN drivers from the project and replaced them with a UniQuake net implementation that doesn't actually have any LAN drivers, i.e. only local loopback connections will work.
5 years ago
Nico de Poel
c2f105a604
Fixed a rather embarrassing pointer error, which by sheer luck just happened to not cause any issues
5 years ago
Nico de Poel
96d2a1fe7b
First setup to upload brush models (specifically: the world model) from Quake to Unity. Updated the QWorld class to include the fields added by QuakeSpasm.
5 years ago
Nico de Poel
834ff9a794
First test converting models from Quake into Unity meshes, including normals and UVs. It's still far from perfect (back side UVs are not handled at all yet) but it's a good demonstration of what will be possible.
5 years ago
Nico de Poel
ccaf57ec02
Added some legal text and fixed FMOD callbacks for 32-bit compiles
5 years ago
Nico de Poel
99b09dc854
Moved some global variables around for portability
5 years ago
Nico de Poel
75b9427296
Fixed compatibility issues with Scourge Done Slick:
- Implement Sys_DoubleTime with a clock function that keeps running and doesn't update only once per frame. Fixes infinite loop in Host_ShutdownServer.
- Readded missing "play" and "playvol" console commands.
- Ignore console messages that contain only whitespace.
5 years ago
Nico de Poel
bf4a09cfd7
FMOD will copy the sound buffer into its own memory when FMOD_CREATESAMPLE is used, so we don't need to keep the loaded sound files in Hunk memory anymore.
5 years ago
Nico de Poel
d2184af9b1
Resolved compiler errors related to disabling SDL. Now we've just got a ton of linker errors to deal with...
5 years ago
Nico de Poel
11cdaf7a75
Allow passing of player number to FMOD for split-screen purposes. Not used for anything yet, but it's handy to have it in there already.
5 years ago
Nico de Poel
afa6333078
Some additional cleanup
5 years ago
Nico de Poel
35e48c9087
Fixed popping noise upon stopping a sound by quickly ramping down the volume instead of stopping immediately. Also did a bit of additional housekeeping.
5 years ago
Nico de Poel
9806b057c7
Implemented ambient sounds, did some refactoring and added explanations about the different types of sounds
5 years ago
Nico de Poel
162c935334
Some housekeeping and preparation for ambient sounds
5 years ago
Nico de Poel
13df268ecf
Implemented sound effect delay in the situation where multiple instances of the same sound are started on a single frame
5 years ago
Nico de Poel
e928833f5e
Implemented proper looping of sounds based on cue information from the WAV file header. Also modified Delay function so that it is unaffected by differences in sample rate between the input file and FMOD's mixer.
5 years ago
Nico de Poel
79ad6f086c
Release sounds loaded by FMOD on shutdown, and check FMOD version upon startup
5 years ago
Nico de Poel
756420c5f9
Set channels with 0 volume to automatically become virtual. This greatly reduces the number of real channels that are being used.
5 years ago
Nico de Poel
52510cfecc
Some cleanup and extra housekeeping
5 years ago
Nico de Poel
2b740b33aa
Give local player sounds higher-than-default priority, so its real channels won't get stolen by other entity sounds
5 years ago
Nico de Poel
0d4043e444
Properly set max real and virtual channels on FMOD initialization. Fixes sounds noticeably cutting out when the default max of 64 real channels is exceeded.
5 years ago
Nico de Poel
83210b5822
Got the FMOD entity sound slot system working in a way that's effective and still fairly simple:
- Up to 1024 entities are statically defined with 8 sound slots each. Sounds played within these ranges will override each other.
- Sounds with free channel assignment get a slot that's dynamically allocated in zone memory.
- Used the channel control callback to detect when a channel is done playing and free the associated slot.
- Also implemented StopSound function
5 years ago
Nico de Poel
dedad3b4e4
Use channel's 3D level to handle sounds from the view entity. Fixes player sounds still panning left and right, and simplifies attenuation code.
5 years ago
Nico de Poel
f5b948af3a
WIP FMOD sound system:
- Quick hack channel userdata for attenuation to test normal entity sounds
- Always set full volume for sounds coming from the view entity (i.e. the player)
- It's starting to sound like Quake!
5 years ago
Nico de Poel
fa4183ac30
WIP FMOD sound system:
- Update listener position and SFX volume
- Implemented static looping sounds, with an attenuation algorithm mimicking the one from Quake
- First bits of entity sound playback, which needs some additional thought first
5 years ago
Nico de Poel
68db1e78ae
Implemented more FMOD goodness:
- Initialization of FMOD System (if necessary), diagnostics and setup of SFX channel group
- Loading of FMOD sounds from either disk or PAK file
5 years ago