Skip to content

Azamlynny/MFBA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MFBA - Magnet Faculty Battle Arena

MFBA is a MOBA-style game written in Processing.py, with characters you know and love from Magnet High School, like Mr. Sanservino.

map example

Presentation

The presentation can be found here.

MLA Works Cited

The MLA works cited can be found here.

Flowchart

Flowchart can be found here

Features

Object-Oriented Programming

This project makes heavy use of OOP. We can use the class Entity as an example. Entity is an object largely inherited to represent anything drawn on the screen. Entity's subclasses are used in the following fashion:

  • Entity
    • Tree
    • Attackable
      • Mob
        • Player
        • Creep
      • Structure
        • Tower
        • Nexus

This allows for most functions that all Attackable objects do (like attacking, debuff processing, etc.) to be inherited to all classes. The Entity class is used for movement and collisions checking on all objects at once.

Object "trackers" (like PlayerTracker, StructureTracker, CreepTracker, etc.) have a list of all elements they track and process the relevant functions for those elements every game tick.

Networking

Processing's network library also works for Processing.py. This allows for us to implement multiplayer. A single server instance to be running, and processing all game actions, while client code renders and displays the game to the players. Server does all computations in order to prevent cheating by tampering with packets.

Pathfinding

pathfinding example The map has a series of nodes throughout all of the lanes. The blue alliance creep traverse up the graph from node to node and the red alliance creep traverse downwards. If a player of an opposing alliance intercepts a creep, the creep will pathfind towards them. If the distance between the aggressor is too large, the creep will return to the previous node it was at.

Download and Setup

1. Download Relevant Software

a. Download processing

b. Install Python Mode

  • In the top right corner, select "Java", then add Mode:

Adding Python Mode

  • select Python Mode, then click "Install":

Select Python Mode

c. Clone the Repository

git clone https://github.com/Azamlynny/MFBA.git

2. Start Server

a. Open Server Code in Processing IDE

Server code found at /src/Server/Driver

b. Run Server Code

Look for the play button in the top right corner of Processing IDE

c. Note down Server IP

The IP is printed in the IDE console, but may indicate a loopback address. in this case, open your command prompt

i. Find IPv4 in Windows with cmd

Execute

ipconfig

ipconfig on cmd

ii. Find IPv4 in Linux (Bash)

Execute

ifconfig

ifconfig on bash

iii. Find IPv4 in MacOS

Execute

ifconfig

ifconfig on MacOS

iv. Find IPv4 in Powershell

Execute

Get-NetIPAddress | Format-Table

Get-NetIPAddress on Powershell

Keep in mind that your local IP will look like one of the following:

Credit to Wikipedia for the chart

3. Start Client(s)

a. Open Client Code in Processing IDE

b. Run Client Code

  • Running Client Code is the same as Server code. Just remember to replace the ip variable in Driver.pyde with the server's ip address.

Controls

  • Mouse
    • Right Click will move your character. If you right click an Attackable (Player, Creep, Tower), your player will pathfind to attack it.
    • Left Click will show the health of the object clicked on in the GUI.
    • Middle Click + Drag pans the camera.
  • Keyboard
    • W,A,S,D will pan the camera.
    • Space will pan the camera onto your player
  • Developer Mode (Server only)
    • Tree editing
      • J, K, L (simultaneously) will toggle tree editing mode.
      • Left Click will place trees
      • T will delete the trees saved in memory (Holding down for too long can result in mass tree deletion)
      • O will write your current tree configuration to a txt file.
    • Pathfinding Node editing
      • H, J, K (simultaneously) will toggle node editing mode.
      • Left Click will place nodes
      • P will save your current node configuration to a txt file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages