0
\$\begingroup\$

So I have just begun studying Data Driven Design and implementing it into a project. I just encountered an issue and I have not be able to locate any material that suggests an elegant if not practical design to address it.

In my case I am using an XML file to assign game objects' member variables such as x/y coordinates, etc. My issue is that the values are still in a sense 'hard-coded', i.e. x="300" y="blah blah", but what if I want to offer different window resolutions? Beyond making X number of XML files for each individual resolution, I am unsure of how to couple DDD and a feature that effects the data in manner such as this.

Could someone please provide any good ideas on how to satisfy the issue? Documented or personal experience are welcomed.

\$\endgroup\$
1
\$\begingroup\$

I think you want to put them in world coordinate position instead of screen coordinates; instead of the values relating to a position on the screen and thus changing; make, it say the position x=30 y=50 for example, the same on any screen so that the world coordinates are the same (a specific area in the game world) in it's own coordinate system separate from the screen

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.