Coder Social home page Coder Social logo

kolmon's People

Contributors

andrewwang996 avatar erasaur avatar leegabriel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

andrewwang996

kolmon's Issues

Add server methods to models

Can organize models by using:

  • a lib folder that exposes the model (and certain methods) to both client and server
  • a client folder that extends the model with client-only methods
  • a server folder that extends the model with server-only methods

This way, common logic can be reused on both client and server.

Add inheritance for classes

constructors, cleanup methods, etc. are all very similar. should be able to subclass a "base" class and automatically have those methods defined in super.

Rely on position rather than time-based movement

i.e don't start the next move until we have arrived (or almost arrived) at destination. the idea is to follow the movement queue more strictly so we don't have sudden jumps in position (which I suspect might happen when the client time somehow gets out of sync and triggers a setPosition before the move actually finishes)

Handling of battle doc

  • account for closing the browser (should properly cleanup stale battle documents)
  • account for idling -> kicked out of battle

Namespace conflict between class and collection

Have a Pokemon class as well as a Pokemon collection, both of which have the same name because the plural form has no 's'. Should probably move collections into KOL.collections and models into KOL.models or something similar to avoid conflicts in the future.

Implement teams/PC

  • disallow having no pokemon in team, assign first pokemon in team as "leader"
  • implement catching pokemon (status effects, low hp, speed, etc.)
  • implement leveling up pokemon/evolving
  • handle adding newly caught pokemon to team if space allows, otherwise store in PC (can just represent PC as _.difference(user.pokemonIds, user.teamIds). have to be careful though, since _.difference returns unique values only, so multiple pokemon of same type will not be accounted for)

Initial load sometimes doesn't render anything

probably something is out of sync with loading the images and rendering them afterwards. the issue doesn't occur if the image is already cached.

edit: When world calls the initial render, map and player potentially have not loaded yet.

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.