Inspiration

We wanted to create a game that will add some whimsy to coding, inspire developers to follow best coding practices, collaborate on code with others and have fun doing so!

What it does

This, very first version of the game generates a map of the fictional game world based on the contents of the codebase in a repository.

It uses SCC code analysis tool to generate code statistics and builds a unique map based on a summary of those statistics. It is currently a very simply summary, but we hope to improve on this project as we work on it further in the future.

As user adds our component and uses the play GitTerra stage to their .gitlab-ci.yml file, the game starts! Each commit they make generates an artifact they can download or browse direction on the GitLab website and see the awesome world their code transforms to.

How we built it

We had an idea of the project awhile ago and worked on some artwork and basic map code several years ago.

As we learned about this hackathon (at the last moment, unfortunately), we decided to jump on this opportunity and see if we can rebuild it as a true CI/CD game as we originally intended.

We were positively surprised how easy it was to create a very smooth integration experience using GitLab CI/CD Components Catalog and were happy to be able to finish the project in a few remaining hours of the hackathon.

Challenges we ran into

It was challenging to connect all pieces of the process together and needed to polish the component to make it easy to integrate into any repo with only a couple lines of code.

We also had to figure out how to bring additional tools and assets into the job workers in addition to the template scripts.

What we learned

  • .gitlab-ci.yml syntax and workflow
  • A process to list custom components in GitLab's CI/CD Component Catalog
  • Process for using CI Tokens to enable permissions for cloning GitLab repos into CI job workers
  • How to generate an artifact as a result of a CI/CD job and make it available directly to the users or other jobs in the pipeline

What's next for GitTerra CI/CD Game

We have many ideas on how to make gameplay better and make the game more exciting:

  • Make the generated map cumulative and contiguous, so that your additions expand and build on what came before, rather than generating a completely new and random map every time.
  • Have the map reflect the nature of your code. For example, old or un-refactored code can cause its building to turn into ruins, errors or bad practice in your code can appear as monster lairs or bandit camps or other nefarious locations on your map, to create an incentive to remove them. And we could allow for created tickets for the code to appear as more imposing sections and challenges on the game map as well.
  • Allow to view the history of the world you build, corresponding to the timeline of your commits and branches in the timeline of your project.
  • Create better navigation for the map, allowing zoom and panning.
  • Add more graphics for the base tileset and improve the overall aesthetic and ui
  • Change generation method and parameters: allowing for example for the map to generate specific building styles for different types of data, as well as possibly using hexagonal tiles instead of squares.
  • Change generation of map, i.e. have the base map consist of “nature tiles” of a certain size based on the number of files, that will be filled with your civilization based on the nature of your code and data.
  • Allow a system for collaborators on your repository to show which parts of the world came from their contributions, becoming their “Domain”.
  • Potential systems for PVP or CO-OP multiplayer interaction with your collaborators.

Built With

Share this project:

Updates