Compare commits
7 Commits
pygame-app
...
b5474a2c41
Author | SHA1 | Date | |
---|---|---|---|
b5474a2c41 | |||
1f8d31c894 | |||
f2958fa9fa | |||
d04c0a6e15 | |||
1b1d8a5d82 | |||
5208d61954 | |||
ab5752d59f |
BIN
.vs/ShadowCrestGameEngine/v17/.suo
Normal file
BIN
.vs/ShadowCrestGameEngine/v17/Browse.VC.db
Normal file
BIN
.vs/ShadowCrestGameEngine/v17/Browse.VC.db-shm
Normal file
BIN
.vs/ShadowCrestGameEngine/v17/Browse.VC.db-wal
Normal file
158
.vs/ShadowCrestGameEngine/v17/DocumentLayout.backup.json
Normal file
@ -0,0 +1,158 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TextComponent.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\core\\Engine.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TextComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\Component.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\core\\Engine.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TransformComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\Entity.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "TransformComponent.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TransformComponent.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TransformComponent.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAB8AAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T20:31:15.964Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "TextComponent.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TextComponent.cpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TextComponent.cpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAPAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2025-07-13T20:09:50.139Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"Title": "Entity.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\Entity.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\Entity.hpp",
|
||||
"ViewState": "AgIAAAwAAAAAAAAAAAAAABoAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:25:40.407Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "Component.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\Component.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\Component.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:24:03.306Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "TextComponent.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TextComponent.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TextComponent.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:18:06.662Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Engine.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp",
|
||||
"RelativeDocumentMoniker": "src\\core\\Engine.cpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp",
|
||||
"RelativeToolTip": "src\\core\\Engine.cpp",
|
||||
"ViewState": "AgIAAEsAAAAAAAAAAAAAAFkAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2025-07-13T18:23:56.384Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"FloatingWindowState": {
|
||||
"Id": "09bdcdd6-978b-49f3-a0e1-d42915841f24",
|
||||
"Display": 1,
|
||||
"X": 215,
|
||||
"Y": 195,
|
||||
"Width": 1553,
|
||||
"Height": 721,
|
||||
"WindowState": 2
|
||||
},
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "Engine.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp",
|
||||
"RelativeDocumentMoniker": "src\\core\\Engine.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp",
|
||||
"RelativeToolTip": "src\\core\\Engine.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T18:21:30.176Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
158
.vs/ShadowCrestGameEngine/v17/DocumentLayout.json
Normal file
@ -0,0 +1,158 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TextComponent.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\core\\Engine.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TextComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\Component.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\core\\Engine.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\TransformComponent.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{5653811A-38D1-4D9D-9446-A417E8557584}|ShadowCrestGameEngine.vcxproj|solutionrelative:src\\game\\components\\Entity.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "TransformComponent.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TransformComponent.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TransformComponent.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TransformComponent.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAB8AAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T20:31:15.964Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "TextComponent.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TextComponent.cpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.cpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TextComponent.cpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABkAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2025-07-13T20:09:50.139Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"Title": "Entity.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\Entity.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Entity.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\Entity.hpp",
|
||||
"ViewState": "AgIAAAwAAAAAAAAAAAAAABoAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:25:40.407Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "Component.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\Component.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\Component.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\Component.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:24:03.306Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "TextComponent.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp",
|
||||
"RelativeDocumentMoniker": "src\\game\\components\\TextComponent.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\game\\components\\TextComponent.hpp",
|
||||
"RelativeToolTip": "src\\game\\components\\TextComponent.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T19:18:06.662Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Engine.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp",
|
||||
"RelativeDocumentMoniker": "src\\core\\Engine.cpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.cpp",
|
||||
"RelativeToolTip": "src\\core\\Engine.cpp",
|
||||
"ViewState": "AgIAAEsAAAAAAAAAAAAAAFkAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2025-07-13T18:23:56.384Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"FloatingWindowState": {
|
||||
"Id": "09bdcdd6-978b-49f3-a0e1-d42915841f24",
|
||||
"Display": 1,
|
||||
"X": 215,
|
||||
"Y": 195,
|
||||
"Width": 1553,
|
||||
"Height": 721,
|
||||
"WindowState": 2
|
||||
},
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "Engine.hpp",
|
||||
"DocumentMoniker": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp",
|
||||
"RelativeDocumentMoniker": "src\\core\\Engine.hpp",
|
||||
"ToolTip": "C:\\Users\\steev\\Desktop\\ShadowCrestGameEngine\\src\\core\\Engine.hpp",
|
||||
"RelativeToolTip": "src\\core\\Engine.hpp",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2025-07-13T18:21:30.176Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
BIN
.vs/ShadowCrestGameEngine/v17/Solution.VC.db
Normal file
0
Assets/.gitkeep
Normal file
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 612 B |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 1,
|
||||
"type":"MonsterCard",
|
||||
"name": "Test Monster",
|
||||
"image": "Assets/Cards/1/cards.png",
|
||||
"description": "can attack other monsters",
|
||||
"costs": 30,
|
||||
"defense": 40,
|
||||
"attacks":[
|
||||
{
|
||||
"id": 1,
|
||||
"name":"test attack",
|
||||
"description": "can attack another Monster",
|
||||
"damage": 80
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name":"test attack",
|
||||
"description": "can attack another Monster",
|
||||
"damage": 80
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "testspell",
|
||||
"type":"EffectCard",
|
||||
"image":"Assets/Cards/2/artwork.png",
|
||||
"costs": 30,
|
||||
"defense": 0,
|
||||
"description":"this is a test spell card",
|
||||
"attacks": []
|
||||
}
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "testtrap",
|
||||
"type":"EffectCard",
|
||||
"image":"Assets/Cards/3/artwork.png",
|
||||
"costs": 30,
|
||||
"defense": 0,
|
||||
"description":"this is a test trap card",
|
||||
"attacks": []
|
||||
}
|
BIN
Assets/fonts/Roboto-Bold.ttf
Normal file
@ -1,62 +0,0 @@
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
|
||||
from Classes.System.Components.Window import Window
|
||||
from Classes.System.Components.InputHandler import InputHandler
|
||||
from Classes.System.Network.TCPClient import TCPClient
|
||||
from Classes.System.Utils.Path import PathUtil
|
||||
|
||||
class App:
|
||||
|
||||
__window:Window
|
||||
__running:bool = True
|
||||
__FPS = 60
|
||||
__clock = pygame.time.Clock()
|
||||
__myFont:pygame.font
|
||||
__inputHandler: InputHandler
|
||||
__tcpClient: TCPClient
|
||||
|
||||
def __init__(self, width:int=1920, height:int=1080, title:str="default title"):
|
||||
pygame.font.init()
|
||||
self.__myFont = pygame.font.SysFont('Comic Sans MS', 30)
|
||||
self.__window = Window(width=width, height=height, title=title)
|
||||
self.__inputHandler = InputHandler()
|
||||
self.selectedCard = None
|
||||
|
||||
self.startGameLoop()
|
||||
self.onCleanup()
|
||||
|
||||
def startGameLoop(self):
|
||||
|
||||
while self.__running:
|
||||
self.__clock.tick(self.__FPS)
|
||||
|
||||
self.__window.getScreen().fill((0,0,0))
|
||||
|
||||
# render world
|
||||
self.__window.drawWorld(self.__world)
|
||||
|
||||
# event handler
|
||||
self.handleEvent(pygame.event.get())
|
||||
|
||||
# emits update to the game
|
||||
pygame.display.update()
|
||||
|
||||
# handles incoming event queue
|
||||
def handleEvent(self, events):
|
||||
# TODO: fix bug that stacks cards when dragging them around
|
||||
try:
|
||||
for event in events:
|
||||
if event.type == pygame.QUIT:
|
||||
self.onCleanup()
|
||||
except:
|
||||
pass
|
||||
|
||||
# sets the running state for the gameloop
|
||||
def setRunning(self, running:bool):
|
||||
self.__running = running
|
||||
|
||||
# ensures the gameloop stops running and the pygame instance is stopped properly
|
||||
def onCleanup(self):
|
||||
self.__running = False
|
||||
pygame.quit()
|
@ -1,53 +0,0 @@
|
||||
import pygame
|
||||
|
||||
from Classes.Game.BoardField import BoardField
|
||||
|
||||
class InputHandler:
|
||||
# returns pressed key
|
||||
@staticmethod
|
||||
def getPressed():
|
||||
return pygame.key.get_pressed()
|
||||
|
||||
# returns pressed key
|
||||
@staticmethod
|
||||
def getMousePressed():
|
||||
return pygame.mouse.get_pressed()
|
||||
|
||||
# takes in movement inputs and maps them to x and y axis
|
||||
@staticmethod
|
||||
def getInputAxis() -> tuple:
|
||||
xvel = 0
|
||||
yvel = 0
|
||||
|
||||
# construct x and y velocity input axis
|
||||
if InputHandler.getPressed()[pygame.K_a] or InputHandler.getPressed()[pygame.K_LEFT]:
|
||||
xvel = -1
|
||||
if InputHandler.getPressed()[pygame.K_d] or InputHandler.getPressed()[pygame.K_RIGHT]:
|
||||
xvel = 1
|
||||
if InputHandler.getPressed()[pygame.K_w] or InputHandler.getPressed()[pygame.K_UP]:
|
||||
yvel = -1
|
||||
if InputHandler.getPressed()[pygame.K_s] or InputHandler.getPressed()[pygame.K_DOWN]:
|
||||
yvel = 1
|
||||
|
||||
return tuple((xvel, yvel))
|
||||
|
||||
@staticmethod
|
||||
def getMousePos() -> pygame.Vector2:
|
||||
return pygame.Vector2(pygame.mouse.get_pos())
|
||||
|
||||
# get field under mousbutton
|
||||
@staticmethod
|
||||
def getMouseHover(mouse_pos: pygame.Vector2, world_card_width: int, world_card_height: int, board_fields: list) -> BoardField:
|
||||
x_pos = mouse_pos.x / world_card_width
|
||||
y_pos = mouse_pos.y / world_card_height
|
||||
|
||||
for field in board_fields:
|
||||
field_x = field.getPos().x
|
||||
field_y = field.getPos().y
|
||||
field_width = world_card_width # Annahme: Jedes Feld hat eine Breite von 1 Einheit
|
||||
field_height = world_card_height # Annahme: Jedes Feld hat eine Höhe von 1 Einheit
|
||||
|
||||
if field_x <= x_pos < field_x + field_width and field_y <= y_pos < field_y + field_height:
|
||||
return field
|
||||
|
||||
return None
|
@ -1,47 +0,0 @@
|
||||
import pygame
|
||||
|
||||
class Label:
|
||||
rect:pygame.rect
|
||||
image:pygame.image
|
||||
__screen:pygame.surface
|
||||
__text:str
|
||||
__pos:pygame.Vector2
|
||||
__font:pygame.font
|
||||
font:pygame.font
|
||||
__name:str
|
||||
|
||||
def __init__(self, name:str, screen:pygame.surface, text:str, pos:pygame.Vector2, size:float=20, color:str="white"):
|
||||
self.__font = pygame.font.SysFont("Arial", size)
|
||||
self.font = pygame.font.SysFont("Arial", size)
|
||||
self.image = self.font.render(text, 1, color)
|
||||
_, _, w, h = self.image.get_rect()
|
||||
self.__pos = pos
|
||||
self.rect = pygame.Rect(self.__pos.x, self.__pos.y, w, h)
|
||||
self.__screen = screen
|
||||
self.__text = text
|
||||
self.__name = name
|
||||
|
||||
def getText(self) -> str:
|
||||
return self.__text
|
||||
|
||||
def getFont(self) -> pygame.font:
|
||||
return self.__font
|
||||
|
||||
def getPos(self) -> pygame.Vector2:
|
||||
return self.__pos
|
||||
|
||||
def getName(self) -> str:
|
||||
return self.__name
|
||||
|
||||
def setText(self, newtext:str, color:str="white"):
|
||||
self.image = self.font.render(newtext, 1, color)
|
||||
|
||||
def setFont(self, font:pygame.font, size:float, color:str="white"):
|
||||
self.__font = pygame.font.SysFont(font, size)
|
||||
self.change_text(self.text, color)
|
||||
|
||||
def setPos(self, pos:pygame.Vector2):
|
||||
self.__pos = pos
|
||||
|
||||
def draw(self):
|
||||
self.__screen.blit(self.image, (self.rect))
|
@ -1,54 +0,0 @@
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
|
||||
from Classes.Game.BoardField import BoardField
|
||||
from Classes.Game.World import World
|
||||
|
||||
class Window:
|
||||
__width:int = 800
|
||||
__height:int = 600 # takes 80% of width which tranlates to 640
|
||||
__title:str = "python game engine"
|
||||
__screen:pygame.Surface
|
||||
__clock:pygame.time.Clock
|
||||
|
||||
def __init__(self, width:int=800, height:int=600, title:str="python game engine"):
|
||||
self.__width = width
|
||||
self.__height = height
|
||||
self.__title = title
|
||||
|
||||
pygame.init()
|
||||
|
||||
self.__screen = pygame.display.set_mode((self.__width, self.__height))
|
||||
self.__screen.fill((236, 240, 241)) # Hier liegt der Fehler, es muss eine Tuple übergeben werden
|
||||
pygame.display.set_caption(self.__title)
|
||||
|
||||
self.__clock = pygame.time.Clock()
|
||||
self.__framerate = 60 # Framerate auf 60 FPS festlegen
|
||||
|
||||
# set framerate (where the fuck is it?)
|
||||
def Render(self):
|
||||
# dear future me figure out what past me did!
|
||||
pass
|
||||
|
||||
def setWidth(self, width:int):
|
||||
self.__width = width
|
||||
|
||||
def setHeight(self, height:int):
|
||||
self.__height = height
|
||||
|
||||
def setTitle(self, title:str):
|
||||
self.__title = title
|
||||
|
||||
def getScreen(self) -> pygame.surface:
|
||||
return self.__screen
|
||||
|
||||
# draws a passed sprite group to the screen
|
||||
def drawSpriteGroup(self, group:pygame.sprite.Group):
|
||||
group.draw(self.__screen)
|
||||
|
||||
# draws a given group of rectangles onto the screen
|
||||
def drawWorld(self, world:World):
|
||||
for field in world.getBoardFields():
|
||||
pygame.draw.rect(self.__screen, field.getColor(), field.getRect())
|
||||
for label in world.getLabels():
|
||||
label.draw()
|
@ -1,23 +0,0 @@
|
||||
from Classes.Game.Player import Player
|
||||
from Classes.Game.World import World
|
||||
|
||||
|
||||
class GameManager:
|
||||
player:Player
|
||||
enemy:Player
|
||||
world:World
|
||||
|
||||
def __init__(self, world):
|
||||
self.world = world
|
||||
|
||||
def getPlayer(self) -> Player:
|
||||
return self.player
|
||||
|
||||
def getEnemy(self) -> Player:
|
||||
return self.enemy
|
||||
|
||||
def setPlayer(self, player:Player):
|
||||
self.player = player
|
||||
|
||||
def setEnemy(self, enemy:Player):
|
||||
self.enemy = enemy
|
@ -1,11 +0,0 @@
|
||||
import socket
|
||||
|
||||
import pygame
|
||||
|
||||
from Classes.System.Components.InputHandler import InputHandler
|
||||
class TCPEventHandler:
|
||||
def __init__(self, socket:socket):
|
||||
self.tcp_socket = socket
|
||||
|
||||
def handleEvents(self, message, inputHandler:InputHandler):
|
||||
pass
|
@ -1,69 +0,0 @@
|
||||
import json
|
||||
import socket
|
||||
import threading
|
||||
|
||||
import pygame
|
||||
|
||||
from Classes.Game.World import World
|
||||
from Classes.System.Components.InputHandler import InputHandler
|
||||
from Classes.Game.Events.GameStart import GameStart
|
||||
from Classes.Game.Events.Login import LoginResponse
|
||||
from Classes.Game.Events.PlaceCard import CardPlaced
|
||||
from Classes.Game.Player import Player
|
||||
|
||||
class TCPClient:
|
||||
def __init__(self, addr: str, port: str, world:World, inputHandler:InputHandler):
|
||||
self.addr = addr
|
||||
self.port = int(port)
|
||||
self.tcpSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.world = world
|
||||
self.inputHandler = inputHandler
|
||||
|
||||
try:
|
||||
self.tcpSocket.connect((self.addr, self.port))
|
||||
except Exception as e:
|
||||
print(f"Error connecting TCP socket: {e}")
|
||||
|
||||
# Starten des Listener-Threads
|
||||
self.listen()
|
||||
|
||||
def send(self, message: dict):
|
||||
try:
|
||||
self.tcpSocket.sendall(json.dumps(message).encode())
|
||||
except Exception as e:
|
||||
print(f"Error sending TCP data: {e}")
|
||||
|
||||
def receive(self):
|
||||
while True:
|
||||
try:
|
||||
data = self.tcpSocket.recv(1024)
|
||||
if data:
|
||||
decoded_data = json.loads(data.decode())
|
||||
self.handleEvents(decoded_data)
|
||||
except Exception as e:
|
||||
print(f"Error receiving TCP data: {e}")
|
||||
break
|
||||
|
||||
def handleEvents(self, message):
|
||||
print(message)
|
||||
if message["event"] == "loginresponse":
|
||||
if message["status"] != "success":
|
||||
print("login failed")
|
||||
else:
|
||||
print("receiving login confirmation from server")
|
||||
self.world.setPlayer(Player(0,0,message["name"], message["id"]))
|
||||
elif message["event"] == "startgame":
|
||||
print(self.world.player)
|
||||
# world.player.setMana(message["player"]["mana"])
|
||||
# world.player.setHp(message["player"]["hp"])
|
||||
self.world.setEnemy(Player(message["enemy"]["hp"],0,message["enemy"]["name"], message["enemy"]["id"]))
|
||||
GameStart(self.world, message["player"]["hand"], self.inputHandler, self.world.getPlayer())
|
||||
pass
|
||||
elif message["event"] == "PlacedCard":
|
||||
CardPlaced(self.world, message["card"], message["owner"], pygame.Vector2(message["x"], message["y"]), self.inputHandler)
|
||||
pass
|
||||
|
||||
def listen(self):
|
||||
tcpThread = threading.Thread(target=self.receive)
|
||||
tcpThread.daemon = True
|
||||
tcpThread.start()
|
@ -1,6 +0,0 @@
|
||||
import os
|
||||
|
||||
|
||||
class PathUtil:
|
||||
def getAbsolutePathTo(notAbsolutPath:str) -> str:
|
||||
return os.path.abspath("Client/" + notAbsolutPath)
|
@ -1,11 +0,0 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
|
||||
class StringUtils:
|
||||
def get_random_string(length) -> str:
|
||||
# choose from all lowercase letter
|
||||
letters = string.ascii_lowercase
|
||||
result_str = ''.join(random.choice(letters) for i in range(length))
|
||||
print("Random string of length", length, "is:", result_str)
|
||||
return result_str
|
40
README.md
@ -1,46 +1,26 @@
|
||||
<div style="align:center">
|
||||
<img src="sc_logo_3_4-removebg-preview.png" style="align:center">
|
||||
<img src="https://git.slpnetwork.de/Steev/shadowcrest/raw/branch/main/ShadowCrest_Logo.png" style="align:center">
|
||||
</div>
|
||||
|
||||
# Shadowcrest
|
||||
My own Gameengine used in games i make forward
|
||||
the dream of having My own Gameengine made in c++ which is used in games i make forward
|
||||
|
||||
## why do i want my own engine?
|
||||
simply said because i want to know how games run in their backend
|
||||
another strong reason would be i want to have full controll over what works how and when its added
|
||||
Simply put i want to learn c++ and how the more lower level Systems on a computer work as i only have worked in languages that help out with things like memory management e.g. Javascript, PHP, C#, Go. In Addition to that i want to improve my skills on how to optimize code and how to properly work with memory.
|
||||
and since that isn't enough i want to know how the System that are required to make games work eventually improving my engine on my way while working on projects.
|
||||
|
||||
## big things are to happen
|
||||
right now this repo only is a placeholder not planed to be worked on for a long while as i need to figure out what i want and how i want it
|
||||
depending on what of the below i chose (i already think i will decide between 2 or 3 but am interessted in 3 due to more tech) i will start designing an engine architecture and also decide if i keep this project opensource or not
|
||||
depending on what of the below i chose (i already think i will decide between 2 or 3 but am interested in 3 due to more tech) i will start designing an engine architecture and also decide if i keep this project oversource or not
|
||||
|
||||
### what does it aim todo
|
||||
bulding my games to keep it simple
|
||||
building my games to keep it simple
|
||||
- supporting 2D games
|
||||
- supporting 3D games
|
||||
- supporting networking networking solutions i develop in placeholder
|
||||
- a user interface for me to organize my project with
|
||||
|
||||
## multiple options emerge
|
||||
### option 1 using pygame
|
||||
as i am working on a project in pygame and have constructed a small engine arround pygame for the sake of getting the project to where i want it
|
||||
a option would be clearing the present gamelogic out from it and constructing a more easy to use api and a user interface
|
||||
#### downsides:
|
||||
- python is compared to its dotnet competitors not very good in memory management
|
||||
- python is simple but due to the lack of typesafety can be painfull to debug
|
||||
|
||||
### option 2 using dotnet gameframeworks
|
||||
dotnet is used very widely in game development and is used in the biggest known game engines currently available:
|
||||
- godot (C#)
|
||||
- unity (C#)
|
||||
- cryengine (C#, LUA)
|
||||
- unreal (c++)
|
||||
i could use a game framework like [monogame](https://monogame.net/)
|
||||
|
||||
### option 3 the hard way implementing public tech on my own
|
||||
besides the option to use a framework that does the hard game technology part for me i can go all the way on my own and implement things like Vulcan or DirectX, a opensource physics engine like [project chrono](https://projectchrono.org/) or [react physics 3d](https://www.reactphysics3d.com/) or even a more widely used physics engine like nvidia physx or havok engine and fmod as audio engine
|
||||
|
||||
this would be the by far hardest option out of all available but also the by a lot most custom experience
|
||||
this approach would also teach me a very much more then all the other options above
|
||||
|
||||
### downsides
|
||||
a very very very very painfull development process
|
||||
### all in all what expectation should exist?
|
||||
none. i am no professional game developer nor do i have any experience with how engine tech works outside of classic engines like unreal and unity.
|
||||
i am a professional software developer but working in a completely different field which gives me a lot of know how and knowledge about the basic concepts of programming..
|
||||
but game development is hard and game engine development is even harder so expecting the next unity or the next godot is just out of the picture for this project.. in fact it might be abandoned at some point for any reason without ever becoming a real working game engine!
|
BIN
ShadowCr.5653811a/x64/Debug/Engine.obj
Normal file
BIN
ShadowCr.5653811a/x64/Debug/Logger.obj
Normal file
BIN
ShadowCr.5653811a/x64/Debug/Renderer.obj
Normal file
@ -0,0 +1,6 @@
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\core\Engine.cpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\Engine.obj
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\core\Logger.cpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\Logger.obj
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\core\WindowManager.cpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\WindowManager.obj
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\main.cpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\main.obj
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\systems\Renderer.cpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\Renderer.obj
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\src\systems\Renderer.hpp;C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\Renderer.obj
|
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:
|
||||
Debug|x64|C:\Users\steev\Desktop\ShadowCrestGameEngine\|
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>
|
@ -0,0 +1,2 @@
|
||||
^C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\ENGINE.OBJ|C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\LOGGER.OBJ|C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\MAIN.OBJ|C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\RENDERER.OBJ|C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\RENDERER.OBJ|C:\USERS\STEEV\DESKTOP\SHADOWCRESTGAMEENGINE\SHADOWCR.5653811A\X64\DEBUG\WINDOWMANAGER.OBJ
|
||||
C:\Users\steev\Desktop\ShadowCrestGameEngine\ShadowCr.5653811a\x64\Debug\ShadowCrestGameEngine.ilk
|
11
ShadowCr.5653811a/x64/Debug/ShadowCrestGameEngine.exe.recipe
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\steev\Desktop\ShadowCrestGameEngine\x64\Debug\ShadowCrestGameEngine.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
BIN
ShadowCr.5653811a/x64/Debug/TextComponent.obj
Normal file
BIN
ShadowCr.5653811a/x64/Debug/WindowManager.obj
Normal file
BIN
ShadowCr.5653811a/x64/Debug/main.obj
Normal file
BIN
ShadowCr.5653811a/x64/Debug/vc143.idb
Normal file
BIN
ShadowCr.5653811a/x64/Debug/vc143.pdb
Normal file
31
ShadowCrestGameEngine.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36301.6 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShadowCrestGameEngine", "ShadowCrestGameEngine.vcxproj", "{5653811A-38D1-4D9D-9446-A417E8557584}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Debug|x64.Build.0 = Debug|x64
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Debug|x86.Build.0 = Debug|Win32
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Release|x64.ActiveCfg = Release|x64
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Release|x64.Build.0 = Release|x64
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Release|x86.ActiveCfg = Release|Win32
|
||||
{5653811A-38D1-4D9D-9446-A417E8557584}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {BCC6CFCC-6747-45A2-ABEE-0BC355C15801}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
152
ShadowCrestGameEngine.vcxproj
Normal file
@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{5653811a-38d1-4d9d-9446-a417e8557584}</ProjectGuid>
|
||||
<RootNamespace>ShadowCrestGameEngine</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(ProjectDIr)/vendored/SDL3_ttf-3.2.2/include;$(ProjectDir)/vendored/SDL/include;$(ProjectDir)/libs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)/libs/*.lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>$(ProjectDir)libs/SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\core\Engine.cpp" />
|
||||
<ClCompile Include="src\core\Logger.cpp" />
|
||||
<ClCompile Include="src\core\WindowManager.cpp" />
|
||||
<ClCompile Include="src\game\components\TextComponent.cpp" />
|
||||
<ClCompile Include="src\main.cpp" />
|
||||
<ClCompile Include="src\systems\Renderer.cpp" />
|
||||
<ClCompile Include="src\systems\Renderer.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\core\Engine.hpp" />
|
||||
<ClInclude Include="src\core\Logger.hpp" />
|
||||
<ClInclude Include="src\core\WindowManager.hpp" />
|
||||
<ClInclude Include="src\game\components\Component.hpp" />
|
||||
<ClInclude Include="src\game\components\Entity.hpp" />
|
||||
<ClInclude Include="src\game\components\TextComponent.hpp" />
|
||||
<ClInclude Include="src\game\components\TransformComponent.hpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
90
ShadowCrestGameEngine.vcxproj.filters
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Quelldateien">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Ressourcendateien">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Quelldateien\core">
|
||||
<UniqueIdentifier>{c7e9328e-53fc-4a6c-b575-2a282171ee45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien\core">
|
||||
<UniqueIdentifier>{dab3d0c3-1768-433c-86d1-ac8cb6dbeb21}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien\systems">
|
||||
<UniqueIdentifier>{266ca74b-e2bf-4558-a165-4f1f6bc4d09c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Quelldateien\systems">
|
||||
<UniqueIdentifier>{cf2b49e9-84b3-45c7-93aa-5f954e717ab4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien\game">
|
||||
<UniqueIdentifier>{53f59132-4a9c-48c2-a4b3-b60c846757e3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien\game\components">
|
||||
<UniqueIdentifier>{30ef3058-6b07-462a-abbd-4163bb41917f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Quelldateien\game">
|
||||
<UniqueIdentifier>{ef88eeaa-5dcd-4259-8891-e90fa0fd7ab9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Quelldateien\game\components">
|
||||
<UniqueIdentifier>{2b83c1db-d09d-4c6b-b964-6f50ecdb6246}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien\game\Entities">
|
||||
<UniqueIdentifier>{2881d119-111d-413c-a9fe-105bda2c6f1d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\main.cpp">
|
||||
<Filter>Quelldateien</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\Logger.cpp">
|
||||
<Filter>Quelldateien\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\Engine.cpp">
|
||||
<Filter>Quelldateien\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\WindowManager.cpp">
|
||||
<Filter>Quelldateien\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\systems\Renderer.hpp">
|
||||
<Filter>Headerdateien\systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\systems\Renderer.cpp">
|
||||
<Filter>Quelldateien\systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\game\components\TextComponent.cpp">
|
||||
<Filter>Quelldateien\game\components</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\core\Engine.hpp">
|
||||
<Filter>Headerdateien\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\core\Logger.hpp">
|
||||
<Filter>Headerdateien\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\core\WindowManager.hpp">
|
||||
<Filter>Headerdateien\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\game\components\TextComponent.hpp">
|
||||
<Filter>Headerdateien\game\components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\game\components\Component.hpp">
|
||||
<Filter>Headerdateien\game\components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\game\components\Entity.hpp">
|
||||
<Filter>Headerdateien\game\Entities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\game\components\TransformComponent.hpp">
|
||||
<Filter>Headerdateien\game\components</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
ShadowCrestGameEngine.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 214 KiB |
BIN
libs/SDL3.dll
Normal file
BIN
libs/SDL3.lib
Normal file
BIN
libs/SDL3.pdb
Normal file
BIN
libs/SDL3_test.lib
Normal file
BIN
libs/SDL3_ttf.dll
Normal file
BIN
libs/SDL3_ttf.lib
Normal file
BIN
libs/SDL3_ttf.pdb
Normal file
7
main.py
@ -1,7 +0,0 @@
|
||||
import pygame
|
||||
from Classes.System.App import App
|
||||
|
||||
if __name__ == "__main__":
|
||||
pygame.init()
|
||||
game = App()
|
||||
game.onExecute()
|
@ -1,42 +0,0 @@
|
||||
# validation for placing cards:
|
||||
- is the game still running
|
||||
- is it the players turn
|
||||
- does the card exist
|
||||
- does the player have that card in his deck
|
||||
- does the player have this card in his hand
|
||||
- is the type of card allowed in that type of field
|
||||
- is the field already blocked by another card
|
||||
|
||||
# validation for attacking another player
|
||||
- is the game still running
|
||||
- is it the players turn
|
||||
- does the card exist
|
||||
- does the player have that card in his deck
|
||||
- is that card played
|
||||
- does the enemy have remaining monster cards on his side
|
||||
- if yes a direct attack would only be possible if a effect allows it
|
||||
- can this card attack
|
||||
- is the card of correct type
|
||||
- is it blocked by effects (will be implemented after card effects are implemented)
|
||||
|
||||
# player death management (win condition)
|
||||
- does a players hp go to 0?
|
||||
- make the other player the winner
|
||||
- if an effect affects the playing player card priority comes first
|
||||
|
||||
# handle a player leaving
|
||||
- check if game still runs
|
||||
- make remaining player win if yes
|
||||
|
||||
# turn management
|
||||
- server keeps track of each turn
|
||||
- whos turn is it
|
||||
- what turn state is currently active
|
||||
- draw state
|
||||
- place state
|
||||
- is the player trying to do actions not allowed in the given state
|
||||
|
||||
# drawing cards:
|
||||
- ensure the player only can have 7 cards
|
||||
- if limit exceeds the player payes lifepoints and drops a card
|
||||
- ensure the drawn card for sure still can be in the players deck
|
0
src/Renderer.cpp
Normal file
0
src/Renderer.hpp
Normal file
0
src/core/.gitkeep
Normal file
93
src/core/Engine.cpp
Normal file
@ -0,0 +1,93 @@
|
||||
#include "Engine.hpp"
|
||||
#include "WindowManager.hpp"
|
||||
#include "../systems/Renderer.hpp"
|
||||
#include "../game/components/TextComponent.hpp"
|
||||
#include <iostream>
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3_ttf/SDL_ttf.h>
|
||||
|
||||
bool running = true;
|
||||
WindowManager *wm = nullptr;
|
||||
Renderer renderer;
|
||||
|
||||
bool Engine::Init() {
|
||||
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||||
std::cerr << "SDL_Init failed: " << SDL_GetError() << "\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!TTF_Init()) {
|
||||
std::cerr << "TTF_Init: failed" << SDL_GetError() << "\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
wm = new WindowManager();
|
||||
|
||||
if (!wm->InitWindow("ShadowCrest", 800, 600)) {
|
||||
std::cerr << "SDL_Init failed: " << SDL_GetError() << "\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!renderer.Init(wm->GetWindow())) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Engine::Run() {
|
||||
SDL_Event event;
|
||||
|
||||
while (running) {
|
||||
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if (event.type == SDL_EVENT_QUIT) {
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
|
||||
renderer.Clear();
|
||||
|
||||
// game logic here
|
||||
TextComponent* text = new TextComponent(
|
||||
"Hallo Welt", "assets/fonts/Roboto.ttf", 24, SDL_Color{ 255, 255, 255, 255 }
|
||||
);
|
||||
text->Init(renderer.GetSDLRenderer());
|
||||
|
||||
renderer.Present();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetFPS: calculates FPS the engine can execute at call
|
||||
*/
|
||||
int Engine::GetFPS() {
|
||||
|
||||
this->oldTime = newTime;
|
||||
this->newTime = SDL_GetTicks();
|
||||
|
||||
this->FPS = 1.f / (float(this->newTime - this->oldTime) / 1000.f);
|
||||
|
||||
// prevent nois (fps numbers below 0) from beeing written to the FPS counter and do rewrite it when the value wouldn't change
|
||||
if (this->FPS < 0) this->FPS = this->lastFPS;
|
||||
if (this->lastFPS != this->FPS) this->lastFPS = this->FPS;
|
||||
|
||||
return this->FPS;
|
||||
}
|
||||
|
||||
void Engine::Shutdown() {
|
||||
|
||||
// empty variables that have been set by the engine itself
|
||||
this->FPS = 0;
|
||||
this->lastFPS = 0;
|
||||
this->newTime = 0;
|
||||
this->oldTime = 0;
|
||||
|
||||
// safely close down every system
|
||||
if (wm != nullptr) {
|
||||
wm->Close();
|
||||
}
|
||||
|
||||
// stop sdl systems
|
||||
SDL_Quit();
|
||||
}
|
17
src/core/Engine.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
class Engine {
|
||||
public:
|
||||
bool Init();
|
||||
void Run();
|
||||
void Shutdown();
|
||||
int GetFPS();
|
||||
|
||||
private:
|
||||
int lastFPS = 0;
|
||||
int FPS = 0;
|
||||
Uint64 oldTime = 0;
|
||||
Uint64 newTime = 0;
|
||||
};
|