x/y offset

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
THOM
Artisan
Posts: 198
Joined: Sat Feb 28, 2004 9:22 pm
Location: Cologne, Germany
Contact:

x/y offset

Post by THOM »

I give it up. I do not understand how the x/y offset is functioning!

I try to position a walltile. but offset 0/0 doesn't seem to bee in the middle of the screen. when do I have to use + or - ? I can't understand that system...

can anybody help me??

THOM
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

It is different for each item - you need to logically look at something that is the same dimensions for the offsets, and then give up and tweak it by hand! :)
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

0,0 is top left of the dungeon view.

Wallitems however take their 0,0 origin from the center of the bitmap they are placed on....

You should have seen what it used to be like before we complained!:

http://www.dungeon-master.com/forum/vie ... hp?t=25024
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

The offset for standard (pickupableupable) items / monsters / flooritems is the point in the graphic where the (depth) centre of it would touch the floor. For example, in a walking monster, it would be the centre of it's feet / for a pillar, it's the centre of the base in 3D (which is different from the base in 2D, as that would be the bottom of the image). For most images, the offset is about 3/4 of the height, but obviously depends on the perspective of the objects projection into 2D.

For wallitems, the offset is the offset relative to the centre of the wall (i.e. so an offset of 0,0 would place the item centrally on the wall).

I think that for clouds and spells the offset is ignored.

As beowuuf said though, it's best to look at something similar and copy that!
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Finally! This is information is so important, it needs to be put in a sticky 'Editing RTC thread' and/or an editing guide!!!!!! I don't think I've ever seen this clarification before so thanks you GG. :D
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I'm sure it's all been put into various posts over the years, but collating it all into a sticky is definitely a good plan!
Post Reply