Advertisement

screen size for script 2D coords

Started by January 24, 2005 08:13 PM
1 comment, last by Madster 19 years, 7 months ago
I am designing an xml-based script language for my 2D, resolution-independent game. In this script, some attributes will be flat screenspace coordinates. I was wondering which is the most comfortable way to express these coordinates. My ideas so far are: -assume a base resolution (800x600): even though the real resolution could be higher or lower. Fractional coordinates would be allowed. -use 0 to 1 as fractional coordinates: I'm concerned about aspect ratio and float precision in this method -specify own screen size: this would have the best of both worlds. But what about aspect ratio? lock it? specify only width and calculate height accordingly? What is your experience from modding games trough their scripts?
Working on a fully self-funded project
Really, you need to make a list of what you need to achieve, and come to a decision on what will help you the most. I would think that issues of aspect ratio and the like will depend on what resolutions you are allowing, which in turn is dependent on other parts of your game such as the art and graphics engine. Once you know what sort of parameters you're working with, then you can make an informed decision about the easiest coordinate system to use. You might even prefer a system that doesn't use any absolute positioning; for example, it's easy to develop a GUI in terms of rows and columns of buttons or whatever, without ever specifying where anything should go in terms of pixels or percentages.
Advertisement
Aha... thanks for replying.
I need to deliver flexible texture-based 2D animations via script, so it is customizable. So it could be pretty much anything. The most important thing is that it will be flat (and apparently, z-sorted or z-buffered, so depth goes in there too)
Working on a fully self-funded project

This topic is closed to new replies.

Advertisement