Skip to content
SFilinsky edited this page Dec 6, 2023 · 25 revisions

Worldscapes Engine is data-driven framework for game simulation. It provides scalable architecture which allows you to easily create multiplayer-first games using any modern Javascript technologies for game render.

Engine priorities (not ordered)

  • Minimalistic - designed to be simple in usage
  • Structured - provides complete architecture for game simulation
  • Simple - user mainly works using functions with straight in-out processing which makes development simple
  • Customizable - allows customization by replacing wanted engine parts
  • Distributed - multiplayer is built into engine core and can be easily used rightaway
  • Pure - encourages keeping world logic pure, which gives more consistency and simplifies testing
  • Testable - engine provides lightweight tools for testing
  • Transparent - most parts of engine can be easily benchmarked for performance overview and optimizations

What this Engine is not

  • Complete solution for building games - though it provides framework, many features common for games (like physics) should be integrated separatelly
  • Rendering library - it does not include rendering or any other ways to display data. Though you can easily implement any presentation you want, Engine only provides you API to access simulation results

Features

  • Uni-directional data-flow
  • Both client-side and server-side support
  • Customizable presentation layer
  • Separate presentational and game world logic
  • Separate state and behaviour
  • Game world persistence from a box
  • Clear separation of different aspects of game
    • Game world simulations
    • Networking
    • Presentation
      • Graphics
        • Animation
        • Modeling
        • Rendering
        • Texturing
        • Effects
      • GIU
      • Sound
      • Input
  • Event-based user input processing
  • Composable game entities
  • Simple independent testing of game simulation logic
  • Simulation does not depend on assets, allowing lazy loading of game resources

Why to create custom engine instead of using existing ones (vs Unity and Unreal)?

The main point of creating custom engine is to provide solution for architecture. Other engines give toolset for basic game features, scene representation as game objects. But many important questions are not solved. How to serialize game state? How to organize network communication? How to organize game objects that interact with each other? Of course, those questions can be solved by user, but it requeres additional awareness and increases developement complexity.

But what's important, some general architectural problems are almost unsolvable with exisiting engines:

  1. They mix data with game world logic and presentation logic together.
    Without clear separation it complicates a project and leads to more bugs in this mess. When those concepts are clearly separated we can benefit from extra optimization, make space for additional features, customization of different parts of engine and make developemnt more focused overall.
  2. They do not organize data flow inside of game.
    It leads to exponential complexity growth, excess bugs and even performance degradation which is hard to fix.

Those problems should be addressed by engine architecture and not by engine users.

Also, this engine is being created for specific project. Because of that, it would be easier to develop it using strictly aligned feature set designed for project needs.

Why to use Javascript instead of other languages?

Though Javascript lacks some important features like built-in multithreading (yet), linear arrays (as we know them from other languages), direct memory optimization, it's good language for building flexible frameworks using modern patterns. More to it, language can achieve high performance because of real-time optimizations. And it still improves making overhead less and less significant.

Overall, when using Javascript we sacrifice part of performance for sake of other advantages:

  1. Crossplatform because of browser integration, but still can be used for desktop and mobile apps
  2. Users can concentrate on high-level game development without low-level details, so development goes faster and is more focused
  3. Javascript has good support for functional features which allow to think in more data-driven manner
  4. HTML, CSS and tons of UI libraries to be used which allow much cleaner and fast UI developement
  5. It makes easier to create additional tools for engine
  6. Built in network support

Customization

To allow customization Engine uses concept of dependency injection. You can replace any part of Engine by injecting custom implementation which can have much more functionality and features. The only restriction is that Custom implementation should have several API methods so other parts of Engine can communicate to it.