├── .gitattributes ├── .gitignore ├── .gitmodules ├── ArchitectureDiagram.png ├── BuildAndExportEngine.bat ├── Dependency.bat ├── ExportHeaders.bat ├── Isetta ├── ColladaConverter.exe ├── ConfigEditor.exe ├── External │ ├── FMOD │ │ ├── inc │ │ │ ├── fmod.cs │ │ │ ├── fmod.h │ │ │ ├── fmod.hpp │ │ │ ├── fmod_codec.h │ │ │ ├── fmod_common.h │ │ │ ├── fmod_dsp.cs │ │ │ ├── fmod_dsp.h │ │ │ ├── fmod_dsp_effects.h │ │ │ ├── fmod_errors.cs │ │ │ ├── fmod_errors.h │ │ │ └── fmod_output.h │ │ └── lib │ │ │ ├── fmod64.dll │ │ │ ├── fmod64_vc.lib │ │ │ ├── fmodL64.dll │ │ │ ├── fmodL64_vc.lib │ │ │ ├── libfmod.a │ │ │ └── libfmodL.a │ └── SID │ │ └── sid.h ├── Horde3D_ColladaConverter.exe ├── Isetta.sln ├── IsettaEngine │ ├── AI │ │ ├── Nav2DAgent.cpp │ │ ├── Nav2DAgent.h │ │ ├── Nav2DObstacle.cpp │ │ ├── Nav2DObstacle.h │ │ ├── Nav2DPlane.cpp │ │ └── Nav2DPlane.h │ ├── Application.cpp │ ├── Application.h │ ├── Audio │ │ ├── AudioClip.cpp │ │ ├── AudioClip.h │ │ ├── AudioListener.cpp │ │ ├── AudioListener.h │ │ ├── AudioModule.cpp │ │ ├── AudioModule.h │ │ ├── AudioSource.cpp │ │ └── AudioSource.h │ ├── Collisions │ │ ├── AABB.cpp │ │ ├── AABB.h │ │ ├── BVTree.cpp │ │ ├── BVTree.h │ │ ├── BoxCollider.cpp │ │ ├── BoxCollider.h │ │ ├── CapsuleCollider.cpp │ │ ├── CapsuleCollider.h │ │ ├── Collider.cpp │ │ ├── Collider.h │ │ ├── CollisionHandler.cpp │ │ ├── CollisionHandler.h │ │ ├── CollisionSolverModule.cpp │ │ ├── CollisionSolverModule.h │ │ ├── CollisionUtil.h │ │ ├── Collisions.cpp │ │ ├── Collisions.h │ │ ├── CollisionsModule.cpp │ │ ├── CollisionsModule.h │ │ ├── RaycastHit.h │ │ ├── SphereCollider.cpp │ │ └── SphereCollider.h │ ├── Components │ │ ├── AxisDrawer.cpp │ │ ├── AxisDrawer.h │ │ ├── Editor │ │ │ ├── Console.cpp │ │ │ ├── Console.h │ │ │ ├── EditorComponent.cpp │ │ │ ├── EditorComponent.h │ │ │ ├── FrameReporter.cpp │ │ │ ├── FrameReporter.h │ │ │ ├── Hierarchy.cpp │ │ │ ├── Hierarchy.h │ │ │ ├── Inspector.cpp │ │ │ ├── Inspector.h │ │ │ ├── NetworkMonitor.cpp │ │ │ └── NetworkMonitor.h │ │ ├── FlyController.cpp │ │ ├── FlyController.h │ │ ├── GridComponent.cpp │ │ ├── GridComponent.h │ │ ├── JointFollow.cpp │ │ ├── JointFollow.h │ │ ├── PauseComponent.cpp │ │ └── PauseComponent.h │ ├── Core │ │ ├── Color.cpp │ │ ├── Color.h │ │ ├── Config │ │ │ ├── CVar.cpp │ │ │ ├── CVar.h │ │ │ ├── CVarRegistry.h │ │ │ ├── Config.cpp │ │ │ ├── Config.h │ │ │ └── ICVar.h │ │ ├── DataStructures │ │ │ ├── AVLTree.cpp │ │ │ ├── AVLTree.h │ │ │ ├── Array.h │ │ │ ├── Delegate.cpp │ │ │ ├── Delegate.h │ │ │ ├── HandleBin.cpp │ │ │ ├── HandleBin.h │ │ │ ├── Plane.h │ │ │ ├── PriorityQueue.h │ │ │ ├── RingBuffer.cpp │ │ │ ├── RingBuffer.h │ │ │ ├── Trie.cpp │ │ │ └── Trie.h │ │ ├── Debug │ │ │ ├── Assert.h │ │ │ ├── Debug.h │ │ │ ├── DebugDraw.cpp │ │ │ ├── DebugDraw.h │ │ │ ├── Logger.cpp │ │ │ └── Logger.h │ │ ├── EngineResource.cpp │ │ ├── EngineResource.h │ │ ├── Filesystem.cpp │ │ ├── Filesystem.h │ │ ├── Geometry │ │ │ ├── Plane.cpp │ │ │ ├── Plane.h │ │ │ └── Ray.h │ │ ├── IsettaAlias.h │ │ ├── IsettaCore.h │ │ ├── Math │ │ │ ├── Math.h │ │ │ ├── Matrix3.cpp │ │ │ ├── Matrix3.h │ │ │ ├── Matrix4.cpp │ │ │ ├── Matrix4.h │ │ │ ├── Quaternion.cpp │ │ │ ├── Quaternion.h │ │ │ ├── Random.cpp │ │ │ ├── Random.h │ │ │ ├── Rect.cpp │ │ │ ├── Rect.h │ │ │ ├── Util.cpp │ │ │ ├── Util.h │ │ │ ├── Vector2.cpp │ │ │ ├── Vector2.h │ │ │ ├── Vector2Int.cpp │ │ │ ├── Vector2Int.h │ │ │ ├── Vector3.cpp │ │ │ ├── Vector3.h │ │ │ ├── Vector3Int.cpp │ │ │ ├── Vector3Int.h │ │ │ ├── Vector4.cpp │ │ │ └── Vector4.h │ │ ├── Memory │ │ │ ├── DoubleBufferedAllocator.cpp │ │ │ ├── DoubleBufferedAllocator.h │ │ │ ├── FreeListAllocator.cpp │ │ │ ├── FreeListAllocator.h │ │ │ ├── MemUtil.cpp │ │ │ ├── MemUtil.h │ │ │ ├── MemoryArena.cpp │ │ │ ├── MemoryArena.h │ │ │ ├── MemoryManager.cpp │ │ │ ├── MemoryManager.h │ │ │ ├── ObjectHandle.cpp │ │ │ ├── ObjectHandle.h │ │ │ ├── PoolAllocator.cpp │ │ │ ├── PoolAllocator.h │ │ │ ├── StackAllocator.cpp │ │ │ ├── StackAllocator.h │ │ │ └── TemplatePoolAllocator.h │ │ ├── SystemInfo.cpp │ │ ├── SystemInfo.h │ │ └── Time │ │ │ ├── Clock.cpp │ │ │ ├── Clock.h │ │ │ ├── StopWatch.cpp │ │ │ ├── StopWatch.h │ │ │ └── Time.h │ ├── Custom │ │ ├── EmptyLevel │ │ │ ├── EmptyLevel.cpp │ │ │ └── EmptyLevel.h │ │ ├── LevelLoadingMenu.cpp │ │ ├── LevelLoadingMenu.h │ │ └── NoCameraLevel │ │ │ ├── NoCameraComponent.cpp │ │ │ ├── NoCameraComponent.h │ │ │ ├── NoCameraLevel.cpp │ │ │ └── NoCameraLevel.h │ ├── Doxyfile │ ├── EngineLoop.cpp │ ├── EngineLoop.h │ ├── Events │ │ ├── EventObject.cpp │ │ ├── EventObject.h │ │ ├── Events.cpp │ │ └── Events.h │ ├── Graphics │ │ ├── AnimationComponent.cpp │ │ ├── AnimationComponent.h │ │ ├── CameraComponent.cpp │ │ ├── CameraComponent.h │ │ ├── Font.cpp │ │ ├── Font.h │ │ ├── GUI.cpp │ │ ├── GUI.h │ │ ├── GUIModule.cpp │ │ ├── GUIModule.h │ │ ├── GUIStyle.cpp │ │ ├── GUIStyle.h │ │ ├── LightComponent.cpp │ │ ├── LightComponent.h │ │ ├── MeshComponent.cpp │ │ ├── MeshComponent.h │ │ ├── ParticleSystemComponent.cpp │ │ ├── ParticleSystemComponent.h │ │ ├── RectTransform.h │ │ ├── RenderModule.cpp │ │ ├── RenderModule.h │ │ ├── RenderNode.cpp │ │ ├── RenderNode.h │ │ ├── Texture.cpp │ │ ├── Texture.h │ │ ├── Window.cpp │ │ ├── Window.h │ │ ├── WindowModule.cpp │ │ └── WindowModule.h │ ├── ISETTA_API.h │ ├── Input │ │ ├── GLFWInput.cpp │ │ ├── GLFWInput.h │ │ ├── Input.cpp │ │ ├── Input.h │ │ ├── InputModule.cpp │ │ ├── InputModule.h │ │ └── KeyCode.h │ ├── IsettaEngine.props │ ├── IsettaEngine.vcxproj │ ├── IsettaEngine.vcxproj.filters │ ├── Networking │ │ ├── BuiltinMessages.h │ │ ├── ClientInfo.h │ │ ├── Messages.h │ │ ├── NetworkDiscovery.cpp │ │ ├── NetworkDiscovery.h │ │ ├── NetworkId.cpp │ │ ├── NetworkId.h │ │ ├── NetworkManager.cpp │ │ ├── NetworkManager.h │ │ ├── NetworkTransform.cpp │ │ ├── NetworkTransform.h │ │ ├── NetworkingModule.cpp │ │ └── NetworkingModule.h │ ├── Resources │ │ ├── DaeToGeoConverter.bat │ │ ├── fonts │ │ │ └── Lato-Regular.ttf │ │ ├── lights │ │ │ ├── deferredLighting.shader │ │ │ └── light.material.xml │ │ ├── particles │ │ │ └── particleSys1 │ │ │ │ ├── particle.shader │ │ │ │ ├── particle1.material.xml │ │ │ │ ├── particle1.particle.xml │ │ │ │ ├── particle1.tga │ │ │ │ └── particleSys1.scene.xml │ │ ├── pipelines │ │ │ ├── ambientMap.dds │ │ │ ├── deferred.pipeline.xml │ │ │ ├── forward.pipeline.xml │ │ │ ├── globalSettings.material.xml │ │ │ ├── hdr.pipeline.xml │ │ │ ├── postHDR.material.xml │ │ │ └── postHDR.shader │ │ ├── primitives │ │ │ ├── Capsule │ │ │ │ ├── Capsule.dae │ │ │ │ ├── Capsule.geo │ │ │ │ └── Capsule.scene.xml │ │ │ ├── Cube │ │ │ │ ├── Cube.dae │ │ │ │ ├── Cube.geo │ │ │ │ ├── Cube.scene.xml │ │ │ │ └── Cube.shader │ │ │ ├── Cylinder │ │ │ │ ├── Cylinder.dae │ │ │ │ ├── Cylinder.geo │ │ │ │ ├── Cylinder.scene.xml │ │ │ │ └── Cylinder.shader │ │ │ ├── Grid │ │ │ │ ├── Grid.dae │ │ │ │ ├── Grid.geo │ │ │ │ ├── Grid.scene.xml │ │ │ │ └── Grid.shader │ │ │ ├── Quad │ │ │ │ ├── Quad.dae │ │ │ │ ├── Quad.geo │ │ │ │ ├── Quad.scene.xml │ │ │ │ └── Quad.shader │ │ │ ├── Sphere │ │ │ │ ├── Sphere.dae │ │ │ │ ├── Sphere.geo │ │ │ │ ├── Sphere.scene.xml │ │ │ │ └── Sphere.shader │ │ │ └── primitive.material.xml │ │ ├── shaders │ │ │ ├── model.shader │ │ │ └── utilityLib │ │ │ │ ├── fragDeferredRead.glsl │ │ │ │ ├── fragDeferredReadGL4.glsl │ │ │ │ ├── fragDeferredWrite.glsl │ │ │ │ ├── fragDeferredWriteGL4.glsl │ │ │ │ ├── fragLighting.glsl │ │ │ │ ├── fragLightingGL4.glsl │ │ │ │ ├── fragPostProcess.glsl │ │ │ │ ├── fragPostProcessGL4.glsl │ │ │ │ ├── vertCommon.glsl │ │ │ │ ├── vertParticle.glsl │ │ │ │ ├── vertParticleGL4.glsl │ │ │ │ ├── vertSkinning.glsl │ │ │ │ └── vertSkinningGL4.glsl │ │ └── textures │ │ │ └── common │ │ │ ├── defnorm.tga │ │ │ └── white.tga │ ├── Scene │ │ ├── Component.cpp │ │ ├── Component.h │ │ ├── Entity.cpp │ │ ├── Entity.h │ │ ├── IsettaLevel.h │ │ ├── Layers.cpp │ │ ├── Layers.h │ │ ├── Level.cpp │ │ ├── Level.h │ │ ├── LevelManager.cpp │ │ ├── LevelManager.h │ │ ├── Primitive.cpp │ │ ├── Primitive.h │ │ ├── Transform.cpp │ │ ├── Transform.cpp.orig │ │ └── Transform.h │ ├── Util.h │ ├── config.cfg │ ├── cpp.hint │ ├── imgui.ini │ └── main.cpp ├── IsettaTest │ ├── Core │ │ ├── ColorTest.cpp │ │ ├── DataStructures │ │ │ ├── ArrayTest.cpp │ │ │ ├── PriorityQueueTest.cpp │ │ │ ├── RingBufferTest.cpp │ │ │ └── TrieTest.cpp │ │ └── Math │ │ │ ├── Matrix3Test.cpp │ │ │ ├── UtilTest.cpp │ │ │ ├── Vector2IntTest.cpp │ │ │ ├── Vector2Test.cpp │ │ │ ├── Vector3IntTest.cpp │ │ │ ├── Vector3Test.cpp │ │ │ └── Vector4Test.cpp │ ├── IsettaTest.vcxproj │ ├── IsettaTest.vcxproj.filters │ ├── TestInitialization.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── IsettaTestbed │ ├── AILevel │ ├── AILevel.cpp │ ├── AILevel.h │ ├── AITestAgent.h │ ├── AITestComponent.cpp │ └── AITestComponent.h │ ├── AudioLevel │ ├── AudioLevel.cpp │ ├── AudioLevel.h │ ├── AudioPlay.cpp │ └── AudioPlay.h │ ├── BVHLevel │ ├── BVHLevel.cpp │ ├── BVHLevel.h │ ├── RandomMover.cpp │ └── RandomMover.h │ ├── CollisionSolverLevel │ ├── CollisionSolverLevel.cpp │ └── CollisionSolverLevel.h │ ├── CollisionsLevel │ ├── CollisionsLevel.cpp │ └── CollisionsLevel.h │ ├── Custom │ ├── DebugCollision.cpp │ ├── DebugCollision.h │ ├── EscapeExit.cpp │ ├── EscapeExit.h │ ├── KeyTransform.cpp │ ├── KeyTransform.h │ ├── OscillateMove.cpp │ ├── OscillateMove.h │ ├── RaycastClick.cpp │ └── RaycastClick.h │ ├── DebugLevel │ ├── DebugComponent.cpp │ ├── DebugComponent.h │ ├── DebugLevel.cpp │ └── DebugLevel.h │ ├── EditorLevel │ ├── EditorLevel.cpp │ └── EditorLevel.h │ ├── EmptyLevel │ ├── EmptyLevel.cpp │ └── EmptyLevel.h │ ├── EventLevel │ ├── EventLevel.cpp │ ├── EventLevel.h │ ├── EventListenerComponent.cpp │ ├── EventListenerComponent.h │ ├── EventSenderComponent.cpp │ └── EventSenderComponent.h │ ├── Example │ ├── ExampleComponent.cpp │ ├── ExampleComponent.h │ ├── ExampleLevel.cpp │ └── ExampleLevel.h │ ├── GUILevel │ ├── FontExample.cpp │ ├── FontExample.h │ ├── GUIComponent.cpp │ ├── GUIComponent.h │ ├── GUILevel.cpp │ └── GUILevel.h │ ├── Halves │ ├── Bullet.cpp │ ├── Bullet.h │ ├── CameraController.cpp │ ├── CameraController.h │ ├── GameManager.cpp │ ├── GameManager.h │ ├── HalvesLevel.cpp │ ├── HalvesLevel.h │ ├── PlayerController.cpp │ ├── PlayerController.h │ ├── Zombie.cpp │ └── Zombie.h │ ├── InputLevel │ ├── InputLevel.cpp │ ├── InputLevel.h │ ├── InputTestComponent.cpp │ └── InputTestComponent.h │ ├── IsettaEngine.props │ ├── IsettaTestbed.vcxproj │ ├── IsettaTestbed.vcxproj.filters │ ├── KnightGame │ ├── Constants.h │ ├── Gameplay │ │ ├── EmptyComponent.cpp │ │ ├── EmptyComponent.h │ │ ├── Enemy.cpp │ │ ├── Enemy.h │ │ ├── FireballCircle.cpp │ │ ├── FireballCircle.h │ │ ├── FollowComponent.cpp │ │ ├── FollowComponent.h │ │ ├── KnightController.cpp │ │ ├── KnightController.h │ │ ├── ScoreManager.cpp │ │ ├── ScoreManager.h │ │ ├── ScreenShifter.cpp │ │ ├── ScreenShifter.h │ │ ├── SpinAttack.cpp │ │ ├── SpinAttack.h │ │ ├── SwordController.cpp │ │ └── SwordController.h │ └── Level │ │ ├── KnightMainLevel.cpp │ │ └── KnightMainLevel.h │ ├── LevelLoadingLevel │ ├── LevelLoadingLevel.cpp │ ├── LevelLoadingLevel.h │ ├── LoadNextLevel.cpp │ └── LoadNextLevel.h │ ├── MeshAnimLevel │ ├── MeshAnimLevel.cpp │ └── MeshAnimLevel.h │ ├── NetworkLevel │ ├── EmptyLevelForNetworkLoadLevel.cpp │ ├── EmptyLevelForNetworkLoadLevel.h │ ├── NetworkLevel.cpp │ ├── NetworkLevel.h │ ├── NetworkTestComp.cpp │ └── NetworkTestComp.h │ ├── PrimitiveLevel │ ├── PrimitiveLevel.cpp │ └── PrimitiveLevel.h │ ├── Resources │ ├── Example │ │ ├── Bodymat.material.xml │ │ ├── Bottommat.material.xml │ │ ├── Hairmat.material.xml │ │ ├── Hatmat.material.xml │ │ ├── Malcom_Body_Diffuse.png │ │ ├── Malcom_Body_Gloss.png │ │ ├── Malcom_Body_Normal.png │ │ ├── Malcom_Body_Opacity.png │ │ ├── Malcom_Body_Specular.png │ │ ├── Malcom_Bottom_Diffuse.png │ │ ├── Malcom_Bottom_Gloss.png │ │ ├── Malcom_Bottom_Normal.png │ │ ├── Malcom_Bottom_Opacity.png │ │ ├── Malcom_Bottom_Specular.png │ │ ├── Malcom_Hair_Diffuse.png │ │ ├── Malcom_Hair_Gloss.png │ │ ├── Malcom_Hair_Normal.png │ │ ├── Malcom_Hair_Opacity.png │ │ ├── Malcom_Hair_Specular.png │ │ ├── Malcom_Hat_Diffuse.png │ │ ├── Malcom_Hat_Gloss.png │ │ ├── Malcom_Hat_Normal.png │ │ ├── Malcom_Hat_Opacity.png │ │ ├── Malcom_Hat_Specular.png │ │ ├── Malcom_Shoes_Diffuse.png │ │ ├── Malcom_Shoes_Gloss.png │ │ ├── Malcom_Shoes_Normal.png │ │ ├── Malcom_Shoes_Opacity.png │ │ ├── Malcom_Shoes_Specular.png │ │ ├── Malcom_Top_Diffuse.png │ │ ├── Malcom_Top_Gloss.png │ │ ├── Malcom_Top_Normal.png │ │ ├── Malcom_Top_Opacity.png │ │ ├── Malcom_Top_Specular.png │ │ ├── Pushing.anim │ │ ├── Pushing.dae │ │ ├── Pushing.geo │ │ ├── Pushing.scene.xml │ │ ├── Shoesmat.material.xml │ │ ├── Topmat.material.xml │ │ └── push_maya.mb │ ├── Fonts │ │ └── CONSOLA.TTF │ ├── Halves │ │ ├── Bullet │ │ │ ├── Bullet.anim │ │ │ ├── Bullet.blend │ │ │ ├── Bullet.blend1 │ │ │ ├── Bullet.dae │ │ │ ├── Bullet.geo │ │ │ ├── Bullet.material.xml │ │ │ └── Bullet.scene.xml │ │ ├── Ground │ │ │ ├── Ground.material.xml │ │ │ ├── Level.anim │ │ │ ├── Level.blend │ │ │ ├── Level.blend1 │ │ │ ├── Level.dae │ │ │ ├── Level.geo │ │ │ ├── Level.scene.xml │ │ │ ├── albedo.png │ │ │ └── normal.png │ │ ├── Soldier │ │ │ ├── Soldier.anim │ │ │ ├── Soldier.dae │ │ │ ├── Soldier.geo │ │ │ ├── Soldier.scene.xml │ │ │ ├── Soldier_Idle.anim │ │ │ ├── Soldier_Idle.dae │ │ │ ├── Soldier_Idle.geo │ │ │ ├── Soldier_Idle.scene.xml │ │ │ ├── VanguardBodyMat.material.xml │ │ │ ├── Vanguard_VisorMat.material.xml │ │ │ ├── vanguard_diffuse.png │ │ │ ├── vanguard_normal.png │ │ │ └── vanguard_specular.png │ │ ├── Sound │ │ │ ├── bullet-impact.wav │ │ │ ├── gunshot.aiff │ │ │ └── zombie-death.mp3 │ │ ├── ZOMBIE.TTF │ │ └── Zombie │ │ │ ├── Zombie.anim │ │ │ ├── Zombie.dae │ │ │ ├── Zombie.geo │ │ │ ├── Zombie.scene.xml │ │ │ ├── emireh_body_material.material.xml │ │ │ ├── emireh_shoe_material.material.xml │ │ │ ├── mremireh_body__diffuse.png │ │ │ ├── mremireh_body_normal.png │ │ │ ├── mremireh_body_specular.png │ │ │ ├── mremireh_shoe_diffuse.png │ │ │ ├── mremireh_shoe_normal.png │ │ │ └── mremireh_shoe_specular.png │ ├── Images │ │ ├── cursor.png │ │ └── isetta_logo.png │ ├── KnightGame │ │ ├── Audio │ │ │ ├── flames.aiff │ │ │ └── sword.aiff │ │ ├── Fireball │ │ │ ├── particle1.material.xml │ │ │ ├── particle1.particle.xml │ │ │ ├── particle2.material.xml │ │ │ ├── particle2.particle.xml │ │ │ └── particleSys1.scene.xml │ │ ├── Fonts │ │ │ └── KnightsQuest.ttf │ │ ├── Images │ │ │ └── pow.png │ │ ├── Knight │ │ │ ├── Guard_03.material.xml │ │ │ ├── Paladin_MAT.material.xml │ │ │ ├── Paladin_MAT_001.material.xml │ │ │ ├── death.anim │ │ │ ├── death.dae │ │ │ ├── file1.png │ │ │ ├── file3.png │ │ │ ├── file4.png │ │ │ ├── idle.anim │ │ │ ├── idle.dae │ │ │ ├── idle.geo │ │ │ ├── idle.scene.xml │ │ │ ├── impact.anim │ │ │ ├── impact.dae │ │ │ ├── knight.fbm │ │ │ │ ├── Guard_03__diffuse.png │ │ │ │ ├── Guard_03__normal.png │ │ │ │ └── Guard_03__specular.png │ │ │ ├── run.anim │ │ │ ├── run.dae │ │ │ ├── slash.anim │ │ │ ├── slash.dae │ │ │ ├── spin.anim │ │ │ ├── spin.dae │ │ │ ├── sword.dae │ │ │ ├── sword.fbm │ │ │ │ ├── Paladin_diffuse.png │ │ │ │ ├── Paladin_normal.png │ │ │ │ └── Paladin_specular.png │ │ │ ├── sword.geo │ │ │ ├── sword.scene.xml │ │ │ ├── sword_aligned.dae │ │ │ ├── sword_aligned.geo │ │ │ ├── sword_aligned.scene.xml │ │ │ ├── walk.anim │ │ │ └── walk.dae │ │ └── Links.txt │ ├── Sound │ │ ├── singing.wav │ │ ├── wave.mp3 │ │ ├── zombie-death.mp3 │ │ └── zombie-hit.wav │ └── Week10 │ │ ├── Enemy.geo │ │ ├── Enemy.material.xml │ │ ├── Enemy.scene.xml │ │ ├── Ground.geo │ │ ├── Ground.material.xml │ │ ├── Ground.scene.xml │ │ ├── Player.dae │ │ ├── Player.geo │ │ ├── Player.material.xml │ │ ├── Player.scene.xml │ │ ├── RoundedCube.dae │ │ ├── RoundedCube.geo │ │ ├── RoundedCube.scene.xml │ │ └── lambert1.material.xml │ ├── SkeletonLevel │ ├── SkeletonLevel.cpp │ └── SkeletonLevel.h │ ├── Week10MiniGame │ ├── W10GameManager.cpp │ ├── W10GameManager.h │ ├── W10NetworkManager.cpp │ ├── W10NetworkManager.h │ ├── W10NetworkPlayer.cpp │ ├── W10NetworkPlayer.h │ ├── W10Player.cpp │ ├── W10Player.h │ ├── W10UIManager.cpp │ ├── W10UIManager.h │ ├── Week10Level.cpp │ └── Week10Level.h │ ├── WindowLevel │ ├── WindowLevel.cpp │ └── WindowLevel.h │ ├── config.cfg │ ├── cpp.hint │ ├── main.cpp │ ├── pch.cpp │ └── pch.h ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | Isetta/External/* linguist-vendored=true 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Isetta/External/brofiler"] 2 | path = Isetta/External/brofiler 3 | url = https://github.com/The-Engine-Process/brofiler.git 4 | branch = v1.1.2 5 | ignore = untracked 6 | [submodule "Isetta/External/Horde3D"] 7 | path = Isetta/External/Horde3D 8 | url = https://github.com/horde3d/Horde3D.git 9 | ignore = untracked 10 | [submodule "Isetta/External/GLFW"] 11 | path = Isetta/External/GLFW 12 | url = https://github.com/glfw/glfw.git 13 | ignore = dirty 14 | [submodule "Isetta/External/yojimbo"] 15 | path = Isetta/External/yojimbo 16 | url = https://github.com/Isetta-Team/yojimbo.git 17 | ignore = untracked 18 | [submodule "Isetta/External/imgui"] 19 | path = Isetta/External/imgui 20 | url = https://github.com/Isetta-Team/imgui.git 21 | -------------------------------------------------------------------------------- /ArchitectureDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/ArchitectureDiagram.png -------------------------------------------------------------------------------- /BuildAndExportEngine.bat: -------------------------------------------------------------------------------- 1 | set engine_path=. 2 | set game_path=../Isetta-Game 3 | 4 | REM Reset our local files to the develop branch's HEAD 5 | git -C %engine_path% reset --hard 6 | git -C %engine_path% checkout develop 7 | git -C %engine_path% pull 8 | 9 | REM Set some helpful variables for later 10 | set git_commit_id=git -C %engine_path% rev-parse --short HEAD 11 | set VisualStudioPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE" 12 | set PATH=%PATH%;%VisualStudioPath% 13 | 14 | REM Reset our game to the develop branch as well 15 | git -C %game_path% reset --hard 16 | git -C %game_path% checkout develop 17 | git -C %game_path% pull 18 | 19 | REM Build all of the engine DLLs 20 | devenv %engine_path%\Isetta\Isetta.sln /Project %engine_path%\Isetta\IsettaEngine\IsettaEngine.vcxproj /Rebuild "Debug DLL|x64" 21 | devenv %engine_path%\Isetta\Isetta.sln /Project %engine_path%\Isetta\IsettaEngine\IsettaEngine.vcxproj /Rebuild "Release DLL|x64" 22 | devenv %engine_path%\Isetta\Isetta.sln /Project %engine_path%\Isetta\IsettaEngine\IsettaEngine.vcxproj /Rebuild "ReleaseEditor DLL|x64" 23 | 24 | REM If any builds fail, we escape 25 | if NOT %errorlevel% == 0 ( 26 | exit /b %errorlevel% 27 | ) 28 | 29 | REM Run the ExportHeaders batch file 30 | call %engine_path%\ExportHeaders.bat NoStop 31 | 32 | REM Copy all of the Includes and Engine files over to our game directory 33 | xcopy Includes %game_path%\TwinStickGame\Engine /s /y /I 34 | 35 | REM Push up the changed files to develop 36 | git -C %game_path% add * 37 | git -C %game_path% commit -m "%git_commit_id%" 38 | git -C %game_path% push 39 | 40 | pause -------------------------------------------------------------------------------- /Dependency.bat: -------------------------------------------------------------------------------- 1 | set VisualStudioPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE" 2 | 3 | cd Isetta\External\GLFW 4 | set GLFW=%cd% 5 | mkdir Build 6 | cd Build 7 | 8 | cmake ^ 9 | -G "Visual Studio 15 2017 Win64" ^ 10 | .. 11 | 12 | set PATH=%PATH%;%VisualStudioPath% 13 | devenv GLFW.sln /Build "Debug|x64" 14 | devenv GLFW.sln /Build "Release|x64" 15 | 16 | cd ..\.. 17 | cd Horde3D 18 | mkdir Build 19 | cd Build 20 | 21 | cmake ^ 22 | -G "Visual Studio 15 2017 Win64" ^ 23 | -DGLFW_INCLUDE_DIR=%GLFW%/include ^ 24 | -DGLFW_LIBRARY_PATH=%GLFW%/Build/src/Release/glfw3.lib ^ 25 | -DHORDE_BUILD_EXAMPLES=OFF ^ 26 | .. 27 | 28 | devenv Horde3D.sln /Build "Debug|x64" 29 | devenv Horde3D.sln /Build "Release|x64" 30 | 31 | pause -------------------------------------------------------------------------------- /Isetta/ColladaConverter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/ColladaConverter.exe -------------------------------------------------------------------------------- /Isetta/ConfigEditor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/ConfigEditor.exe -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/fmod64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/fmod64.dll -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/fmod64_vc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/fmod64_vc.lib -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/fmodL64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/fmodL64.dll -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/fmodL64_vc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/fmodL64_vc.lib -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/libfmod.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/libfmod.a -------------------------------------------------------------------------------- /Isetta/External/FMOD/lib/libfmodL.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/External/FMOD/lib/libfmodL.a -------------------------------------------------------------------------------- /Isetta/Horde3D_ColladaConverter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/Horde3D_ColladaConverter.exe -------------------------------------------------------------------------------- /Isetta/IsettaEngine/AI/Nav2DAgent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Math/Vector2.h" 6 | #include "Nav2DPlane.h" 7 | #include "Scene/Component.h" 8 | #include "Core/DataStructures/Delegate.h" 9 | 10 | namespace Isetta { 11 | DEFINE_COMPONENT(Nav2DAgent, Component, true) 12 | Math::Vector2 velocity; 13 | Math::Vector2 linear; 14 | Nav2DPlane* navPlane; 15 | 16 | void UpdateSteeringData(Math::Vector2 position, float distance); 17 | 18 | float maxAcceleration = 2; 19 | float maxVelocity = 2; 20 | float timeToTarget = 0.1f; 21 | float stopDistance = 0.5f; 22 | float maxAcceleration2 = 4; 23 | float maxVelocity2 = 4; 24 | Math::Vector2 GetAIMovement(float deltaTime); 25 | 26 | public: 27 | explicit Nav2DAgent(Nav2DPlane* plane, float maxAcc = 2.f, float maxV = 2.f, float timeToTarget = 0.1f, float arriving = 0.5f); 28 | Math::Vector2 GetAIMovement(Math::Vector2 agentPosition, 29 | float deltaTime); 30 | Delegate onTargetArrive; 31 | DEFINE_COMPONENT_END(Nav2DAgent, Component) 32 | } // namespace Isetta 33 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/AI/Nav2DObstacle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/DataStructures/Array.h" 6 | #include "ISETTA_API.h" 7 | 8 | namespace Isetta::Math { 9 | class Vector2; 10 | class Rect; 11 | } // namespace Isetta::Math 12 | 13 | namespace Isetta { 14 | struct ISETTA_API Nav2DObstacle { 15 | Array points; 16 | Nav2DObstacle() = default; 17 | explicit Nav2DObstacle(const Array& points); 18 | 19 | static Nav2DObstacle Rectangle(const Math::Rect& rectangle); 20 | static Nav2DObstacle Circle(const Math::Vector2& position, float radius, 21 | float angleOffset = 0, int segments = 12); 22 | 23 | #ifdef _EDITOR 24 | void DebugDraw() const; 25 | #endif 26 | 27 | // TODO(all): Add obstacles as cross-sections of colliders (either maximum 28 | // area or cross section intersecting nav plane) 29 | // Nav2DObstacle(const class BoxCollider& collider, bool useYPos = false); 30 | // Nav2DObstacle(const class SphereCollider& collider, int segments = 12, 31 | // bool useYPos = false); 32 | // Nav2DObstacle(const class CapsuleCollider& collider, int segments = 12, 33 | // bool useYPos = false); 34 | }; 35 | } // namespace Isetta 36 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Application.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #include "Application.h" 6 | #include "EngineLoop.h" 7 | 8 | namespace Isetta { 9 | 10 | void Application::Start() { 11 | if (EngineLoop::Instance().isGameRunning) { 12 | throw std::exception( 13 | "Cannot start engine after it has already been started!"); 14 | } 15 | EngineLoop::Instance().Run(); 16 | } 17 | 18 | void Application::Exit() { EngineLoop::Instance().isGameRunning = false; } 19 | 20 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Application.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #include "ISETTA_API.h" 7 | 8 | namespace Isetta { 9 | 10 | class ISETTA_API Application { 11 | public: 12 | /** 13 | * \brief Start the game. Should be called in your main.cpp 14 | */ 15 | static void Start(); 16 | /** 17 | * \brief Exit the game, can be called anywhere 18 | */ 19 | static void Exit(); 20 | }; 21 | 22 | } // namespace Isetta 23 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Audio/AudioClip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include 7 | #include "ISETTA_API.h" 8 | 9 | namespace FMOD { 10 | class Sound; 11 | } 12 | class StringId; 13 | 14 | namespace Isetta { 15 | class ISETTA_API AudioClip { 16 | public: 17 | ~AudioClip(); 18 | 19 | /** 20 | * @brief Load the AudioClip 21 | * 22 | * @param filePath under the resource_path where audio located 23 | * @param soundName user defined name for easy access, defaults to filepath 24 | * @return AudioClip* AudioClip that is loaded 25 | */ 26 | static AudioClip* Load(const std::string_view filePath, 27 | const std::string_view soundName = ""); 28 | /** 29 | * @brief Finds the AudioClip by name 30 | * 31 | * @param name of the AudioClip (user defined name on load) 32 | * @return AudioClip* AudioClip associated with name or nullptr 33 | */ 34 | static AudioClip* Find(const std::string_view name); 35 | 36 | private: 37 | explicit AudioClip(std::string_view filePath, std::string_view name); 38 | static void UnloadAll(); 39 | 40 | std::string filePath, name; 41 | FMOD::Sound* fmodSound{}; 42 | 43 | static class AudioModule* audioModule; 44 | static std::unordered_map clips; 45 | 46 | friend class AudioModule; 47 | friend class AudioSource; 48 | friend class FreeListAllocator; 49 | }; 50 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Audio/AudioListener.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "AudioListener.h" 5 | 6 | #include "AudioModule.h" 7 | #include "Core/Debug/DebugDraw.h" 8 | #include "Scene/Transform.h" 9 | 10 | namespace Isetta { 11 | void AudioListener::OnEnable() { audioModule->listeners.push_back(this); } 12 | void AudioListener::OnDisable() { audioModule->listeners.remove(this); } 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Audio/AudioListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Component.h" 6 | 7 | namespace Isetta { 8 | DEFINE_COMPONENT(AudioListener, Component, true) 9 | private: 10 | inline static class AudioModule* audioModule; 11 | friend class AudioModule; 12 | 13 | public: 14 | void OnEnable() override; 15 | void OnDisable() override; 16 | DEFINE_COMPONENT_END(AudioListener, Component); 17 | } // namespace Isetta 18 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Collisions/Collider.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Collisions/Collider.h" 5 | #include "Collisions/CollisionHandler.h" 6 | #include "Collisions/CollisionsModule.h" 7 | 8 | #include "Collisions/RaycastHit.h" 9 | #include "Core/Geometry/Ray.h" 10 | #include "Scene/Entity.h" 11 | 12 | namespace Isetta { 13 | CollisionsModule* Collider::collisionsModule{nullptr}; 14 | 15 | void Collider::Start() { 16 | if (!handler) FindHandler(); 17 | } 18 | 19 | void Collider::OnEnable() { 20 | collisionsModule->bvTree.AddCollider(this); 21 | // TODO(Yidi) + TODO(Jacob) 22 | // hierarchyHandle = 23 | // entity->OnHierarchyChange.Register(std::bind(&Collider::FindHandler,this)); 24 | } 25 | 26 | void Collider::OnDisable() { 27 | collisionsModule->bvTree.RemoveCollider(this); 28 | // TODO(Yidi) + TODO(Jacob) 29 | // entity->OnHierarchyChange.Unregister(hierarchyHandle); 30 | } 31 | void Collider::FindHandler() { 32 | handler = entity->GetComponent(); 33 | Transform* parent = transform->GetParent(); 34 | while (parent && !handler) { 35 | handler = parent->entity->GetComponent(); 36 | parent = parent->GetParent(); 37 | } 38 | } 39 | void Collider::RaycastHitCtor(RaycastHit* const hitInfo, const float distance, 40 | const Math::Vector3& point, 41 | const Math::Vector3& normal) { 42 | *hitInfo = RaycastHit{this, distance, point, normal.Normalized()}; 43 | } 44 | } // namespace Isetta 45 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Collisions/CollisionSolverModule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #include "Collisions/CollisionUtil.h" 7 | #include "Scene/Layers.h" 8 | 9 | namespace Isetta { 10 | class CollisionSolverModule { 11 | public: 12 | struct Collision { 13 | Math::Vector3 hitPoint = Math::Vector3::zero; 14 | Math::Vector3 pushDir = Math::Vector3::forward; 15 | bool onEdge = false; 16 | }; 17 | 18 | private: 19 | CollisionSolverModule() = default; 20 | ~CollisionSolverModule() = default; 21 | 22 | Collision Solve(Collider* collider, Collider* other); 23 | Math::Vector3 Resolve(Collider* collider1, Collision collision1, 24 | Collider* collider2, Collision collision2); 25 | 26 | void StartUp(); 27 | void Update(); 28 | void ShutDown(); 29 | 30 | const float EPS = 1e-6; 31 | 32 | static class CollisionsModule* collisionsModule; 33 | 34 | friend class EngineLoop; 35 | friend class CollisionsModule; 36 | friend class StackAllocator; 37 | }; 38 | } // namespace Isetta 39 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Collisions/CollisionUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Collisions/Collider.h" 4 | #include "Util.h" 5 | 6 | namespace Isetta::CollisionUtil { 7 | using CollisionPair = std::pair; 8 | using ColliderPairSet = 9 | std::unordered_set; 11 | } // namespace Isetta::CollisionUtil 12 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Collisions/Collisions.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Collisions/Collisions.h" 5 | 6 | #include "Collisions/CollisionsModule.h" 7 | #include "Collisions/RaycastHit.h" 8 | 9 | namespace Isetta { 10 | CollisionsModule *Collisions::collisionsModule{nullptr}; 11 | 12 | bool Collisions::Raycast(const Ray &ray, RaycastHit *const hitInfo, 13 | float maxDistance) { 14 | return collisionsModule->Raycast(ray, hitInfo, maxDistance); 15 | } 16 | Array Collisions::RaycastAll(const Ray &ray, float maxDistance) { 17 | return collisionsModule->RaycastAll(ray, maxDistance); 18 | } 19 | 20 | bool Collisions::GetIgnoreLayerCollision(int layer1, int layer2) { 21 | return collisionsModule->GetIgnoreLayerCollision(layer1, layer2); 22 | } 23 | void Collisions::SetIgnoreLayerCollision(int layer1, int layer2, 24 | bool ignoreLayer) { 25 | collisionsModule->SetIgnoreLayerCollision(layer1, layer2, ignoreLayer); 26 | } 27 | 28 | void Collisions::SetIgnoreCollisions(Collider *const a, Collider *const b, 29 | bool ignore) { 30 | if (ignore) { 31 | collisionsModule->ignoreColliderPairs.insert({a, b}); 32 | } else { 33 | collisionsModule->ignoreColliderPairs.erase({a, b}); 34 | } 35 | } 36 | bool Collisions::GetIgnoreCollisions(Collider *const a, Collider *const b) { 37 | return collisionsModule->ignoreColliderPairs.find({a, b}) != 38 | collisionsModule->ignoreColliderPairs.end(); 39 | } 40 | } // namespace Isetta 41 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/AxisDrawer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Components/AxisDrawer.h" 5 | #include "Core/Debug/DebugDraw.h" 6 | #include "Scene/Transform.h" 7 | 8 | namespace Isetta { 9 | #ifdef _EDITOR 10 | void AxisDrawer::Update() { 11 | // draw the x-y-z axes at the entity's worldPos 12 | DebugDraw::Axis(transform->GetLocalToWorldMatrix()); 13 | } 14 | #endif 15 | } // namespace Isetta 16 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/AxisDrawer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Component.h" 6 | 7 | namespace Isetta { 8 | /** 9 | * @brief Draws local axis which are hidden without _EDITOR 10 | * 11 | */ 12 | DEFINE_COMPONENT(AxisDrawer, Component, false) 13 | public: 14 | #ifdef _EDITOR 15 | void Update() override; 16 | #endif 17 | DEFINE_COMPONENT_END(AxisDrawer, Component) 18 | } // namespace Isetta 19 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/Editor/EditorComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/IsettaAlias.h" 6 | #include "Scene/Component.h" 7 | 8 | namespace Isetta { 9 | /** 10 | * @brief EditorComponent contains other editor windows including: Console, 11 | * FrameReporter, Hierarchy, and Inspector 12 | * ALT + SHIFT + M: Toggles open menu bar (can also open the other windows) 13 | * ALT + SHIFT + C: Toggles open console 14 | * ALT + SHIFT + H: Toggles open hierarchy 15 | * ALT + SHIFT + I: Toggles open inspector 16 | * ALT + SHIFT + F: Toggles open frame reporter 17 | * 18 | */ 19 | DEFINE_COMPONENT(EditorComponent, Component, false) 20 | #ifdef _EDITOR 21 | private: 22 | class Console* console; 23 | class Inspector* inspector; 24 | class Hierarchy* hierarchy; 25 | class FrameReporter* frameReporter; 26 | 27 | U64 menuHandle, consoleHandle, inspectorHandle, hierarchyHandle, 28 | frameReporterHandle; 29 | bool isOpen, menuOpen{true}; 30 | 31 | void OnDisable() override; 32 | void GuiUpdate() override; 33 | 34 | public: 35 | EditorComponent() = default; 36 | 37 | void Awake() override; 38 | void OnEnable() override; 39 | #endif 40 | DEFINE_COMPONENT_END(EditorComponent, Component) 41 | } // namespace Isetta 42 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/Editor/FrameReporter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/IsettaAlias.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | /** 11 | * @brief FrameReporter reports FPS, frame time, last frame time, and average 12 | * frame time 13 | * 14 | */ 15 | DEFINE_COMPONENT(FrameReporter, Component, false) 16 | #ifdef _EDITOR 17 | public: 18 | void GuiUpdate() override; 19 | void Open(); 20 | 21 | private: 22 | int reportInterval{20}; 23 | int count{0}; 24 | float fps{}; 25 | float frameTime{}; 26 | 27 | float timeSumForAvg{0.f}; 28 | Size frameCountForAvg{60}; 29 | std::queue frameDurations; 30 | 31 | bool isOpen{false}; 32 | #endif 33 | DEFINE_COMPONENT_END(FrameReporter, Component) 34 | } // namespace Isetta 35 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/Editor/Hierarchy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Graphics/RectTransform.h" 6 | #include "Scene/Component.h" 7 | 8 | namespace Isetta { 9 | /** 10 | * @brief Hierarchy displays the scene hierarchy (parents/children) of level, 11 | * can select entities to open inspector (if one is attached) 12 | * 13 | */ 14 | DEFINE_COMPONENT(Hierarchy, Component, false) 15 | #ifdef _EDITOR 16 | private: 17 | std::string title; 18 | bool isOpen = true; 19 | RectTransform rectTransform{{30, 30, 160, 300}}; 20 | 21 | public: 22 | /** 23 | * @brief Inspector to open on entity select 24 | * 25 | */ 26 | class Inspector* inspector; 27 | 28 | /** 29 | * @brief Hierarchy of the scene 30 | * 31 | * @param title of the window 32 | * @param isOpen whether the window starts as open 33 | * @param inspector to attach when entity selected 34 | */ 35 | Hierarchy(std::string title, bool isOpen, class Inspector* inspector = nullptr); 36 | void GuiUpdate() override; 37 | 38 | void Open(); 39 | #endif 40 | DEFINE_COMPONENT_END(Hierarchy, Component) 41 | } // namespace Isetta 42 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/Editor/Inspector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Graphics/RectTransform.h" 6 | #include "Scene/Component.h" 7 | 8 | namespace Isetta { 9 | /** 10 | * @brief Inspector shows debug information of selected transform including: 11 | * transformational information (position/rotation/scale), components, entity 12 | * information 13 | * 14 | */ 15 | DEFINE_COMPONENT(Inspector, Component, false) 16 | #ifdef _EDITOR 17 | public: 18 | /** 19 | * @brief Transform debug information is about 20 | * 21 | */ 22 | class Transform* target; 23 | 24 | /** 25 | * @brief Construct a new Inspector object 26 | * 27 | * @param title of the window 28 | * @param isOpen whether starts open 29 | * @param target transformation to display information 30 | */ 31 | Inspector(std::string title, bool isOpen, bool isStatic = false, 32 | class Transform* target = nullptr); 33 | void GuiUpdate() override; 34 | 35 | void Open(); 36 | bool IsSelected(const Transform* const transform) const; 37 | void SetAsInstance(bool isStatic = true); 38 | 39 | static const Inspector* Instance(); 40 | 41 | private: 42 | std::string title; 43 | bool isOpen = true; 44 | static Inspector* instance; 45 | RectTransform rectTransform{{30, 300, 350, 300}}; 46 | #endif 47 | DEFINE_COMPONENT_END(Inspector, Component) 48 | } // namespace Isetta 49 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/Editor/NetworkMonitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Component.h" 6 | 7 | namespace Isetta { 8 | /** 9 | * @brief Network monitor interface window for displaying useful networking 10 | * information 11 | * 12 | */ 13 | DEFINE_COMPONENT(NetworkMonitor, Component, false) 14 | #ifdef _EDITOR 15 | public: 16 | void GuiUpdate() override; 17 | #endif 18 | DEFINE_COMPONENT_END(NetworkMonitor, Component) 19 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/FlyController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Math/Vector2.h" 6 | #include "ISETTA_API.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | /** 11 | * @brief Controls an object with typical first person shooter controls and 12 | * slight variations 13 | * 14 | * F: Toggle enabling the mouse to affect look direction 15 | * CTRL + KP_0: Reset entity to origin 16 | * SCROLL: Up scroll increases speed/down scroll speed with SHIFT 17 | * LEFT_SHIFT: increases speed of movement 18 | * W: move in local forward direction 19 | * A: move in local left direction 20 | * S: move in local back direction 21 | * D: move in local right direction 22 | * Q: move in local down direction 23 | * E: move in local up direction 24 | */ 25 | DEFINE_COMPONENT(FlyController, Component, false) 26 | public: 27 | FlyController() = default; 28 | /** 29 | * @brief Construct a new Fly Controller object 30 | * 31 | * @param enableLook with mouse (moving mouse control look direction) 32 | */ 33 | FlyController(bool enableLook); 34 | 35 | void OnEnable() override; 36 | void Update() override; 37 | 38 | private: 39 | Math::Vector2 lastFrameMousePos; 40 | float rotX{}; 41 | float rotY{}; 42 | float lookRotationSpeed{-0.1f}; 43 | float flySpeed = 15.f; 44 | float flySpeedMultiplier = 2.0f; 45 | bool enableLook = true; 46 | DEFINE_COMPONENT_END(FlyController, Component) 47 | } // namespace Isetta 48 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/GridComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Components/GridComponent.h" 5 | 6 | #include "Core/Debug/DebugDraw.h" 7 | 8 | namespace Isetta { 9 | #ifdef _EDITOR 10 | void GridComponent::Update() { 11 | // draw a grid and axis at origin 12 | DebugDraw::Grid(); 13 | DebugDraw::Axis(); 14 | } 15 | #endif 16 | } // namespace Isetta 17 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/GridComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Math/Vector2.h" 6 | #include "ISETTA_API.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | /** 11 | * @brief Draws a debug grid and axis at the origin to help orient, hidden 12 | * without _EDITOR 13 | * 14 | */ 15 | DEFINE_COMPONENT(GridComponent, Component, false) 16 | public: 17 | #ifdef _EDITOR 18 | void Update() override; 19 | #endif 20 | DEFINE_COMPONENT_END(GridComponent, Component) 21 | } // namespace Isetta 22 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/JointFollow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "JointFollow.h" 5 | 6 | #include "Graphics/MeshComponent.h" 7 | #include "Scene/Transform.h" 8 | #ifdef _EDITOR 9 | #include "Components/Editor/Inspector.h" 10 | #include "Graphics/GUI.h" 11 | #include "Graphics/RectTransform.h" 12 | #endif 13 | 14 | namespace Isetta { 15 | void JointFollow::Update() { 16 | if (!follow) return; 17 | auto [pos, rot] = follow->GetJointWorldTransform(jointName); 18 | transform->SetWorldPos(pos + posOffset); 19 | transform->SetWorldRot(rot); 20 | transform->RotateWorld(rotOffset); 21 | } 22 | 23 | #ifdef _EDITOR 24 | void JointFollow::GuiUpdate() { 25 | const Inspector* const inspector = Inspector::Instance(); 26 | if (!inspector || !inspector->IsSelected(transform)) return; 27 | 28 | static RectTransform rect{Math::Rect{10, 10, 350, 100}, GUI::Pivot::Left}; 29 | GUI::Window(rect, "Joint Follow", [&]() { 30 | RectTransform local{{10, 10, 0, 0}}; 31 | GUI::InputVector3(local, "Position Offset", &posOffset); 32 | local.rect.y += 25; 33 | GUI::InputVector3(local, "Rotation Offset", &rotOffset); 34 | }); 35 | } 36 | #endif 37 | } // namespace Isetta 38 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/JointFollow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/Math/Vector3.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | DEFINE_COMPONENT(JointFollow, Component, false) 11 | private: 12 | class MeshComponent* const follow; 13 | std::string jointName; 14 | Math::Vector3 posOffset, rotOffset; 15 | 16 | public: 17 | JointFollow() = default; 18 | JointFollow(MeshComponent* follow, const std::string_view jointName) 19 | : follow{follow}, jointName{jointName} {} 20 | JointFollow(MeshComponent* follow, const std::string_view jointName, 21 | const Math::Vector3& posOffset, const Math::Vector3& rotOffset) 22 | : follow{follow}, 23 | jointName{jointName}, 24 | posOffset{posOffset}, 25 | rotOffset{rotOffset} {} 26 | 27 | void Update() override; 28 | #ifdef _EDITOR 29 | void GuiUpdate() override; 30 | void Open(); 31 | #endif 32 | DEFINE_COMPONENT_END(JointFollow, Component) 33 | } // namespace Isetta 34 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Components/PauseComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Color.h" 6 | #include "Scene/Component.h" 7 | 8 | namespace Isetta { 9 | /** 10 | * @brief NOT DONE 11 | * ----- IN DEVELOPMENT ----- 12 | * 13 | */ 14 | BEGIN_COMPONENT(PauseComponent, Component, true) 15 | private: 16 | bool pause; 17 | Color border = Color::blue; 18 | int handle; 19 | 20 | public: 21 | void OnEnable() override; 22 | void OnDisable() override; 23 | void GuiUpdate() override; 24 | void Update() override; 25 | 26 | void PauseGame() { pause = !pause; } 27 | END_COMPONENT(PauseComponent, Component) 28 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Config/CVar.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/Config/CVar.h" 5 | 6 | #include 7 | #include "Core/Config/CVarRegistry.h" 8 | #include "Core/DataStructures/Array.h" 9 | 10 | namespace Isetta { 11 | // added explicit declarations so they can export correctly 12 | template class ISETTA_API CVar; 13 | 14 | std::unordered_map CVarRegistry::registry; 15 | std::vector CVarRegistry::keys; 16 | 17 | CVarString::CVarString(const std::string& name, 18 | const std::string_view defaultValue) 19 | : ICVar(name), sVal{defaultValue} { 20 | CVarRegistry::RegisterVariable(this); 21 | } 22 | 23 | CVarString::CVarString(const std::string_view name) : ICVar(name) { 24 | CVarRegistry::RegisterVariable(this); 25 | } 26 | 27 | CVarVector3::CVarVector3(const std::string_view name, 28 | const Math::Vector3& defaultValue) 29 | : ICVar(name), v3Val{defaultValue} { 30 | CVarRegistry::RegisterVariable(this); 31 | } 32 | 33 | CVarVector3::CVarVector3(const std::string_view name) : ICVar(name) { 34 | CVarRegistry::RegisterVariable(this); 35 | } 36 | } // namespace Isetta 37 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Config/ICVar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include "ISETTA_API.h" 9 | #include "SID/sid.h" 10 | 11 | namespace Isetta { 12 | /** 13 | * @brief Base class of console variables 14 | * 15 | */ 16 | class ISETTA_API ICVar { 17 | public: 18 | /// Key name of CVar 19 | const std::string name; 20 | /// StringId of CVar 21 | const StringId nameID; 22 | 23 | /** 24 | * @brief Set the Val object, abstract 25 | * 26 | * @param strVal convert from this string 27 | */ 28 | virtual void SetVal(const std::string_view strVal) = 0; 29 | // virtual StringId GetType() const { return typeID; } 30 | 31 | protected: 32 | // const StringId typeID; 33 | /** 34 | * @brief Construct a new ICVar object, cannot publicly create ICVar 35 | * 36 | * @param name 37 | */ 38 | explicit ICVar(std::string_view name) 39 | : name{name}, nameID{SID(name.data())} {} 40 | /** 41 | * @brief Destroy the ICVar object, cannot instance ICVar 42 | * 43 | */ 44 | virtual ~ICVar() {} 45 | }; 46 | } // namespace Isetta 47 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/AVLTree.cpp: -------------------------------------------------------------------------------- 1 | #include "Core/DataStructures/AVLTree.h" 2 | 3 | namespace Isetta { 4 | template 5 | AVLTree::AVLTree() { 6 | root = nullptr; 7 | } 8 | template 9 | void AVLTree::Test(T a) {} 10 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/Delegate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Delegate.h" 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/HandleBin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #pragma once 6 | 7 | #include "Core/IsettaAlias.h" 8 | #include "ISETTA_API.h" 9 | 10 | #include 11 | 12 | namespace Isetta { 13 | 14 | class ISETTA_API HandleBin { 15 | private: 16 | std::set handles; 17 | U64 topHandle; 18 | U64 maxHandle; 19 | 20 | public: 21 | HandleBin(); 22 | HandleBin(U64 start); 23 | HandleBin(U64 start, U64 max); 24 | 25 | U64 GetHandle(); 26 | void ReturnHandle(U64 handle); 27 | bool RemoveHandle(U64 handle); 28 | void Clear(); 29 | }; 30 | 31 | } // namespace Isetta 32 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/Plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Math/Vector3.h" 6 | 7 | namespace Isetta { 8 | struct Plane { 9 | Math::Vector3 position, direction; 10 | }; 11 | struct Ray { 12 | Math::Vector3 position, direction; 13 | }; 14 | } // namespace Isetta 15 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/RingBuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Core/DataStructures/RingBuffer.h" 2 | 3 | namespace Isetta {} // namespace Isetta 4 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/DataStructures/Trie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Memory/MemoryManager.h" 6 | 7 | namespace Isetta { 8 | template 9 | class Array; 10 | 11 | class Trie { 12 | public: 13 | struct Node { 14 | static const int ASCII_CHAR_SET = 128; 15 | struct Node* children[ASCII_CHAR_SET]; 16 | bool isWord; 17 | 18 | Node(); 19 | ~Node(); 20 | 21 | Node(const Node& inNode); 22 | Node(Node&& inNode); 23 | Node& operator=(const Node& inNode); 24 | Node& operator=(Node&& inNode) noexcept; 25 | 26 | private: 27 | Node* Copy(const Node* const node); 28 | 29 | friend Trie; 30 | }; 31 | 32 | private: 33 | Node* root{nullptr}; 34 | int wordCnt{0}, depth{0}; 35 | 36 | Node* NewNode(); 37 | void GetWordsUtil(Node* const node, Array* const words, 38 | char* const word, int pos) const; 39 | 40 | public: 41 | Trie(); 42 | ~Trie(); 43 | 44 | Trie(const Trie& inTrie); 45 | Trie(Trie&& inTrie) noexcept; 46 | Trie& operator=(const Trie& inTrie); 47 | Trie& operator=(Trie&& inTrie); 48 | 49 | explicit Trie(const Array& vec); 50 | 51 | void Insert(const std::string_view& key); 52 | Node* Find(const std::string_view& key); 53 | bool Contains(const std::string_view& key); 54 | bool HasPrefix(const std::string_view& key); 55 | Array GetWords() const; 56 | }; 57 | 58 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Debug/Assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Debug/Logger.h" 6 | 7 | #ifdef _DEBUG 8 | /** 9 | * @brief ASSERT must evaluate to true otherwise will break 10 | * 11 | */ 12 | #define ASSERT(expr) \ 13 | if (expr) { \ 14 | } else { \ 15 | __debugbreak(); \ 16 | } 17 | 18 | /** 19 | * @brief ASSERT_LOG must evaluate to true otherwise will log error and break 20 | * 21 | */ 22 | #define ASSERT_LOG(expr, channel, msg) \ 23 | if (expr) { \ 24 | } else { \ 25 | LOG_ERROR(channel, msg); \ 26 | __debugbreak(); \ 27 | } 28 | #else 29 | #define ASSERT(expr) ((void)0) 30 | #define ASSERT_LOG(expr) \ 31 | if (expr) { \ 32 | } else { \ 33 | LOG_ERROR(channel, msg); \ 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/EngineResource.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/EngineResource.h" 5 | 6 | std::string Isetta::EngineResource::defaultLightMat = "lights/light.material.xml"; 7 | std::string Isetta::EngineResource::defaultParticle = "particles/particleSys1/particleSys1.scene.xml"; -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/EngineResource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | 7 | namespace Isetta { 8 | struct EngineResource { 9 | static std::string defaultLightMat; 10 | static std::string defaultParticle; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Geometry/Plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/Math/Vector3.h" 6 | 7 | namespace Isetta { 8 | class Plane { 9 | private: 10 | Math::Vector3 normal; 11 | float distance; 12 | 13 | public: 14 | Plane(const Math::Vector3& normal, const Math::Vector3& point) 15 | : normal{normal.Normalized()}, distance{point.Magnitude()} {} 16 | Plane(const Math::Vector3& normal, float distance) 17 | : normal{normal.Normalized()}, distance{distance} {} 18 | Plane(const Math::Vector3& a, const Math::Vector3& b, const Math::Vector3& c); 19 | 20 | inline Math::Vector3 GetNormal() const { return normal; } 21 | inline float GetDistance() const { return distance; } 22 | inline void Flip() { normal *= -1; } 23 | 24 | void SetPoints(const Math::Vector3& a, const Math::Vector3& b, 25 | const Math::Vector3& c); 26 | void SetNormalPosition(const Math::Vector3& inNormal, 27 | const Math::Vector3& point); 28 | 29 | Math::Vector3 ClosestPointOnPlane(const Math::Vector3& point); 30 | float GetDistanceToPoint(const Math::Vector3& point); 31 | int GetSide(const Math::Vector3& point); 32 | bool SameSide(const Math::Vector3& pt0, const Math::Vector3& pt1); 33 | bool Raycast(const class Ray& ray, class RaycastHit* const hitInfo, 34 | float maxDistance = 0); 35 | }; 36 | } // namespace Isetta 37 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/IsettaAlias.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Isetta { 10 | using Byte = uint8_t; 11 | using Size = size_t; 12 | 13 | using U8 = uint8_t; 14 | using U16 = uint16_t; 15 | using U32 = uint32_t; 16 | using U64 = uint64_t; 17 | 18 | constexpr U8 U8_MAX = 0xFF; 19 | constexpr U16 U16_MAX = 0xFFFF; 20 | constexpr U32 U32_MAX = 0xFFFFFFFF; 21 | constexpr U64 U64_MAX = 0xFFFFFFFFFFFFFFFF; 22 | 23 | using I8 = int8_t; 24 | using I16 = int16_t; 25 | using I32 = int32_t; 26 | using I64 = int64_t; 27 | 28 | using PtrDiff = std::ptrdiff_t; 29 | using PtrInt = uintptr_t; 30 | 31 | template 32 | using Action = std::function; 33 | 34 | template 35 | using Func = std::function; 36 | 37 | inline auto operator""_KB(Size const x) { return 1024 * x; } 38 | inline auto operator""_MB(Size const x) { return 1024 * 1024 * x; } 39 | inline auto operator""_GB(Size const x) { return 1024 * 1024 * 1024 * x; } 40 | 41 | } // namespace Isetta 42 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/IsettaCore.h: -------------------------------------------------------------------------------- 1 | // collection of headers that are used very frequently 2 | 3 | #pragma once 4 | #include "Application.h" 5 | #include "Audio/AudioClip.h" 6 | #include "Audio/AudioListener.h" 7 | #include "Audio/AudioSource.h" 8 | #include "Core/Debug/DebugDraw.h" 9 | #include "Core/Debug/Logger.h" 10 | #include "Core/Math/Random.h" 11 | #include "Core/Time/Clock.h" 12 | #include "Core/Time/Time.h" 13 | #include "EngineLoop.h" 14 | #include "Graphics/AnimationComponent.h" 15 | #include "Graphics/CameraComponent.h" 16 | #include "Graphics/GUI.h" 17 | #include "Graphics/LightComponent.h" 18 | #include "Graphics/RectTransform.h" 19 | #include "Input/Input.h" 20 | #include "Scene/Entity.h" 21 | #include "Scene/Level.h" 22 | #include "Scene/LevelManager.h" 23 | #include "Scene/Transform.h" 24 | #include "Util.h" 25 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Math/Math.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Matrix3.h" 4 | #include "Matrix4.h" 5 | #include "Quaternion.h" 6 | #include "Random.h" 7 | #include "Rect.h" 8 | #include "Vector2.h" 9 | #include "Vector2Int.h" 10 | #include "Vector2.h" 11 | #include "Vector3.h" 12 | #include "Vector3Int.h" 13 | #include "Vector4.h" -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Math/Random.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/Math/Random.h" 5 | 6 | namespace Isetta::Math { 7 | RandomGeneratorInt Random::GetRandomGenerator(int start, int end) { 8 | return RandomGeneratorInt(start, end); 9 | } 10 | 11 | RandomGeneratorInt Random::GetRandomGenerator(int start, int end, int seed) { 12 | return RandomGeneratorInt(start, end, seed); 13 | } 14 | 15 | RandomGenerator Random::GetRandomGenerator(float start, float end) { 16 | return RandomGenerator(start, end); 17 | } 18 | 19 | RandomGenerator Random::GetRandomGenerator(float start, float end, int seed) { 20 | return RandomGenerator(start, end, seed); 21 | } 22 | 23 | float Random::GetRandom01() { return randomFloatGen.GetValue(); } 24 | 25 | RandomGenerator Random::randomFloatGen = RandomGenerator(0.f, 1.f); 26 | 27 | } // namespace Isetta::Math 28 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/DoubleBufferedAllocator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/Memory/DoubleBufferedAllocator.h" 5 | 6 | namespace Isetta { 7 | 8 | DoubleBufferedAllocator::DoubleBufferedAllocator(const Size size) 9 | : stacks{StackAllocator{size}, StackAllocator{size}}, curStackIndex(0) {} 10 | 11 | void* DoubleBufferedAllocator::Alloc(const Size size, const U8 alignment) { 12 | return stacks[curStackIndex].Alloc(size, alignment); 13 | } 14 | 15 | void DoubleBufferedAllocator::SwapBuffer() { curStackIndex = !curStackIndex; } 16 | 17 | void DoubleBufferedAllocator::ClearCurrentBuffer() { 18 | stacks[curStackIndex].Clear(); 19 | } 20 | 21 | } // namespace Isetta 22 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/MemUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/IsettaAlias.h" 6 | 7 | namespace Isetta { 8 | 9 | /** 10 | * \brief MemoryAllocator class provides some handy utilities for allocating and 11 | * freeing memory. This is only intended to be used by the programmer 12 | * responsible for maintaining memory management systems of this engine. 13 | */ 14 | class MemUtil { 15 | public: 16 | static const U8 ALIGNMENT = 16; 17 | static void CheckAlignment(U8 alignment); 18 | 19 | /** 20 | * \brief Allocate properly aligned memory. The adjusted size of memory is 21 | * stored as a head (1 byte to the left of the returned raw memory pointer) 22 | * 23 | * \param size Size in bytes 24 | * \param alignment Alignment requirement. Must be power of 2 and less than 25 | * 128 and >= 8 26 | * \return A raw pointer to the newly allocated memory address 27 | */ 28 | static void* Alloc(Size size, U8 alignment = ALIGNMENT); 29 | 30 | /** 31 | * \brief Free the properly aligned memory address 32 | */ 33 | static void Free(void*); 34 | template 35 | static std::string GetNameForType() { 36 | std::string name = typeid(T).name(); 37 | auto pos = name.find("::"); 38 | if (pos != std::string::npos) { 39 | name = name.substr(pos + 2); 40 | } 41 | 42 | pos = name.find(" * __ptr64"); 43 | if (pos != std::string::npos) { 44 | name = name.substr(0, pos); 45 | name += "*"; 46 | } 47 | 48 | return name; 49 | } 50 | }; 51 | 52 | } // namespace Isetta 53 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/ObjectHandle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/Memory/ObjectHandle.h" 5 | 6 | namespace Isetta { 7 | 8 | PtrInt HandleEntry::GetAddress() const { return reinterpret_cast(ptr); } 9 | 10 | void HandleEntry::Set(const U32 uniqueID, void* ptr, const bool isEmpty, 11 | const Size size) { 12 | this->uniqueID = uniqueID; 13 | this->ptr = ptr; 14 | this->isEmpty = isEmpty; 15 | this->size = size; 16 | } 17 | } // namespace Isetta 18 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/PoolAllocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/IsettaAlias.h" 6 | #include "Core/DataStructures/Array.h" 7 | 8 | namespace Isetta { 9 | class PoolAllocator { 10 | public: 11 | PoolAllocator() = delete; 12 | explicit PoolAllocator(Size chunkSize, Size count, Size increment); 13 | ~PoolAllocator(); 14 | void* Get(); 15 | void Free(void*); 16 | 17 | private: 18 | union PoolNode { 19 | PoolNode* next; 20 | explicit PoolNode(PoolNode* next) { this->next = next; } 21 | }; 22 | 23 | void InitializeNodes(void* memHead, Size count); 24 | void Expand(); 25 | 26 | Size capacity{}; 27 | Size chunkSize{}; 28 | Size increment{}; 29 | PoolNode* head{}; 30 | void* memHead{}; 31 | Array additionalMemory; 32 | }; 33 | 34 | } // namespace Isetta 35 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/StackAllocator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #include "Core/Memory/StackAllocator.h" 6 | #include 7 | #include "Core/Debug/Logger.h" 8 | #include "Core/IsettaAlias.h" 9 | #include "Core/Memory/MemUtil.h" 10 | 11 | namespace Isetta { 12 | StackAllocator::StackAllocator(const Size stackSize) 13 | : top(0), totalSize(stackSize) { 14 | bottom = std::malloc(stackSize); 15 | bottomAddress = reinterpret_cast(bottom); 16 | } 17 | 18 | StackAllocator::~StackAllocator() { 19 | std::free(bottom); 20 | } 21 | 22 | void* StackAllocator::Alloc(const Size size, const U8 alignment) { 23 | MemUtil::CheckAlignment(alignment); 24 | 25 | PtrInt rawAddress = bottomAddress + top; 26 | PtrInt misAlignment = rawAddress & (alignment - 1); 27 | PtrDiff adjustment = alignment - misAlignment; 28 | // for the special case when misAlignment = 0 29 | // make sure we don't shift the address by its alignment 30 | adjustment = adjustment & (alignment - 1); 31 | PtrInt alignedAddress = rawAddress + adjustment; 32 | Marker newTop = top + size + adjustment; 33 | 34 | if (newTop > totalSize) { 35 | throw std::overflow_error{"StackAllocator::Alloc => Not enough memory"}; 36 | } 37 | 38 | top = newTop; 39 | 40 | return reinterpret_cast(alignedAddress); 41 | } 42 | 43 | } // namespace Isetta 44 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Memory/TemplatePoolAllocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "PoolAllocator.h" 6 | 7 | namespace Isetta { 8 | 9 | template 10 | class TemplatePoolAllocator { 11 | public: 12 | TemplatePoolAllocator() = delete; 13 | explicit TemplatePoolAllocator(const Size count, const Size increment) 14 | : pool(sizeof(T), count, increment) {} 15 | ~TemplatePoolAllocator() = default; 16 | 17 | template 18 | T* Get(Args&&... args) { 19 | return new (pool.Get()) T(std::forward(args)...); 20 | } 21 | void Free(T* t) { 22 | t->~T(); 23 | pool.Free(t); 24 | } 25 | 26 | private: 27 | PoolAllocator pool; 28 | }; 29 | } // namespace Isetta 30 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/SystemInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "DataStructures/Array.h" 7 | #include "ISETTA_API.h" 8 | 9 | namespace Isetta { 10 | class ISETTA_API SystemInfo { 11 | public: 12 | static std::string GetIpAddressWithPrefix(std::string_view prefix); 13 | static Array GetIPAddresses(); 14 | static std::string GetMachineName(); 15 | static std::string GetSystemUserName(); 16 | }; 17 | } // namespace Isetta 18 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Time/Clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/IsettaAlias.h" 7 | #include "ISETTA_API.h" 8 | 9 | namespace Isetta { 10 | class ISETTA_API Clock { 11 | using Nanoseconds = std::chrono::nanoseconds; 12 | using HighResClock = std::chrono::high_resolution_clock; 13 | using TimePoint = std::chrono::time_point; 14 | 15 | TimePoint startTime; 16 | TimePoint currentTime; 17 | double deltaTime; 18 | double elapsedTime; 19 | double elapsedUnscaledTime; 20 | U64 timeFrame; 21 | 22 | public: 23 | Clock(); 24 | 25 | Clock(const Clock& inClock); 26 | Clock(Clock&& inClock) noexcept; 27 | 28 | Clock& operator=(const Clock& inClock) = delete; 29 | Clock& operator=(Clock&& inClock) = delete; 30 | 31 | /** 32 | * \brief The time scale of this clock 33 | */ 34 | float timeScale; 35 | /** 36 | * \brief Check if the clock is paused 37 | */ 38 | bool isPause; 39 | 40 | /** 41 | * \brief Update the clock time by realtime 42 | */ 43 | void UpdateTime(); 44 | /** 45 | * \brief Get the delta time from last update 46 | */ 47 | double GetDeltaTime() const; 48 | /** 49 | * \brief Get elapsed time since the clock started 50 | */ 51 | double GetElapsedTime() const; 52 | /** 53 | * \brief Get unscaled elapsed time since clock started 54 | */ 55 | double GetElapsedUnscaledTime() const; 56 | 57 | U64 GetTimeFrame() const; 58 | 59 | /** 60 | * \brief Get the real timestamp 61 | */ 62 | static U64 GetTimestamp(); 63 | }; 64 | 65 | } // namespace Isetta 66 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Time/StopWatch.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Core/Time/StopWatch.h" 5 | 6 | namespace Isetta { 7 | 8 | void StopWatch::Start() { startTime = HighResClock::now(); } 9 | 10 | float StopWatch::EvaluateInSecond() const { 11 | return Seconds(HighResClock::now() - startTime).count(); 12 | } 13 | 14 | I64 StopWatch::EvaluateInNanoseconds() const { 15 | return Nanoseconds(HighResClock::now() - startTime).count(); 16 | } 17 | 18 | void StopWatch::Reset() { startTime = HighResClock::now(); } 19 | } // namespace Isetta 20 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Core/Time/StopWatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/IsettaAlias.h" 7 | #include "ISETTA_API.h" 8 | 9 | namespace Isetta { 10 | class ISETTA_API StopWatch { 11 | using HighResClock = std::chrono::high_resolution_clock; 12 | using TimePoint = std::chrono::time_point; 13 | using Seconds = std::chrono::duration; 14 | using Nanoseconds = std::chrono::duration; 15 | 16 | TimePoint startTime; 17 | 18 | public: 19 | StopWatch() = default; 20 | StopWatch(const StopWatch& inStopWatch) = delete; 21 | StopWatch(StopWatch&& inStopWatch) = delete; 22 | 23 | StopWatch& operator=(const StopWatch& inStopWatch) = delete; 24 | StopWatch& operator=(StopWatch&& inStopWatch) = delete; 25 | 26 | void Start(); 27 | float EvaluateInSecond() const; 28 | I64 EvaluateInNanoseconds() const; 29 | void Reset(); 30 | }; 31 | } // namespace Isetta 32 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/EmptyLevel/EmptyLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EmptyLevel.h" 5 | 6 | #include "Core/IsettaCore.h" 7 | #include "Graphics/CameraComponent.h" 8 | 9 | namespace Isetta { 10 | void EmptyLevel::Load() { 11 | Entity* cameraEntity = Entity::Instantiate("Camera"); 12 | cameraEntity->AddComponent(); 13 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 14 | Math::Vector3::one); 15 | } 16 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/EmptyLevel/EmptyLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/IsettaLevel.h" 6 | 7 | /** 8 | * @brief Empty level to be used as a starting point for user created levels 9 | * 10 | */ 11 | namespace Isetta { 12 | DEFINE_LEVEL(EmptyLevel) 13 | void Load() override; 14 | DEFINE_LEVEL_END 15 | } // namespace Isetta 16 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/LevelLoadingMenu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/DataStructures/Array.h" 6 | #include "Scene/Component.h" 7 | 8 | namespace Isetta { 9 | DEFINE_COMPONENT(LevelLoadingMenu, Component, true) 10 | private: 11 | Array levels; 12 | static inline int handle = -1; 13 | bool showWindow; 14 | static LevelLoadingMenu* instance; 15 | 16 | public: 17 | LevelLoadingMenu(); 18 | 19 | void OnEnable() override; 20 | void OnDisable() override; 21 | void GuiUpdate() override; 22 | DEFINE_COMPONENT_END(LevelLoadingMenu, Component) 23 | } // namespace Isetta 24 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/NoCameraLevel/NoCameraComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "NoCameraComponent.h" 5 | 6 | #include "Graphics/GUI.h" 7 | #include "Graphics/RectTransform.h" 8 | 9 | namespace Isetta { 10 | void NoCameraComponent::GuiUpdate() { 11 | const RectTransform rect{ 12 | {0, 0, 0, 0}, GUI::Pivot::Center, GUI::Pivot::Center}; 13 | GUI::Text(rect, "No cameras rendering: Load level with camera."); 14 | } 15 | } // namespace Isetta 16 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/NoCameraLevel/NoCameraComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Component.h" 6 | 7 | namespace Isetta { 8 | DEFINE_COMPONENT(NoCameraComponent, Component, true) 9 | void GuiUpdate() override; 10 | DEFINE_COMPONENT_END(NoCameraComponent, Component) 11 | } // namespace Isetta 12 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/NoCameraLevel/NoCameraLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Custom/NoCameraLevel/NoCameraLevel.h" 5 | 6 | #include "Core/Config/Config.h" 7 | #include "Core/IsettaCore.h" 8 | #include "Graphics/CameraComponent.h" 9 | 10 | #include "Custom/NoCameraLevel/NoCameraComponent.h" 11 | 12 | namespace Isetta { 13 | void NoCameraLevel::Load() { 14 | Entity* cameraEntity{Entity::Instantiate("Camera")}; 15 | cameraEntity->AddComponent(); 16 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 17 | Math::Vector3::one); 18 | cameraEntity->AddComponent(); 19 | } 20 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Custom/NoCameraLevel/NoCameraLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/IsettaLevel.h" 6 | #include "Scene/Level.h" 7 | 8 | namespace Isetta { 9 | DEFINE_LEVEL(NoCameraLevel) 10 | void Load() override; 11 | DEFINE_LEVEL_END 12 | } // namespace Isetta 13 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/EngineLoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Application.h" 6 | #include "Core/Config/CVar.h" 7 | 8 | namespace Isetta { 9 | class ISETTA_API EngineLoop { 10 | public: 11 | struct LoopConfig { 12 | CVar maxFps{"max_fps", 16}; 13 | CVar maxSimCount{"max_simulation_count", 5}; 14 | }; 15 | 16 | // Start the whole game 17 | EngineLoop(); 18 | ~EngineLoop(); 19 | 20 | static EngineLoop& Instance(); 21 | static class Clock& GetGameClock(); 22 | 23 | private: 24 | bool isGameRunning; 25 | double accumulateTime; 26 | double intervalTime; 27 | int maxSimulationCount; 28 | 29 | class MemoryManager* memoryManager; 30 | class AudioModule* audioModule; 31 | class WindowModule* windowModule; 32 | class RenderModule* renderModule; 33 | class InputModule* inputModule; 34 | class GUIModule* guiModule; 35 | class NetworkingModule* networkingModule; 36 | class CollisionsModule* collisionsModule; 37 | class CollisionSolverModule* collisionSolverModule; 38 | class Events* events; 39 | 40 | void Run(); 41 | void StartUp(); 42 | void Update(); 43 | void FixedUpdate(float deltaTime) const; 44 | void VariableUpdate(float deltaTime) const; 45 | void ShutDown(); 46 | 47 | void StartGameClock() const; 48 | 49 | friend class Application; 50 | }; 51 | } // namespace Isetta 52 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Events/EventObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include 7 | #include "Core/DataStructures/Array.h" 8 | #include "Core/IsettaAlias.h" 9 | #include "Core/Math/Vector3.h" 10 | 11 | namespace Isetta { 12 | using EventParam = 13 | std::variant; 14 | 15 | enum class ISETTA_API EventPriority { 16 | LOW = 3000, 17 | MEDIUM = 2000, 18 | HIGH = 1000, 19 | EMERGENT = 0 20 | }; 21 | 22 | struct ISETTA_API EventObject { 23 | std::string eventName; 24 | U64 timeFrame; 25 | EventPriority eventPriority; 26 | Array eventParams; 27 | 28 | EventObject() = default; 29 | EventObject(std::string name, U64 frame, EventPriority priority, 30 | Array params); 31 | EventObject(std::string name, Array params); 32 | EventObject(const EventObject& other); 33 | EventObject(EventObject&& other) noexcept; 34 | EventObject& operator=(const EventObject& other); 35 | EventObject& operator=(EventObject&& other) noexcept; 36 | 37 | bool operator==(const EventObject& other) const; 38 | bool operator!=(const EventObject& other) const; 39 | bool operator>(const EventObject& rhs) const; 40 | 41 | static std::function 42 | queueComparer; 43 | }; 44 | } // namespace Isetta 45 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Events/Events.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/DataStructures/Array.h" 6 | #include "Core/DataStructures/PriorityQueue.h" 7 | #include "Core/IsettaAlias.h" 8 | #include "Events/EventObject.h" 9 | #include "SID/sid.h" 10 | 11 | namespace Isetta { 12 | using CallbackPair = std::pair>; 13 | class ISETTA_API Events { 14 | public: 15 | static Events& Instance() { return *instance; } 16 | 17 | void StartUp() { instance = this; } 18 | void ShutDown(); 19 | 20 | void RaiseQueuedEvent(const EventObject& eventObject); 21 | void RaiseImmediateEvent(const EventObject& eventObject); 22 | 23 | U16 RegisterEventListener(std::string_view eventName, 24 | const Action& callback); 25 | void UnregisterEventListener(std::string_view eventName, 26 | U16 eventListenerHandle); 27 | 28 | void Clear(); 29 | 30 | private: 31 | inline static Events* instance; 32 | 33 | Events() = default; 34 | PriorityQueue eventQueue; 35 | std::unordered_map> callbackMap; 36 | 37 | void Update(); 38 | 39 | static U16 totalListeners; 40 | 41 | friend class EngineLoop; 42 | friend class StackAllocator; 43 | }; 44 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/MeshComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/Math/Math.h" 7 | #include "Horde3D/Horde3D/Bindings/C++/Horde3D.h" 8 | #include "SID/sid.h" 9 | #include "Scene/Component.h" 10 | 11 | namespace Isetta { 12 | DEFINE_COMPONENT(MeshComponent, Component, false) 13 | H3DNode renderNode{0}; 14 | H3DRes renderResource{0}; 15 | 16 | std::unordered_map joints; 17 | 18 | explicit MeshComponent(std::string_view resourceName); 19 | ~MeshComponent(); 20 | 21 | void UpdateTransform() const; 22 | 23 | protected: 24 | static H3DRes LoadResourceFromFile(std::string_view resourceName); 25 | 26 | void OnEnable() override; 27 | void OnDisable() override; 28 | void OnDestroy() override; 29 | 30 | friend class AnimationComponent; 31 | friend class Entity; 32 | friend class MemoryManager; 33 | friend class FreeListAllocator; 34 | friend class RenderModule; 35 | 36 | public: 37 | std::tuple GetJointWorldTransform( 38 | std::string jointName); 39 | 40 | static class RenderModule* renderModule; 41 | DEFINE_COMPONENT_END(MeshComponent, Component) 42 | } // namespace Isetta 43 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/ParticleSystemComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Core/DataStructures/Array.h" 6 | #include "Horde3D/Horde3D/Bindings/C++/Horde3D.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | DEFINE_COMPONENT(ParticleSystemComponent, Component, false) 11 | H3DNode renderNode{0}; 12 | Array emitters; 13 | H3DRes renderResource{0}; 14 | bool hasStarted{false}; 15 | 16 | ParticleSystemComponent(); 17 | explicit ParticleSystemComponent(std::string_view resourceName); 18 | // ~ParticleSystemComponent(); 19 | 20 | void UpdateTransform() const; 21 | void UpdateEmitter(float deltaTime) const; 22 | 23 | protected: 24 | static H3DRes LoadResourceFromFile(std::string_view resourceName); 25 | void Awake() override; 26 | void OnEnable() override; 27 | void OnDisable() override; 28 | void OnDestroy() override; 29 | 30 | friend class Entity; 31 | friend class MemoryManager; 32 | friend class FreeListAllocator; 33 | friend class RenderModule; 34 | 35 | static inline class RenderModule* renderModule; 36 | 37 | public: 38 | void StartEmttting(); 39 | 40 | DEFINE_COMPONENT_END(ParticleSystemComponent, Component) 41 | } // namespace Isetta 42 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/RenderNode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Graphics/RenderNode.h" 5 | 6 | #include 7 | #include 8 | #include "Core/Math/Matrix4.h" 9 | #include "Core/Math/Vector3.h" 10 | 11 | namespace Isetta { 12 | void RenderNode::SetHordeTransform(const Isetta::Math::Vector3& position, 13 | const Isetta::Math::Vector3& rotation, 14 | const Isetta::Math::Vector3& scale) { 15 | h3dSetNodeTransform(renderNode, position.x, position.y, position.z, 16 | rotation.x, rotation.y, rotation.z, scale.x, scale.y, 17 | scale.z); 18 | } 19 | 20 | } // namespace Isetta 21 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/RenderNode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace Isetta::Math { 9 | class Vector3; 10 | class Matrix4; 11 | } // namespace Isetta::Math 12 | 13 | namespace Isetta { 14 | class RenderNode { 15 | protected: 16 | std::string resourceFilepath; 17 | H3DNode renderNode; 18 | 19 | RenderNode() = default; 20 | /** 21 | * \brief Load the resource file from disk (different nodes have different 22 | * ways to load) 23 | * \param resourceName The filename of the resource 24 | */ 25 | virtual H3DRes LoadResourceFromFile(std::string resourceName) = 0; 26 | 27 | public: 28 | virtual ~RenderNode() = default; 29 | // TODO(Chaojie) Transform class 30 | /** 31 | * \brief Set the transform of this node 32 | * \param position The position of the node 33 | * \param rotation The rotation in degree of the node 34 | * \param scale The scale of the node 35 | */ 36 | void SetHordeTransform(const Math::Vector3& position, 37 | const Math::Vector3& rotation, 38 | const Math::Vector3& scale); 39 | }; 40 | } // namespace Isetta 41 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/Texture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "Core/IsettaAlias.h" 7 | #include "Core/Math/Vector2Int.h" 8 | #include "ISETTA_API.h" 9 | 10 | typedef int H3DRes; 11 | 12 | namespace Isetta { 13 | class ISETTA_API Texture { 14 | private: 15 | std::string_view fileName; 16 | unsigned int texture = 0; 17 | Math::Vector2Int size; 18 | H3DRes h3dres; 19 | U8* data; 20 | 21 | public: 22 | Texture() = default; 23 | Texture(std::string_view fileName, bool load = true); 24 | ~Texture(); 25 | 26 | Texture(const Texture& tex) : fileName{tex.fileName} { 27 | if (tex.texture) Load(); 28 | } 29 | Texture(Texture&& tex) : fileName{tex.fileName} { 30 | texture = tex.texture; 31 | size = tex.size; 32 | tex.texture = 0; 33 | } 34 | inline Texture& operator=(const Texture& tex) { 35 | fileName = tex.fileName; 36 | if (tex.texture) Load(); 37 | return *this; 38 | } 39 | inline Texture& operator=(Texture&& tex) { 40 | fileName = tex.fileName; 41 | texture = tex.texture; 42 | size = tex.size; 43 | tex.texture = 0; 44 | return *this; 45 | } 46 | 47 | void Load(); 48 | void Unload(); 49 | 50 | inline unsigned int GetTexture() const { return texture; } 51 | inline U8* GetData() const { return data; } 52 | inline int GetWidth() const { return size.x; } 53 | inline int GetHeight() const { return size.y; } 54 | inline Math::Vector2Int GetSize() const { return size; } 55 | }; 56 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Graphics/WindowModule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #include 7 | #include "Core/Config/CVar.h" 8 | #include "GLFW/include/GLFW/glfw3.h" 9 | #include "Window.h" 10 | 11 | namespace Isetta::Math { 12 | class Vector2; 13 | } 14 | 15 | namespace Isetta { 16 | class WindowModule { 17 | public: 18 | struct WindowConfig { 19 | CVar windowWidth{"window_width", 1024}; 20 | CVar windowHeight{"window_height", 768}; 21 | CVarString windowTitle{"window_title", "Game"}; 22 | CVar windowFullScreen{"window_fullscreen", 0}; 23 | CVar windowShowCursor{"window_show_cursor", 1}; 24 | }; 25 | 26 | private: 27 | WindowModule() = default; 28 | ~WindowModule() = default; 29 | 30 | int xPos, yPos, width, height; 31 | GLFWcursor* customCursor; 32 | Window::Cursor cursor; 33 | 34 | void StartUp(); 35 | void Update(float deltaTime); 36 | void ShutDown(); 37 | 38 | void InitWindow(); 39 | // GLFWmonitor* GetCurrentMonitor() const; 40 | void SetFullscreen(bool fullscreen); 41 | 42 | GLFWwindow* winHandle; 43 | 44 | friend class EngineLoop; 45 | friend class StackAllocator; 46 | friend class Window; 47 | }; 48 | } // namespace Isetta 49 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/ISETTA_API.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #if defined(IN_ENGINE) || defined(IN_TEST) 7 | #define ISETTA_API 8 | #define ISETTA_API_DECLARE 9 | #else 10 | #ifdef ISETTA_EXPORTS 11 | #define ISETTA_API __declspec(dllexport) 12 | #define ISETTA_API_DECLARE __declspec(dllexport) 13 | #else 14 | #define ISETTA_API __declspec(dllimport) 15 | #define ISETTA_API_DECLARE 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Input/GLFWInput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | #include "Core/IsettaAlias.h" 7 | #include "GLFW/include/GLFW/glfw3.h" 8 | 9 | namespace Isetta { 10 | class GLFWInput { 11 | public: 12 | static void RegisterWindowCloseCallback(const Action& callback); 13 | static U64 RegisterWindowSizeCallback( 14 | const Action& callback); 15 | static void UnegisterWindowSizeCallback(U64 handle); 16 | static U64 RegisterMouseButtonCallback( 17 | const Action& callback); 18 | static void UnregisterMouseButtonCallback(U64 handle); 19 | static U64 RegisterKeyCallback( 20 | const Action& callback); 21 | static void UnegisterKeyCallback(U64 handle); 22 | static U64 RegisterScrollCallback( 23 | const Action& callback); 24 | static void UnegisterScrollCallback(U64 handle); 25 | static U64 RegisterCharCallback( 26 | const Action& callback); 27 | static void UnegisterCharCallback(U64 handle); 28 | 29 | private: 30 | static class InputModule* inputModule; 31 | 32 | friend class InputModule; 33 | }; 34 | } // namespace Isetta 35 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Networking/ClientInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | 7 | namespace Isetta { 8 | struct ClientInfo { 9 | std::string ip{}; 10 | std::string machineName{}; 11 | int clientIndex{-1}; 12 | ClientInfo() = default; 13 | ClientInfo(const std::string& ip, const std::string& machineName, 14 | const int clientIndex) 15 | : ip(ip), machineName(machineName), clientIndex(clientIndex) {} 16 | }; 17 | } // namespace Isetta 18 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Networking/NetworkId.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #include "Networking/NetworkId.h" 6 | #include "Networking/NetworkManager.h" 7 | #include "Scene/Entity.h" 8 | 9 | // TODO(Caleb): There is no map of unused network IDs yet 10 | namespace Isetta { 11 | NetworkId::NetworkId() { 12 | NetworkManager::Instance().CreateNetworkId(this); 13 | } 14 | 15 | NetworkId::NetworkId(U32 id) { 16 | NetworkManager::Instance().AssignNetworkId(id, this); 17 | } 18 | 19 | void NetworkId::OnDestroy() { NetworkManager::Instance().RemoveNetworkId(this); } 20 | 21 | bool NetworkId::HasClientAuthority() const { 22 | return clientAuthorityId == 23 | NetworkManager::Instance().GetClientIndex(); 24 | } 25 | 26 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Networking/NetworkId.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #pragma once 6 | #include "Core/IsettaAlias.h" 7 | #include "Scene/Component.h" 8 | 9 | namespace Isetta { 10 | DEFINE_COMPONENT(NetworkId, Component, true) 11 | public: 12 | NetworkId(); 13 | NetworkId(U32 id); 14 | 15 | void OnDestroy() override; 16 | 17 | bool HasClientAuthority() const; 18 | 19 | /// Network ID that corresponds to our entity 20 | U32 id = 0; 21 | /// Client ID of the client who has authority over this entity 22 | int clientAuthorityId = 0; 23 | /// Update interval of any networked components on this entity 24 | int updateInterval = 5; 25 | // Interpolation speed of any networked components on this entity 26 | float interpolationFactor = 1; 27 | 28 | friend class NetworkManager; 29 | DEFINE_COMPONENT_END(NetworkId, Component) 30 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/DaeToGeoConverter.bat: -------------------------------------------------------------------------------- 1 | ..\..\External\Horde3D\Build\Binaries\Windows\Release\ColladaConv.exe . -type model 2 | ..\..\External\Horde3D\Build\Binaries\Windows\Release\ColladaConv.exe . -type anim -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/lights/light.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/particles/particleSys1/particle1.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/particles/particleSys1/particle1.particle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/particles/particleSys1/particle1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/particles/particleSys1/particle1.tga -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/particles/particleSys1/particleSys1.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/pipelines/ambientMap.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/pipelines/ambientMap.dds -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/pipelines/deferred.pipeline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/pipelines/forward.pipeline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/pipelines/globalSettings.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/pipelines/postHDR.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Capsule/Capsule.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Capsule/Capsule.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Capsule/Capsule.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Cube/Cube.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Cube/Cube.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Cube/Cube.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Cylinder/Cylinder.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Cylinder/Cylinder.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Cylinder/Cylinder.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Grid/Grid.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Grid/Grid.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Grid/Grid.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Quad/Quad.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Quad/Quad.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Quad/Quad.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Sphere/Sphere.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/primitives/Sphere/Sphere.geo -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/Sphere/Sphere.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/primitives/primitive.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragDeferredRead.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Deferred shading functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | uniform sampler2D gbuf0; 13 | uniform sampler2D gbuf1; 14 | uniform sampler2D gbuf2; 15 | uniform sampler2D gbuf3; 16 | 17 | float getMatID( const vec2 coord ) { return texture2D( gbuf0, coord ).a; } 18 | vec3 getPos( const vec2 coord ) { return texture2D( gbuf0, coord ).rgb; } 19 | vec3 getNormal( const vec2 coord ) { return texture2D( gbuf1, coord ).rgb; } 20 | vec3 getAlbedo( const vec2 coord ) { return texture2D( gbuf2, coord ).rgb; } 21 | vec4 getSpecParams( const vec2 coord ) { return texture2D( gbuf3, coord ).rgba; } 22 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragDeferredReadGL4.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Deferred shading functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | uniform sampler2D gbuf0; 13 | uniform sampler2D gbuf1; 14 | uniform sampler2D gbuf2; 15 | uniform sampler2D gbuf3; 16 | 17 | float getMatID( const vec2 coord ) { return texture( gbuf0, coord ).a; } 18 | vec3 getPos( const vec2 coord ) { return texture( gbuf0, coord ).rgb; } 19 | vec3 getNormal( const vec2 coord ) { return texture( gbuf1, coord ).rgb; } 20 | vec3 getAlbedo( const vec2 coord ) { return texture( gbuf2, coord ).rgb; } 21 | vec4 getSpecParams( const vec2 coord ) { return texture( gbuf3, coord ).rgba; } 22 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragDeferredWrite.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Deferred shading functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | void setMatID( const float id ) { gl_FragData[0].a = id; } 13 | void setPos( const vec3 pos ) { gl_FragData[0].rgb = pos; } 14 | void setNormal( const vec3 normal ) { gl_FragData[1].rgb = normal; } 15 | void setAlbedo( const vec3 albedo ) { gl_FragData[2].rgb = albedo; } 16 | void setSpecParams( const vec3 specCol, const float gloss ) { gl_FragData[3].rgb = specCol; gl_FragData[3].a = gloss; } 17 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragDeferredWriteGL4.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Deferred shading functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | layout( location = 0 ) out vec4 fragData0; 13 | layout( location = 1 ) out vec4 fragData1; 14 | layout( location = 2 ) out vec4 fragData2; 15 | layout( location = 3 ) out vec4 fragData3; 16 | 17 | void setMatID( const float id ) { fragData0.a = id; } 18 | void setPos( const vec3 pos ) { fragData0.rgb = pos; } 19 | void setNormal( const vec3 normal ) { fragData1.rgb = normal; } 20 | void setAlbedo( const vec3 albedo ) { fragData2.rgb = albedo; } 21 | void setSpecParams( const vec3 specCol, const float gloss ) { fragData3.rgb = specCol; fragData3.a = gloss; } 22 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragLighting.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/shaders/utilityLib/fragLighting.glsl -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/fragLightingGL4.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/shaders/utilityLib/fragLightingGL4.glsl -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/vertCommon.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Common functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | uniform mat4 viewMat; 13 | uniform mat4 worldMat; 14 | uniform mat3 worldNormalMat; 15 | 16 | 17 | vec4 calcWorldPos( const vec4 pos ) 18 | { 19 | return worldMat * pos; 20 | } 21 | 22 | vec4 calcViewPos( const vec4 pos ) 23 | { 24 | return viewMat * pos; 25 | } 26 | 27 | vec3 calcWorldVec( const vec3 vec ) 28 | { 29 | return worldNormalMat * vec; 30 | } 31 | 32 | mat3 calcTanToWorldMat( const vec3 tangent, const vec3 bitangent, const vec3 normal ) 33 | { 34 | return mat3( tangent, bitangent, normal ); 35 | } 36 | 37 | vec3 calcTanVec( const vec3 vec, const vec3 tangent, const vec3 bitangent, const vec3 normal ) 38 | { 39 | vec3 v; 40 | v.x = dot( vec, tangent ); 41 | v.y = dot( vec, bitangent ); 42 | v.z = dot( vec, normal ); 43 | return v; 44 | } -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/vertParticle.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Particle functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | uniform mat4 viewMatInv; 13 | uniform vec3 parPosArray[64]; 14 | uniform vec2 parSizeAndRotArray[64]; 15 | uniform vec4 parColorArray[64]; 16 | 17 | attribute float parIdx; 18 | 19 | 20 | vec4 getParticleColor() 21 | { 22 | return parColorArray[int( parIdx )]; 23 | } 24 | 25 | vec3 calcParticlePos( const vec2 texCoords ) 26 | { 27 | int index = int( parIdx ); 28 | vec3 camAxisX = viewMatInv[0].xyz; 29 | vec3 camAxisY = viewMatInv[1].xyz; 30 | 31 | vec2 cornerPos = texCoords - vec2( 0.5, 0.5 ); 32 | 33 | // Apply rotation 34 | float s = sin( parSizeAndRotArray[index].y ); 35 | float c = cos( parSizeAndRotArray[index].y ); 36 | cornerPos = mat2( c, -s, s, c ) * cornerPos; 37 | 38 | return parPosArray[index] + (camAxisX * cornerPos.x + camAxisY * cornerPos.y) * parSizeAndRotArray[index].x; 39 | } -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/shaders/utilityLib/vertParticleGL4.glsl: -------------------------------------------------------------------------------- 1 | // ************************************************************************************************* 2 | // Horde3D Shader Utility Library 3 | // -------------------------------------- 4 | // - Particle functions - 5 | // 6 | // Copyright (C) 2006-2016 Nicolas Schulz and Horde3D team 7 | // 8 | // You may use the following code in projects based on the Horde3D graphics engine. 9 | // 10 | // ************************************************************************************************* 11 | 12 | uniform mat4 viewMatInv; 13 | uniform vec3 parPosArray[64]; 14 | uniform vec2 parSizeAndRotArray[64]; 15 | uniform vec4 parColorArray[64]; 16 | 17 | layout( location = 1 ) in float parIdx; 18 | 19 | 20 | vec4 getParticleColor() 21 | { 22 | return parColorArray[int( parIdx )]; 23 | } 24 | 25 | vec3 calcParticlePos( const vec2 texCoords ) 26 | { 27 | int index = int( parIdx ); 28 | vec3 camAxisX = viewMatInv[0].xyz; 29 | vec3 camAxisY = viewMatInv[1].xyz; 30 | 31 | vec2 cornerPos = texCoords - vec2( 0.5, 0.5 ); 32 | 33 | // Apply rotation 34 | float s = sin( parSizeAndRotArray[index].y ); 35 | float c = cos( parSizeAndRotArray[index].y ); 36 | cornerPos = mat2( c, -s, s, c ) * cornerPos; 37 | 38 | return parPosArray[index] + (camAxisX * cornerPos.x + camAxisY * cornerPos.y) * parSizeAndRotArray[index].x; 39 | } -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/textures/common/defnorm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/textures/common/defnorm.tga -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Resources/textures/common/white.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaEngine/Resources/textures/common/white.tga -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Scene/IsettaLevel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/Memory/MemoryManager.h" 3 | #include "Scene/Level.h" 4 | #include "Scene/LevelManager.h" -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Scene/LevelManager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Scene/LevelManager.h" 5 | #include "Core/Config/Config.h" 6 | #include "Core/Debug/Logger.h" 7 | #include "Scene/Level.h" 8 | 9 | namespace Isetta { 10 | LevelManager& LevelManager::Instance() { 11 | static LevelManager instance; 12 | return instance; 13 | } 14 | 15 | bool LevelManager::Register(const std::string_view name, Func level) { 16 | levels.insert_or_assign(SID(name.data()), level); 17 | levelNames.push_back(name.data()); 18 | return true; 19 | } 20 | 21 | std::vector LevelManager::GetLevelNames() const { 22 | return levelNames; 23 | } 24 | 25 | void LevelManager::LoadLevel() { 26 | if (pendingLoadLevel != nullptr) { 27 | if (loadedLevel != nullptr) { 28 | UnloadLevel(); 29 | } 30 | loadedLevel = pendingLoadLevel; 31 | pendingLoadLevel = nullptr; 32 | LOG("Loading......%s", loadedLevel->GetName().c_str()); 33 | loadedLevel->Load(); 34 | LOG("Loading Complete"); 35 | loadedLevel->isLevelLoaded = true; 36 | } 37 | } 38 | 39 | void LevelManager::UnloadLevel() { 40 | if (loadedLevel != nullptr) { 41 | loadedLevel->Unload(); 42 | LOG("Unloaded: %s", loadedLevel->GetName().c_str()); 43 | loadedLevel->~Level(); 44 | loadedLevel = nullptr; 45 | } 46 | } 47 | 48 | void LevelManager::LoadLevel(std::string_view levelName) { 49 | pendingLoadLevel = levels.at(SID(levelName.data()))(); 50 | } 51 | 52 | } // namespace Isetta 53 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Scene/LevelManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include 7 | #include "Core/Config/CVar.h" 8 | #include "Core/IsettaAlias.h" 9 | #include "ISETTA_API.h" 10 | #include "SID/sid.h" 11 | 12 | namespace Isetta { 13 | template 14 | class LevelRegistry { 15 | protected: 16 | static bool registered; 17 | }; 18 | 19 | class ISETTA_API LevelManager { 20 | private: 21 | std::vector levelNames; 22 | std::unordered_map> levels; 23 | class Level* pendingLoadLevel{nullptr}; 24 | 25 | void LoadLevel(); 26 | void UnloadLevel(); 27 | friend class EngineLoop; 28 | 29 | public: 30 | struct LevelConfig { 31 | CVarString startLevel{"start_level", "EmptyLevel"}; 32 | }; 33 | 34 | /// Access the current loaded level 35 | class Level* loadedLevel{nullptr}; 36 | 37 | static LevelManager& Instance(); 38 | 39 | /** 40 | * \brief Used internally 41 | */ 42 | bool Register(const std::string_view, Func); 43 | /** 44 | * \brief Get names of all levels registered 45 | */ 46 | std::vector GetLevelNames() const; 47 | 48 | LevelManager() = default; 49 | ~LevelManager() = default; 50 | /** 51 | * \brief Load the level with the given level name 52 | */ 53 | void LoadLevel(std::string_view levelName); 54 | }; 55 | 56 | template 57 | bool LevelRegistry::registered = 58 | LevelManager::Instance().Register(T::GetLevelName(), T::CreateMethod); 59 | } // namespace Isetta 60 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/Scene/Primitive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | #include "ISETTA_API.h" 7 | 8 | namespace Isetta { 9 | struct ISETTA_API Primitive { 10 | enum class Type { 11 | Capsule, 12 | Cube, 13 | Cylinder, 14 | Grid, 15 | Quad, 16 | Sphere, 17 | }; 18 | /** 19 | * \brief Create a primitive with the given name, with the option to specific 20 | * if it has a collider attached 21 | */ 22 | static class Entity* Create(Type type, const std::string_view name, 23 | bool withCollider); 24 | /** 25 | * \brief Create a primitive, with the option to specific if it has a collider 26 | * attached 27 | */ 28 | static class Entity* Create(Type type, bool withCollider = false); 29 | }; 30 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaEngine/imgui.ini: -------------------------------------------------------------------------------- 1 | [Window][Debug##Default] 2 | Pos=60,60 3 | Size=1708,993 4 | Collapsed=0 5 | 6 | [Window][window name] 7 | Pos=200,719 8 | Size=400,400 9 | Collapsed=0 10 | 11 | [Window][Console] 12 | Pos=300,30 13 | Size=600,400 14 | Collapsed=0 15 | 16 | [Window][Hierarchy] 17 | Pos=30,30 18 | Size=160,300 19 | Collapsed=0 20 | 21 | [Window][Network Monitor] 22 | Pos=1040,80 23 | Size=200,300 24 | Collapsed=0 25 | 26 | [Window][Frame Reporter] 27 | Pos=20,10 28 | Size=150,80 29 | Collapsed=0 30 | 31 | [Window][Load Level] 32 | Pos=1088,372 33 | Size=170,300 34 | Collapsed=0 35 | 36 | [Window][Inspector] 37 | Pos=30,300 38 | Size=350,300 39 | Collapsed=0 40 | 41 | -------------------------------------------------------------------------------- /Isetta/IsettaEngine/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | // #define _CRTDBG_MAP_ALLOC 5 | // #include 6 | // #include 7 | 8 | #include "Application.h" 9 | 10 | using namespace Isetta; 11 | 12 | /*! \mainpage Isetta Engine 13 | Game engine development is a very wide field in the industry, but also a very 14 | inaccessible one. Budding engineers are advised to just jump into development to 15 | learn, and it's for this reason that the Isetta Engine project came to be. 16 | 17 | Our team is building a game engine specialized for the twin-stick shooter genre. 18 | Every step of the way we will be documenting our process through a dedicated 19 | blog. Readers can hear from us personally and get an in-depth look at our 20 | journey to create the engine. In addition, we will supplement our content 21 | through regular interviews with industry professionals who have built their own 22 | engines before. 23 | 24 | Between our own hands-on process and sage advice from veteran engineers, we hope 25 | to give newcomers a clearer representation of the engine-building process. 26 | */ 27 | int main() { 28 | // _CrtSetBreakAlloc(1199); 29 | // _CrtSetBreakAlloc(3607); 30 | Application::Start(); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Isetta/IsettaTest/Core/ColorTest.cpp: -------------------------------------------------------------------------------- 1 | #include "Core/Color.h" 2 | #include "CppUnitTest.h" 3 | 4 | using namespace Microsoft::VisualStudio::CppUnitTestFramework; 5 | using namespace Isetta; 6 | 7 | namespace ColorTest { 8 | TEST_CLASS(ColorTest){public : TEST_METHOD(GreyScale){ 9 | Assert::IsTrue(0.5f == Color(0.4f, 0.5f, 0.6f, 1.0f).GreyScale()); 10 | } 11 | 12 | public: 13 | TEST_METHOD(MaxColorComponent) { 14 | Assert::IsTrue(0.3f == Color(0.1f, 0.2f, 0.3f, 1.0f).MaxColorComponent()); 15 | } 16 | 17 | public: 18 | TEST_METHOD(ToString) { 19 | Assert::IsTrue(std::string("Color(0.1, 0.2, 0.3, 1.0)") == 20 | Color(0.1f, 0.2f, 0.3f, 1.0f).ToString()); 21 | } 22 | 23 | public: 24 | TEST_METHOD(Lerp) { 25 | Assert::IsTrue(Color(0.25f, 0.25f, 0.25f, 0.25f) == 26 | Color::Lerp(Color::clear, Color::white, 0.25f)); 27 | } 28 | } 29 | ; 30 | } // namespace ColorTest 31 | -------------------------------------------------------------------------------- /Isetta/IsettaTest/Core/DataStructures/TrieTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTest/Core/DataStructures/TrieTest.cpp -------------------------------------------------------------------------------- /Isetta/IsettaTest/Core/Math/Vector2IntTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Core/Math/Vector2.h" 3 | #include "Core/Math/Vector2Int.h" 4 | #include "CppUnitTest.h" 5 | 6 | using namespace Microsoft::VisualStudio::CppUnitTestFramework; 7 | using namespace Isetta; 8 | 9 | namespace MathTest { 10 | TEST_CLASS(Vector2IntTest){ 11 | public : 12 | 13 | TEST_METHOD(Magnitude){Math::Vector2Int vec{1, 1}; 14 | Assert::AreEqual(sqrt(2.f), vec.Magnitude()); 15 | } // namespace MathTest 16 | 17 | TEST_METHOD(SqrMagnitude) { 18 | Math::Vector2Int vec{1, 1}; 19 | Assert::AreEqual(2, vec.SqrMagnitude()); 20 | } 21 | 22 | TEST_METHOD(Normalized) { 23 | Math::Vector2Int vec{5, 0}; 24 | Assert::IsTrue(Math::Vector2::right == vec.Normalized()); 25 | } 26 | 27 | TEST_METHOD(Dot) { 28 | Math::Vector2Int vec1{5, 1}; 29 | Math::Vector2Int vec2(2, 5); 30 | Assert::AreEqual(15, Math::Vector2Int::Dot(vec1, vec2)); 31 | } 32 | 33 | TEST_METHOD(Cross) { 34 | Math::Vector2Int vec1{1, 3}; 35 | Math::Vector2Int vec2(2, -5); 36 | Assert::AreEqual(-11, Math::Vector2Int::Cross(vec1, vec2)); 37 | } 38 | 39 | TEST_METHOD(Distance) { 40 | Math::Vector2Int vec1{1, 0}; 41 | Math::Vector2Int vec2(0, 1); 42 | Assert::AreEqual(Math::Vector2Int::Distance(vec1, vec2), sqrt(2.f)); 43 | } 44 | 45 | TEST_METHOD(Scale) { 46 | Math::Vector2Int vec1{1, -2}; 47 | Math::Vector2Int vec2(5, 3); 48 | Assert::IsTrue(Math::Vector2Int::Scale(vec1, vec2) == 49 | Math::Vector2Int(5, -6)); 50 | } 51 | } 52 | ; 53 | } -------------------------------------------------------------------------------- /Isetta/IsettaTest/TestInitialization.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | 5 | #include "Core/Memory/MemoryManager.h" 6 | #include "CppUnitTest.h" 7 | //#include "EngineLoop.h" 8 | 9 | using namespace Microsoft::VisualStudio::CppUnitTestFramework; 10 | 11 | namespace Isetta { 12 | class TestInitialization { 13 | public: 14 | TestInitialization(); 15 | // static void TestClassInitialize() { engineLoop.StartUp(); }; 16 | // static void TestClassCleanup() { engineLoop.ShutDown(); }; 17 | 18 | static void TestClassInitialize() { }; 19 | static void TestClassCleanup() { }; 20 | 21 | private: 22 | // static EngineLoop engineLoop; 23 | static MemoryManager memory; 24 | }; 25 | 26 | TestInitialization::TestInitialization(){}; 27 | 28 | // EngineLoop TestInitialization::engineLoop; 29 | MemoryManager TestInitialization::memory; 30 | 31 | TEST_MODULE_INITIALIZE(ModuleInitialize) { 32 | TestInitialization::TestClassInitialize(); 33 | } 34 | 35 | TEST_MODULE_CLEANUP(ModuleCleanup) { TestInitialization::TestClassCleanup(); } 36 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTest/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // IsettaTest.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Isetta/IsettaTest/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | // Headers for CppUnitTest 11 | #include "CppUnitTest.h" 12 | 13 | // TODO: reference additional headers your program requires here 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTest/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AILevel/AILevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief Level showing how navigation module works in the engine and how to use the particle system 7 | * 8 | */ 9 | namespace Isetta { 10 | DEFINE_LEVEL(AILevel) 11 | void Load() override; 12 | DEFINE_LEVEL_END 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AILevel/AITestAgent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "AI/Nav2DAgent.h" 6 | #include "AI/Nav2DPlane.h" 7 | 8 | DEFINE_COMPONENT(AITestAgent, Isetta::Component, true) 9 | Isetta::Nav2DPlane* navPlane; 10 | Isetta::Nav2DAgent* navAgent; 11 | 12 | public: 13 | AITestAgent(Isetta::Nav2DPlane* nav2DPlane) : navPlane{nav2DPlane} {} 14 | 15 | // Assign the navigation plane to the navigation agent 16 | void Awake() override { navAgent = entity->AddComponent(navPlane); } 17 | 18 | void Update() override { 19 | Isetta::Math::Vector3 currPos{transform->GetWorldPos()}; 20 | // Get the suggested movement direction from the agent 21 | auto v = 22 | navAgent->GetAIMovement({currPos.x, currPos.z}, Isetta::Time::GetDeltaTime()); 23 | currPos.x += v.x * Isetta::Time::GetDeltaTime(); 24 | currPos.z += v.y * Isetta::Time::GetDeltaTime(); 25 | transform->SetWorldPos(currPos); 26 | Isetta::DebugDraw::Cube(transform->GetLocalToWorldMatrix(), 27 | Isetta::Color::green); 28 | } 29 | 30 | DEFINE_COMPONENT_END(AITestAgent, Isetta::Component) 31 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AILevel/AITestComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "AI/Nav2DAgent.h" 6 | #include "AI/Nav2DPlane.h" 7 | 8 | namespace Isetta { 9 | DEFINE_COMPONENT(AITestComponent, Component, true) 10 | // A Nav2DPlane is a representation of a navigatable 2D plane 11 | Nav2DPlane navPlane; 12 | 13 | public: 14 | // The grid surface is the size of the navigation plane, the divide number is 15 | // how the plane is divided into a grid (10x10 or 5x5) 16 | AITestComponent(const Math::Rect& gridSurface, 17 | const Math::Vector2Int& divideNums, Transform* tracking); 18 | // void GuiUpdate() override; 19 | void Update() override; 20 | void Awake() override; 21 | Transform* trackingEntity; 22 | Array agents; 23 | DEFINE_COMPONENT_END(AITestComponent, Component) 24 | } // namespace Isetta 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AudioLevel/AudioLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Level.h" 6 | 7 | /** 8 | * @brief Level to demonstrate 2D and 3D audio 9 | * 10 | */ 11 | namespace Isetta { 12 | DEFINE_LEVEL(AudioLevel) 13 | void Load() override; 14 | DEFINE_LEVEL_END 15 | } // namespace Isetta 16 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AudioLevel/AudioPlay.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "AudioPlay.h" 5 | 6 | namespace Isetta { 7 | void AudioPlay::OnEnable() { 8 | src->Play(); 9 | src->Pause(); 10 | handle = Input::RegisterKeyPressCallback(key, [&]() { 11 | if (src->IsPaused()) 12 | src->Continue(); 13 | else if (src->IsPlaying()) 14 | src->Pause(); 15 | else 16 | src->Play(); 17 | }); 18 | } 19 | void AudioPlay::OnDisable() { Input::UnregisterKeyPressCallback(key, handle); } 20 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/AudioLevel/AudioPlay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | namespace Isetta { 6 | DEFINE_COMPONENT(AudioPlay, Component, false) 7 | private: 8 | class AudioSource* const src = nullptr; 9 | KeyCode key; 10 | U64 handle; 11 | 12 | public: 13 | AudioPlay(KeyCode key, class AudioSource* const src) : key{key}, src{src} {} 14 | 15 | void OnEnable() override; 16 | void OnDisable() override; 17 | DEFINE_COMPONENT_END(AudioPlay, Component) 18 | } // namespace Isetta 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/BVHLevel/BVHLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | 7 | /** 8 | * @brief Level testing our dynamic AABB tree 9 | * 10 | */ 11 | namespace Isetta { 12 | DEFINE_LEVEL(BVHLevel) 13 | void Load() override; 14 | 15 | private: 16 | std::queue spheres; 17 | Array randomMovers; 18 | int count = 0; 19 | DEFINE_LEVEL_END 20 | } // namespace Isetta 21 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/BVHLevel/RandomMover.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "RandomMover.h" 5 | 6 | namespace Isetta { 7 | void RandomMover::Update() { 8 | // Get delta time 9 | float dt = Time::GetDeltaTime(); 10 | // Translate transform's world coordinates 11 | transform->TranslateWorld(velocity * dt); 12 | 13 | coolDown -= dt; 14 | if (coolDown <= 0) { 15 | coolDown = interval; 16 | // Random values in each direction, with random speed 17 | velocity = Math::Vector3{Math::Random::GetRandom01() - 0.5f, 18 | Math::Random::GetRandom01() - 0.5f, 19 | Math::Random::GetRandom01() - 0.5f} * 20 | Math::Random::GetRandom01() * speed; 21 | 22 | if (range > 0 && transform->GetWorldPos().SqrMagnitude() > range * range && 23 | Math::Vector3::Dot(transform->GetWorldPos(), velocity) > 0) { 24 | velocity *= -1; 25 | } 26 | } 27 | } 28 | } // namespace Isetta 29 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/BVHLevel/RandomMover.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Moves the entity in a random direction for a given interval 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(RandomMover, Component, false) 12 | public: 13 | void Update() override; 14 | 15 | float speed{5.f}; 16 | float coolDown{0.f}; 17 | float interval{1.f}; 18 | float range{0.f}; 19 | 20 | private: 21 | Math::Vector3 velocity; 22 | 23 | DEFINE_COMPONENT_END(RandomMover, Component) 24 | } // namespace Isetta 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/CollisionSolverLevel/CollisionSolverLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | /** 8 | * @brief Level testing our collision solving system 9 | * 10 | */ 11 | DEFINE_LEVEL(CollisionSolverLevel) 12 | Entity* box = nullptr; 13 | Entity* capsule = nullptr; 14 | Entity* sphere = nullptr; 15 | void Load() override; 16 | DEFINE_LEVEL_END 17 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/CollisionsLevel/CollisionsLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Level testing our collision intersections 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_LEVEL(CollisionsLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | } // namespace Isetta 15 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/DebugCollision.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "DebugCollision.h" 5 | 6 | namespace Isetta { 7 | // Register collision callbacks 8 | void DebugCollision::OnEnable() { 9 | // Get all colliders on this entity 10 | colliders = entity->GetComponents(); 11 | // CollisionHandler is responsible for callback events 12 | handler = entity->GetComponent(); 13 | 14 | // Register callback to OnEnter 15 | // BIND_1 binds this object to the member method OnCollisionEnter 16 | enterHandle = 17 | handler->RegisterOnEnter(BIND_1(DebugCollision::OnCollisionEnter, this)); 18 | // Register callback to OnExit 19 | exitHandle = 20 | handler->RegisterOnExit(BIND_1(DebugCollision::OnCollisionExit, this)); 21 | } 22 | 23 | // Unregister collision callbacks 24 | void DebugCollision::OnDisable() { 25 | handler->UnregisterOnEnter(enterHandle); 26 | handler->UnregisterOnExit(exitHandle); 27 | } 28 | 29 | // Set all colliders on entity to red on intersection 30 | void DebugCollision::OnCollisionEnter(Collider* const col) { 31 | collisions++; 32 | for (auto& c : colliders) { 33 | // debugColor is the color of Collider in _Editor 34 | c->debugColor = Color::red; 35 | } 36 | } 37 | 38 | // Set all colliders on entity to green if no intersections 39 | void DebugCollision::OnCollisionExit(Collider* const other) { 40 | collisions--; 41 | if (collisions == 0) { 42 | for (auto& c : colliders) { 43 | c->debugColor = Color::green; 44 | } 45 | } 46 | } 47 | } // namespace Isetta 48 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/DebugCollision.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Change the appearance of the collider on collision 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(DebugCollision, Component, false) 12 | private: 13 | int collisions = 0; 14 | U64 enterHandle, exitHandle; 15 | Array colliders; 16 | class CollisionHandler* handler; 17 | 18 | public: 19 | void OnEnable() override; 20 | void OnDisable() override; 21 | void OnCollisionEnter(class Collider* const other); 22 | void OnCollisionExit(class Collider* const other); 23 | DEFINE_COMPONENT_END(DebugCollision, Component) 24 | } // namespace Isetta 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/EscapeExit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EscapeExit.h" 5 | 6 | namespace Isetta { 7 | // Register escape key to exit 8 | void EscapeExit::OnEnable() { 9 | handle = Input::RegisterKeyPressCallback(KeyCode::ESCAPE, 10 | []() { Application::Exit(); }); 11 | } 12 | // Unregister escape key 13 | void EscapeExit::OnDisable() { 14 | Input::UnregisterKeyPressCallback(KeyCode::ESCAPE, handle); 15 | } 16 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/EscapeExit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Quit application on ESC key 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(EscapeExit, Component, false) 12 | private: 13 | U64 handle; 14 | 15 | public: 16 | void OnEnable() override; 17 | void OnDisable() override; 18 | DEFINE_COMPONENT_END(EscapeExit, Component) 19 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/KeyTransform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Move the entity transform in discrete steps or continuous motion 8 | * M toggle between step and continuous 9 | * 10 | * RIGHT_ARROW move right 11 | * LEFT_ARROW move left 12 | * UP_ARROW move forward 13 | * DOWN_ARROW move back 14 | * PAGE_UP move up 15 | * PAGE_DOWN move down 16 | * 17 | * NUM1 rotate about X 18 | * NUM2 rotate about -X by step 19 | * NUM3 rotate about -Y by step 20 | * NUM4 rotate about Y by step 21 | * NUM5 rotate about Z by step 22 | * NUM6 rotate about -Z by step 23 | * 24 | * NUM7 scale by 1.1 uniformly 25 | * NUM8 scale by 0.9 uniformly 26 | * 27 | */ 28 | namespace Isetta { 29 | DEFINE_COMPONENT(KeyTransform, Component, false) 30 | private: 31 | float step; 32 | bool pressed = true; 33 | 34 | public: 35 | KeyTransform(float step = 1) : step{step} {} 36 | 37 | void OnEnable() override; 38 | void Update() override; 39 | DEFINE_COMPONENT_END(KeyTransform, Component) 40 | } // namespace Isetta 41 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/OscillateMove.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "OscillateMove.h" 5 | 6 | namespace Isetta { 7 | // Check for valid axis of direction of movement (0-2) 8 | void OscillateMove::OnEnable() { 9 | if (axis < 0 || axis > Math::Vector3::ELEMENT_COUNT - 1) { 10 | this->SetActive(false); 11 | } 12 | } 13 | 14 | // Move the transform each update 15 | void OscillateMove::Update() { 16 | float dist = Math::Vector3::Dot(transform->GetLocalPos() - origin, 17 | transform->GetAxis(axis)); 18 | if (distance < dist) { 19 | direction = -1; 20 | } else if (-distance > dist) { 21 | direction = 1; 22 | } 23 | transform->TranslateLocal(direction * transform->GetAxis(axis) * speed * 24 | EngineLoop::GetGameClock().GetDeltaTime()); 25 | // DebugDraw::Cube(Math::Matrix4::Translate(transform->GetWorldPos())); 26 | } 27 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/OscillateMove.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Osciallate movement between distance at speed 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(OscillateMove, Component, false) 12 | private: 13 | int axis = 0; 14 | int direction = 1; 15 | float speed = 1; 16 | Math::Vector3 origin = Math::Vector3::zero; 17 | float distance = 5; 18 | 19 | public: 20 | OscillateMove(int axis = 0, float speed = 1, int direction = 1, 21 | float distance = 5, 22 | const Math::Vector3& origin = Math::Vector3::zero) 23 | : axis{axis}, 24 | speed{speed}, 25 | direction{direction}, 26 | distance{distance}, 27 | origin{origin} {} 28 | 29 | void OnEnable() override; 30 | void Update() override; 31 | DEFINE_COMPONENT_END(OscillateMove, Component) 32 | } // namespace Isetta 33 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Custom/RaycastClick.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Raycast into the level on mouse click, debug drawing ray and hit 8 | * points 9 | * 10 | */ 11 | namespace Isetta { 12 | DEFINE_COMPONENT(RaycastClick, Component, false) 13 | private: 14 | bool useRaycastAll = false; 15 | float maxRayDistance = 0; 16 | 17 | void Raycast(const class Ray& ray); 18 | void RaycastAll(const class Ray& ray); 19 | 20 | public: 21 | RaycastClick(bool raycastAll = false, float maxDistance = 0); 22 | void OnEnable() override; 23 | DEFINE_COMPONENT_END(RaycastClick, Component) 24 | } // namespace Isetta 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/DebugLevel/DebugComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "DebugComponent.h" 5 | 6 | using namespace Isetta; 7 | 8 | void DebugComponent::Update() { 9 | DebugDraw::Point(2 * Math::Vector3::left, Color::magenta, 20); 10 | DebugDraw::Line(Math::Vector3::zero, 3 * Math::Vector3::one); 11 | // Rotating ray in a circle 12 | if (Input::IsKeyPressed(KeyCode::V)) { 13 | static float angle = 0.0f; 14 | angle += 0.4f * EngineLoop::GetGameClock().GetDeltaTime(); 15 | if (angle >= 2 * Math::Util::PI) { 16 | angle = 0; 17 | } 18 | DebugDraw::Ray( 19 | Math::Vector3::zero, 20 | Math::Vector3{Math::Util::Cos(angle), 0, Math::Util::Sin(angle)}, 21 | Color::cyan, 2); 22 | } 23 | // Display plane 24 | if (Input::IsKeyPressed(KeyCode::B)) { 25 | DebugDraw::Plane(Math::Matrix4::identity, Color::blue, 2); 26 | } 27 | DebugDraw::WirePlane(Math::Matrix4::identity); 28 | DebugDraw::Cube(Math::Matrix4::Translate(Math::Vector3{2.8, 1.1, 0}) * 29 | Math::Matrix4::Scale(2.2 * Math::Vector3::one), 30 | Color::brown); 31 | DebugDraw::WireCube(Math::Matrix4::Translate(Math::Vector3{0, 0, -2})); 32 | DebugDraw::WireSphere(Math::Vector3::up, 1, Color::red); 33 | DebugDraw::WireCapsule(Math::Matrix4::Translate(Math::Vector3{-1, 4, 1}), 0.5, 34 | 2, Color::blue); 35 | DebugDraw::AxisSphere(Math::Vector3::up, 1); 36 | DebugDraw::Axis(); 37 | DebugDraw::Grid(); 38 | } -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/DebugLevel/DebugComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief DebugDrawing example component with a number of the debug drawing 7 | * capabilities 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(DebugComponent, Component, false) 12 | public: 13 | void Update() override; 14 | DEFINE_COMPONENT_END(DebugComponent, Component) 15 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/DebugLevel/DebugLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "DebugLevel.h" 5 | #include "Components/FlyController.h" 6 | #include "DebugComponent.h" 7 | 8 | using namespace Isetta; 9 | void DebugLevel::Load() { 10 | Entity* cameraEntity{Entity::Instantiate("Camera")}; 11 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 12 | Math::Vector3::one); 13 | 14 | cameraEntity->AddComponent(); 15 | cameraEntity->AddComponent(); 16 | // See DebugComponent for more details 17 | cameraEntity->AddComponent(); 18 | } 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/DebugLevel/DebugLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | using namespace Isetta; 6 | 7 | /** 8 | * @brief Level demoing our debug drawing capabilities 9 | * 10 | */ 11 | DEFINE_LEVEL(DebugLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EditorLevel/EditorLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EditorLevel.h" 5 | #include "Components/Editor/EditorComponent.h" 6 | #include "Custom/EscapeExit.h" 7 | 8 | namespace Isetta { 9 | 10 | void EditorLevel::Load() { 11 | Entity* cameraEntity{Entity::Instantiate("Camera")}; 12 | cameraEntity->AddComponent(); 13 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 14 | Math::Vector3::one); 15 | cameraEntity->AddComponent(); 16 | 17 | // Entity holding editor components 18 | Entity* editor{Entity::Instantiate("Editor")}; 19 | // EditorComponent has console, inspector, hierarchy, and frame reporter 20 | editor->AddComponent(); 21 | 22 | // Each component can also be added individually 23 | // editor->AddComponent("Console", true); 24 | // Inspector* inspector = editor->AddComponent("Inspector", false); 25 | // editor->AddComponent("Hierarchy", true, inspector); 26 | } 27 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EditorLevel/EditorLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Level showing the editor components: inspector, hierarchy, and console 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_LEVEL(EditorLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | } // namespace Isetta 15 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EmptyLevel/EmptyLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EmptyLevel.h" 5 | #include "Custom/EscapeExit.h" 6 | 7 | namespace Isetta { 8 | 9 | void EmptyLevel::Load() { 10 | Entity* cameraEntity = Entity::Instantiate("Camera"); 11 | cameraEntity->AddComponent(); 12 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 13 | Math::Vector3::one); 14 | // Quits the application 15 | // Application::Exit(); 16 | 17 | // Escape Key exits application 18 | cameraEntity->AddComponent(); 19 | } 20 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EmptyLevel/EmptyLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Empty level to be used as a starting point for user created levels 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_LEVEL(EmptyLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | } // namespace Isetta 15 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EventLevel/EventLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EventLevel.h" 5 | #include "EventListenerComponent.h" 6 | #include "EventSenderComponent.h" 7 | 8 | using namespace Isetta; 9 | 10 | void EventLevel::Load() { 11 | Entity* cameraEntity = Entity::Instantiate("Camera"); 12 | cameraEntity->AddComponent(); 13 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 14 | Math::Vector3::one); 15 | 16 | // Send/create event 17 | Entity* senderEntity = Entity::Instantiate("SenderEntity"); 18 | senderEntity->AddComponent(); 19 | 20 | // Listen for event 21 | Entity* listenerEntity = Entity::Instantiate("ListenerEntity"); 22 | listenerEntity->AddComponent(); 23 | } 24 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EventLevel/EventLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Level demoing our event messaging system with sender and listener 8 | * components 9 | * 10 | */ 11 | DEFINE_LEVEL(EventLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EventLevel/EventListenerComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EventListenerComponent.h" 5 | 6 | namespace Isetta { 7 | void EventListenerComponent::OnEnable() { 8 | // Register event listener to a specific event 9 | // param1: event name 10 | // param2: callback function 11 | handle = Events::Instance().RegisterEventListener( 12 | "RaiseEvent", [](const Isetta::EventObject& eventObject) { 13 | std::string message{std::get(eventObject.eventParams[0])}; 14 | LOG_INFO(Isetta::Debug::Channel::Gameplay, 15 | Isetta::Debug::Verbosity::Info, "Event: %s", message.c_str()); 16 | }); 17 | } 18 | 19 | // Unregister listener 20 | void EventListenerComponent::OnDisable() { 21 | Events::Instance().UnregisterEventListener("RaiseEvent", handle); 22 | } 23 | } // namespace Isetta 24 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EventLevel/EventListenerComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Listen for event and output message 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(EventListenerComponent, Component, false) 12 | private: 13 | int handle; 14 | 15 | public: 16 | void OnEnable() override; 17 | void OnDisable() override; 18 | DEFINE_COMPONENT_END(EventListenerComponent, Component) 19 | } // namespace Isetta 20 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/EventLevel/EventSenderComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Construct a new define component object 8 | * 9 | */ 10 | DEFINE_COMPONENT(EventSenderComponent, Isetta::Component, false) 11 | Isetta::U64 handleA{0}, handleB{0}, handleC{0}; 12 | void Start() override; 13 | DEFINE_COMPONENT_END(EventSenderComponent, Isetta::Component) 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Example/ExampleComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "ExampleComponent.h" 5 | 6 | namespace Isetta { 7 | void ExampleComponent::Update() { 8 | DebugDraw::WireCube(transform->GetLocalToWorldMatrix()); 9 | Entity* entity = Entity::GetEntityByName("PushAnim"); 10 | 11 | if (entity != nullptr) { 12 | if (Input::IsKeyPressed(KeyCode::N)) { 13 | entity->GetComponent()->SetActive(false); 14 | } 15 | if (Input::IsKeyPressed(KeyCode::M)) { 16 | entity->GetComponent()->SetActive(true); 17 | } 18 | } 19 | 20 | float speed = 3.f; 21 | float rotSpeed = 30.; 22 | float dt = EngineLoop::GetGameClock().GetDeltaTime(); 23 | 24 | if (Input::IsKeyPressed(KeyCode::UP_ARROW)) { 25 | transform->TranslateWorld(transform->GetForward() * dt * speed); 26 | } 27 | 28 | if (Input::IsKeyPressed(KeyCode::DOWN_ARROW)) { 29 | transform->TranslateWorld(transform->GetForward() * dt * -speed); 30 | } 31 | 32 | if (Input::IsKeyPressed(KeyCode::LEFT_ARROW)) { 33 | transform->RotateLocal(transform->GetUp(), rotSpeed * dt); 34 | } 35 | 36 | if (Input::IsKeyPressed(KeyCode::RIGHT_ARROW)) { 37 | transform->RotateLocal(transform->GetUp(), -rotSpeed * dt); 38 | } 39 | } 40 | } // namespace Isetta 41 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Example/ExampleComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief Component demoing what a component should look like 7 | * param1: Name of new component 8 | * param2: Name of base/parent component 9 | * param3: Whether the component is unique on an entity (ie. [AllowMultiple=false]) 10 | */ 11 | namespace Isetta { 12 | DEFINE_COMPONENT(ExampleComponent, Component, true) 13 | public: 14 | void Update() override; 15 | DEFINE_COMPONENT_END(ExampleComponent, Component) 16 | } // namespace Isetta 17 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Example/ExampleLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Level with an animating model and example component 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_LEVEL(ExampleLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | } // namespace Isetta 15 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/GUILevel/FontExample.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "FontExample.h" 5 | 6 | namespace Isetta { 7 | FontExample::FontExample(float fontSize, const std::string_view fontName) 8 | : fontSize{fontSize} { 9 | Font::AddFontFromFile(fontName.data(), 16.0f, "FontExampleName"); 10 | Font::AddFontFromFile(fontName.data(), 32.0f, "FontExampleName"); 11 | if (fontSize > 0) 12 | Font::AddFontFromFile(fontName.data(), fontSize, "FontExampleName"); 13 | else 14 | fontSize = 16.0f; 15 | } 16 | void FontExample::GuiUpdate() { 17 | GUI::Text( 18 | RectTransform{{0, 100, 0, 0}, GUI::Pivot::Center, GUI::Pivot::Center}, 19 | "Test", GUI::TextStyle{fontSize, "FontNameExample"}); 20 | } 21 | } // namespace Isetta 22 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/GUILevel/FontExample.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | namespace Isetta { 7 | DEFINE_COMPONENT(FontExample, Component, true) 8 | private: 9 | float fontSize; 10 | 11 | public: 12 | FontExample(float fontSize, 13 | const std::string_view fontName = "Fonts\\CONSOLA.TTF"); 14 | 15 | void GuiUpdate() override; 16 | DEFINE_COMPONENT_END(FontExample, Component) 17 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/GUILevel/GUIComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Some of the GUI functionality 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(GUIComponent, Component, false) 12 | private: 13 | static bool checkbox; 14 | 15 | public: 16 | void GuiUpdate() override; 17 | DEFINE_COMPONENT_END(GUIComponent, Component) 18 | } // namespace Isetta 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/GUILevel/GUILevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "GUILevel.h" 5 | #include "FontExample.h" 6 | #include "GUIComponent.h" 7 | 8 | using namespace Isetta; 9 | 10 | void GUILevel::Load() { 11 | // Load font at filepath at size(s) 12 | // Font::AddFontFromFile("Fonts\\CONSOLA.TTF", 13.0f, "Consola"); 13 | 14 | Entity* cameraEntity = Entity::Instantiate("Camera"); 15 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 16 | Math::Vector3::one); 17 | cameraEntity->AddComponent(); 18 | 19 | Entity* guiEntity = Entity::Instantiate("GUI"); 20 | // Display some of GUI functionality 21 | guiEntity->AddComponent(); 22 | // Display use of font in GUI 23 | guiEntity->AddComponent(16.f, "Halves/ZOMBIE.TTF"); 24 | } 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/GUILevel/GUILevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | using namespace Isetta; 6 | 7 | /** 8 | * @brief Level demoing some of our GUI capabilities 9 | * 10 | */ 11 | DEFINE_LEVEL(GUILevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/Bullet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | namespace Isetta { 7 | DEFINE_COMPONENT(Bullet, Component, true) 8 | public: 9 | void Reactivate(const Math::Vector3& pos, const Math::Vector3& flyDir); 10 | void OnEnable() override; 11 | void Update() override; 12 | 13 | // exposed for easier debug inspector 14 | static float flySpeed; 15 | 16 | private: 17 | float lifeTime{1.5}; 18 | float elapsedTime{0}; 19 | float damage{35}; 20 | Math::Vector3 dir{}; 21 | bool initialized = false; 22 | AudioSource* audio; 23 | DEFINE_COMPONENT_END(Bullet, Component) 24 | } // namespace Isetta 25 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/CameraController.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "CameraController.h" 5 | #include "PlayerController.h" 6 | 7 | namespace Isetta { 8 | 9 | void CameraController::Update() { 10 | auto player = PlayerController::Instance(); 11 | if (player != nullptr) { 12 | // always follow player 13 | transform->SetWorldPos(player->transform->GetWorldPos() + Math::Vector3{0, y, z}); 14 | Math::Vector3 dir = transform->GetWorldPos() - player->transform->GetWorldPos(); 15 | transform->LookAt(transform->GetWorldPos() + dir); 16 | } 17 | } 18 | 19 | void CameraController::GuiUpdate() { 20 | float base = 150; 21 | float padding = 20; 22 | // A hacky solution to allow tweaking value at runtime 23 | GUI::SliderFloat(RectTransform{Math::Rect{-200, base, 300, 100}, 24 | GUI::Pivot::TopRight, GUI::Pivot::TopRight}, 25 | "Camera Height", &y, 0, 30.f); 26 | GUI::SliderFloat(RectTransform{Math::Rect{-200, base + padding, 300, 100}, 27 | GUI::Pivot::TopRight, GUI::Pivot::TopRight}, 28 | "Camera HoriDis", &z, 0, 30.f); 29 | } 30 | } // namespace Isetta 31 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/CameraController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | namespace Isetta { 7 | DEFINE_COMPONENT(CameraController, Component, true) 8 | public : void Update() override; 9 | void GuiUpdate() override; 10 | 11 | private: 12 | float y = 9.8; 13 | float z = 4.6; 14 | DEFINE_COMPONENT_END(CameraController, Component) 15 | } // namespace Isetta 16 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/GameManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | 7 | namespace Isetta { 8 | DEFINE_COMPONENT(GameManager, Component, true) 9 | public: 10 | void Start() override; 11 | void OnEnable() override; 12 | void Update() override; 13 | void GuiUpdate() override; 14 | 15 | static std::vector zombies; 16 | static int score; 17 | 18 | private: 19 | class Font* font; 20 | void SpawnZombie() const; 21 | float spawnRadius{10}; 22 | float spawnInterval{2}; 23 | float cooldown{3}; 24 | int poolSize = 100; 25 | DEFINE_COMPONENT_END(GameManager, Component) 26 | } // namespace Isetta 27 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/HalvesLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | namespace Isetta { 6 | DEFINE_LEVEL(HalvesLevel) 7 | void Load() override; 8 | DEFINE_LEVEL_END 9 | } // namespace Isetta 10 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/PlayerController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include 6 | namespace Isetta { 7 | DEFINE_COMPONENT(PlayerController, Component, true) 8 | public: 9 | void OnEnable() override; 10 | void Start() override; 11 | void Update() override; 12 | void GuiUpdate() override; 13 | static PlayerController* Instance(); 14 | 15 | private: 16 | static PlayerController* instance; 17 | void Shoot(); 18 | 19 | float scale{0.01f}; 20 | float moveSpeed{15.0f}; 21 | bool isMoving{false}; 22 | float lookSmooth{30.f}; 23 | 24 | // shooting 25 | std::vector bullets; 26 | int bulletPoolSize = 100; 27 | float shootInterval = 0.15f; 28 | float cooldown{0}; 29 | AudioSource* shootAudio{nullptr}; 30 | 31 | AnimationComponent* animationComp{nullptr}; 32 | 33 | DEFINE_COMPONENT_END(PlayerController, Component) 34 | } // namespace Isetta 35 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/Zombie.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Zombie.h" 5 | #include "GameManager.h" 6 | #include "PlayerController.h" 7 | 8 | namespace Isetta { 9 | float Zombie::speed = 10.f; 10 | 11 | void Zombie::OnEnable() { 12 | if (!isInitialized) { 13 | // add mesh and animation component when first time initialized 14 | MeshComponent* mesh = 15 | entity->AddComponent("Halves/Zombie/Zombie.scene.xml"); 16 | AnimationComponent* animation = 17 | entity->AddComponent(mesh); 18 | animation->AddAnimation("Halves/Zombie/Zombie.anim", 0, "", false); 19 | // initialize audio too 20 | audio = entity->AddComponent( 21 | AudioClip::Load("Halves/Sound/zombie-death.mp3")); 22 | isInitialized = true; 23 | } 24 | entity->GetComponent()->Play(); 25 | health = 100.f; 26 | } 27 | 28 | void Zombie::Update() { 29 | auto player = PlayerController::Instance(); 30 | if (player == nullptr) return; 31 | 32 | // run to player 33 | Math::Vector3 dir = 34 | player->transform->GetWorldPos() - transform->GetWorldPos(); 35 | transform->TranslateWorld(dir.Normalized() * Time::GetDeltaTime() * speed); 36 | transform->LookAt(transform->GetWorldPos() + dir); 37 | } 38 | 39 | // get shot by player 40 | void Zombie::TakeDamage(const float damage) { 41 | health -= damage; 42 | if (health <= 0) { 43 | audio->Play(); 44 | GameManager::score += (Math::Random::GetRandom01() / 2 + 0.5f) * 10; 45 | entity->SetActive(false); 46 | } 47 | } 48 | } // namespace Isetta 49 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Halves/Zombie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | namespace Isetta { 6 | DEFINE_COMPONENT(Zombie, Component, true) 7 | public: 8 | void OnEnable() override; 9 | void Update() override; 10 | void TakeDamage(float damage); 11 | static float speed; 12 | 13 | private: 14 | float health = 100; 15 | bool isInitialized = false; 16 | AudioSource* audio{nullptr}; 17 | DEFINE_COMPONENT_END(Zombie, Component) 18 | } // namespace Isetta 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/InputLevel/InputLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "InputLevel.h" 5 | 6 | #include "InputTestComponent.h" 7 | 8 | using namespace Isetta; 9 | 10 | void InputLevel::Load() { 11 | Entity* cameraEntity{Entity::Instantiate("Camera")}; 12 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 13 | Math::Vector3::one); 14 | 15 | cameraEntity->AddComponent(); 16 | // See InputTestComponent for details 17 | cameraEntity->AddComponent(); 18 | } 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/InputLevel/InputLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | using namespace Isetta; 6 | 7 | /** 8 | * @brief Level demoing some of the input capabilities 9 | * 10 | */ 11 | DEFINE_LEVEL(InputLevel) 12 | void Load() override; 13 | DEFINE_LEVEL_END -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/InputLevel/InputTestComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | using namespace Isetta; 6 | 7 | /** 8 | * @brief Demoing of some input capabilities 9 | * 10 | */ 11 | DEFINE_COMPONENT(InputTestComponent, Component, false) 12 | private: 13 | U64 handleA, handleB, handleC; 14 | 15 | public: 16 | void OnEnable() override; 17 | void OnDisable() override; 18 | void Update() override; 19 | DEFINE_COMPONENT_END(InputTestComponent, Component) 20 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Constants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | /** 5 | * @brief All constants for the KnightGame 6 | * 7 | */ 8 | namespace KnightGame { 9 | static const std::string KNIGHT_PATH = "KnightGame\\Knight\\"; 10 | static const std::string KNIGHT_LAYER = "Knight_Layer"; 11 | static int knightLayer; 12 | static inline const int enemyPool = 10; 13 | static const std::string GAMEOVER_EVENT = "GameOver"; 14 | } // namespace KnightGame -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/EmptyComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EmptyComponent.h" 5 | 6 | using namespace Isetta; 7 | 8 | namespace KnightGame 9 | { 10 | } // namespace KnightGame 11 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/EmptyComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/Component.h" 6 | 7 | using namespace Isetta; 8 | 9 | namespace KnightGame 10 | { 11 | BEGIN_COMPONENT(EmptyComponent, Component, true) 12 | private: 13 | public: 14 | }; // namespace KnightGame 15 | } // namespace KnightGame 16 | 17 | bool Isetta::ComponentRegistry::EmptyComponentRegistered = 19 | Component::RegisterComponent( 20 | std::type_index(typeid(KnightGame::EmptyComponent)), 21 | std::type_index(typeid(Component)), true); -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/Enemy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class CapsuleCollider; 10 | class Collider; 11 | class CollisionHandler; 12 | 13 | class AudioClip; 14 | class AudioSource; 15 | 16 | class Entity; 17 | class MeshComponent; 18 | } // namespace Isetta 19 | 20 | namespace KnightGame { 21 | DEFINE_COMPONENT(Enemy, Component, true) 22 | private: 23 | CollisionHandler* handler; 24 | U64 handle; 25 | AudioSource* src; 26 | AudioClip* const swordClip; 27 | Entity* deadBody; 28 | MeshComponent* mesh; 29 | CapsuleCollider* capsule; 30 | 31 | public: 32 | Enemy() = default; 33 | Enemy(CollisionHandler* handler, AudioClip* const swordClip) 34 | : handler{handler}, swordClip{swordClip} {} 35 | 36 | void OnEnable() override; 37 | void OnDisable() override; 38 | void OnCollisionEnter(Collider* const collider); 39 | 40 | void Explode(); 41 | void Reset(); 42 | }; // namespace KnightGame 43 | } // namespace KnightGame 44 | 45 | using namespace KnightGame; 46 | REGISTER_COMPONENT(Enemy, Component, true) -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/FireballCircle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class ParticleSystemComponent; 10 | class Transform; 11 | class AudioSource; 12 | } // namespace Isetta 13 | 14 | namespace KnightGame { 15 | DEFINE_COMPONENT(FireballCircle, Component, true) 16 | private: 17 | float elapsedTime = 0, timeUp = 3.f; 18 | ParticleSystemComponent* particleSys = nullptr; 19 | float radius = 2.f; 20 | float angle = 0; 21 | float speed = 30.f; 22 | Transform* center; 23 | class SpinAttack* spin; 24 | AudioSource* src; 25 | 26 | public: 27 | std::list enemies; 28 | 29 | FireballCircle() = default; 30 | FireballCircle(Transform* center, SpinAttack* spin) 31 | : center{center}, spin{spin} {} 32 | 33 | void Start() override; 34 | void OnEnable() override; 35 | void OnDisable() override; 36 | void Update() override; 37 | }; // namespace KnightGame 38 | } // namespace KnightGame 39 | 40 | using namespace KnightGame; 41 | REGISTER_COMPONENT(FireballCircle, Component, true) 42 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/FollowComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "FollowComponent.h" 5 | 6 | using namespace Isetta; 7 | 8 | namespace KnightGame { 9 | void FollowComponent::LateUpdate() { 10 | Math::Vector3 position = transform->GetWorldPos(); 11 | Math::Vector3 followPos = follow->transform->GetWorldPos(); 12 | for (int i = 0; i < 3; i++) 13 | if (direction[i]) position[i] = followPos[i]; 14 | transform->SetWorldPos(position); 15 | } 16 | } // namespace KnightGame 17 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/FollowComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class Entity; 10 | } // namespace Isetta 11 | 12 | namespace KnightGame { 13 | DEFINE_COMPONENT(FollowComponent, Component, true) 14 | private: 15 | Entity* const follow; 16 | bool direction[3]; 17 | 18 | public: 19 | FollowComponent(Entity* follow, bool direction[3]) : follow{follow} { 20 | for (int i = 0; i < 3; i++) this->direction[i] = direction[i]; 21 | } 22 | void LateUpdate() override; 23 | }; // namespace KnightGame 24 | } // namespace KnightGame 25 | 26 | bool Isetta::ComponentRegistry::FollowComponentRegistered = 28 | Component::RegisterComponent( 29 | std::type_index(typeid(KnightGame::FollowComponent)), 30 | std::type_index(typeid(Component)), true); -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/KnightController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class AnimationComponent; 10 | } 11 | 12 | namespace KnightGame { 13 | DEFINE_COMPONENT(KnightController, Component, true) 14 | public: 15 | void Start() override; 16 | void Update() override; 17 | 18 | void Walk() { canRun = false; } 19 | void Run() { canRun = true; } 20 | 21 | private: 22 | AnimationComponent* animation; 23 | int death, idle, impact, run, slash, spin, walk; 24 | 25 | const float walkSpeed = 0.35f, runSpeed = 1.1f; 26 | const float walkAxis = 0.4f, runAxis = 0.7f; 27 | const float depth = 4.5f; 28 | 29 | bool canRun = true; 30 | 31 | }; // namespace KnightGame 32 | } // namespace KnightGame 33 | 34 | using namespace KnightGame; 35 | REGISTER_COMPONENT(KnightController, Component, true) -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/ScoreManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class Font; 10 | } // namespace Isetta 11 | 12 | namespace KnightGame { 13 | DEFINE_COMPONENT(ScoreManager, Component, true) 14 | private: 15 | int score = 0; 16 | Font *titleFont, *scoreFont; 17 | static inline ScoreManager* instance; 18 | 19 | int gameOverEvent; 20 | bool gameOver = false; 21 | float elapsed = 0; 22 | const float speed = 0.4f; 23 | 24 | public: 25 | ScoreManager() = default; 26 | 27 | static inline ScoreManager* Instance() { return instance; } 28 | 29 | void Start() override; 30 | void OnEnable() override; 31 | void OnDisable() override; 32 | void GuiUpdate() override; 33 | 34 | inline void AddPoint() { score++; } 35 | }; // namespace KnightGame 36 | } // namespace KnightGame 37 | 38 | using namespace KnightGame; 39 | REGISTER_COMPONENT(ScoreManager, Component, true) -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/ScreenShifter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "ScreenShifter.h" 5 | 6 | using namespace Isetta; 7 | 8 | namespace KnightGame { 9 | void ScreenShifter::Update() { 10 | transform->TranslateWorld(Math::Vector3::left * speed * Time::GetDeltaTime()); 11 | } 12 | } // namespace KnightGame 13 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/ScreenShifter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class CollisionHandler; 10 | } // namespace Isetta 11 | 12 | namespace KnightGame { 13 | DEFINE_COMPONENT(ScreenShifter, Component, true) 14 | private: 15 | float speed = 0.8f; 16 | 17 | public: 18 | ScreenShifter() = default; 19 | 20 | void Update() override; 21 | }; // namespace KnightGame 22 | } // namespace KnightGame 23 | 24 | using namespace KnightGame; 25 | REGISTER_COMPONENT(ScreenShifter, Component, true) -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/SpinAttack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace KnightGame { 9 | DEFINE_COMPONENT(SpinAttack, Component, true) 10 | private: 11 | const float axisMin = 0.6f; 12 | float startAngle = 3.14f, lastAngle; 13 | const float timeToComplete = 1.f; 14 | float elapsedTime = 0; 15 | 16 | bool started = false, extended = false; 17 | int direction = 0; 18 | const float anglePercision = 0.25f; 19 | 20 | bool callbackInProgress; 21 | Action<> callback; 22 | 23 | public: 24 | void Update() override; 25 | 26 | void SetCallback(Action<> callback); 27 | }; // namespace KnightGame 28 | } // namespace KnightGame 29 | 30 | bool Isetta::ComponentRegistry::SpinAttackRegistered = 32 | Component::RegisterComponent( 33 | std::type_index(typeid(KnightGame::SpinAttack)), 34 | std::type_index(typeid(Component)), true); -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Gameplay/SwordController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | using namespace Isetta; 7 | 8 | namespace Isetta { 9 | class MeshComponent; 10 | } 11 | 12 | namespace KnightGame { 13 | DEFINE_COMPONENT(SwordController, Component, true) 14 | private: 15 | MeshComponent* const knightMesh; 16 | class KnightController* const knight; 17 | 18 | public: 19 | SwordController(MeshComponent* knightMesh, class KnightController* const knight) 20 | : knightMesh{knightMesh}, knight{knight} {} 21 | 22 | void Update() override; 23 | }; // namespace KnightGame 24 | } // namespace KnightGame 25 | 26 | using namespace KnightGame; 27 | REGISTER_COMPONENT(SwordController, Component, true) -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/KnightGame/Level/KnightMainLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | namespace KnightGame { 6 | DEFINE_LEVEL(KnightMainLevel) 7 | void Load() override; 8 | DEFINE_LEVEL_END 9 | } // namespace KnightGame 10 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/LevelLoadingLevel/LevelLoadingLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "LevelLoadingLevel.h" 5 | #include "Custom/EscapeExit.h" 6 | #include "Custom/LevelLoadingMenu.h" 7 | #include "LoadNextLevel.h" 8 | 9 | namespace Isetta { 10 | void LevelLoadingLevel::Load() { 11 | Font::AddFontFromFile("Fonts\\CONSOLA.TTF", 13.0f, "Consola"); 12 | 13 | Entity* cameraEntity = Entity::Instantiate("Camera"); 14 | cameraEntity->AddComponent(); 15 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 16 | Math::Vector3::one); 17 | cameraEntity->AddComponent(); 18 | 19 | Entity* levelMenu{Entity::Instantiate("Level Menu")}; 20 | // LevelLoadingMenu brings up a menu to browse other levels 21 | levelMenu->AddComponent(); 22 | // LoadNextLevel loads the level of specified string, 23 | // throws exception if level doesn't exist 24 | levelMenu->AddComponent("EditorLevel"); 25 | } 26 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/LevelLoadingLevel/LevelLoadingLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief Demonstrating level loading 7 | * 8 | */ 9 | namespace Isetta { 10 | DEFINE_LEVEL(LevelLoadingLevel) 11 | void Load() override; 12 | DEFINE_LEVEL_END 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/LevelLoadingLevel/LoadNextLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "LoadNextLevel.h" 5 | 6 | namespace Isetta { 7 | void LoadNextLevel::GuiUpdate() { 8 | if (GUI::Button( 9 | RectTransform{ 10 | {0, 0, 500, 100}, GUI::Pivot::Center, GUI::Pivot::Center}, 11 | "Load Level: " + loadLevel)) { 12 | // Load level named loadLevel 13 | LevelManager::Instance().LoadLevel(loadLevel); 14 | LOG("Current Level: %s;\t Next Level.....%s", 15 | LevelManager::Instance().loadedLevel->GetName().c_str(), 16 | loadLevel.c_str()); 17 | } 18 | } 19 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/LevelLoadingLevel/LoadNextLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | /** 7 | * @brief Loads the next level specified in constructor 8 | * 9 | */ 10 | namespace Isetta { 11 | DEFINE_COMPONENT(LoadNextLevel, Component, true) 12 | private: 13 | std::string loadLevel; 14 | 15 | public: 16 | LoadNextLevel(std::string_view loadLevel) : loadLevel{loadLevel} {} 17 | 18 | void GuiUpdate() override; 19 | DEFINE_COMPONENT_END(LoadNextLevel, Component) 20 | } // namespace Isetta 21 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/MeshAnimLevel/MeshAnimLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief 7 | * 8 | */ 9 | namespace Isetta { 10 | DEFINE_LEVEL(MeshAnimLevel) 11 | void Load() override; 12 | DEFINE_LEVEL_END 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/NetworkLevel/EmptyLevelForNetworkLoadLevel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "EmptyLevelForNetworkLoadLevel.h" 5 | #include "Custom/EscapeExit.h" 6 | #include "NetworkLevel/NetworkTestComp.h" 7 | 8 | namespace Isetta { 9 | 10 | void EmptyLevelForNetworkLoadLevel::Load() { 11 | Entity* cameraEntity = Entity::Instantiate("Camera"); 12 | cameraEntity->AddComponent(); 13 | cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0}, 14 | Math::Vector3::one); 15 | 16 | cameraEntity->AddComponent(); 17 | 18 | Entity* networkTestEntity = Entity::Instantiate("Network Test"); 19 | networkTestEntity->AddComponent(); 20 | } 21 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/NetworkLevel/EmptyLevelForNetworkLoadLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief Empty level to be used as a starting point for user created levels 7 | * 8 | */ 9 | namespace Isetta { 10 | DEFINE_LEVEL(EmptyLevelForNetworkLoadLevel) 11 | void Load() override; 12 | DEFINE_LEVEL_END 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/NetworkLevel/NetworkTestComp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | namespace Isetta { 7 | DEFINE_COMPONENT(NetworkTestComp, Component, true) 8 | public: 9 | void Start() override; 10 | DEFINE_COMPONENT_END(NetworkTestComp, Component) 11 | } // namespace Isetta -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/PrimitiveLevel/PrimitiveLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | /** 6 | * @brief Level displaying all the types of primitive objects 7 | * 8 | */ 9 | namespace Isetta { 10 | DEFINE_LEVEL(PrimitiveLevel) 11 | void Load() override; 12 | DEFINE_LEVEL_END 13 | } // namespace Isetta 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Bodymat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Bottommat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Hairmat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Hatmat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Body_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Bottom_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hair_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Hat_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Shoes_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Gloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Gloss.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Opacity.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Malcom_Top_Specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Pushing.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Pushing.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Pushing.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/Pushing.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Shoesmat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/Topmat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Example/push_maya.mb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Example/push_maya.mb -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Fonts/CONSOLA.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Fonts/CONSOLA.TTF -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.blend -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.blend1 -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Bullet/Bullet.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Ground.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Level.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/Level.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Level.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/Level.blend -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Level.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/Level.blend1 -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Level.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/Level.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/Level.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/albedo.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Ground/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Ground/normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier_Idle.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier_Idle.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier_Idle.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/Soldier_Idle.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/VanguardBodyMat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/Vanguard_VisorMat.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Soldier/vanguard_specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Sound/bullet-impact.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Sound/bullet-impact.wav -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Sound/gunshot.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Sound/gunshot.aiff -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Sound/zombie-death.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Sound/zombie-death.mp3 -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/ZOMBIE.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/ZOMBIE.TTF -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/Zombie.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/Zombie.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/Zombie.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/Zombie.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/emireh_body_material.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/emireh_shoe_material.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body__diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body__diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body_normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body_specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_body_specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Halves/Zombie/mremireh_shoe_specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Images/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Images/cursor.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Images/isetta_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Images/isetta_logo.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Audio/flames.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Audio/flames.aiff -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Audio/sword.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Audio/sword.aiff -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fireball/particle1.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fireball/particle1.particle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fireball/particle2.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fireball/particle2.particle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fireball/particleSys1.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Fonts/KnightsQuest.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Fonts/KnightsQuest.ttf -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Images/pow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Images/pow.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/Guard_03.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/Paladin_MAT.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/Paladin_MAT_001.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/death.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/death.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/file1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/file1.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/file3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/file3.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/file4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/file4.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/idle.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/idle.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/idle.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/idle.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/impact.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/impact.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/knight.fbm/Guard_03__specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/run.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/run.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/slash.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/slash.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/spin.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/spin.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_diffuse.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_normal.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.fbm/Paladin_specular.png -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword_aligned.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword_aligned.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/sword_aligned.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Knight/walk.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/KnightGame/Knight/walk.anim -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/KnightGame/Links.txt: -------------------------------------------------------------------------------- 1 | ## Audio 2 | - sword.aiff: https://freesound.org/people/lostchocolatelab/sounds/1434/ 3 | - flames.aiff: https://freesound.org/people/nextmaking/sounds/86049/ -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Sound/singing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Sound/singing.wav -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Sound/wave.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Sound/wave.mp3 -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Sound/zombie-death.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Sound/zombie-death.mp3 -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Sound/zombie-hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Sound/zombie-hit.wav -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Enemy.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Week10/Enemy.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Enemy.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Enemy.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Ground.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Week10/Ground.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Ground.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Ground.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Player.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Week10/Player.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Player.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/Player.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/RoundedCube.geo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/Resources/Week10/RoundedCube.geo -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/RoundedCube.scene.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Resources/Week10/lambert1.material.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/SkeletonLevel/SkeletonLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | namespace Isetta { 7 | DEFINE_LEVEL(SkeletonLevel) 8 | void Load() override; 9 | DEFINE_LEVEL_END 10 | } // namespace Isetta 11 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10GameManager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Week10MiniGame/W10GameManager.h" -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10GameManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "W10Player.h" 6 | #include "W10NetworkPlayer.h" 7 | 8 | DEFINE_COMPONENT(W10GameManager, Isetta::Component, true) 9 | public: 10 | W10Player* player; 11 | W10NetworkPlayer* enemy; 12 | DEFINE_COMPONENT_END(W10GameManager, Isetta::Component) 13 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10NetworkPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | DEFINE_COMPONENT(W10NetworkPlayer, Isetta::Component, true) 6 | int swordNetId; 7 | bool isOnRight; 8 | int clientAuthorityId; 9 | void InitPosition(); 10 | 11 | public: 12 | W10NetworkPlayer(bool isRight, int swordNetID, int clientAuthorityID); 13 | void Awake() override; 14 | void SwordBlocked(); 15 | void Update() override; 16 | Isetta::Entity* swordEntity; 17 | 18 | DEFINE_COMPONENT_END(W10NetworkPlayer, Isetta::Component) 19 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10Player.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | DEFINE_COMPONENT(W10Player, Isetta::Component, true) 7 | public: 8 | W10Player(bool isRight, int swordNetID, int clientAuthorityID); 9 | void Awake() override; 10 | void Start() override; 11 | void Update() override; 12 | Isetta::Entity* swordEntity; 13 | 14 | private: 15 | void InitPosition(); 16 | bool isOnRight; 17 | bool canOperate; 18 | 19 | float horizontalSpeed; 20 | 21 | int swordPos; 22 | float swordTargetX; 23 | float swordXProgress; 24 | float stabSpeed; 25 | int swordStabStatus; // 0 for init, 1 for atack, 2 for revoke, 3 for not on 26 | // hand 27 | 28 | float gravity; 29 | float flyDuration; 30 | float totalFlyDuration; 31 | float targetX; 32 | float targetY; 33 | float originY; 34 | float v0x; 35 | float v0y; 36 | bool isSwordFlying; 37 | int clientAuthorityId; 38 | int swordNetId; 39 | 40 | void ChangeSwordVerticlePosition(int direction); 41 | void ChangeSwordHorizontalPosition(float deltaTime); 42 | void SwordBlocked(); 43 | 44 | DEFINE_COMPONENT_END(W10Player, Isetta::Component) 45 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10UIManager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Week10MiniGame/W10UIManager.h" 5 | 6 | void W10UIManager::Awake() { 7 | Isetta::Events::Instance().RegisterEventListener( 8 | "UITextChange", [&](const Isetta::EventObject obj) { 9 | displayText = std::get(obj.eventParams[0]); 10 | }); 11 | Isetta::Events::Instance().RegisterEventListener("Win", 12 | [&](auto) { ++winning; }); 13 | Isetta::Events::Instance().RegisterEventListener("Lose", 14 | [&](auto) { ++losing; }); 15 | } 16 | 17 | void W10UIManager::GuiUpdate() { 18 | Isetta::GUI::Text( 19 | Isetta::RectTransform{Isetta::Math::Rect{50, 50, 100, 100}, 20 | Isetta::GUI::Pivot::TopLeft, 21 | Isetta::GUI::Pivot::TopLeft}, 22 | Isetta::Util::StrFormat("Win: %d\nLose: %d", winning, losing)); 23 | Isetta::GUI::Text(Isetta::RectTransform{Isetta::Math::Rect{0, -200, 100, 100}, 24 | Isetta::GUI::Pivot::Center, 25 | Isetta::GUI::Pivot::Center}, 26 | displayText); 27 | } 28 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/W10UIManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | 6 | DEFINE_COMPONENT(W10UIManager, Isetta::Component, true) 7 | int winning; 8 | int losing; 9 | public: 10 | void Awake() override; 11 | void GuiUpdate() override; 12 | std::string displayText = "Press R to ready."; 13 | DEFINE_COMPONENT_END(W10UIManager, Isetta::Component) 14 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/Week10Level.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #include "Week10MiniGame/Week10Level.h" 5 | #include "Components/Editor/EditorComponent.h" 6 | #include "Week10MiniGame/W10NetworkManager.h" 7 | #include "Week10MiniGame/W10UIManager.h" 8 | 9 | using namespace Isetta; 10 | 11 | void Week10Level::Load() { 12 | Entity* cameraEntity{Entity::Instantiate("Camera")}; 13 | cameraEntity->AddComponent(); 14 | cameraEntity->SetTransform(Math::Vector3{0, 0.25f, 3.0f}); 15 | 16 | Entity* lightEntity{Entity::Instantiate("Light")}; 17 | lightEntity->AddComponent(); 18 | lightEntity->SetTransform(Math::Vector3{0, 6, 3.5f}, Math::Vector3{-30, 0, 0}, 19 | Math::Vector3::one); 20 | 21 | Entity* debug{Entity::Instantiate("Debug")}; 22 | debug->AddComponent(); 23 | 24 | Entity* ground{Entity::Instantiate("Ground")}; 25 | ground->AddComponent("Week10/Ground.scene.xml"); 26 | ground->SetTransform(Math::Vector3{0, -5.25, 0}, Math::Vector3::zero, 27 | Math::Vector3{4.0f, 10.0f, 1}); 28 | 29 | Entity* networkManager{Entity::Instantiate("GameManager")}; 30 | networkManager->AddComponent(); 31 | networkManager->AddComponent(); 32 | networkManager->AddComponent(); 33 | } 34 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/Week10MiniGame/Week10Level.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | namespace Isetta { 6 | DEFINE_LEVEL(Week10Level) 7 | void Load() override; 8 | DEFINE_LEVEL_END 9 | } 10 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/WindowLevel/WindowLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Isetta 3 | */ 4 | #pragma once 5 | #include "Scene/IsettaLevel.h" 6 | 7 | using namespace Isetta; 8 | 9 | /** 10 | * @brief Testing the window features 11 | * 12 | */ 13 | DEFINE_LEVEL(WindowLevel) 14 | void Load() override; 15 | DEFINE_LEVEL_END 16 | -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/cpp.hint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isetta-Team/Isetta-Engine/9f9bd0a2785ee7d944c4e251127ff57970f25754/Isetta/IsettaTestbed/cpp.hint -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/main.cpp: -------------------------------------------------------------------------------- 1 | #include "EngineLoop.h" 2 | 3 | int main() { 4 | Isetta::Application::Start(); 5 | 6 | return 0; 7 | } -------------------------------------------------------------------------------- /Isetta/IsettaTestbed/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 The-Engine-Process 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------