Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace internal object description string with a configuration #35

Open
dixx opened this issue Jun 9, 2014 · 4 comments
Open

replace internal object description string with a configuration #35

dixx opened this issue Jun 9, 2014 · 4 comments

Comments

@dixx
Copy link
Owner

dixx commented Jun 9, 2014

This is related to the 3D object creation #22.
Most of the time, a C++ configuration object is way faster and a bit smaller than a string.
Check why we use the string in the first case, and check if it would be a good idea to replace it with a proper configuration object.

@dixx dixx added the clarify label Jun 9, 2014
@dixx
Copy link
Owner Author

dixx commented Jul 2, 2014

We use a string as it is a flexible data type with simplest handling. And of course it is a good idea to replace a struct with a proper object, which is extendable at wish. But think about a good object structure first!
... and a string is version-safe.

@dixx
Copy link
Owner Author

dixx commented Jul 2, 2014

example:

class ObjectConfiguration
{
    string name;
    enum type;
    io::path meshFileName;
    core::vector3df position;
    ;
    ;
    ;
}

@dixx dixx changed the title replace internal object description string with a configuration? replace internal object description string with a configuration Jul 12, 2014
@dixx dixx modified the milestone: Savegames Jul 12, 2014
@dixx dixx self-assigned this Jul 15, 2014
@dixx
Copy link
Owner Author

dixx commented Jul 19, 2014

We should think about replacing even the scriptual string creation, as well as the stack handling.
We could read the values "as is" from the stack, but we would need a marshaling (a more or less unchangeable order) or an "encoding" for this, and a bit of logic must may also be in the Lua scripts. We could even think about creating the whole objects in Lua. Maybe this relates to #8.

@dixx dixx removed the in progress label Sep 4, 2014
@dixx dixx removed their assignment Jan 4, 2019
@dixx
Copy link
Owner Author

dixx commented Nov 21, 2020

Or we just use a class holding a JSON or YAML object instead, with defaults and accessors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant