· 5 years ago · Jul 21, 2020, 07:02 AM
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========================================
1395/6/2020(1:10AM) Upgrading to 0.0.07c
140========================================
141-Implemented Error(std::string, HRESULT) to engine that accounts for all HRESULT types and will show the player more specific information when an error is encountered, and adds it to the engine's log
142-Audio Class Created; Beginning Audio Engine.
143-Audio Class has Play() and PlayRepeat(), can play concurrent audio files, repeating audio files are dealt with by a separate Audio Thread
144-All audio files will be stored within a global vector so they can be accessed from anywhere
145========================================
1465/6/2020(5:37PM) Upgrading to 0.0.08a
147========================================
148-Eliminated 100% of compiler warnings
149-Created ErrorHandling.h, which has the WINAPI Thread LoadingErrorThread, which is called at entrypoint
150-If Loader is taking too long, player will be issued an error stating it may be due to his/her hardware.
151-If Loader takes *too* long, it will present the user with a Fatal Error and urge the player to restart the game.
152-Vastly improved Audio Engine -- Audio is now stored globally as a vector, with NUM_OF_SOUNDS for vector's memory allocation
153-DirectX API's functions now have its own header with class, and separate cpp file that instances those class's functions(like an REAL game engine, this should've been done long ago).
154//NOTE(5/10/20): This loader had to be scapped. Although it was working on *my* hardware, I was shocked to see it break on other hardware.;
155//This is NOT DirectX9, I cannot create a loader in this manner. I'm going to have to use deferred contexts, which are a whole new animal in of themselves. Son of a bitch.
156========================================
1575/13/2020(12:30AM) Upgrading to 0.0.08b
158========================================
159-ENGINE HAS BEEN UPGRADED TO MICROSOFT VISUAL STUDIO 2019 AND C++ 17(for dev-team) AND C++ 19-20 FOR ENGINE (wasn't the easiest thing to do)
160-Loader now works 100% of the time on all hardware, the loading thread was referencing the original D3D11Device and using its depth stencil instance
161-3D Mesh Tool has been created for dev-team, comes with win32 dialogue box to pick the mesh from a folder, loads it, renders it, allows dev-team to scale/customize ambient color with color picker (this was a bitch in of itself to do)
162-Music can be toggled by pressing 'M'
163-InitEngine() implemented; It is always to be the first function called at any entry point(mostly to CoInitialize)
164-There is now a *proper* and official engine log that is outputted in the binary's directory called ENGINELOG.txt. It records the player's resolution, records loading times, and outputs all Console Logs.
165-Soon another cpp file will have to be created to handle game logic, to separate between drawing/rendering, loading, updating, etc.
166//Note: in Material.inl for this version of C++ std::min needs to be encased: (std::min), #define NOMINMAX not needed.
167========================================
1685/13/2020(8:44PM) Upgrading to 0.0.08c
169========================================
170-Cleaned up source code a bit
171-Eliminated 100% of Compiler warnings(New warnings that MSVC++ 2019 due to std::C++ 17-19 caused)
172-Globals.cpp: Unicode() and ToStandard() now make use of win32 API's MultiByteToWideChar() and WideCharToMultiByte()
173========================================
1745/25/2020(3:08PM) Upgrading to 0.0.09a
175========================================
176-Massive Break Taken Again(Dealing with my community and real-life)
177-__DEBUG preprocessor define, now when defined allows for precise cursor coordinates(there is no longer an offset for imGUI debug interfaces)
178-SetWindowLong()'s style is called when debug flag is commented out, otherwise when in debug mode engine will stay in a window rather than go fullscreen
179-SwapChain->SetFullscreenMode will always be false, setting it to true at this point causes the engine to literally take over the hardware and requires a reboot
180//6/6/2020: EmergencyEscape Thread was created for problem stated above: When escape key is pressed, emergency thread will let the user fucking BAIL instead of has his PC get consumed
181========================================
1826/5/2020(12:43AM) Upgrading to 0.0.09b
183========================================
184-Again, Dealt with a lot of real-life situations, break was not premeditated
185-DevTeam header created, code is to be compiled with __DEVTEAM flag(even further, this #define existed previously, header is to keep code out of the way and keep main cpp clean)
186-Updated 3D Development Team Tool created, drastically improved due to cursor being on target, dev's can move camera via imGUI and get vertex data(estimated polycount, etc) on any given mesh, and manipulate environment a bit more
187-CreateSphere() brought into DXGraphics class; variables that were initially global brought into class. Main cpp code cleaner as a result.
188-Making use of <system_error> header for Engine's overloaded Error(std::string buffer, HRESULT hr) function, which accounts for *all* HRESULT's and logs them. This is a serious advantage for future debugging.
189-Created Window.h, encases all functions for Win32 Window(WndProc, InitalizeWindow). HWND is now a global, defined as extern in globals.h and instanced in globals.cpp. Main cpp even cleaner.
190-Removed InitD2D_D3D101_DWrite Init Function that switched between DX10/11 devices, wasn't needed, also removed the "cupWorld" matrix since this engine is *definitely not* making use of DXTK's SDKMESH/CUO models, we have assimp for that.
191========================================
1926/6/2020(12:32PM) Upgrading to 0.0.09c
193========================================
194-*A LOT* done for a simple engine upgrade to 0.0.09c(Where, in my last DirectX9 Engine's changelog, I "wondered" where I'd be, well here I am. Certainly made up for the break.
195-Camera.cpp/header created for Camera class--*all* variables(Vectors/Matrices) are now part of Camera Class, Instanced as PlayerCamera.
196-Camera Class has functions MoveCamera(..) and MoveCameraToPosition(..), the latter moves the player camera to a given vector at a given speed. Collision Detection in-tact; These functions do not over-ride the collision detection, and will not "wall hack"
197-The above functions are going to be neccesary for moving the player during cinematics, or when the player is being moved, i.e. in a spacecraft
198-Player can look freely while locked in place as being moved, this will be an advantage in certain types of games
199-Vast Majority of Matrix/Vector variables are no longer DirectXMath(XMVECTOR/XMMATRIX/etc), changed to DirectX::SimpleMath namespace
200-"Mesh" matrix and other variables removed; RenderText(..) also removed, Main cpp cleaned up even further
201-Collision cpp/header created, Collision Class is by no means complete whatsoever, but knocked out an unnecessary global "distance" which is part of Collision Class
202-As a result of this the main cpp isn't 3000 lines of code anymore, this project is slowly, but surely, being knocked together into an efficient game engine.
203-I am guessing that in the distant future, once this Engine is complete, I'll be looking upon this as my "Globals Engine", since I'm using older programming practices but latest technology. Results are the same, anyways.
204-...Thank god for Valium. Keeps me calm as I code, my boyfriend is yelling "wee look at my game!" behind me, and I can focus. This is what I get for dating a kid several years my junior. But I love him, and just as importantly, he loves me intensely. A Keeper.
205========================================
2066/8/2020(2:21AM) Upgrading to 0.0.10a
207========================================
208-Well: We're at v0.0.1, wow. The amount of upgrades to this engine today(tonight?) certainly warrant this version upgrade. This is as far as I've ever gotten in my game engines thus far(I stopped my DirectX9 Engine at 0.0.08-something). Anyways:
209-DrawD2D(int) Function removed. Was not necessary, was never referenced in the first place.
210-THE ENTIRE BSP MAPPING CLASS HAS BEEN UPDATED. It is no longer confined to a header; This was causing double-incursion issues. It may now be #included in any particular order and the result is the same(Hurray for OOP style programming!)
211-BSP_Mapping.cpp created. All functions that exist as prototypes in the header from the CBSP class are now contained with the cpp. This should have been done much much earlier obviously, since it is an integral part of any potential 3D game made from this engine in the future.
212-CBSP's functions have been updated to make use of the Engine's functions, i.e. logging, and especially error-handling that handle's all HRESULT failures and outputs specific information.
213-Every simple char array that was used with sprintf() for logging has been used with Log(std::string), dozens of logging calls are making ENGINELOG.txt more verbose; Errors are used with Error(std::string) and overloaded Error(std::string, HRESULT hr).
214-The above update will help when this engine is used by beta-testers; They will be able to spot a bug and send me the engine log, which will allow me to debug more efficiently.
215-I am particularly worried about CBSP::CreateDXVertexBuffer(). It is using a *massive* amount of memory on the stack, and would explain why I've witnessed the BSP map itself simply disappear ten minutes or so into the game sometimes when other people have tested this engine on their hardware.
216-Above problem can only be rectified by moving memory to the heap rather than stack; There is a TODO comment in the class I put there in the past complaining to myself that I'm using memory recklessly for the Vertex Buffer. This *needs* to be fixed before any kind of demo game is released.
217-Player Weapon now has its own protected class members for offsets to position it properly on the player's screen: m_WeaponRotX, m_WeaponTransX, m_WeaponTransY, etc
218-Object::PutWeaponAway() implemented. When the user hits the "1" key, the player's weapon will rotate and translate realistically and the player will then disarm himself. This of course is using the engine's delta variable so rotation/translation is uniform across all hardware.
219-Object::EquipWeapon() also implemented, to reverse this and bring the rifle back. I've been coding for hours, so it is not finished. It's not just for this rifle, it's for every single possible item the player may use(gun, knife, flashlight, etc, literally any item)
220-g_Audio vector increased, NUM_OF_SOUNDS #define increased. Every time the player toggles the weapon a "cha-ching!" sound will play.
221-All external filenames have been moved to "data" folder. The only external filenames that cannot be put in this folder are the textures for the BSP maps; The bsp map will look in the PWD(The current working directory) for textures. I can change this in the CBSP class later if need be.
222-I need to be careful, I'm not "making a game" right now. I'm programming a game engine. Simple things like equpping a weapon I can do in two seconds if I ignore the engine aspect and hard-code it. But these functions are very engine-level and will apply to *all* objects the player can interact with(equip, use, and put away).
223-ASSIMP's dll is also in the data folder, using DelayLoad and adding a dll directory to the data directory. Thanks to Jesse Natalie from Microsoft(AGAIN) for helping me on this one. The guy's a genius, if you ask him the meaning of life, he'll tell you instantly and it'll all make sense. He's *that* good.
224-Hours later, I have now also made it so the BSP map searches under the data directory for all textures. This is the biggest engine upgrade I've ever made in a 24 hour period(12 hours, really).
225-Immer weiter...Immer weiter! das ist deutsche für: "Onward and Upward." Creating a game engine is a slow, tedious process. Especially when you're the sole programmer and learning the graphics API more and more as you go on.
226========================================
2276/11/2020(4:07AM) Upgrading to 0.0.10b
228========================================
229-Object::PutWeaponAway() and Object::EquipWeapon() now function perfectly with rifle. Each function rotates the mesh back to its original position properly and realistically.
230-When Weapon is toggled, "cha-ching"(or any other noise that would fit the player's primary object being put away/equipped) is played within these functions, not outside their scope, so the sound matches the toggling of the weapon/object
231-A lot of trial/error done with the ASSIMP 3D ModelLoader and Mesh class, it seemed that there was a problem with <xmemory> due to it trying to find the proper directory, even wrote 50 lines of code to get around it, BUT...
232-Turns out that was not the case. When a brand new mesh is loaded, vector obviously must be resized. This is not a problem for the engine, but is for the 3D development tool.
233-Will have to program a newer version for 3D development team who are finding it impossible to import their own custom meshes, as NUM_OF_OBJECTS does not increase, must resize the vector on the fly(Models[x].push_back(), most likely).
234-While 3D Models are loaded, properties of given model are logged(Number of subsets, number of textures, animations, etc. Each subset mesh's vertices are logged as well when processed
235-Had to re-code how Objects are rendered, depth for map objects was lost again, fixed: Have to be careful in which the order of everything is drawn/rendered
236-Created Upgraded 3D Development tool for dev-team(it *actually* works much better this time), Kiba had fun importing his meshes he made, this engine handled a model with over 1.2 MILLION POLYCOUNT. I *must* be doing *something* right..
237========================================
2386/12/2020(8:40PM) Upgrading to 0.0.10c
239========================================
240-Does creating the fucking Universe count for an engine upgrade? I think so!
241-int spaceNumSphereVertices;spaceNumSphereFaces;DirectX::SimpleMath::Matrix spaceRotationx;spaceRotationz;;spaceRotationy have been Created.
242-New DDS file created from "Space-3D" WebGL generator for six pictures I then have to use with the old DirectX Texture Viewer(I had to INSTALL THE ENTIRE OLD JUNE 2010 LEGACY DIRECTX SDK *just* to get it)
243-Planet is now contained within a larger sphere, which is instanced as spaceWorld. Function CreateSpaceSphere created.
244-I might decide to create a system where I can make hundreds of planets, which would require std::vectors of all variables and probably throw them in a class. For now this is fine.
245-camProjection FOV set to 5000 so when leaving the planet the ground/map/objects disappear normally; They were still visible when fucking 10 parsecs away prior to this.
246-Note: float4x4 is no longer the variable being used in the HLSL shader for cbuffer, matrix is now being used (I am going to have to learn HLSL in-depth; I am *not* looking forward to this. Shaders can do great things, but these were not mandatory in prior versions of DX, so this is alien to me).
247-DirectX::SimpleMath::Matrix does *not* suffice for float4x4 or matrix variables in HLSL: Why?? XMMATRIX is the only variable that allows the constant buffer to remain in-tact. Again, I need to learn HLSL better. iedoc helped me with my shader, and I threw it i
248-DetectInput()'s DIK_ESCAPE & 0x80 caused a WM_DESTROY message to be sent, player coudln't Alt+Tab out of the game. Engine now relies on WndProc's WM_KEYDOWN/VK_ESCAPE to make use DestroyWindow() rather send WM_DESTROY. Emergency Exit Escape Thread also in place. Player can now Alt Tab out of game and return safely;
249-This problem should be addressed later. It's just not on my priority list, sorry. Other programmers would scream and cry at me for this(among another things: "Global variables, eww!!" Screw yourself and your precious templates and unncessary pointers to redundant classes). What the player see's will be the same regardless.
250-This engine is like Germany's very ambitious Navy(Kriegsmarine) building program that was not due to finish until 1948; They were forced to use their resources prematurely in 1939, will this project have a similar fate? (Will I be tempted to make a game prematurely after so many months(almost a year now) of building game engines? This one since the New Years 2020 alone?)
251========================================
2526/13/2020(10:29PM) Upgrading to 0.0.11a
253========================================
254-Cbuffer struct now makes use of DirectX::SimpleMath namespace for Matricies/Vectors, using __declspec(align(16)) prior to its creation keeps the ByteWidth for a constant buffer happy.
255-Renabled D3D11 Debug flag when creating D3D11Device/SwapChain, why I felt it necessary to comment it out in the first place when working on this project is one my retard moments that happens more often than I want.
256-Thank you...AGAIN...Jesse Natalie from Microsoft, for HELPING ME. Told me to enable the flag when I had done it before, and confirmed to me that __declspec(align()) would work. I swear, if I have to credit him ONE MORE TIME, I'll *have* to send him money because he's waaaaaaaay too helpful/brilliant.
257_ARRAYSIZE(x) macro being used for Creation of Vertex/Index Buffers, rather than ARRAYSIZE. Visual Studio 2019 thought it necessary to inform me _ARRAYSIZE was the more appropriate macro for memory.
258========================================
2596/16/2020(11:03PM) Upgrading to 0.0.11b
260========================================
261-GameLogic cpp/header created; GameLogic Class created (Finally!)
262-GameLogic instanced as Game; All globals in main cpp moved to this class
263-All MapObjects(std:vector <Object> Objects) in GameLogic Class, objects now referenced as (Game.Objects[x])
264-Shader has been put back into file, no longer massive auto std::string
265-imGUI more interactive with lights/lighting
266========================================
2676/23/2020(6:02PM) Upgrading to 0.0.11c
268========================================
269-Minor Engine Upgrade; Beginning to understand HLSL Lighting
270-Improved imGUI interface for lighting
271-Pondering how to implement actual game logic(Should there be an external cpp/header like now with the GameLogic class, should it just be another Draw Scene function, WHERE to implement the logic? Where do I put the variables?)
272========================================
2736/25/2020(4:42PM) Upgrading to 0.0.12a
274========================================
275-Another small upgrade; DeltaTime header, All Engine's Timer Functions that deal with delta variable are stored there, not main cpp
276-Appended "#include "imgui_impl_dx11.h"" and "#include "imgui_impl_win32.h"" to the very end of imgui.h to clean up main cpp further
277-Collision cpp/header removed; CollisionDetection.h created (with global variable distance since distance was part of old Collision Class)
278-Global DetectCollison() function which passed no arguments was removed from main cpp(Yes, it was misspelled this entire time)
279-Collision header is for BSP map, DetectionCollision(*CBSP xxx) created (this is the only parameter needed...for now)
280========================================
2817/4/2020(7:22PM) Upgrading to 0.0.12b
282========================================
283-Court is coming up on the 7th...As a result I have not been able to work on this engine. I'm scared. I can't work on my engine because of my anxiety.
284-Just a small upgrade; UpdateCamera() uses DirectX::SimpleMath::Matrix::CreateLookAt(..), which creates a RIGHT handed Matrix rather than Left-Handed
285-As a result Mouse's pitch has been reversed, and WSAD are reversed as well in order to work with a right-handed Matrix so they're not inversed
286-camProjection uses DirectX::SimpleMath::Matrix::CreatePerspectFieldOfView(..) now, it was attempted before, works now since camView is a right-handed Matrix
287-Ground disappeared unless it was high above the Y Axis, changed Rasterizer State for No Culling and it was fixed; Arrow keys now control height of ground for future debugging
288========================================
2897/5/2020(5:23PM) Upgrading to 0.0.12c
290========================================
291-Input header/cpp created(Finally); Taken out of main cpp, local global debug variables are unable to be changed as a result for now
292-This engine is so large that all the header and cpp files in Visual Studio's Solution Explorer cannot be seen fully without scrolling even at a 1920x1200 resolution, this engine has been growing for quite some time
293-XMMatrixScaling not used, using SimpleMath Wrapper again, using DirectX::SimpleMath::Matrix::CreateScale(float,float,float) for every Matrix
294-Using SimpleMath's namespace functions double the amount of SSE ASM machine instructions during run-time, which is obviously not good for memory, but I am sacrificing memory for better design.
295-Anxiety level is extremely high, doctors is tomorrow, day after that, my life is going to be changed forever at the State Supreme Court. I can't take this anymore. I just want to live my life.
296========================================
2977/14/2020(6:34AM) Upgrading to 0.0.13a
298========================================
299-100% of DirectXMath's XM__(..) functions that deal with Matricies and Vectors have been eliminated, SimpleMath wrapper used. One exception is Matrix Transposing, SimpleMath's tranpose member for some reason cannot properly transpose a matrix to be sent to the shader. No explanation for this.
300-New Engine Feature: Messages. Game messages: Player Hints, Lists of Objectives, i.e. "New Objective: Survive Planet", now created. Custom Font type IDWriteTextFormat used in DXAPI class.
301-Message Class created with custom constructor, PopulateMessages, like PopulateObjects also created, however, Messages are not stored in a global vector like Objects are. Objects should also be reverted this way, the less globals the better.
302-Message header/cpp file created. Messages have Type, Displayed boolean flag, and std::string that contains the message. Within PopulateMessages(), push_back(Message(std::string)) is used rather than assigning values to something already in memory.
303-GameLogic class makes use of this as well; GameLogic class is becoming more important now, thankfully, don't want an entire game stuck within the main cpp/drawing functions.
304-DrawMessage Function created, used in DrawD2D(). DrawD2D() is now(obviously) responsible for *all* Direct2D Drawing, global Game.g_bShowConsole taken out of global scope and used in DrawD2D(). Better Design.
305-DrawMessage has arguments of std::string and D2D1::Color(R,G,B) for custom Game messages that will be displayed to the player during any game.
306-Messages appear, and slowly fade away as the alpha value is decreased while being multiplied by the engine's delta variable. Very pretty/professional looking.
307========================================
3087/18/2020(10:46PM) Upgrading to 0.0.13b
309========================================
310-Been working over the past few days; A lot of work done but will all be considered as this minor 13a-13beta upgrade
311-Main cpp only has WINAPI entrypoint; StartEngine() function created, prototype is extern, code is only 13 lines long and Main.cpp has this changelog above it
312-GameClock class created. Uses stopwatch and stores milliseconds, seconds, minutes, and hours. (MINUTES/HOURS WILL NOT BE RESET TO 0 ONCE OVER 60, I need to be able to measure time very prescisely, this is not a pretty clock for the player, it's for game logic.)
313-Internal Game Clock created(timers have been in this engine for a while, this one is the actual ENGINE'S internal chronometer; It is not instanced globally(which is good design), within GameLogic class.
314-Game clock is displayed counting on debug console once EngineState is set to GameState::InGame. Clock does not start until Engine's state is InGame, not Loading.
315-Several functions created within GameLogic class; Including StartGame(), which begins the engine's intenal game clock. InGame() as well, along with others that are relevant to the Messaging system.
316-Again, new protected members within GameLogic class created, along with public functions to access protected members. Going over them all in this changelog would just take up too much time/space.
317-All messages are pointers, with their own alpha's, color's, types, etc. I am not like other programmers, but within DrawMessage(*Message message), using pointers was necessary in order to deal with the messages at real-time.
318-Old Main.cpp renamed to Scene.cpp(This has been A LONG TIME COMING); Main.cpp is only for entrypoint and to invoke StartEngine().
319-StartEngine, if returning as false, will invoke a Fatal Error message explaining the playing is not using Windows, or an old version of Windows. Error String is SZ_ENGINEFAILURE, stored in Globals.h
320-Textures are now logged properly; aiScene->hasTextures would always return false and therefore no texture loading would be logged. This has been fixed as each subet mesh is processed, it is logged there, and uses the subset mesh's texture variables to log information.
321-Engine should return 1337 as return value if all goes well, if StartEngine() fails, -1 will be returned. This would be within a very fatal situation.
322-100% of compiler warnings eliminated.
323========================================
3247/19/2020(2:16AM) Upgrading to 0.0.13c
325========================================
326-DoCollisionDetection(CBSP *bsp) created; Allows for *much better* BSP map collision detection, player can now slide against walls with impunity without getting "caught" in the wall(GREAT for all FPS games, and horror games in tight mazes)
327-Accidental WallHacking seems to be a thing of the past now. Don't want to jynx myself on this one(Note: 7/19: Noticed a wallhack, after setting radius to 90 instead of 20, tried to reproduce it, couldn't); There's a lot more to do with the physics on this engine. This is just one step.
328/*-----------------------------------------------CHANGELOG--------------------------------------------------------------*/