News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Issues with some graphics

Started by Junna, March 15, 2017, 09:27:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Junna

I've been trying to compile this pak, but the graphics come out as if the dat file is set up wrongly (not made by me, goes without saying)-- even though it comes out fine in Standard. Is there anything obviously wrong with it?

Ves

What happens when you compile it? How is the graphic wrong?

Junna

Aligned as if it's one tile off. I tried removing the off-set numbers in the dat, but this did not help.

The pre-compiled (for standard double-slope) version that came with the download does not show up whatsoever in Simutrans Ex.

https://osdn.net/projects/sis-simutrans/releases/62839

Original sources and compiled paks.

jamespetts

That is extremely odd - I have really not altered the code for displaying way graphics from Standard at all, and all of the Pak128.Britain-Ex roads have no difficulties, so it is very hard to see what this issue could be. Actually tracking it down would be exceedingly difficult, as I have no knowledge of how the graphics code actually works, so it would be likely to take me days just understanding the graphics code.

One possibility is that this is as a result of changes made to Standard sine they were last incorporated into Extended, although that is not of the greatest likelihood, since Extended is not currently too far behind Standard.

Have you actually tried compiling this for Standard, or are you relying on the pre-compiled build? If the latter, it is possible that the .dat file is not the correct one used in the pre-compiled build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Junna

They do end up with different file sizes (by almost 50% smaller) when I compile the source, suggesting that the makeobj is skipping some content or it being different. The rotation appears off, but I don't know how exactly the N/S/SW/etc relate to the graphic image?

How exactly does the off-sets work?

Things like:

Image[W][0]=EIS_Expwy_Road_G_2lane_01S.1.0,-64,-96

(Ves, as an aside, how do I raise your vehicles so that they can be used with pak-britain rails that are not lowered á la standard?)

jamespetts

The offsets are x, y offsets. The x and y work in the same directions as the x and y grid co-ordinates in the game, but, in the .dat files, they are measured in pixels. For example, to move a graphic 2 pixels south and 1 pixel west, you would add -1,2 as an offset.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Quote from: Junna on March 16, 2017, 12:20:04 AM
They do end up with different file sizes (by almost 50% smaller) when I compile the source, suggesting that the makeobj is skipping some content or it being different. The rotation appears off, but I don't know how exactly the N/S/SW/etc relate to the graphic image?

How exactly does the off-sets work?

Things like:

Image[W][0]=EIS_Expwy_Road_G_2lane_01S.1.0,-64,-96

(Ves, as an aside, how do I raise your vehicles so that they can be used with pak-britain rails that are not lowered á la standard?)
Offset 64,96 is huge. I think that makeobj may clip at 128*128 and then move the clipped image. I would recommend moving the graphics in png to fit with other roads without offset.

For Swedish trains try offset 0,4. We used that in pak. Cs when moving to flat tracks.

Sent from my ONEPLUS A3003 using Tapatalk


Ves

Yes, it might be that the way was originaly designed to be placed as a second layer somehow?

For the Swedish trains, -2,0 should work in all directions (0,4 would only push the train in the lateral position, thus won't work for diagonal tracks), save that you might have to tweak it a little to fit the actual track graphic.

Regarding the rotations:
The n,s,se etc. defines in which direction you can EXIT the tile.
N= exit to the north only.
Nse= can exit to the north, south and east.
Ns= exit both north and south.

Junna

The strange thing is that the graphics are fine in standard, and since from what James has said, there has been no change (unless the -ex code is outdated in some manner?). This is not just this particular set, many of others aren't working either, and others appear partially.

jamespetts

That is odd. The code in Extended is slightly outdated (but only by a few months, although, as I merge manually, it is possible to miss things or merge incorrectly on occasions), but I have been trying to update it recently and brought it forward by about a month over the week-end so that it is now up to the latest code from about early/mid February 2017.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Junna

Is there anyway to tell during the loading process why a pak may fail to be recognised?

http://www.mediafire.com/file/flx21028vvrh8hv/eis-sis.rar

This is the collection of the road paks. There are a number of oddities that are not reproducible in Standard, which puzzles me, since there shouldn't be any difference apart from missing -ex features.



The oddest thing, apart from some things not showing up at all, is this; this pak includes cosmetic stop-graphics used to give a smooth off- and on-slip for the motorway - here also shewn all the ways that ought be visible -- but when this used in -ex, it produces a warped result.


As it is supposed to work (in standard)



In Ex, the merging field appears off-set to the top by a whole tile or in some others, as if it has been rotated (note that these are the exact same files, I have no idea why they would show up differently, and why some would not show up at all.)



Here the merging field appears rotated and on the wrong side.

Junna

Double post (if this is unrelated you may want to move it to a separate thread), but loading pak128 (standard) with Simu-Ex does not work at all, it crashes on load. This may be related?