Giter VIP home page Giter VIP logo

moba's Introduction

MOBA - Multiplayer Online Battle Arena

Test Suite Discord

MOBA

A community-made turn-based RPG built with Phoenix LiveView.

Get Involved

MOBA is an opportunity to get your feet wet with Phoenix LiveView (or even Elixir) beyond simple counter demos. It's first and foremost a fun learning experience for all developer skill levels, while also being an actual product with real users deployed in a production environment. Interested? Get Involved.

Requirements

  • PostgreSQL 15
  • Elixir 1.14.1
  • Erlang 25.3.2.6
  • node.js 17.0.1

Setup

  • Install dependencies with mix deps.get
  • Create, migrate and seed your database with mix ecto.setup
  • Install asset dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server (in project root)

Now you can visit localhost:4000 from your browser. You can login with the seeded admin account: [email protected] 123456

Running tests

The tests need the seeds file to be run on the test database.

MIX_ENV=test mix ecto.setup
mix test

moba's People

Contributors

asakura avatar dependabot[bot] avatar pedromtavares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

moba's Issues

Ongoing Battle

  • Change processor so that a battle can happen 1 turn at a time, with actions on what skills to use.
  • Should not wait for other player if in PVE mode.
  • Some visual feedback that battle is progressing

Base Gameplay Mechanics

  • Hero will have a fixed ultimate associated with it and custom attributes
  • Users can pick normal skills (but not ultimate)
  • Bots
  • Match will run weekly, have minimum of 100 heroes (fill with bots)
  • Heroes will start with 10 battles and get one every 2 hours
  • For every battle, user will have to pick between 6 fixed targets (2 of higher lvl, 2 of same lvl and 2 of lower lvl)

Bot heroes

  • Bots will be divided into easy, normal and hard
  • Each avatar will have Builds of each difficulty
  • A build will be a set of normal skills (and later items)
  • Bots will be created with a predetermined level, as to cover all level ranges of the game in all difficulties

Base Battle mechanics

  • Import battle processor logic from BD (hero+skills+items)
  • Cooldown mechanic
  • Normal skills can be used more than once (until mana is gone)

Item Level

  • Each hero will have an item level attribute that measures how powerful his inventory is
  • This metric will be used directly for finding proper targets, including bots
  • Bots will need to have varied item levels for each build in order to cover all range of possible targets.

Skills with multiple levels

level up bot skills when generating bots
review xp to next level, seems bugged
add roles to avatar form in admin

Active Items

Integrate activating items into the new processor.

Admin Pages

For skills, items and avatars.

Will live in /admin. Use torch

Death streaks

Similar to kill streaks, give extra XP for when a hero is dying too much, to avoid having some getting too left behind.

Brainstorming ideas

Alpha

  • Will run weekly, have minimum of 100 heroes (fill with bots)
  • Users will pick a hero
  • Heroes can level up, level will be tied to rank in match
  • Hero will have a fixed ultimate associated with it and custom attributes
  • Users can pick normal skills (but not ultimate)
  • Normal skills can be used more than once (until mana is gone)
  • Cooldown mechanic
  • User will only have 10 battles per day
  • Amount X of XP will be calculated per battle, if you kill, you get X, if you die, you get 0, if both live, both get X/2
  • For every battle, user will have to pick between 6 fixed targets (2 of higher lvl, 2 of same lvl and 2 of lower lvl)
  • Users will win gold per battle, which can be used to buy items
  • Items should be easily sellable, so users can swap items throughout the match, keeps things dynamic

Beta

  • Pick and set up template.
  • Set up web app + implement Phoenix Live View
  • Views: create hero, targets page (root), shop, edit hero (skill orders), battles, view battle, user page, match page (ranking + past matches), avatars + skills
  • Try mode: users can create heroes and battle with bots without having an account
  • Noob support: new users will have a full reset at any time
  • Authentication with e-mail verification
  • Content Research
  • Achievements

Base Economy

  • Users will win gold per battle, which can be used to buy items
  • Items should be easily sellable, so users can swap items throughout the match, keeps things dynamic

Current hero design

include streaks in XP bar, XP, time until next gank available, item stats, skill/item orders

Manual battle UI

  • after battle is finished, replace skills column with rewards in battle bar
  • readd hero rows on top when the battle does not belong to current hero

Weekly (?) matches

  • Will have bots from level 1-50 covering all item levels and difficulties
  • Updates ranking every 10mins
  • Increments heroes' battle count every 2 hours

Battle XP calculation

Amount X of XP will be calculated per battle, if you kill, you get X, if you die, you get 0, if both live, both get X/2, if both die, nobody wins anything

Battle targets

  • hero will has_many :targets, and targets will get generated after every battle

  • For every battle, user will have to pick between 6 fixed targets: 2 easy, 2 normal and 2 hard (weak, moderate, strong)

  • No bonus for easy, +10 bonus XP for normal and +25 for hard

  • After level 10 (?), move to 3 normal and 3 hard

  • allowed to repick targets once per hour (maybe later? season thing)

  • difficulty of target will be based on level, item level and, in case of bots, bot difficulty

Bot AI

Auto finishing battles on bots should trigger skills, not just basic attacks

Battle server for unfinished battles

Have a genserver that runs every minute checking for battles that have not finished for over a minute, should close them out by issuing basic attacks on behalf of the player until it finishes.

User Registration

  • Backend for creating users
  • Users will have: username, email, password
  • Registration page

Pending Battles

Don't allow users to start a new battle if they have a pending one.

Force redirect via plug?

Isolate skills/items/avatars per match

  • Every resource will belong to a match, and heroes will pick from that pool.
  • There will be a separate pool of 'canon' resources in which balance patches will be applied
  • This canon pool will be used by the start_match func to generate copies for the specific match.

Set up Phoenix app

  • Including contexts for initial models: battle, hero, item, skill, user and avatar
  • Update Elixir and Erlang to latest versions

Hero creation

  • Will have custom attributes based on Avatar: hp, mp, atk, power, armor, speed
  • Users can only pick normal skills, ult is based on Avatar
  • Heroes will start with 10 battles

Bonus XP for streaks

Starting from 3, hero gets 25 XP * streak bonus

3 kills = 25
4 kills = 50
5 kills = 75
6 kills = 100

etc

Base XP mechanics

  • Heroes will start at level 1 and level up with XP
  • Amount X of XP will be calculated per battle, if you kill, you get X, if you die, you get 0, if both live, both get X/2, if both die, nobody wins anything
  • There will be 12 battles per day, so balance leveling around that
  • Users will also have XP, it will be the accumulated value of his heroes' XP

Backend for Teamfights and Leagues

  • Group heroes into leagues, all start at Bronze -> Silver -> Gold -> Platinum -> Diamond
  • 5 consecutive battles with players from the same league
  • 1 easy target from low ranking, 2 mid ranking targets and 2 higher ranked
  • these are random and you must win them all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.