compositor

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package compositor paints a part of the map into an image.Image using the provided map data source and a things pack.

It has support for compositing tiles, floors and the map itself, along with the lightmap overlay on top.

BUG(ivucica): Light is not quite calculated per floor. Details below.

  1. Lights on higher floors, if rendered, should affect lower floors as well.

    On OT map, see around x=111&y=108&bot=7&top=0: the light from floor 6 is clearly visible until the character steps under the house. Hence, lightmap should not enshroud floor 7 with config x=111&y=108&bot=7&top=0 or x=111&y=108&bot=7&top=6, but it should do so with x=111&y=108&bot=7&top=7.

  2. Light sometimes penetrates from the lower floors. For instance, fences on upper floors do get some light from the bottom floor, but just one tile further away, the light is no longer visible.

  3. While most light items seem to be behaving fine, the 'void' (client item 100 on 8.54) is not emitting any light into the light map, despite being marked as such in .dat (a brown color light with strength).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompositeMap

func CompositeMap(m gameworld.MapDataSource, th *things.Things, x, y uint16, floorTop, floorBottom uint8, width, height int, tileW, tileH int) image.Image

Types

type Light

type Light struct {
	Center    image.Point
	LightInfo dat.LightInfo
}

Notes

Bugs

  • Light is not quite calculated per floor. Details below.

    1. Lights on higher floors, if rendered, should affect lower floors as well.

      On OT map, see around x=111&y=108&bot=7&top=0: the light from floor 6 is clearly visible until the character steps under the house. Hence, lightmap should not enshroud floor 7 with config x=111&y=108&bot=7&top=0 or x=111&y=108&bot=7&top=6, but it should do so with x=111&y=108&bot=7&top=7.

    2. Light sometimes penetrates from the lower floors. For instance, fences on upper floors do get some light from the bottom floor, but just one tile further away, the light is no longer visible.

    3. While most light items seem to be behaving fine, the 'void' (client item 100 on 8.54) is not emitting any light into the light map, despite being marked as such in .dat (a brown color light with strength).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL