All Projects → jekyllgrim → ZScript_Basics

jekyllgrim / ZScript_Basics

Licence: other
ZScript entry guide

ZScript Basics: A Guide for Non-Programmers (from a non-programmer)

This guide is a beginner-friendly introduction to ZScript, a primary coding language used to code gameplay, UI and menus in GZDoom source port.

Important notes

  1. This document was written by a person who learned to use ZScript without any prior programming experience. I strive to use the correct terminology and not dumb things down but I may also purposefully overexplain certain things or initially present them in a simplified manner for the sake of beginner-friendliness.
  2. While most code examples in the guide are made to be runnable, it's not recommended to use them as is: many of them are purposefully inefficient, and the guide tends to iterate over them, improving various aspects while explaining new techniques. Examples are meant to be just that: examples—not ready-made solutions.
  3. This document is a guide, not a wiki. As such, it's designed to be read from beginning to end. Chapters are not self-contained and often rely on information explained earlier in the guide, so it's not recommended to skip anything. The only exception to this is the appendix chapters that can be found at the end—they contain additional information that may be referenced throughout the guide, so you may familiarize yourself with the contents of those chapters as needed.

🔶 CHOOSE YOUR PATH 🔶

  • If you do NOT have prior DECORATE experience and want to learn ZScript from scratch, start here: 🔵 >> Where to start.

  • If you DO have prior DECORATE experience and are considering switching to ZScript, start here: 🔵 >> Why ZScript?

Table of Contents

  1. Where to start

  2. Defining ZScript classes

  3. Why ZScript?

  4. Classes instead of actors

  5. How to see your classes in the game

  6. Anonymous functions

  7. Variables and data types

  8. Pointers and casting

  9. Custom functions and function types

  10. Virtual Functions

  11. Event Handlers

  12. Player, PlayerInfo and PlayerPawn

  13. Weapons, PSprite and overlays (WIP)

  14. Arrays

  15. Constants

  16. Inventory (TBA)

  17. HUD (TBA)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].