TalonBraveInfo / OpenHoW

Open-source reimplementation of Gremlin's Hogs of War (PC/PSX).
http://talonbrave.info
GNU General Public License v3.0
166 stars 12 forks source link

Outline and basic implementation for the Actor sub-system #61

Closed hogsy closed 5 years ago

hogsy commented 5 years ago

We cannot proceed with implementing level objects or other objects until we have a proper outline for this, which also means a rough idea of how things will operate over a network.

From discussions we're leaning towards a client/server model at the moment, but each client will have a copy of all the entities?


Some other random thoughts.


One possible implementation for 'actors.manifest'...

{
    "classes":[
        {
            "name": "DynamicScenery",
            "script": "classes/dynamic_scenery.js",
            "dependencies": [
                "Physics"
            ],
            "properties": [
                {
                    "name": "rotation_degrees",
                    "description": "Rotation overtime",
                    "type": "vector3"
                },
                {
                    "name": "block_explosions",
                    "type": "boolean"
                },
                {
                    "name": "enable_physics",
                    "description": "Enable physics on death",
                    "type": "boolean"
                }
            ]
        }
    ],

    "actors":[
        {
            "name": "WINDSAILH",
            "class": "DynamicScenery",
            "properties": {
                "rotation_degrees": "16 0 0",
                "block_explosions": true,
                "enable_physics": false
            },
        },
        {
            "name": "BOOTS",
            "class": "StaticScenery",

        }
    ]
}
hogsy commented 5 years ago

This is done, really. At least a basic implementation + outline anyway.

@solemnwarning what changes do you want to make to the actor sub-system, at least for this milestone? Otherwise remarks about actor manifest etc will be moved onto a separate milestone.

solemnwarning commented 5 years ago

Only thing that comes to mind right now is that I'd expect the classes themselves to be declaring their properties, rather than the manifest that happens to be loading them. But I don't think we're doing any kind of dynamically loaded classes stuff for the time being anyway?

hogsy commented 5 years ago

Only thing that comes to mind right now is that I'd expect the classes themselves to be declaring their properties, rather than the manifest that happens to be loading them. But I don't think we're doing any kind of dynamically loaded classes stuff for the time being anyway?

I would like to get it done for this release, but realistically I don't think that's going to happen. Below are a list of things I would like to do; not sure if they're things you might be happy to look at?

We can probably discuss it in more detail later.

hogsy commented 5 years ago

I will be taking over some of this for the next milestone as we haven't made as much progress in this area as I wanted.