Giter VIP home page Giter VIP logo

rustyfusion's Introduction

RustyFusion

RustyFusion is an open-source server emulator for Cartoon Network's MMO Fusionfall written in Rust inspired by the OpenFusion project in which I am an active contributor. RustyFusion was initially an experiment for me to gain experience writing Rust but is now on course for eventual feature-completion. Please note that, until then, RustyFusion is NOT ready for use as a production Fusionfall server!

RustyFusion vs. OpenFusion

  • Compatibility: RustyFusion is designed to work with general-purpose Fusionfall clients, as it speaks the original Fusionfall network protocol. This means that OpenFusionClient can connect to a RustyFusion server with no extra work. RustyFusion's PostgreSQL backend also uses the OpenFusion database schema, and RustyFusion uses the same tabledata repository as OpenFusion for data sourcing. It will also later support the OpenFusion monitor protocol.
  • Safety: Because RustyFusion is written in Rust as opposed to OpenFusion's choice of C++, it is, in theory, much less prone to memory safety issues, security vulnerabilities, and undefined behavior than OpenFusion's implementation of the game with a near-zero decrease in performance.
  • Scalability: Unlike OpenFusion, RustyFusion's login server and shard server are two separate binaries that communicate to each other over the network, allowing for a more flexible server architecture with multiple shard servers.
  • Reliability: RustyFusion comes after years of writing, refactoring, and evaluating OpenFusion code. There were a handful of cut corners and bad design decisions made in the development of OF that this project aims to avoid. Some already implemented examples include the increased usage of high-level types, a proper logging system, strict error-handling, and stricter packet validation ("anti-cheat"). These changes should lead to a cleaner codebase with less bugs.
  • Completeness: OpenFusion is not technically complete in and of itself. There's a handful of features that remain unimplemented at the time of writing, such as channels, certain built-in commands, and NPC v. NPC combat. RustyFusion aims to close the gap on as many of these features as possible.

What's Done and Left To Do (Roughly)

  • Core login server functionality
    • Client connection
    • Shard connection
    • Auto account creation
    • Character creation
    • Character deletion
    • Character selection
    • Shard selection +
    • Shard querying (channel + player info) +
  • Core shard server functionality
    • Login server connection
    • Client connection
    • Channels +
    • MOTD +
  • Config and tabledata frameworks
  • Core database functionality
    • Framework +
    • Account loading
    • Player loading & saving
    • Periodic shard auto-saving +
  • Chunking
    • Framework
    • Entity tracking
    • Instancing (infected zones + other private instances)
  • Travel
    • S.C.A.M.P.E.R. (fast-travel)
    • Monkey Skyway System (wyvern style)
    • Sliders (bus style)
    • Vehicles
    • Warping through NPCs
  • Items
    • Framework (equipping, stacking, deleting, etc)
    • Vendors (buying, selling, buy-backs)
    • Croc-Potting
    • Trading
    • C.R.A.T.E. opening
  • Social features
    • Basic chat
    • Buddies
      • Framework
      • Buddy chat
      • Buddy warping
      • Emails
      • Blocking
    • Groups
      • Framework +
      • Group chat
      • Shared kills
      • Group warping
  • Nanos*
    • Swapping equipped nanos
    • Summoning nanos
    • Acquiring nanos
    • Changing nano powers
  • Combat
    • Mobs
    • Core combat loop & mob AI +
    • Player respawning
    • Abilities and (de)buffs
      • Passive skills (including nano)*
      • Active skills (including nano)*
      • Gumballs & other usables
      • E.G.G.s (the ones on the ground that buff you)
    • Rockets and grenades
    • Mob drops
  • Missions
    • Starting tasks +
    • Switching active mission
    • Quest items
    • Completing tasks +
    • Mission rewards
    • Escort tasks +
      • Follow player
      • Follow path
        • Eduardo (Scary Monsters)
        • Billy (Carnival Collection)
        • Grim (Don't Fear the Reaper (Part 4 of 4))
  • Entity pathing
  • Infected Zones
    • Movement elements
    • Races
      • Rank endpoint
  • Guide changing
  • Admin features
    • Built-in cheat commands +
    • Custom command system
    • Account (un)banning
    • OpenFusion monitor protocol
    • Management application (bonus)
  • Time machine
  • Fuse boss fight
  • Scripting API (bonus)
  • "Academy" (build 1013) support (currently, only build 104 is supported)
    • Struct support
    • Patching framework
    • Dash skill
    • Nano capsules
    • Code redemption

Known Issues

None currently

Items that are highlighted are in planning or WIP. Items marked with + are either new and not present in OpenFusion or enhanced from OpenFusion (bug fixes not included). Some items have dependencies in other categories, so the list won't get completed in order.

Developing

RustyFusion requires an instance of a supported database backend to connect to for database operations. You can manually configure an instance and set the connection parameters in config.toml or, for PostgreSQL specifically, use docker compose to spawn a container with the default parameters.

Cargo (Rust's package manager) makes working with Rust projects extremely easy to setup. Just clone the repo (recursively, to grab critical tabledata), build, and run:

git clone --recurse-submodules https://github.com/gsemaj/RustyFusion
cd RustyFusion
cargo build
cargo run --bin login_server # or shard_server

Database Backend

RustyFusion compiles with the PostgreSQL backend by default. If you'd like to compile RustyFusion to use a specific database backend (such as MongoDB), run the following instead of cargo build:

cargo build --no-default-features --features <mongo|postgres>

There are currently no plans to implement a SQLite backend, as a SQLite DB can be pretty easily migrated to PostgreSQL.

Contributing

If you have code you want to contribute, make sure you follow the general code style and run the following commands before you commit your code (CI/CD will catch you if you don't):

cargo fmt
cargo clippy

Other Notes

On Creative Liberties

Although RustyFusion tries to match the front-end behavior of OpenFusion closely, there are some notable, intentional differences that exist between the two. I only diverged on these because I think they lead to an overall improved experience.

  • Mob aggro is dynamic and builds up/diminishes according to different factors. This new formula is being tweaked often.
  • Not all OpenFusion custom commands will be supported (particularly "gruntwork" commands) and brand new custom commands are added as good use cases come up.

Disclaimer

RustyFusion is a personal project that I work on in my free time, so it is unlikely to progress at a constant pace.

Feel free to email or DM me if you have any questions about the project or are interested in contributing.

rustyfusion's People

Contributors

dependabot[bot] avatar dongresource avatar yungcomputerchair avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

dongresource

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.