Giter Club home page Giter Club logo

bernhardrieder / pcgml-game-mechanics Goto Github PK

View Code? Open in Web Editor NEW
55.0 8.0 17.0 730.35 MB

Master thesis: "Using Procedural Content Generation via Machine Learning as a Game Mechanic" with a prototype in Unreal Engine 4.22.

License: MIT License

TeX 31.16% Batchfile 0.03% Jupyter Notebook 47.35% Python 11.33% C++ 9.91% C 0.07% C# 0.16%
master-thesis machine-learning procedural-content-generation game-mechanics game-development unreal-engine-4 python cplusplus pcgml

pcgml-game-mechanics's Introduction

Using Procedural Content Generation via Machine Learning as a Game Mechanic

This repository contains my master thesis which addresses the open problem of "Using Procedural Content Generation via Machine Learning as a Game Mechanic". It was written for the study program Game Engineering and Simulation Technology at the University of Applied Sciences Technikum Wien in Vienna, Austria.

Thesis Abstract

Procedural Content Generation (PCG) is a powerful and essential topic in modern video games which helps developers to create a vast amount of game elements. Brand new and recent research now connected PCG with Machine Learning (ML) to enable new horizons of content generation. Nevertheless, the research showed that there is still much to do and left the problem of using PCG via ML (PCGML) as a game mechanic open for further research.

For this reason, this thesis dedicated itself to address this open problem with a theoretical and practical approach and furthermore provides developers with a guideline about the procedure of developing PCGML game mechanics. It first addressed fundamental theoretical issues which help to create awareness for PCGML in the first place. It then addressed possible PCGML game mechanics where one of them was implemented in a game prototype scenario. The entire development process for this prototype was documented so that developers can follow them step by step to implement their PCGML game mechanics.

Now, the research showed that PCGML game mechanics are suitable for a broad range of games and are not limited to particular genres. 13 different ideas are described in the thesis and one particular idea called "Changing Weapons" was then implemented in a game prototype scenario. The game mechanics primary feature is a weapon generator which can generate new and similar weapons based on the weapons of a favorite first-person shooter game. In specific, the generator uses a with TensorFlow implemented variational autoencoder to learn the underlying and hidden structure of the provided weapon data and can generate useful weapon data. This generator was then integrated into Unreal Engine 4 to test and prove that a PCGML game mechanic can be used in a typical game engine and showed that this application is possible without any issues.

To conclude the thesis, a performance report was created which showed that the implemented game mechanic does not cause significant performance losses. Thus, it is possible to use PCGML-based game mechanics in video games regularly. Therefore, with this proof-of-concept, a new game mechanic area for creating new player experience has opened for future games.

Repository Breakdown

There are two main projects in this repository:

Playable Prototype

This repository provides a playable prototype which can be found in the release section.

Getting Started with the Project

Requirements

How to Start and Play?

  • Clone the repository
  • Open the plugins folder of the project and extract the "plugins-source-code.7z" file. This file contains the TensorFlow plugin with a modification in the UnrealEnginePython plugin to enable proper packaging support. For more information see this thread.
  • Download the "Windows x86-64 embeddable zip file" from the Python website and extract it into "../UE4/Binaries/Win64/". Note: the required Python version is 3.6.4.
  • Launch the project and make sure you can activate the Python Console in "Window/Developer Tools/Python Console". This indicates that the Python plugin is enabled and works.
  • Check the Python console and wait until all TensorFlow dependencies are installed. For more information, check out this GitHub page
  • Restart the project and then you should be able to run the game now. To make sure everything works, open the weapon generator blueprint located in "Content/Blueprints/BP_TensorFlowWeaponGenerator". It should take a while to open, and no error message should appear in the logs. That means you are ready to go!
  • Press the play button or ALT+P and you should find yourself in the main menu. Don't panic if it freezes after pressing the "Start Scenario" button! It just takes a few moments to load all the dlls.

Known Issues

  • TensorFlowComponent not found: This can happen if your path of the project is too long. Quick fix: move your project to another directory.

Want to learn more about the project?

Check out the chapters 5, 7 and 8 of my master thesis.

Credits

getnamo for this awesome Unreal Engine 4 TensorFlow plugin

pcgml-game-mechanics's People

Contributors

bernhardrieder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.