GithubHelp home page GithubHelp logo

sideviewshootemup's Introduction

HMS "Sunflower" project.

Physics based arcade ship builder.

Question:

What is the optimal way to replicate the behavior of Highfleet ships in Unreal engine?

Requirements:

  • Ship is collections of parts that rigidly joined together affected by gravity and moves using thrusters
  • Each part takes damage individually, can be destroyed so ship can be split
  • Guns can be placed inside ship -- projectiles they spawn do not collide with ship itself, only with enemy ship, other projectiles
  • Player character can run inside the ship, and is affected by ship movement

Constraints approach

Ship parts connected together using FConstraintInstance.

Nice:

  • Very simple code
  • We can add snapping and bending as features

Bad:

  • Physic simulation take a lot of CPU - this will no run on mobile for sure

Really bad:

  • Ship is not rigid

More constraints approach

Add long distance constraints.

Nice:

  • We can add snapping and bending as features

Not great:

  • Messy code to split ship
  • Ship is sort of rigid but no 100%

Bad:

  • Even worse performance

Welding approach

Ship parts connected together using AttachToComponent with bWeldSimulatedBodies = true

Really nice:

  • Very cheap simulation - should run on mobile

Nice:

  • Ship is 100% rigid

Bad:

  • Attachment is directed graph, wile ship is undirected - so additional layer of conde is needed

Really bad:

  • Unwelding parts generates spikes up to 200ms on big ships

Batch unweld chaos mod

Add Batch unweld to MeshComponent, FBodyInstance and chaos.

Not tested yet, performance fix is not given.

Bad:

  • Extra maintenance cost associated with engine modification.

Lego fortnite approach

Use FClusterUnion and FGeometryCollection.

  • FClusterUnionManager
    • FClusterUnionPhysicsProxy
      • UClusterUnionComponent (5.3)
        • AClusterUnionActor
        • ChaosModularVehicle (5.4)

sideviewshootemup's People

Contributors

barsnadcat 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.