Giter VIP home page Giter VIP logo

giantscape's People

Contributors

dylanrenwick avatar

Watchers

 avatar

giantscape's Issues

Tilesets should be separate from Tilemaps

Rather than stored as a property of a Tilemap, Tilesets should be distinct objects that can be independently passed across the network. This allows multiple tilemaps to use the same tileset without duplicate data, and allow for partial tilemaps such as chunks.

Tilesets should store the following information about every tile type:

  • Resource name
  • Collision
  • Pathing weight

Steps:

  • Decouple TilesetData from TilemapData
  • Implement pipeline for loading TilesetData and associating with Tilemaps
  • Implement TilemapRequest and Tilemap packets
  • Implement client-side handling of decoupled data and loading

Allow server to handle entity spawning

The main client scene should not have a player entity spawned by default.

Instead, when the player logs in, the server should spawn a player entity at the relevant location, and send that spawned entity to the client to be spawned in, along with other entities on screen.

  • Remove player entity from client
  • Create player entity prefab in client
  • Create entity data class
  • Create entity spawn packet
  • Spawn new player entity when player logs in on server
  • Send new entity spawns to client via entity spawn packet
  • Spawn new entity on client when receiving entity spawn packet

Database architecture overview

Currently the server loads all relevant data from files, mostly json formatted.

User account data, including password hashes, map records attaching names and IDs to tilemap files, and player records connecting user accounts with data stores are all stored in a monolithic database.json file.

Tilemaps are then stored in individual json files in the Tilemaps subdirectory.
While DataStores are stored in the similar DataStores subdirectory in bson format with .dat files

Worst of all, all of these files are read and deserialized into memory on startup.

This method of storing DataStores will likely remain, but a better solution is needed to handle data storage and loading. Data should be loaded as its needed, and only kept as long as it is needed. User accounts should be handled by a separate database via a json web API.

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.