This project describes the research and implementation of several Computer Graphics and Artificial Intelligence topics into a video game. The Artificial Intelligence topics are an image recognition neural network and a search algorithm, and the Computer Graphics topics which are addressed in this paper are morphing and advanced shading. These techniques were researched, and the best solutions were selected and implemented into a space-themed first-person shooter game. The neural network was implemented with a Single Shot Multibox Detector which was trained using training data generated by hand. The search algorithm was implemented with A*, as this was fast enough to run several times per second for multiple entities in the game. Morphing was done by modifying the models vertices and normals using Perlin noise, which was used because it is a continuous noise function which results in smooth movements. Finally the advanced shading was done by rendering the scene from the perspective of the light source and using the result to find what would be reached by the light, along with some filtering and noise to improve realism of the shadows.
Languages, libraries and versions used in the project:
- Java
- TensorFlow
- Lightweight Java Game Library
- OpenGL
To modify or create a schematic, you need to do the following steps first.
- Get Minecraft and make sure you have the launcher installed and have run the game at least once on the latest version (14.4).
- Go to https://fabricmc.net/use/ and download the Fabric installer for vanilla (latest version) and run the installer and follow its instructions.
- Now (re)launch the Minecraft launcher and load the new Fabric profile (select it in the bottom bar).
- Go to
C:\Users\USER\AppData\Roaming\.minecraft\mods
(the mods directory was just created). - Go to https://www.curseforge.com/minecraft/mc-mods/structureutils and downlodad the jar file for 1.14
- Go to https://www.curseforge.com/minecraft/mc-mods/worldedit and download the jar file for 1.14 with (Fabric for...) in the name.
- Go to https://www.curseforge.com/minecraft/mc-mods/fabric-api and download the latest jar file for 1.14
- Put all three jar files into the mods directory and relaunch the game (this tends to take a minute).
- Create a new world in creative mode with superflat as world type.
- Set the difficulty to peaceful in options.
- Run the following commands:
/gamerule doWeatherCycle false
and/gamerule doDaylightCycle false
. (this stops rain and night) - Now give yourself a structure block:
/give NAME minecraft:structure_block
. - All done.
Saved structures are saved to the generated directory in the world save.
- Daan Wöltgens
- Kilian van Berlo - S150750 - [email protected]
- Mathijs Boezer
- Tobin van den Hurk
- Tom Verberk
Project Link: https://github.com/KilianBerlo/Space-Invaders-2