Coder Social home page Coder Social logo

mmo-rts's Introduction

MMO-RTS Game

Immerse yourself in a world of strategy with our massively multiplayer online real-time strategy (MMO-RTS) game! Players engage in a captivating shared game world, building structures, training units, gathering resources, and battling with other players. The server architecture is powered by Node.js, Express, and Socket.IO, with Vue.js driving the client-side operations. MongoDB handles the task of storing and retrieving game state data.

Features

  • Real-time updates for a responsive and interactive game world.
  • Secure user authentication and authorization.
  • Construct strategic structures such as Spawns and Towers.
  • Train versatile units, including Workers, Axemen, and Archers.
  • Manage resources effectively, including gold, wood, stone, and food.
  • Explore and exploit various biomes, including plains, tundra, and mountains.
  • Engage in thrilling combat.
  • Experience the unique action-based system, with a set number of actions per user per turn.
  • Server-side game loop with customizable intervals.
  • Enjoy seamless gameplay with a graceful server shutdown and restart mechanism.

Gameplay Mechanics

Structures

Players can build the following structures:

  • Spawn: A structure where new units can be spawned. Each player can only build one Spawn.
  • Tower: A defensive structure capable of attacking enemy units and buildings. Each player can build multiple towers.

Units

Players can train the following units:

  • Worker: Workers are the primary resource gatherers and can perform various tasks. They can be trained at the Spawn.
  • Axeman: A combat unit that provides an offensive edge to your army. Train them at the Spawn.
  • Archer: A ranged unit that excels in long-range attacks. Train them at the Spawn.

Resources

Players need to manage the following resources effectively:

  • Gold: Crucial for training units and building structures.
  • Wood and Stone: Essential for constructing various structures.
  • Food: Vital for sustaining your units.

Biomes

Players can explore and exploit the following biomes:

  • Plains: Ideal for building structures and farming.
  • Tundra: A source of unique resources.
  • Mountain: Rich in stone and other minerals.

Wildlife

Players can encounter the following wildlife:

  • Deer: Found one per 10x10 chunk of cells. Hunt them for food.

Actions

Every turn, players have a limited number of actions, including:

  • Building structures
  • Training and moving units
  • Attacking with towers, Axemen, and Archers
  • Gathering resources
  • Hunting wildlife for food

Game Loop

The server runs a game loop that processes player actions and updates the game world at customizable intervals. The game loop performs the following:

  1. Processes all queued actions
  2. Updates the game state and saves it to the database
  3. Broadcasts the updated game state to all connected clients
  4. Resets the actions queue
  5. Updates the next task timestamp

The game loop scheduling is handled by the node-cron package.

Demo

A live demo of the current state of the game's development is available at https://mmo-rts.com.

Contributing

We welcome contributions to the project. Please submit a pull request with your changes or create an issue to discuss your proposed changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

mmo-rts's People

Contributors

waxeye7 avatar

Stargazers

Yuriy A Taranov avatar

Watchers

 avatar

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.