· 6 years ago · May 02, 2020, 04:40 PM
1/* GAME ENGINE WRITTEN WITH THE DIRECTX11 API BY THOMAS WOODMAN
2/*-----------------------------------------------CHANGELOG--------------------------------------------------------------/
33/4/2020(9:53PM) Upgrading to 0.0.01c
4========================================
5-BSP Header file has been upgraded from DirectX9/D3D9 to DirectX11/D3DX11 (There are however issues with collision detection, implementation is *very* redumentary)
6-Created Debug Console that can be toggled with the tidle(~) key (win32 API's Sleep() Function was needed to stop the extremely fast toggling, I'm using iedoc's tutorials for a codebase)
7-Implemented Console() function, which stores all logs in a std::string vector, rather than a linked list as in the last project
8-Console provides real-time feedback of camera position, camera target, camera direction, distance, and FPS to the user
9-OBJ Loader function has its own header file, for now just to clear code on the main CPP so it is less crowded, still very hard-coded
10-Implented FlatSquare() function, which allows for D2D Drawing of rects with color and alpha values(Used in the Debug Console)
11-Implemented SKYBOX for sky, there seems to be a problem culling/stencil/depth issues as certain parts of BSP maps disappear at a certain distance
12-Eliminated 100% of compiler warnings
13========================================
143/6/2020(6:06AM) Upgrading to 0.0.02a
15========================================
16-Created new XMVECTOR's oldCamPosition/newCamPosition, elementary collision detection is now in-tact (Y and Z axis are inverted with BSP maps)
17-Reset Ground Matrix's translation and mapWorld Matrix translation to align with the camera and ground
18========================================
193/6/2020(6:06AM) Upgrading to 0.0.02b
20========================================
21-Eliminated clipping of objects at a certain distance (camProjection Matrix's FOV was set only to 1000, duh!)
22-Ground, BSP map, and meshes are all rendered even with console enabled(the order in which you draw things is very tricky in DX11..I anticipate more problems like these)
23========================================
243/6/2020(6:06AM) Upgrading to 0.0.02c
25========================================
26-Adjusted the output of the debug console std::string vector to the 23 last elements of the vector to fit the debug console's transparant box so informaton doesn't trail off screen
27-Made minor adjustments to collision detection, still unable to slide against walls of BSP maps while in motion
28========================================
293/6/2020(6:06AM) Upgrading to 0.0.03a
30========================================
31-Implemented pistol OBJ Mesh
32-OBJ Mesh has its own Scale Matrix, Translation Matrix, Rotation Matrix, World and View Matrix, shares Projection Matrix with FPS Camera
33-Implemented Translation and Rotation variables that can be changed (i.e. AK-47 would point farther away and rotate less, flashlight would be closer and rotate with player)
34========================================
353/6/2020(6:06AM) Upgrading to 0.0.03a
36========================================
37-DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS!!
38-Entire Engine has been UPGRADED to make use of the static DirectXTK lib, and has done away with *ALL* deprecated DX9/10/11 CODE, this engine now solely relies on d3d11.lib and the DirectXTK
39-This is an extreme upgrade done in two days, no more old deprecated DX code, and can now make use of the *ENTIRE* tool kit, for sprites, meshes, etc!
40-All DirectX functions are included in the standard Windows SDK now. Now there's no need for making use of *any* directX headers, except for toolkits.
41========================================
423/23/2020 (My 31st Birthday) Upgrading to 0.0.03b
43========================================
44-Massive amount of work/experimentation has been taken all month long; Fell back to Legacy, went back to standard up-to-date SDK, *a lot* of learning/trial and error
45-Binary is now 64-bit; This is due to ASSIMP's lib is only x64, no point in compiling 32-bit binaries anymore anyways, especially for a game engine
46-Implemented Skybox(Upgraded it to DXTK/d3d11 standards)
47-Implemented ASSIMP Mesh Loader, loads basic meshes with embedded diffuse textures
48-Removed old deprecated OBJ Loader
49-BSP Map Now Draws within a standard for-loop pursuant to number of faces, PVS_Render() wouldn't draw properly, random shadows and random tri's appearing/disappearing
50========================================
513/26/2020(6:06AM) Upgrading to 0.0.03c
52========================================
53-SpriteBatch/SpriteFont now work perfectly. Understanding that DX11 is a state-machine is very important; Can now make use of DXTK tools without destroying the scene.
54-DXTK's Model drawing now works without a hitch. Now this engine has two separate ways of drawing meshes, we shall see which one is perferred(obj/fbx/3ds's converted to .CUO/SDKMESH, or my ASSIMP modelloader?)
55-OBJ meshes that the player holds/uses no longer clips into the walls of other objects, i.e. the BSP map (WARNING: DISABLING Z-BUFFER WHILE DRAWING MESHES CAUSES THEM TO LOSE *THEIR* SENSE OF DEPTH AS WELL) this problem must be solved later
56-Remember: DXTK draws need ALL states proprerly set: The IA(Input Assembler) Layout, the Topology(in most cases TRIANGLELIST), shaders, OutputMerger(OM) Render Targets, and Z-Buffer MUST be enabled.
57-XMVECTOR's for First Person Camera have been converted to DirectX's namespace and using SimpleMath Library(DirectX::SimpleMath::Vector3 rather than XMVECTOR, should help with collison detection in the future)
58-Collision Detection System now using DirectX::SimpleMath::Vector3 because D3DXVECTOR3 no longer exists in the Windows SDK (In 2005 I was competing with SEGA in terms of game development; I wasted my 20's to drugs and now I have a decade of catch-up...fucking oxy/heroin)
59-Z-Buffer Problem stated just a few lines earlier regarding mesh losing depth has been fixed by clearing the depth state prior to its draw (Thank you Jesse Natalie from Microsoft for the advice!)
60========================================
613/26/2020(6:06AM) Upgrading to 0.0.04a
62========================================
63-Finally implemented multiple spotlights; Thanks to iedoc for advice on HLSL, Jesse Natalie from Microsoft *again* helpled me out, pointing out finalColor should be set to 0 and not diffuse
64========================================
654/2/2020(6:47PM) Upgrading to 0.0.04b
66========================================
67-Implemented imGUI interface
68-Implemented imGIU window for second light
69-Implemented debug toggle for mouse, LEFT SHIFT key will toggle debug to make use of imGUI interface and player's looking direction
70-Width/Height dimensions are determined by clientRect so that the mouse cursor will be in the appropriate position for GUI windows
71-Debug Console rendered via D2D was unaffected by this; Therefore only 19 of the latest console messages will appear from the DebugConsole std::string vector
72========================================
734/4/2020(10:20AM) Upgrading to 0.0.04c
74========================================
75-Created DXAPI header file
76-Created Globals.h header file
77-Created Error() Function, which invokes MB_ICONERROR MessageBoxA() and logs the error into the DebugConsole Vector, which is now part of Globals.h
78-Grouped most of DirectX API calls into DXGraphics class
79-Calls are now being made from DXGraphics class(instanced as DXAPI)
80-Solution/Project is now being orgranized and coded into an engine rather than a linear hard-coded graphical program(Double Incursion is still very hard to avoid; Will tackle as time goes on)
81========================================
824/5/2020(5:30AM) Upgrading to 0.0.05a
83========================================
84-Shaders are no longer compiled from effects file; D3DCompile compiles shaders(VS/PS/SKYBOX_VS/SKYBOX_PS/D2D_PS) from std::string
85-All filenames are under Globals.h as preprocessor #defines(i.e. "grass.jpg" is now SZ_GRASSFILENAME)
86-More functions transferred to DXGraphics class
87========================================
884/7/2020(4:43PM) Upgrading to 0.0.05b
89========================================
90-Created Objects Class which contain their own matricies, functions for translating, scaling, rotating
91-Create std::vector for Objects Class and implemented PopulateObjects() function that calls the Objects class constructor to give map coordinates
92-Objects class has multiple constructors; There will be more in the future, i.e. simple items for player, NPC's, etc
93========================================
944/11/2020(10:30PM) Upgrading to 0.0.05c
95========================================
96-Implemented Timer system, from new Timer class(added Timers.h, wrote it in my last DirectX9 engine), made into a std::vector with a size of the number of items
97-Object Class now is able to rotate properly on its own axis, multiplying matricies must be done in a certain order; It's not like linear algebra
98-Objects can now rotate/spin continuiously, making use of the Timer class to ensure the rotation rate is the same no matter what hardware the player uses
99========================================
1004/19/2020(7:39PM) Upgrading to 0.0.06a
101========================================
102-Old Timer system used static variables, so no matter how many instances of a class the timers would remain constant
103-A LOT of back-bone work done, engine-level. This is now turning into an actual game engine rather than an exploratory pretty 3D game app
104-ModelLoader system put into its own header and cpp file
105-3D Objects Class system put into its own header and cpp file
106-Global header and cpp used, can be included in every cpp file. It contains all structs, and extern variables. Globals.cpp defines what is declared in header, therefore:
107-Functions such as Console(), Error(), FatalError(), can be used literally anywhere in the engine now.
108-Timer system no longer needed for 3D objects spinning. frameTime is the only thing I need to make sure they happened uniformly across all systems at different increments/decrements (thank you alldayeverday from ##C++-general on freenode for the suggestion)
109========================================
1104/20/2020(11:36PM) Upgrading to 0.0.06b
111========================================
112-Added Object::GetViewMatrix(), Object::GetProjMatrix(), and Object::RotateAll() to 3D Object class
113-Player Weapon is now part of the 3D Object Class, depth buffer is cleared after all other objects have been rendered
114-ObjRotX/Y/Z, ObjTranX/Y/Z variables changed for the pistol since it is now part of the engine's 3D Object's class and not its own mesh with own matrix
115-The reason for this is to allow for the delta frameTime variable to allow for natural rotation/movement of the weapon without it flying into outer space
116========================================
1174/22/2020(3:13AM) Upgrading to 0.0.06c
118========================================
119-A lot of trouble/discovery done with frameTime/delta variable. Remember, it's a *double*, that *must* be typecasted as a float when using other floats.
120-frameTime is now stored globally as delta; This variable must be used carefully. Remember to pass it in through functions as a double, not float, but typecast it as float.
121-The way in which you use the delta variable is critical; For example just using it a function (rot += 0.001f * (float)delta)) which will then in turn use RotateAll(rot,..), is not proper. Typecast it in the RotateAll() function.
122-Created Object::RotateBackAndForth() function, perfected Object::RotateOnTimer() functions, both use delta so it is uniform across all machines
123-Implemented M16A1 AR-15 type rifle mesh, new trans/rotations variables included for debug. No trouble whasoever importing/rendering this mesh, my ModelLoader class(cpp/h) is quite solid at this point.
124-Added __TYPE_M16A1 3D Object Type
125-Player now can hold the weapon and it will realistically rotate slowly to show realism(via Object[3]::RotateBackAndForth(..))
126========================================
1274/28/2020(10:36PM) Upgrading to 0.0.07a
128========================================
129-Global delta variable, initially at run-time has a large value. Functions that call this variable initially, when delta is too large will cause issues.
130-Object::RotateBackAndForth sets extern global delta to 0.0 if it is over 0.04f. Loader is beginning to become necessary; This would allow for the delta var to stabalize
131-Very rudementary loader implemented; Makes use of DXTK's SpriteBatch->Draw for ShaderResourceView(smrv), and scales it to the hardwar's global Width/Height resolution variables
132========================================
1335/2/2020(12:44AM) Upgrading to 0.0.07b
134========================================
135-Created separate thread for DrawLoading(), called LoadingThread
136-Thread is Created and Loader is called *directly after* D3D11 Device is created, so Loader is called and renders concurrently while all init functions are processing
137-Loader shows Engine's console in real-time while engine is loading (This is now a *real* loader, much like my last DirectX9 game engine's loader)
138/*-----------------------------------------------CHANGELOG--------------------------------------------------------------*/