Skip to main content
This guide covers the complete process of creating and managing CTF games in GZCTF, from initial setup to competition launch.

Creating a New Game

Games are the core entity in GZCTF, representing individual CTF competitions or practice events.
1

Navigate to Game Management

Access the admin panel and go to Games section. Click the Create Game button.
2

Configure Basic Information

Fill in the essential game details:
Title
string
required
The name of your CTF competition
Summary
string
A brief description displayed in game listings
Content
string
Detailed game description supporting Markdown formatting. Explain rules, prizes, and other important information.
3

Set Game Timing

Configure when your competition runs:
StartTimeUtc
datetime
required
Competition start time in UTC
EndTimeUtc
datetime
required
Competition end time in UTC
Ensure the end time is after the start time. The game will automatically become active during this window.

Game Configuration Options

Access Control

Control who can participate in your game:
Hidden
boolean
default:false
Hide the game from public listings. Useful for private or upcoming competitions.
InviteCode
string
Require teams to enter an invitation code to join. Maximum 32 characters.
AcceptWithoutReview
boolean
default:false
Automatically accept team registrations without admin approval

Team Configuration

TeamMemberCountLimit
integer
default:0
Maximum team size. Set to 0 for unlimited team members.
{
  "TeamMemberCountLimit": 4
}

Container Settings

ContainerCountLimit
integer
default:3
Maximum number of simultaneous container instances per team. Prevents resource exhaustion.
Set container limits based on your infrastructure capacity. Each container consumes CPU, memory, and network resources.

Scoring Configuration

Blood Bonus System

Reward teams who solve challenges first:
BloodBonusValue
long
default:10000
Points distributed to first three teams solving each challenge:
  • 1st Blood: 50% of bonus value
  • 2nd Blood: 30% of bonus value
  • 3rd Blood: 20% of bonus value
const bloodBonus = {
  first: BloodBonusValue * 0.50,   // 5000 points
  second: BloodBonusValue * 0.30,  // 3000 points
  third: BloodBonusValue * 0.20    // 2000 points
};

Practice Mode

PracticeMode
boolean
default:true
Enable practice mode to keep the game accessible after it ends. Players can continue solving challenges without affecting rankings.

Practice Mode Benefits

  • Learning opportunity for late participants
  • Challenge archive for training
  • No impact on original competition results

Writeup Management

Requiring Writeups

WriteupRequired
boolean
default:false
Require teams to submit writeups after the competition
WriteupDeadline
datetime
Submission deadline for writeups (typically 1-2 weeks after game ends)
WriteupNote
string
Additional instructions or requirements for writeup submissions
Teams can submit writeups in PDF or Markdown format. Admins can:
  • View all submitted writeups from the admin panel
  • Download all writeups as a bulk archive
  • Review writeup quality before making them public

Divisions

Divisions allow you to separate teams into different competition tracks (e.g., university students vs. professionals).
1

Create Division

Navigate to Game SettingsDivisions and click Add Division.
2

Configure Division Properties

Name
string
required
Division name (e.g., “University”, “Professional”, “High School”)
Description
string
Explain eligibility requirements
3

Assign Teams

Teams select their division during registration, or admins can manually assign divisions through the participation management interface.
Each division maintains separate scoreboards, allowing fair competition within similar skill levels.

Game Poster

Customize your game’s visual appearance:
1

Upload Poster

Click Update Poster in game settings
2

Image Requirements

  • Maximum size: 3 MB
  • Recommended dimensions: 1920×1080 or 16:9 aspect ratio
  • Supported formats: PNG, JPG, WebP

Game Notices

Communicate with participants during the competition:

Notice Types

  • Manual Notices: Custom announcements from admins
  • System Notices: Automatic notifications (new challenges, hints)
POST /api/edit/games/{id}/notices

{
  "content": "Server maintenance in 30 minutes. Containers will restart."
}
System notices are automatically generated when you:
  • Enable a new challenge during active competition
  • Update challenge hints

API Reference

Key endpoints for game management:
Create a new game. See GameInfoModel for request schema.
Update game settings. Changes apply immediately.
Permanently delete a game and all associated data (challenges, submissions, instances).
This action cannot be undone. Export your game data first if needed.
Export game as ZIP archive including all challenges, divisions, and attachments. Perfect for backups or sharing game templates.
Import a previously exported game package.

Best Practices

Test Before Launch

Create a test game with practice mode enabled to verify:
  • Challenge functionality
  • Scoring calculations
  • Container deployments

Set Clear Rules

Include in game content:
  • Prohibited activities
  • Flag submission format
  • Scoring methodology
  • Support contact information

Monitor Resources

Review container limits based on:
  • Expected participant count
  • Infrastructure capacity
  • Challenge resource requirements

Plan Communications

Prepare notices for:
  • Game start announcement
  • Scheduled maintenance
  • Time warnings (1 hour, 30 min before end)

Common Issues

Check:
  • Hidden flag is disabled
  • Start time is in the past
  • Users have required invitation code
Verify:
  • Team size doesn’t exceed TeamMemberCountLimit
  • AcceptWithoutReview is enabled or admin approves manually
  • Users are authenticated
Try:
  • Flush scoreboard cache: POST /api/edit/games/{id}/scoreboard/flush
  • Verify challenges have valid flags
  • Check submission logs for errors

Next Steps

Challenge Management

Add challenges to your game

Team Management

Manage team registrations

Build docs developers (and LLMs) love