Giter Club home page Giter Club logo

ragin-mages's People

Contributors

adnanusman avatar brianfreemanatlanta avatar geekingreen avatar ignacioxd avatar miku1338 avatar pepperaddict avatar scottwestover avatar thelaurafranklin 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ragin-mages's Issues

Players allowed to move out of arena

In one of my first matches I was able to move my sprite out of the grid and into the surrounding black area. Eventually the AI could also follow me outside.

To Reproduce
Move sprite to the upper right hand corner of the arena. Try attacking a few times and then move sprite up and down. Return to the upper right hand corner and you should be able to move off grid

Alternative projectile range

I was working with tweens today as an alternative to the timer approach. Here is a sample of a tween projectile that fades with time. Using tweens we can add different effects, such as a fireball that gets bigger as it goes. or a scatter gun.
ProjectileExample.zip

The code is simple:

 let tween= scene.add.tween({
      targets: this,
      alpha: 0,
      ease: 'Linear',
      delay: 400,
      duration: 750,
      onComplete: this._rangeReached,
      onCompleteParams: [ this ]
    });

and

 _rangeReached(tween, targets, projectile) {
    console.log('Kill message received');
    // this.timedEvent.remove(false);
    projectile.destroy();
  }

You can see an example on my fork the game-dev-projectile-upgrade branch.
https://github.com/AtlantaDancer/gosch-game/blob/game-dev-projectile-upgrade/game/src/js/objects/Projectile.js

Game hangs

When I hit down and spacebar (fire) together, the game hung up.

Make responsive

There are several ways we could approach this, this article explains some options we could use: http://www.netexl.com/blog/making-of-a-responsive-game-in-phaser-part-1/

  1. This is definitely the easiest where we shrink the view to the size of the screen, preserving the aspect ratio but not the apparent size of our assets.

  2. Stretch our view across the entire display and make it look distorted.

  3. This is the best, but also most complex option would calculate how much screen real estate is available and render our assets at a size that would appear nearly identical on all screens. That while visually would look best might limit the visibility of players on mobile devices compared to their desktop rivals.

I'd like to implement 3, but I'm worried it might be more complex than I'm thinking, but also that it limits players with less real estate in terms if being able to see what is going on around them. So while I like 3 perhaps 1 is the best for now? Or maybe some sort of combo of the two?

Error on Character selection screen

I am running the DEV build on my local system. I select multi-player. When the character selection screen comes up I get the following error:
characterselectionerror

This happens multiple times eventually it will load without errors. I'm guessing it's a delay in actually loading characters.json into the cache or retrieving it from the cache so that we call the character creation before the data is available.

Configure Client and Server to use config files

For ease of development/testing and then deployment the use of config files would be convenient. This allows us to have a DEV config file pointing to localhost and a production config that can point to the deployment IP address.

I currently have a version on my computer that uses config files to generate the static files for DEV or PRODUCTION. I can do a pull request hopefully tomorrow with that code. I will look to adapt that code to use https://github.com/henrikjoreteg/getconfig or something like it to dynamically read the a config JSON file with the socket IO port.

Scale title & character selection screen for display

When the game is loaded on a small display like a phone the character selection screen should scale so the options are all displayed.

The title screen should also scale a bit to display the options appropriately.

Sprite face direction we fire projectile

If that is the behavior we end up wanting, we could just make points outside of the player character's x and y location and draw a vector from each to see which is closest to the mouse, and animate the character from there, returning to its previous animation direction after firing.

Any thoughts?

Multiplayer websocket messaging protocol

We need to define the messages the game will send via websockets, including the payloads sent by each one, if applicable. The basic features that must be supported for the first milestone are:

  • Player connection/disconnection
  • Player joining the game with a specific character/player name/etc.
  • Player movement
  • Player shooting
  • Player health change
  • Player killed
  • Player respawn

Later versions of the game will support other features, such as collecting power-ups or healing.

Highlight grid square on mouse over

The game will be grid-based, where each character will occupy one cell on the grid. As a first step to enable this functionality, we need the ability to highlight the cell that is under the mouse pointer, and identify when this cell is clicked. Highlighting the cell can be done by dynamically drawing a box around the cell, or by overlaying an asset (e.g., a hollow frame).

Right now, the map tiles are 32x32 pixels, but this can be changed if needed. It would be ideal to make the grid align with these map tiles.

Create first map

A basic map is currently loaded in the game. We need to create a more interesting first map that can be used to test the game mechanics. The use of Tiled is recommended to generate the JSON file required to load the map. The current map can be used as a starting template.

Leaner character creation

We currently have a separate class/file for each possible character. We could consolidate. Have a single character class that has a constructor that individualizes the character. The config information can be stored in a config json file - probably assets.json. When we want to create the character we can either pass in configuration or key identifier and then set properties. Current character properties are:

  • Key
  • Animation
  • colSize
  • offSetX
  • offSetY
  • Projectile type
  • Projectile Range
  • Speed

With the list of characters in a json file we can pass the character list into buildAnimations instead of having the defined list in the routine.
If a new json file is used BootScene has an example of loading the json into the cache and is where the new json can be loaded. LoaderScene has an example of pulling information from the cached json file and then using the information.

Adding a new character won't require code - simply adding assets and adding character information to the json file.

Redo 'No Name'

I think there's going to be a bunch of people joining in quickly without realizing the set name option. There's going to be a bunch of 'no names' in the game. How about we have 'player' with a random number or in sequential order as default. So for example, it'll be 'player3' 'player4' and so on...

Improve Client/Server Communications

Currently, the game is having the "continue walking" problem. The issue is there could be a delay between client/server. To improve this, we're planning on client firing off location if the vector > 0 every 0.25s. If the vector changes to 0, broadcast position only once.

Healthbar should use offsets in json file

Player health bars should use the offsets listed in characters.json. The offsets should be adjusted for the sprites to display correctly.

Do we want the health bars just below the name as currently done or below character?

Update Wiki

It would be awesome to use the Wiki to document the game, both the design/architecture/implementation, and the game idea and mechanics. We can also create a user's manual.

Server side Kills Leader board

Opening this issue in the interest of small tasks. Need a leader board on the server to track current players kill counts and relative position on the leader board. initial requirements are:

  1. Track each player kill count
  2. Kill count resets when player dies
  3. Track players standing on leader board
  4. On first kill notify user of current position on leader board
  5. On subsequent kills notify user if "highest position" on leader has changed
    • Meaning if they were 6th then get 3 kills but other users got 4 kills and standing dropped to 7th don't notify user
    • If their standing increases from 6th to 4th then notify user (whether from other players dying or player kills)
  6. When player is killed & respawns they lose their spot on the leader board
  7. Players are placed on the leader board with their first kill

After the leader board is working we can add the messages and save the data on the client side when the message is received.
Issue #76 will store and display the highest standing when the player dies.

Player shot accuracy not reported

While testing it appears that shot accuracy was simply reported as 0. Since it now takes more than 1 shot to kill someone I think we should add a number of hits given and
accuracy = hits given/shots

2D grid system and pathfinding

This is related to #8. We need to incorporate Phaser's grid alignment system so that each character is always aligned to a cell.

Once a target cell is identified (see #8), we need a pathfinding algorithm that calculates the best path in this grid with only vertical and horizontal movement. This algorithm should be able to calculate how many cells are needed to reach a destination along the chosen path.

Single Player AI

Need to create an AI for the single player campaign / offline version of the game.

User reentering game has ghost

noticed during development. After user is killed if they select "exit game" then chooses a new character and re-enters multi-player battle the old character is still on the field. They aren't removed from "existing players" list, and gets added as a new player.

Steps to recreate:

  1. enter multi-player battle
  2. get kiled
  3. at "exit"/ respawn dialog choose to exit game
  4. choose new character and enter multi-player battle
  5. you will see old character and new character on the battle field
    • if you have console open it will show 2 players instead of 1 player (or 1 higher that actual players)

Load game assets dynamically from JSON file

We need a way to load assets from a master JSON file, instead of manually modifying the Loader scene for every new asset. The format of this JSON file should also make it possible for a service worker to identify the assets that need to be cached.

Socket.io library client-side integration

This will be very similar to what is currently being done for the Phaser engine in Gulp.

  • Add Socket.io as dependency
  • Create and integrate Gulp task to deploy the Socket.io client library into the game build folder
  • Load the Socket.io client library from the HTML

Title screen navigation

We need to add two buttons to the main screen: one to start the game in single player mode, and the second to start it in multiplayer mode. These buttons will open the character selection screen (see #35), but they need to pass in the game mode that the user requested as data.

choose licensing

We currently don't have an licensing on this project. Do we want to assign a licensing such as MIT license to the game?

Character selection screen

Before joining the game, either in single or multiplayer mode, the player should choose a character to play. We need to create a scene right after the title screen and before the game for this. Once a selection is made, this scene should pass the character as data to the game scene.

Player kill count stays at 0

I saw mention that the player kill count is not being tallied/reported. I have investigated this issue and I've found 2 issues that are causing this:

  1. wrong ID is being sent to the client. server\src\game\player.js line 11 should be
    socket.emit('setId', this.id); (currently sending socket.id)
  2. issue with client setID. Each scene has an individual "server" listening for events. The "setID" is received by the Title Scene server. Thus this is the only server that has the "clientID" set and readable. The clientId on the GameScene server is undefined.

There are several possible solutions to item 2. Among them are (these are untested, just throwing possibilities out there - some may not actually work):

  1. create method on the server class to return clientId if assigned (that also won't fail if off-line/not connected. Pass this ID to subsequent Scenes that will assign clientID to their server.
  2. have single event "Server" associated with Game object and scene "servers" subscribe to master game server emitter.
  3. have scene servers subscribe to events from other servers so the ID is passed along to other servers
  4. have single "server" that is passed to scene creation and they all point to the single server.

There are probably other solutions, but these are the one I can think of right now.

What are people's thoughts? One we have consensus I can go in and fix or someone else can.

Service worker should cache all the files defined in the assets.json manifest

We have an asset manifest file (assets.json) that contains all of the assets the game requires, and also includes supporting files to be cached (e.g., index.html, CSS, etc.) The service worker should use this file to determine what to cache, as opposed to having hard-coded file paths.

It might be useful in some cases to use the util/ServiceWorker.js file to post a message to sw.js passing in the manifest object that the game already loads. The service worker could also load the manifest directly as a first step.

Assets issues

I need a list to help keep track of what I need to fix.

Characters

  • mage

    • projectile: centered, pivot point 0.5, 0.5 - named proj_orb_p
    • character: centered, pivot point 0.5, 0.8 - named mage_hero
    • fight, death, walk, stance, critical
  • knight

    • projectile: centered, pivot point 0.5, 0.5 - named proj_light
    • character: centered, pivot point 0.5, 0.8 - named knight_hero
    • fight, death, walk, stance, critical
  • priest

    • projectile: centered, pivot point 0.5, 0.5 - named proj_orb
    • character: centered, pivot point 0.5, 0.8 - named priest_hero
    • fight, death, walk, stance, heal ( heal can be changed to critical)
  • fire monster

    • projectile: centered, pivot point 0.5, 0.5 - named proj_fire
    • character: centered, pivot point 0.5, 0.8 - named fire_monster
    • fight, death, walk, stance, critical - (need to add critical to be even with the other players)
  • ice monster

    • projectile: centered, pivot point 0.5, 0.5 - named proj_ice
    • character: centered, pivot point 0.5, 0.8 - named ice_monster
    • fight, death, walk, stance, critical - (need to add critical to be even with the other players)
  • spider monster

    • projectile: centered, pivot point 0.5, 0.5 - named proj_ven
    • character: centered, pivot point 0.5, 0.8 - named spider_monster
    • fight, death, walk, stance, critical - (need to add critical to be even with the other players)
  • golem monster

    • projectile: centered, pivot point 0.5, 0.5 - named proj_rock
    • character: centered, pivot point 0.5, 0.8 - named golem_monster
    • fight, death, walk, stance, critical - (need to add critical to be even with the other players)

If time permits

  • goblin monster (don't know what type he'll be... maybe an archer?)

    • projectile: centered, pivot point 0.5, 0.5 - named proj_arrow
    • character: centered, pivot point 0.5, 0.8
    • fight, death, walk, stance, critical
  • soldier (don't know what type he'll be... I can turn him into a thief)

    • projectile: centered, pivot point 0.5, 0.5
    • character: centered, pivot point 0.5, 0.8
    • fight, death, walk, stance, critical

Aura

  • healed - has 8 frames
  • spawn/vanish - has 8 frames

Comment here if there's something I missed!

HUDs and Menus

We need a way to display in-game dialogs. We can start with something simple like pressing a key to show the instructions and clicking on a button on the dialog to close it.

Display leaderboard during gameplay

We currently have the leaderboard functionality working in the background. The game receives leaderboard updates when there are any. We need a way to display the leaderboard during gameplay.

There are a couple of ways to go about this that come to mind: 1) a DOM-based HUD (similar to the DOMModal), and 2) an overlay Phaser scene (similar to the other modals and mobile joystick).

Any ideas?

Track player stats to display stats when they die

Track the following stats and then display on the screen for respawning when they die:

  • Kills
  • Shots Fired
  • Accuracy
  • Time alive (Time they were alive since they joined or last respawned)
  • Highest Ranking (relative ranking based on kills)
  • Hits Received

The stats will reset when the character respawns.

Projectiles should have a limited range

Right now, when a projectile is fired, it is only destroyed if it hits another player. We need to be able to limit the range of these projectiles. This should be a per-character setting, to allow different character classes to have different ranges.

Character customization for balanced game

Allow variation in key stats between character classes for balanced play. Here are some initial thoughts of properties that we can vary. Looking for input of the list we want to implement.

  • Character Speed
  • Project Range
  • Projectile speed
  • Projectile strength
  • Firing rate (cooldown time between shots fired)
  • Player health
  • Damage Reduction
  • Weapon vulnerability (e.g. fire does extra damage)
  • Weapon resistance (e.g. cold does less damage)
  • Maneuverability (how fast can they turn)
  • Self-healing (recover health over time)
  • direction dependence on the hit (knights shield block/deflects shots to the front, but don't to shots to the back)

Player health and damage reduction initially have the same affect. Although if damage reduction is due to an item that can be damaged it would later be removed if the item goes away and then the character wouldn't receive the benefit anymore.

This is my initial brain dump of options. Some are easier to implement than others. Looking for input on which we want to implement first, later, never.

Add HP/health bar to game screen

I will be working on this with a new member to our group, kySuga. We will also be working on adding HP functionality to the game.

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.