-
Notifications
You must be signed in to change notification settings - Fork 1
Drawing Primitives
Shall we use Vector2f or Vector3f? Later one would allow to make better and cleaner use of 3D objects, but would it would also require more work from the level designer. -- Grumbel
Windstille uses a ortogonal projection, meaning everything in the game will have a flat 2D look. Multiple layers scrolling at different speeds will be allowed to give a scene a sense of depth. Most non-animated objects in Windstille will be represented by simple 2D sprites, while animated objects, like humans, robots or vehicles will be represented by 3D objects.
Simple rectangular sprite that is rotabable and scaleable.
Sprite {
Vector2f position;
float rotation;
float scale;
}
Same as sprite, except that its four vertices can be moved independently around.
Quad {
Vector2f position[4];
}
A quad that is filled with a repeating textured.
TexturedQuad {
Vector2f position[4];
float texture_rotation;
float texture_scale;
Vector2f texture_offset;
}
A series of points that is connected by a thick textured line to represent ropes or pipes. Begin/end could use seperate textures.
Rope {
Vector2f position[N];
float thickness;
}
Groups allow docking multiple primitives together.
Group {
DrawingPrimitives primitives[N];
float rotation;
float scale;
}
Draws a 3d model exported from Blender on screen.
Sprite3D {
Vector3f position;
Quaternion rotation;
}