diff --git a/Resources/animations/shot_gun_anim.xml b/Resources/animations/shot_gun_anim.xml new file mode 100644 index 0000000..55c75c1 --- /dev/null +++ b/Resources/animations/shot_gun_anim.xml @@ -0,0 +1,14 @@ + + + 4 + + + + 8 + + + + 8 + + + \ No newline at end of file diff --git a/Resources/maps/debugmap.tmx b/Resources/maps/debugmap.tmx index ea7b84c..1478888 100644 --- a/Resources/maps/debugmap.tmx +++ b/Resources/maps/debugmap.tmx @@ -1,20 +1,21 @@ - + + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,28,28,29,25,28,28,29,27,31,28,28,31,28,32,26,29,30,27,25,27,32,28,31,26,29,25,29,32,0, 0,32,27,22,16,16,23,31,26,30,31,31,29,28,30,25,28,26,26,25,29,26,25,32,28,28,31,32,25,0, 0,30,24,11,4,8,14,26,28,31,26,24,16,16,16,16,23,27,25,25,30,26,29,29,30,29,25,29,27,0, -0,25,15,6,1,2,14,28,32,30,24,11,8,7,3,8,12,23,28,27,25,32,30,32,30,28,27,27,26,0, -0,28,20,13,13,13,19,32,28,29,15,5,2,5,3,5,2,14,25,32,31,32,24,16,16,16,23,29,27,0, -0,31,29,31,27,26,27,30,29,27,15,8,7,5,2,3,6,14,27,32,32,29,15,8,4,2,14,26,27,0, -0,30,30,30,25,32,29,31,30,29,20,10,1,3,5,3,9,19,27,25,29,31,20,13,13,13,19,31,26,0, -0,28,30,30,28,24,23,27,31,28,29,20,13,13,13,13,19,27,31,28,27,26,29,26,32,25,31,25,32,0, -0,26,26,31,29,20,19,30,25,29,25,25,25,28,30,27,28,25,31,30,27,26,26,28,25,29,25,32,31,0, -0,30,32,29,29,32,31,27,25,31,31,31,26,30,31,27,29,25,29,32,0,0,0,0,30,26,31,0,0,0, -0,30,27,31,31,28,25,25,28,26,30,27,26,28,30,29,30,25,30,32,0,0,0,0,0,0,0,0,0,0, +0,25,15,6,1,2,14,28,32,30,24,11,0,0,0,8,12,23,28,27,25,32,30,32,30,28,27,27,26,0, +0,28,20,13,13,13,19,32,28,29,15,0,0,0,0,0,0,14,25,32,91,32,24,16,16,16,23,29,27,0, +0,31,29,31,27,26,27,30,29,27,0,0,0,0,0,0,0,0,27,32,32,29,15,8,4,2,14,26,27,0, +0,30,30,30,25,32,29,30,27,28,32,32,30,0,0,0,0,0,27,25,29,31,20,13,13,13,19,31,26,0, +0,28,30,30,28,31,26,29,31,29,26,20,31,0,0,0,0,31,31,28,27,26,29,26,32,25,31,25,32,0, +0,26,26,31,29,20,29,31,25,32,28,25,25,28,30,27,28,25,31,30,27,26,26,28,25,29,25,32,31,0, +0,30,32,29,29,32,31,28,25,31,31,31,26,30,31,27,29,25,29,32,0,0,0,0,30,26,31,0,0,0, +0,30,27,31,31,28,25,32,28,26,30,27,26,28,30,29,30,25,30,32,0,0,0,0,0,0,0,0,0,0, 0,27,29,22,21,30,29,29,32,0,0,0,0,32,30,30,31,32,26,28,0,0,0,0,0,0,0,0,0,0, 0,27,25,18,17,30,28,30,0,0,0,0,0,26,31,26,25,30,27,29,26,0,0,0,0,0,0,0,0,0, 0,32,30,31,30,30,28,0,0,0,0,0,0,32,27,31,30,28,26,31,26,0,0,0,0,0,0,0,0,0, @@ -43,20 +44,44 @@ + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0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,0,47,33, -36,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,39, -37,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,36, -35,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,34, -37,46,0,28,28,30,25,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,39, -34,46,0,30,30,29,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,34, -40,46,0,29,26,31,29,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,35, -33,46,0,30,31,32,27,27,0,0,0,0,0,0,0,0,0,0,0,56,48,48,48,48,55,0,56,48,43,33, -35,46,0,25,30,32,31,28,0,0,0,0,0,0,0,0,0,0,0,47,34,36,34,39,44,48,43,34,36,40, -40,46,0,0,0,0,0,0,56,48,48,48,48,55,0,0,0,0,0,47,36,36,34,39,38,36,36,38,36,37, +36,46,0,0,0,0,0,0,0,0,0,31,32,27,31,30,29,0,0,0,0,0,0,0,0,0,0,0,47,39, +37,46,0,0,0,0,0,0,0,0,25,25,28,27,25,27,32,27,0,126,127,128,0,0,0,0,0,0,47,36, +35,46,0,176,149,150,150,144,0,0,30,28,31,30,32,29,31,32,0,117,141,131,0,0,0,0,0,0,47,34, +37,46,0,177,182,181,180,169,0,0,27,29,28,30,27,26,26,30,0,124,125,132,0,0,0,0,0,0,47,39, +34,46,0,153,180,146,156,175,149,164,176,149,144,25,27,25,31,32,0,0,0,0,0,0,0,0,0,0,47,34, +40,46,0,151,180,167,164,177,161,145,177,166,145,27,25,31,32,0,0,0,0,0,0,0,0,0,0,0,47,35, +33,46,0,153,180,181,145,151,180,167,165,159,169,0,0,0,0,0,0,56,48,48,48,48,55,0,56,48,43,33, +35,46,0,151,152,146,147,177,166,161,180,161,169,0,0,0,0,0,0,47,34,36,34,39,44,48,43,34,36,40, +40,46,0,154,155,157,0,178,155,48,48,48,48,55,0,0,0,0,0,47,36,36,34,39,38,36,36,38,36,37, 35,46,0,0,0,0,0,56,43,36,38,38,39,46,0,0,0,0,0,47,40,39,38,36,38,40,40,34,38,37, 38,46,0,0,0,0,56,43,37,39,36,36,33,46,0,0,0,0,0,0,42,39,35,36,33,34,33,38,40,39, 34,46,0,0,0,0,47,35,34,40,39,38,36,46,0,0,0,0,0,0,47,38,36,34,34,33,36,40,35,40, diff --git a/Resources/maps/newmap.tmx b/Resources/maps/newmap.tmx new file mode 100644 index 0000000..ccb3c95 --- /dev/null +++ b/Resources/maps/newmap.tmx @@ -0,0 +1,100 @@ + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,34,31,31,30,70,72,30,34,29,34,73,33,29,71,72,30,33,31,71,29,70,34,0,0,0,0,0,0,0, +0,31,29,54,33,27,29,32,31,28,29,71,54,72,27,71,71,31,33,70,70,73,31,0,0,0,0,0,0,0, +0,72,70,34,73,31,0,0,30,31,33,32,29,34,70,71,33,27,32,30,31,30,29,0,0,0,0,0,0,0, +0,27,28,31,29,0,0,0,0,34,32,30,28,32,31,27,34,31,54,33,27,27,29,0,0,0,0,0,0,0, +0,54,27,54,28,0,0,0,0,54,31,72,71,34,27,72,70,29,71,73,30,30,71,70,0,0,0,0,0,0, +0,32,27,29,54,70,0,0,71,32,54,70,71,72,34,70,54,70,32,34,72,33,72,32,34,0,0,0,0,0, +0,70,27,54,34,31,27,33,31,28,31,33,54,71,29,33,73,28,34,34,34,71,32,33,30,73,0,0,0,0, +0,29,71,27,31,34,30,71,70,32,72,54,29,31,29,29,54,28,73,33,72,30,30,31,72,31,32,0,0,0, +0,34,72,29,72,29,71,34,31,33,27,70,70,29,71,27,33,28,34,73,54,72,70,73,71,31,54,0,0,0, +0,31,73,27,27,33,34,29,54,73,54,54,70,73,30,73,73,54,34,30,54,34,30,29,34,70,54,0,0,0, +0,28,72,28,28,33,33,29,31,32,30,27,73,27,31,34,73,54,31,32,28,34,70,73,72,33,28,0,0,0, +0,0,73,34,54,32,33,34,33,54,30,29,70,72,73,70,70,54,29,29,34,27,70,71,72,28,70,0,0,0, +0,0,0,29,30,32,27,32,31,28,73,27,72,28,73,71,31,28,71,30,28,34,72,73,54,27,32,0,0,0, +0,0,0,32,27,31,33,33,27,27,30,31,71,28,29,32,31,27,34,34,31,32,27,30,72,54,31,0,0,0, +0,0,0,0,0,34,32,31,29,70,33,32,0,34,34,33,72,70,70,28,30,70,29,30,30,30,34,0,0,0, +0,0,0,0,0,0,0,28,30,27,73,0,0,0,0,70,28,30,34,54,33,32,34,54,27,71,28,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,54,32,32,27,31,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,16,16,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,50,51,22,20,43,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,21,20,38,38,19,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,21,1,3,19,22,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,40,37,6,2,39,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,36,41,41,42,0,0,0,0,0,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,96,102, +88,106,91,92,92,91,91,92,92,92,91,92,92,91,91,92,92,92,92,91,91,92,108,116,115,97,117,94,94,115, +95,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,113,88,118,95,117,116,116,95, +118,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,88,116,94,96,95,102,102, +88,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,113,115,95,115,94,115,88,118, +94,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,108,96,96,88,116,97,102, +117,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,108,117,115,117,94,95, +116,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,108,118,95,118,118, +88,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,108,102,115,94, +118,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,97,118,117, +115,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,115,88,95, +97,103,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,116,96,88, +97,116,103,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,95,96,96, +88,96,97,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,97,102,88, +118,94,115,103,86,100,0,0,0,0,0,112,86,100,0,0,0,0,0,0,0,0,0,0,0,0,89,88,117,118, +95,97,96,97,118,103,85,100,0,0,112,101,88,103,86,100,0,0,0,0,0,0,0,0,0,0,87,102,94,88, +115,94,97,115,115,96,96,103,86,86,101,94,96,116,96,103,85,86,100,0,0,0,0,84,85,86,101,97,116,97, +95,88,116,96,115,116,97,97,96,115,97,117,115,102,102,97,115,118,103,85,86,85,86,101,94,115,97,118,117,115, +102,116,118,88,102,97,102,102,88,97,117,116,88,102,95,94,117,97,117,116,88,96,116,94,115,96,94,97,115,117, +88,95,96,115,94,97,117,116,96,94,94,94,116,96,88,102,97,115,94,94,117,97,116,88,88,88,96,118,118,116 + + + diff --git a/Resources/maps/tilesets/shooterWorldOne.tsx b/Resources/maps/tilesets/shooterWorldOne.tsx index 6b26e74..07bbb89 100644 --- a/Resources/maps/tilesets/shooterWorldOne.tsx +++ b/Resources/maps/tilesets/shooterWorldOne.tsx @@ -1,5 +1,6 @@ - + + diff --git a/Resources/maps/tilesets/wOne.tsx b/Resources/maps/tilesets/wOne.tsx new file mode 100644 index 0000000..3aabe30 --- /dev/null +++ b/Resources/maps/tilesets/wOne.tsx @@ -0,0 +1,570 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/maps/tilesets/worldOne.png b/Resources/maps/tilesets/worldOne.png new file mode 100644 index 0000000..0db1498 Binary files /dev/null and b/Resources/maps/tilesets/worldOne.png differ diff --git a/Resources/maps/yupple.tiled-session b/Resources/maps/yupple.tiled-session index c555e9b..85a7072 100644 --- a/Resources/maps/yupple.tiled-session +++ b/Resources/maps/yupple.tiled-session @@ -1,6 +1,13 @@ { - "activeFile": "", + "Map/SizeTest": { + "height": 4300, + "width": 2 + }, + "activeFile": "debugmap.tmx", "expandedProjectPaths": [ + "tilesets", + "C:/Users/Ethan/source/repos/YuppleMayham/Resources", + "." ], "fileStates": { "": { @@ -22,33 +29,76 @@ "scaleInEditor": 1 }, "debugmap.tmx": { - "scale": 0.45125, - "selectedLayer": 0, + "scale": 0.75, + "selectedLayer": 2, "viewCenter": { - "x": 959.5567867036011, - "y": 955.1246537396123 + "x": 989.3333333333334, + "y": 665.3333333333334 + } + }, + "newmap.tmx": { + "scale": 0.5, + "selectedLayer": 1, + "viewCenter": { + "x": 930, + "y": 621 } }, "shooterWorldOneAtlas.tsx": { "scaleInDock": 0.5, "scaleInEditor": 1 }, + "tilesets/shooterWorldOne.tsx": { + "scaleInDock": 0.5, + "scaleInEditor": 1 + }, "tilesets/shooterWorldOneAtlas.tsx": { "scaleInDock": 0.5, "scaleInEditor": 1 + }, + "tilesets/wOne.tsx": { + "scaleInDock": 0.33, + "scaleInEditor": 1 + }, + "tilesets/was.tsx": { + "scaleInDock": 1, + "scaleInEditor": 1 + }, + "tilesets/wsa.tsx": { + "dynamicWrapping": false, + "scaleInDock": 0.5, + "scaleInEditor": 1 } }, "last.externalTilesetPath": "C:/Users/Ethan/source/repos/YuppleMayham/Resources/maps/tilesets", "last.imagePath": "C:/Users/Ethan/source/repos/YuppleMayham/Resources/maps/tilesets", + "map.lastUsedFormat": "tmx", "openFiles": [ + "debugmap.tmx", + "tilesets/shooterWorldOne.tsx", + "newmap.tmx", + "tilesets/wOne.tsx" ], "project": "yupple.tiled-project", "property.type": "bool", "recentFiles": [ + "tilesets/wOne.tsx", + "newmap.tmx", + "tilesets/shooterWorldOne.tsx", + "debugmap.tmx", + "tilesets/wsa.tsx", + "tilesets/was.tsx", "tilesets/shooterWorldOneAtlas.tsx", "shooterWorldOneAtlas.tsx", "C:/Users/Ethan/Documents/yupplemayham/shooterWorldOneAtlas.tsx", "C:/Users/Ethan/Documents/yupplemayham/debugmap.tmx" ], - "tileset.lastUsedFilter": "Tiled tileset files (*.tsx *.xml)" + "tileset.lastUsedFilter": "Tiled tileset files (*.tsx *.xml)", + "tileset.lastUsedFormat": "tsx", + "tileset.margin": 0, + "tileset.spacing": 2, + "tileset.tileSize": { + "height": 62, + "width": 62 + } } diff --git a/Resources/scenes/debugScene.xml b/Resources/scenes/debugScene.xml index ec2d95f..737d164 100644 --- a/Resources/scenes/debugScene.xml +++ b/Resources/scenes/debugScene.xml @@ -1,7 +1,7 @@ - + diff --git a/Resources/scripts/ai/grunt_behaviour.lua b/Resources/scripts/ai/grunt_behaviour.lua index dd76acc..a63f233 100644 --- a/Resources/scripts/ai/grunt_behaviour.lua +++ b/Resources/scripts/ai/grunt_behaviour.lua @@ -3,22 +3,26 @@ patrolDestination = { x=500.0, y=500.0, z=0.0 } moveLeft = true -- helper functions function watchPosition(actor, pos) - y = pos.y - actor.position.y - x = pos.x - actor.position.x - rotation = math.atan(y, x) + local y = pos.y - actor.position.y + local x = pos.x - actor.position.x + local rotation = math.atan(y, x) actor.rotation = math.deg(rotation) end function distance(a, b) - return math.sqrt((math.abs(a.x - b.x)^2) + (math.abs(a.y - b.y)^2)) + local dx = a.x - b.x + local dy = a.y - b.y + return math.sqrt(dx * dx + dy * dy) end function moveTo(actor, pos) - watchPosition(actor, pos) - if distance(actor.position, pos) < 50 then + local a = actor + local p = pos + watchPosition(a, p) + if distance(a.position, p) < 50 then return true end - actor:moveForward() + a:moveForward() return false end @@ -28,19 +32,23 @@ end -- The AI will be spawned in idle mode, so if you want to put the bot into patrol mode -- It's on you to do that in this function. function idle(actor, target) - if target ~= nil then + local a = actor + local t = target + if t ~= nil then -- print("target is at " .. target.position.x) -- watchPosition(actor, target.position) ai.state = AIState.Patrol - actor.rotation = 180 + a.rotation = 180 end - actor:shoot() + a:shoot() --print("actor is idling at " .. actor.position.x) end -- It is most appropriate to put any patrolling behaviour into this function of course function patrol(actor, target) - if target ~= nil then + local a = actor + local t = target + if t ~= nil then -- print("target is at " .. target.position.x) end --if moveTo(actor, patrolDestination) == true then @@ -52,7 +60,7 @@ function patrol(actor, target) --if raycaster:performRaycast(actor.position, actor.rotation, target.position) == true then --ai.state = AIState.Alert --end - if raycaster:bresenhamRaycast(actor.position, actor.rotation, target.position) == true then + if raycaster:bresenhamRaycast(a.position, a.rotation, t.position) == true then --target hit! ai.state = AIState.Alert end @@ -60,32 +68,34 @@ function patrol(actor, target) upOrDown = math.random(2) if moveLeft == true then if upOrDown == 1 then - actor.rotation = 180 + a.rotation = 180 else - actor.rotation = 270 + a.rotation = 270 end moveLeft = false else if upOrDown == 1 then - actor.rotation = 0 + a.rotation = 0 else - actor.rotation = 90 + a.rotation = 90 end moveLeft = true end end - actor:moveForward() + a:moveForward() end -- the ai has found the player, this is what function is called function alert(actor, target) + local a = actor + local t = target if target ~= nil then -- print("target is at " .. target.position.x) - watchPosition(actor, target.position) + watchPosition(a, t.position) end --print("actor is alert at " .. actor.position.x) - if distance(actor.position, target.position) > 300 then - actor:moveForward() + if distance(a.position, t.position) > 300 then + a:moveForward() end - actor:shoot() + a:shoot() end diff --git a/Resources/shaders/GL_bubble.vert b/Resources/shaders/GL_bubble.vert index 2c111c4..429aa86 100644 --- a/Resources/shaders/GL_bubble.vert +++ b/Resources/shaders/GL_bubble.vert @@ -6,8 +6,12 @@ out vec2 texCoord; uniform mat4 MVP; +uniform mat4 model; +uniform mat4 projection; +uniform mat4 view; + void main() { texCoord = aTexCoord; - gl_Position = MVP * vec4(aPos, 1.0); + gl_Position = projection * view * model * vec4(aPos, 1.0); } \ No newline at end of file diff --git a/Resources/shaders/GL_pistol.vert b/Resources/shaders/GL_pistol.vert index 92b7dc7..63e4dc2 100644 --- a/Resources/shaders/GL_pistol.vert +++ b/Resources/shaders/GL_pistol.vert @@ -5,12 +5,16 @@ layout (location = 1) in vec2 aTexCoord; out vec2 texCoord; uniform mat4 MVP; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 model; uniform bool flip; void main() { texCoord = aTexCoord; - gl_Position = MVP * vec4(aPos, 1.0); + gl_Position = projection * view * model * vec4(aPos, 1.0); if (flip) { texCoord = vec2(aTexCoord.x, 1.0 - aTexCoord.y); diff --git a/Resources/shaders/GL_player.vert b/Resources/shaders/GL_player.vert index 5d614e4..141aab7 100644 --- a/Resources/shaders/GL_player.vert +++ b/Resources/shaders/GL_player.vert @@ -7,9 +7,13 @@ out vec2 texPos; uniform mat4 MVP; +uniform mat4 model; +uniform mat4 projection; +uniform mat4 view; + void main() { pos = aPos; texPos = aTexPos; - gl_Position = MVP * vec4(aPos, 1.0); + gl_Position = projection * view * model * vec4(aPos, 1.0); } \ No newline at end of file diff --git a/Resources/shaders/GL_tile.frag b/Resources/shaders/GL_tile.frag index f53e7bd..7fdc9da 100644 --- a/Resources/shaders/GL_tile.frag +++ b/Resources/shaders/GL_tile.frag @@ -1,8 +1,9 @@ #version 330 core out vec4 FragColor; in vec2 texCoord; +flat in int textureIndex; -uniform sampler2D tileTexture; +uniform sampler2DArray tileTexture; void main() { @@ -12,7 +13,7 @@ void main() } else { - FragColor = texture(tileTexture, texCoord); + FragColor = texture(tileTexture, vec3(texCoord.xy, textureIndex)); } //FragColor = vec4(mod(tileindex / float(tilesperrow), 1.0), mod(tileindex / float(tilesperrow), 1.0), 0.0, 1.0); } \ No newline at end of file diff --git a/Resources/shaders/GL_tile.vert b/Resources/shaders/GL_tile.vert index 7e1ddbd..039f99a 100644 --- a/Resources/shaders/GL_tile.vert +++ b/Resources/shaders/GL_tile.vert @@ -2,32 +2,37 @@ layout (location = 0) in vec3 aPos; layout (location = 1) in vec2 aTexCoord; layout (location = 2) in int aTileIndex; -layout (location = 3) in mat4 aModel; +layout (location = 3) in int aTextureIndex; +layout (location = 4) in int aTilesPerRow; +layout (location = 5) in int aStartIndex; +layout (location = 6) in vec2 aOriginalSize; +layout (location = 7) in mat4 aModel; -uniform int tilesPerRow; +uniform vec2 uCanvasSize; uniform mat4 proj; uniform mat4 view; out vec2 texCoord; -out int tileIndex; +flat out int textureIndex; void main() { - tileIndex = aTileIndex; + int tilesPerRow = aTilesPerRow; gl_Position = proj * view * aModel * vec4(aPos, 1.0); - if (tileIndex != 0) + textureIndex = aTextureIndex; + if (aTileIndex != 0) { - int index = tileIndex - 1; + vec2 scale = vec2(aOriginalSize.x / uCanvasSize.x, aOriginalSize.y / uCanvasSize.y); + + int index = aTileIndex - aStartIndex; float tileSize = 1.0 / float(tilesPerRow); int row = index / tilesPerRow; int col = index % tilesPerRow; - float offsetX = float(col) * tileSize; - float offsetY = float(row) * tileSize; - texCoord.x = (aTexCoord.x + col) * tileSize; texCoord.y = (aTexCoord.y + row) * tileSize; + texCoord = texCoord * scale; } else { diff --git a/Resources/sprites/shotGunFire128.png b/Resources/sprites/shotGunFire128.png new file mode 100644 index 0000000..9402104 Binary files /dev/null and b/Resources/sprites/shotGunFire128.png differ diff --git a/Resources/sprites/shotGunIdle128.png b/Resources/sprites/shotGunIdle128.png new file mode 100644 index 0000000..81227e8 Binary files /dev/null and b/Resources/sprites/shotGunIdle128.png differ diff --git a/Resources/sprites/shotGunReload128.png b/Resources/sprites/shotGunReload128.png new file mode 100644 index 0000000..0ce815e Binary files /dev/null and b/Resources/sprites/shotGunReload128.png differ diff --git a/Resources/weapons/bubblegun.xml b/Resources/weapons/bubblegun.xml index dee8227..7ca7761 100644 --- a/Resources/weapons/bubblegun.xml +++ b/Resources/weapons/bubblegun.xml @@ -11,9 +11,9 @@ - +