jordansavant / phpmud

Educate yourself in PHP by making a small game!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phpmud

Learn PHP, project organization, web implementation, frameworking and other programming principles through developing a classic MUD game. This is the launching point for many other adventures in classical web development.

Some concepts we will explore:

  1. Basic elements of programming, from variables to data structures
  2. Object Oriented programming, polymorphism, inheritence and separation of concerns
  3. Command Line Interface (CLI) programming
  4. Code organization, autoloading and frameworks
  5. Web development with front-end and back-end separation

Chapter 1: Hello world, Hello functions

  1. How to run a script with PHP
  2. How functions functions are declared.
  3. Passing variables into functions.
  4. Screen output
  5. Special characters such as \n

Chapter 2: Arrays and CLI Arguments

  1. $argv variable
  2. Arrays
  3. exit function

Chapter 3: While loops and reading input

  1. New function that uses a built in PHP function
  2. While loops
  3. How to read a terminal line and keep it historically
  4. If / Else block
  5. Exiting the script

Chapter 4: Classes

  1. Classes and objects
  2. Switch statements

Chapter 5: Class Inheritence

  1. Inheritence and Polymorphism
  2. rand()
  3. Added logic to class methods
  4. Switch while to be variable based

Chapter 6: Arrays

  1. Extended enemies to live within an array
  2. explode() function on $line
  3. New randomFloat() function and varying our enemies and float type
  4. unset() variables

Chapter 7: Organizing Files

  1. Moving code to its own files
  2. Learning include, require and require_once

Chapter 8: Autoloading Classes

  1. Organizing our code in folders
  2. Autoloading our classes

Chapter 9: Separating Data from Code

  1. Separating our Data from our Code
  2. JSON encoding and decoding
  3. File contents to strings

About

Educate yourself in PHP by making a small game!


Languages

Language:PHP 100.0%