Code Monkey home page Code Monkey logo

Comments (1)

Archez avatar Archez commented on July 24, 2024

A use case on 2ship for this is the ability to have an Array of CollisionPoly.
At a minimum, we would need a way to return a pointer to the start of the "array", and a way to query the array size.

On the port side we would create the CollisionPoly type, and I'm guessing some form of CollisionPolyFactory and some new Ship::ResourceFactoryBinaryArray.

If Ship::Array remains as an actual resource that implements ReadResource, then the CollisionPolyFactory would probably need a new type of "read" method that can be passed in the current reader as part of some loop within the Array factory. Then the Array resource would manage the memory (destructing each CollisionPoly when the Array is destructed).

If Ship::Array becomes some kind of template, then the CollisionPolyFactory would become solely responsible for reading the full resource. Presumably this would require registering this uniquely with the resource manager and have dedicated meta init data.

What I'm not fully aware of is what would be "registered" and what would go in the init meta data.

(This is just my random thoughts on the matter, but there is probably other ways to handle this as well)

from libultraship.

Related Issues (20)

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.