DevOps and Game Dev with GitLab CI/CD

What is your audience?

Independent game developers with basic experience and targeting the browser as their game's platform

What are the requirements?

See requirements in an introductory post to this proposal Devops and Game Dev Part 1

Summary:

  • No OS reqs - cross platform
  • GitLab account
  • Free-tier AWS account

What's your ETA?

1-2 weeks


Proposal

Writing sample

Introductory post to this proposal: Devops and Game Dev Part 1

Introduction

With advances in WebGL and Websockets browsers are extremely viable as a game development platform without the use of plugins like Adobe Flash. Using an accessible, modern javascript game library (Phaserjs), Gitlab, and AWS, hosting single or multiplayer games at scale is a reasonable goal to single game developers or small teams. I'm hoping to fill a gap in articles catering to beginning game devs that focus on devops, hosting, continuous integration, and continuous deployment. This article will build upon the referenced introductory article to create a game with unit tests, a GitLab CI stage, and deployment to AWS in a 3rd stage. These topics will also open up the potential for an article expanding the game to multiplayer with networking and server hosting/deployment, all within GitLab CI.

Outline

  • Create basic game mechanics in phaser
    • Add a ship spite with keyboard movement
    • Add shooting interaction with the mouse
  • Add unit tests
    • Install mocha and chai
    • Add tests for movement and shooting logic
  • Add Test pipeline stage
    • Add CI artifacts
    • Add 2nd stage script to install and run mocha tests
  • Deploy
    • Set up AWS S3 bucket with website hosting
    • Add gulp task to minify for a production build
  • Automate Deployment
    • Add 3rd stage in GitLab CI: install awscli and use it to deploy to S3
    • Include secret variables for AWS

Example project

The project created by the introductory post: Devops and Game Dev Part 1

Edited by Ryan