78 Commits
Author SHA1 Message Date
karl 1989ff4cc2 Update README 2021-01-18 19:11:17 +01:00
karl 08646911ba Add benchmark code in main (commented out) 2021-01-18 19:11:17 +01:00
karl a3233d90c7 Hotfix for memory leak
The Vector class is still leaky, but it's not a noticeable problem with this fix. Proper fixing requries more debugging
2021-01-18 19:11:07 +01:00
karl 1649af9943 Add flag for non-colliding objects 2021-01-16 22:35:25 +01:00
karl 6801208905 Some cleanup and comments 2021-01-16 22:28:34 +01:00
karl 27dcc00e68 Add global collision point output 2021-01-16 22:14:07 +01:00
karl 68e8bf8153 Add optimizations for working intersect_ray_recurse approach
It's performant and functional now, yay
2021-01-16 19:33:48 +01:00
karl 59d9311cc8 Rewrite intersect_ray_recurse
Like the function in the slides now, but I had to change a part because it's not working 100% otherwise... not very optimized now
2021-01-16 19:16:36 +01:00
karl 40dc7850a9 Add support for multiple triangles per Point 2021-01-16 15:57:41 +01:00
karl ba98ae3386 Minor kdtree fixes/workarounds
Not sure why, but it misses some collisions with that t >= 0.0 clause...
2021-01-15 13:56:53 +01:00
karl 90b6769278 Add visual output for the collision 2021-01-15 11:44:28 +01:00
karl 3504d878f8 Improve visuals for kdtree rendering
Also remove the animations - these don't make sense with a static kdtree
2021-01-12 18:42:55 +01:00
karl af019d3318 Add kdtree -> Lines conversion
The kdtree can now be drawn!
2021-01-12 18:38:37 +01:00
karl 7cbaaf84f7 Fix typo in cross product 2021-01-12 18:38:16 +01:00
karl 418b344dbe Add simple line drawing component + renderer 2021-01-11 12:35:52 +01:00
karl fc880b397a Add mouse direction getter for CollisionSystem 2021-01-02 16:52:02 +01:00
karl 7cc6531928 Minor bugfixes in CollisionSystem
The global origin wasn't taken into account, and the output had an issue.
2021-01-02 16:25:41 +01:00
karl 3bb071ae7b Add prototype collision checking
It outputs values, but they don't seem quite correct...
2021-01-02 16:14:59 +01:00
karl 87b54a1b41 Add kdtree and foundation of CollisionSystem 2021-01-02 16:00:09 +01:00
karl 9c1417a8f9 Autoformat everything + minor include fixes 2021-01-02 15:20:33 +01:00
karl 8e4eacf48f Add clang-format, format main 2021-01-02 15:12:34 +01:00
karl 3a93f2410f Add AA samples as command line argument 2020-12-13 21:55:18 +01:00
karl 53810dd99f Toggle-able AA
button Q toggles anti-aliasing (handled in RenderSystem)
2020-12-13 00:12:49 +01:00
karl 0e8e98026c Add normal scale factor
+ some minor tweaks: higher shadowmap resolution and light rotate speed
2020-11-18 16:48:30 +01:00
karl 482aa93cce Add new textures with normalmaps
Now each texture has proper normals
2020-11-18 16:29:28 +01:00
karl 83936f66fb Use Tangents for correct normal calculation
The normal maps are looking good now!
2020-11-18 16:04:44 +01:00
karl fd9317a5f5 Calculate tangents for ObjMesh 2020-11-18 15:30:31 +01:00
karl 4951ad3b04 Add normalmap support
Tangents are not yet used, so the normals are currently only correct for the ground.
2020-11-16 13:11:07 +01:00
karl 4073897f74 Don't render the shadow debug quad 2020-11-01 22:45:53 +01:00
karl ef649780c3 Fix for real-time shadows + more objects
The framebuffer wasn't properly cleared
2020-10-30 19:32:37 +01:00
karl 6510f720cb Fix shadow acne 2020-10-27 21:26:00 +01:00
karl 0254b81882 Implement basic shadows
Still shadow acne, but working in principle
2020-10-27 21:13:07 +01:00
karl 5f30873f23 Add separate getRenderObjects function
This will make the functions clearer when shadow rendering is added.
2020-10-26 12:30:21 +01:00
karl 51c0cb22d2 Minor changes
Remove debug cout, change some parameters to make it more pleasant to use
2020-10-05 17:55:21 +02:00
karl 074ec20e1b Add interactive path editing
The PathMovementSwitchSystem was repurposed to a general InteractivePathSystem for this. It handles switching and adding points, as both seem like sensible possibilities for such entities to have.
2020-10-03 18:05:55 +02:00
karl 3fb23200fb Add system to switch between path and manual movement
This system automatically checks for entities with both movement methods, and activates/deactivates them when pressing P.
2020-10-03 17:44:52 +02:00
karl cf19af1142 Attempt at constant speed
Not working because linearly increasing t doesn't imply constant velocity within a segment between two points. Seems like a more complex approach will be necessary
2020-10-03 00:56:49 +02:00
karl 09897240d1 Add changing speed with W and S 2020-10-03 00:56:41 +02:00
karl 8138c506d9 Improve mouse rotation code
This had some quirks previously, now it works cleanly with quaternions.
2020-10-02 22:47:27 +02:00
karl 2889a6fa8a Make movement work with origin change 2020-10-02 22:47:10 +02:00
karl aef495a394 Add Quaternion interpolation
glm made this quite easy!
2020-10-02 22:27:12 +02:00
karl 9125e7a3cc Add origin vector to Transform
We need this in addition to the Matrix (which includes translation) - mainly for rotation, which should be around the translation, but not around the origin.

There may be some places left which need changes due to this - the line between the origin and translation isn't as clear yet as it should be.
2020-09-29 21:04:25 +02:00
karl 0aa41b3d66 Basic structure for rotation 2020-09-29 17:56:07 +02:00
karl d6effd66f6 Finish basic spline movement
The speed isn't chosen correctly yet, but the basic movement along the spline is functional!

There are opportunities for a performance increase: Some calculations which we currently do every frame, are actually only necessary once we choose a new point for moving towards.
2020-09-28 18:14:20 +02:00
karl 80b4aa7ba8 Merge branch 'master' of https://github.com/kb173/ecsgame 2020-09-28 16:53:10 +02:00
karl 8f3d3dc7bf First steps towards Catmul-Rom spline path movement
Lots of hardcoded stuff, but interpolation between two points is working and displayed.
2020-09-28 16:52:35 +02:00
karl 161bd6db4a Add screenshot to README 2020-09-22 22:06:23 +02:00
karl f1eaecde89 Update README 2020-01-15 20:14:48 +01:00
karl f61d58a859 Change window title, add screenshot 2020-01-15 18:29:19 +01:00
karl d538ff64ec Add materials for diffuse + specular shading 2020-01-15 18:25:04 +01:00
karl 30b36bd9f8 Add basic sine animation component + system for it 2020-01-15 17:16:55 +01:00
karl 59e3132d6e Proper transparency via sorting + new test level 2020-01-15 17:06:58 +01:00
karl be9f178780 Minor cleanup in LOD system 2020-01-15 12:15:02 +01:00
karl c1c62a9b94 Basic LOD system 2020-01-15 12:06:20 +01:00
karl a043847bad Basic (non-sorted) transparent rendering and cleanup in RenderSystem 2020-01-15 00:22:39 +01:00
karl cbb0dc1164 Texture! 2020-01-14 13:14:33 +01:00
karl 704081dbc3 Add image loader library 2020-01-14 12:57:54 +01:00
karl 1824b0c38c Correctly render mesh from obj 2020-01-14 12:53:31 +01:00
karl 65f0e3367b Fix unintuitive movement (random stopping)
Instead of completely stopping on key release, only that specific
movement is stopped
2020-01-07 22:19:15 +01:00
karl 8c6a1d7834 Cleanup: Moving things where they belong 2020-01-07 22:13:47 +01:00
karl b514cd38a7 Movement is functional!
There is a small bug that can occur, seems like gimbal lock or something
like that. Only rarely though (close to coordinate origin?)
2020-01-07 22:07:38 +01:00
karl 0908a39aa5 Mouse look works properly when stationary 2020-01-07 21:38:26 +01:00
karl a262b60def Mostly functional mouse look
Walking doesn't take it into account though...
2020-01-07 20:02:40 +01:00
karl 511b2da319 A cube is rendered with the new system! 2020-01-07 18:12:43 +01:00
karl 02b0f6a67a Nonfunctional new rendering 2020-01-07 15:35:12 +01:00
karl d99ca4c8d7 Basic camera, mesh, rendering systems
Not used yet!
2020-01-07 13:50:47 +01:00
karl 7675ddc3a4 Add glm for vector math, used for position and movement 2020-01-07 13:10:23 +01:00
karl 3529254a29 Move all ECS stuff into their own files / dirs 2020-01-04 18:25:47 +01:00
karl 0d9f16939c Restructure files into directories for more clarity 2020-01-04 18:19:18 +01:00
karl 94929db5ce Add OBJ Loader 2020-01-04 18:18:03 +01:00
karl a1ccd4e362 Colorful triangle with shaders loaded with new class! 2020-01-04 17:48:15 +01:00
karl 2cb10c9910 Add Shader class from learnopengl.com 2020-01-03 21:51:30 +01:00
karl 50e5a2b30c Tutorial code for modern OpenGL rendering 2020-01-03 21:45:01 +01:00
karl 065c89e902 Add ESC key callback for closing 2019-12-13 13:50:02 +01:00
karl dce2418762 Add OpenGL and GLFW dependencies + example 2019-12-13 13:40:41 +01:00
karl 8032f2efec Add basic project with gravity system test 2019-12-13 13:26:18 +01:00
karl 83e1cec88b Add ECS single-header lib from redxdev 2019-12-13 13:16:52 +01:00
karl 1eaf0ab1cb Add gitignore for CLion 2019-12-13 13:16:14 +01:00