MFBA is a MOBA-style game written in Processing.py, with characters you know and love from Magnet High School, like Mr. Sanservino.
The presentation can be found here.
The MLA works cited can be found here.
Flowchart can be found here
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.
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.
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.
a. Download processing
- In the top right corner, select "Java", then add Mode:
- select Python Mode, then click "Install":
git clone https://github.com/Azamlynny/MFBA.git
Server code found at /src/Server/Driver
Look for the play button in the top right corner of Processing IDE
The IP is printed in the IDE console, but may indicate a loopback address. in this case, open your command prompt
Execute
ipconfig
Execute
ifconfig
Execute
ifconfig
Execute
Get-NetIPAddress | Format-Table
Keep in mind that your local IP will look like one of the following:
- Client code found at /src/Client/Driver
- 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.
- 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.
- Tree editing