Compatibility
- Demos, savefiles, and recordings from ZDoom/GZDoom are not supported and WILL NOT LOAD, this is due to the massive changes under the hood. Demos recorded with VGreaseX will be fine (except for updates that do major changes to the internals, but most of the optimization is focused on the render so it shouldn't be affected)
- Most mods for GZDoom should work fine, except in rare cases. Modern drawing API, modern ZScript compiler is not supported and mods that utilize modern API calls won't work (though most of them are trash or made by Marisa so nothing of value is lost). Decorate specific mods (Brutal Doom) and old maps should be fine however. There's extra compatbility layers and Scuffedtag might break specific mods, but it can obviously be disabled. If a mod doesn't work, you can always fix it yourself and most of the times it's single line changes. Explained below in VXScript differences.
- VGreaseX has less precise/optimized math for extra speed. Collision, math functions, and other parts might be inconsistent or have sudden snaps for this reason, nothing that affects gameplay too hard though.
- FraggleScript has been removed. By now all of those mods should be using ACS instead, and the FS implementation is too nosy to be worth keeping.
- And obviously, VGreaseX exclusive features won't work outside of the port.
Texture changes
- TexCoords on flats are calculated using texture sizes to avoid matrix transformations for rendering speed up, this means that changing textures on a flat (from ACS or vxscript) might result in stretched textures on floors/ceilings unless they're the same size. You should not worry about this most of the times but if you notice this that's the explanation for it.
Scripting Changes
MAPINFO
- Added the following properties:
- disableshadowmap - Disables shadowmaps for this map which can increease perfomance. No effect if the user has them disabled.
- enableshadowmap - Enables shadowmaps for this map. No effect if the user has them disabled.
- disableskyportalstencils - Disables sky texture portal stencils. This makes "sky walls" not work anymore and makes them see-through.
- enableskyportalstencils - Enables sky texture portal stencils.
map MAP {
disableshadowmap
}
- Added scalefactor3d. This controls the scale of vertex and RBX maps.
map MAP {
scalefactor3d = 1.0
}
- Added "editornums" as replacement for "doomednums".
- Skills now have a "MirrorMode" property. This allows you to mirror the map on the X axis.
MAPINFO/GameInfo Field
- Added "notickerpausing". Allows you to disable ticker pausing (escape menu, opening the console, etc will keep the game going)
GameInfo {
notickerpausing = true
}
GAMEINFO Changes
- Added TICRATE. Can be used to change the tic speed of the game. By default this is 35 which means the game runs at 35 tics per second (or frames). It is not recommended to set this to a value over 60. Not taken into consideration for calculating player movements (adjust the physics yourself), only things that require exact seconds.
TICRATE = 35
IWADINFO Changes
- Added TicRate (remember case sensitivity). Same as above.
- Added "Standalone" Game mode. Description below.
IWad {
TicRate = 35
Game = "Standalone"
}
Changes in ""Standalone"" games
Standalone games load minimal data, which means you only need to provide game_content/vgreasex for people to be able to run your iwad/ipk3. A couple of other features are disabled in them as well, meaning to be used for non-doom games, such as:
- Disables the automap completely
- No respawn teleport fog on multiplayer
- Pixelstretch is 1.0 (no vertical stretching to account for 320x200 -> 320x240 conversion)
- Skins are not loaded or supported.
- Compatibilty settings are completely disabled.
ANIMDEF Changes
- Added "undulo" property, works similar to warp and warp2 except that it moves the vertices around to simulate waves.
undulo flat FWATER1
undulo flat FWATER2
undulo flat FWATER3
undulo flat FWATER4
MODELDEF Changes
- Added "variablescale", uses a special scaling formula for the model where the variable SpawnPoint is used for the models scale.
- Added "invertculling", this basically inverts the model's normals and can be used special effects such as cel-shading (by stacking a normal model with one with this enabled) or other purposes.
- Extension to OBJ models. Based from GEOBJ exporter.
- Added vcolor and fvcolorindex (index to vcolor), supports full model vertex coloring.
v -2000 0 0
vcolor 0 0 255 255
v -2000 500 0
vcolor 0 255 0 255
v -2000 0 -500
vcolor 255 0 0 255
f 1 2 3
fvcolorindex 1 2 3
GLSL changes
- vec4 ProcessLight(Material material, vec4 vertexColor) has been renamed to vec3 MaterialInitialLightValue(Material, vec3 vertexColor), and now returns a RGB vec3 value instead of RGBA.
- lights[] buffer handling is completely different, you can see how material_normal.fp does it. You should not need to modify light processing code though. New variables uLightGroupStart and uLightGroupEnd are provided now.
- vTexCoord is now a vec2, meaning it only has xy arguments. It is not a full vec4 anymore.
- aNormal, vWorldNormal, and vEyeNormal are now a vec3, meaning it only has xyz arguments. It is not a full vec4 anymore. This behaviour is unnecessary.
- NormalViewMatrix and NormalModelMatrix are now mat3 instead of mat4, if you're getting errors make sure your multiplications are NormalModelMatrix * vec3 instead of NormalModelMatrix * vec4.
- uFixedColormap, uFixedColormapStart and uFixedColormapRange are removed because they're handled by overlaying a color with special blending features for extra speed.
- vec3 SSR(vec3 pos, vec3 eyeNormal) is now available to shaders as long as SHADER_PASS_SSR is defined and is available for use on reflective flats. This allows you to get a reflection RGB value using the new screen space reflection shader. You need to provide pixel position and a eye normal value (vEyeNormal is provided by default). Otherwise multiply your desired normal by NormalViewMatrix.
#ifdef SHADER_PASS_SSR
texel = vec4(mix(SSR(pixelpos.xyz, vEyeNormal), baseColor, 0.5), baseColor.a);
#else
texel = baseColor;
#endif
- "tex" is now "texture1". Any shader doing texture(tex, coord) should be updated to use getTexel instead either way.
- uniform texture1-units is automatically defined now. This means you do not need to put "uniform sampler2D textureXX" to use a texture unit, and it will be readily available (provided that you give the shader the texture, or you're going to end up using a screen texture somehow) Your GPU must support this feature! You can see how much texture units you can have when you start up the game and check "Max. texture units" from the renderer. Most GPUs are expected to provide atleast 32 texture units by standard, but in some this might not be the case!
- glowdist and gradientdist are removed. This is now directly calculated in main.fp and there's no reason for a mod to need to access this. Each individual component can be calculated like this:
if(uGlowTopColor.a > 0 || uGlowBottomColor.a > 0) {
float topatpoint = (uGlowTopPlane.w + uGlowTopPlane.x * pixelpos.x + uGlowTopPlane.y * pixelpos.z) * uGlowTopPlane.z;
float bottomatpoint = (uGlowBottomPlane.w + uGlowBottomPlane.x * pixelpos.x + uGlowBottomPlane.y * pixelpos.z) * uGlowBottomPlane.z;
glowdist.x = topatpoint - pixelpos.y;
glowdist.y = pixelpos.y - bottomatpoint;
glowdist.z = clamp(glowdist.x / (topatpoint - bottomatpoint), 0.0, 1.0);
}
if(uObjectColor2.a != 0) {
float topatpoint = (uGradientTopPlane.w + uGradientTopPlane.x * pixelpos.x + uGradientTopPlane.y * pixelpos.z) * uGradientTopPlane.z;
float bottomatpoint = (uGradientBottomPlane.w + uGradientBottomPlane.x * pixelpos.x + uGradientBottomPlane.y * pixelpos.z) * uGradientBottomPlane.z;
gradientdist.x = topatpoint - pixelpos.y;
gradientdist.y = pixelpos.y - bottomatpoint;
gradientdist.z = clamp(gradientdist.x / (topatpoint - bottomatpoint), 0.0, 1.0);
}
- There are new defines provided to shaders by the shader system indicating what options the user has enabled:
- VGX_OPENGL_ES - Renderer is OpenGL ES.
- SHADER_PASS_GBUFFER - Shader has a normal buffer
- SHADER_PASS_LIGHTS - Shader has lighting support
- SHADER_PASS_SHADOWMAPS - Shader has a shadowmap buffer, and this is the texture (Bound to texture17)
- SHADER_PASS_SMOOTH_SHADOWS - Shader interpolates shadows
- SHADER_PASS_SSR - Shader has a screen space reflection buffer, and this is the texture (Bound to texture18, texture19)
GLDEFS changes
- Texture HardwareShaders now support a VertexShader entry. This allows for per-vertex manipulation.
HardwareShader texture FLAT1 {
VertexShader "shaders/waves.vp"
}
shaders/waves.vp
vec4 GetVertexWorldPosition() {
return vec4(aPosition.xyz + aNormal * (50.0 + sin((timer * 4.0) + aPosition.x + aPosition.z) * 50.0), aPosition.w);
}
VXScript/Decorate Changes
- IMPORTANT: To make the game run faster, VXScript has no debugging aids unless the CVAR hypervisor_debug is enabled. This means that non conforming code (such as writing to a null pointer, division by zero) will crash the game engine! If you wish to debug your code, enable hypervisor_debug and restart the game. If you wish to debug or see generated assembly, use -dumpjit as a console argument as well!
- To have access to new features, use VXSCRIPT.vgxhv lumps as opposed to ZSCRIPT.zs lumps. The version command works differently in both versions so be careful! If you are unsure, either do not use "version" or put the version of the build you're running (eg version "1.0.0"). Only ZScript syntax up to version 4.6.1 is supported. Some newer stuff isn't supported (yet) and syntax changes from newer versions arent. Though 4.6.1 context is almost enough these days and the only thing you miss out are dogshit bloated GZDoom mods.
- Removed OldSpawnMissile. Stop maintaining old broken features.
- internalgameupdaterate is now a dynamic global variable containing the current tic rate of the game, prefer using it over "TICRATE" or "Thinker.TicRate" in mods.
- SSE Vectors have an extra added parameter, W. But this is not enabled in all builds, so do not use it.
- All API features are in game_content/vgreasex/vxscript.
- Removed LocalViewPitch. Why even access this?
- Exposed "splitscreenplayercount", this is 0 for singleplayer and increments by 1 by each extra player. Use this for checking if the game is in local splitscreen multiplayer mode.
Structs/Classes
General (Object)
- S_StartSound isn't forced to have a second argument anymore. It will always default to CHAN_AUTO.
- Added SetMusicPitch(float pitch) - apart of new music manipulation stuff. SetMusicVolume has been updated to behave more like the ACS equivalent.
EventHandler/StaticEventHandler
- Virtual function "PlayerChatted" added. Can catch player chat.
override string PlayerChatted(PlayerEvent e, string message) {
return message;
}
Screen
- Removed pal color index from screen.Clear, replace the color (if 0) with screen.PaletteColor(index)
screen.Clear(int left, int top, int right, int bottom, Color color, THEPALETTECOLORINQUESTION)
screen.Clear(int left, int top, int right, int bottom, screen.PaletteColor(THEPALETTECOLORINQUESTION))
BaseStatusBar
- Virtual function "DrawSplitScreen" added.
- UpdateScreenGeometry() is removed. Just remove calls to this function.
override void DrawSplitScreen(int splitscreenindex, int vtop, int vleft, int vwidth, int vheight, double TicFrac) {
}
Sector
native float reflect[2];
Line
- Removed flags2. The only reason it was used was for ML2_BLOCKLANDMONSTERS, so convert all usages of that to check for ML_BLOCKLANDMONSTERS on flags instead.
Vertex
- Made p writable to (Vector2 position)
level.vertexes[0].p.x = anything
Player
- Added mouseunlock bool. Use this to make the mouse unlock during places where it's naturally locked.
- Removed MinPitch and MaxPitch, use -89 and 89 respectively. This was a useless feature.. Remove calls to SendPitchLimits as well.
- attackdown has been split into two variables, attackdown and altattackdown respectively for normal/alt fire since they could conflict with NOAUTOFIRE weapons. Prefer to use cmd.buttons & BT_ATTACK or cmd.buttons & BT_ALTATTACK instead.
- New function, VibrateController(int intensity, int time), this will send a haptic vibration command to the player's controller. The duration is in milliseconds (not tics)! and the intensity has to be from 0 to 65535, with 65535 being maximum intensity.
LevelLocals (Level)
- Exposed "position", which is the entrance number of the level.
native readonly int position;
- Added MusicPitch. Use this to read the current music pitch.
native readonly float MusicPitch;
Actor
- MASSIVE CHANGE! Vector3 HitboxDimensions has been added, being a extension to just using "Radius" and "Height". Actors can now be of any XYZ size, and the "Radius" property will modify the X and Y component, while "Height" is now the Z component. Radius/Height are still usable in VXScript normally, but Actor.Radius only exposes the X component of HitboxDimensions.
default {
HitboxDimensions 32, 32, 64;
}
- Added A_SetHitboxDimensions(vector3 newdimensions, bool testpos), used as a new alternative to A_SetSize. The vector3 can have any of it's components set to -1 if you don't want to change that dimension.
- Removed BloodTranslation (The implementation wastes memory and resources). The new blood color copying behaviour is that if:
- The RenderStyle is "Normal"
- The DONTTRANSLATE flag isnt set (-DONTTRANSLATE)
- The bleeding actor has a BloodColor
Then it will set it's RenderStyle to "Stencil" and copy BloodColor into FillColor/StencilColor.
If you're implementing custom blood in your mod, to make it look the best, you should use alpha mask (non-colored) sprites with the "Shaded" RenderStyle, so that BloodColor can properly colorize them and the following properties:
default {
StencilColor "FF 00 00";
RenderStyle "Shaded";
}
- ZDOOMTRANS is removed. Use RenderStyle "Add". VXScript code will not function with this.
- SPRITEFLIP is removed and has been replaced with XFLIP. VXScript code should change usage of "bSPRITEFLIP" to "bXFLIP" to work.
- Added INVISIBLEIFCLOSETOVIEW. Self explanatory.
- Added MVISBLOCKED.
- Added splashgroup, projectilegroup, and infightinggroup (see MBF21 support).