[Request] Wood, Stone and Steel bridge
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
[Request] Wood, Stone and Steel bridge
I've been chipping away at a bridge mod for the past few weeks and the code is now working fine. Graphics, as usual, is my Achilles Heal.
I've spent about a week just making "not completely grim" horizontal sprites, only to realise I have no clue how to add shadows and also that a bunch of them don't line up properly. And I've not even started on the vertical sprites yet.
Brief summary:
During construction...
Each end of the bridge consists of a platform and a ramp. Between the two platforms, there is a repeating foundation. What you're looking at is a customised "pipe-to-ground"
Once built...
The middle section is "filled" with segments, replacing the foundations. There are 6 segments in the image above.
Detailed info
Sprite orientations:
* Ramp: north, east, south, west
* Platform: north, east, south, west
* Foundation: as far as I can tell, the same sprite is used for all orientations
* Segments: vertical, horizontal
Ramps and platforms:
If two bridges are built end to end, the ramps (pipe covers) will disappear, giving the impression of a continuous bridge. This means the platform sprites must line up with their 180º rotated counterpart (eg. west + east side by side should look like one solid platform).
Due to the way the bridge is placed, the first platform will always be waters-edge, like an offshore-pump (as that's what's actually placed initially, then it gets instantly replaced with a pipe-to-ground for remainder of construction). The second platform, however, can either be waters edge or on land (anywhere you could place a pipe-to-ground).
Foundation:
It's the left-side of __core__/graphics/arrows/underground-lines.png -- I can give each type of bridge (wood, stone, steel) it's own foundations image, and it looks like I can change the dimensions used. Main issue here is that the same image is used for all rotations, so any shadows would get rotated with the image = looks weird.
Segments:
These use simple-entity object, which can be given multiple pictures - each time the entity is placed, a random picture from the list is chosen.
Shadows:
I can determine when platforms and segments are directly over ground, water edge or water; potentially I could alter the shadows accordingly. If possible, having shadow layer separate from rest of sprite will allow some experimentation in that area.
Sizing & Bridge Types
If possible double-sized images are preferred (64x64px per tile instead of usual 32x32).
Wood bridge:
* Platform, segments and ramp are 1x1 tile.
* Foundations are 1x2 tile but can be bigger/smaller if desired. Max length of bridge is 30 tiles.
Stone bridge: Similar to wood, but 2 or 3 tiles wide. Max length of bridge is 40 tiles.
Steel bridge: Similar to wood, but 4 or 5 tiles wide, enough to accommodate tanks. Max length of bridge is 60 tiles.
Any help greatly appreciated
I've spent about a week just making "not completely grim" horizontal sprites, only to realise I have no clue how to add shadows and also that a bunch of them don't line up properly. And I've not even started on the vertical sprites yet.
Brief summary:
During construction...
Each end of the bridge consists of a platform and a ramp. Between the two platforms, there is a repeating foundation. What you're looking at is a customised "pipe-to-ground"
Once built...
The middle section is "filled" with segments, replacing the foundations. There are 6 segments in the image above.
Detailed info
Sprite orientations:
* Ramp: north, east, south, west
* Platform: north, east, south, west
* Foundation: as far as I can tell, the same sprite is used for all orientations
* Segments: vertical, horizontal
Ramps and platforms:
If two bridges are built end to end, the ramps (pipe covers) will disappear, giving the impression of a continuous bridge. This means the platform sprites must line up with their 180º rotated counterpart (eg. west + east side by side should look like one solid platform).
Due to the way the bridge is placed, the first platform will always be waters-edge, like an offshore-pump (as that's what's actually placed initially, then it gets instantly replaced with a pipe-to-ground for remainder of construction). The second platform, however, can either be waters edge or on land (anywhere you could place a pipe-to-ground).
Foundation:
It's the left-side of __core__/graphics/arrows/underground-lines.png -- I can give each type of bridge (wood, stone, steel) it's own foundations image, and it looks like I can change the dimensions used. Main issue here is that the same image is used for all rotations, so any shadows would get rotated with the image = looks weird.
Segments:
These use simple-entity object, which can be given multiple pictures - each time the entity is placed, a random picture from the list is chosen.
Shadows:
I can determine when platforms and segments are directly over ground, water edge or water; potentially I could alter the shadows accordingly. If possible, having shadow layer separate from rest of sprite will allow some experimentation in that area.
Sizing & Bridge Types
If possible double-sized images are preferred (64x64px per tile instead of usual 32x32).
Wood bridge:
* Platform, segments and ramp are 1x1 tile.
* Foundations are 1x2 tile but can be bigger/smaller if desired. Max length of bridge is 30 tiles.
Stone bridge: Similar to wood, but 2 or 3 tiles wide. Max length of bridge is 40 tiles.
Steel bridge: Similar to wood, but 4 or 5 tiles wide, enough to accommodate tanks. Max length of bridge is 60 tiles.
Any help greatly appreciated
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Just threw something together this morning
- Attachments
-
- wood-bridge.zip
- (119.49 KiB) Downloaded 204 times
-
- example.png (47.56 KiB) Viewed 12485 times
-
- Unbenannt.png (128.93 KiB) Viewed 12485 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
These are fantastic! Quick test with the horizontal segments:
I'll get the ramps and verticals done and upload another screenie tonight or tomorrow
I'll get the ramps and verticals done and upload another screenie tonight or tomorrow
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
I'm struggling with the bridge ends (ramps and platforms). Would it be possible to get alternate versions where the platform and ramp are separate sprites?
For example, the east end of a horizontal bridge would have a platform that looks exactly like bridge-big005.png (from the zip file), the west end would be similar but with the "stilts" at the other end. The ramps would then be separate images that appear next to them, unless another bridge starts at that point in which case no ramp (the two adjacent platforms would appear to join together).
For example, the east end of a horizontal bridge would have a platform that looks exactly like bridge-big005.png (from the zip file), the west end would be similar but with the "stilts" at the other end. The ramps would then be separate images that appear next to them, unless another bridge starts at that point in which case no ramp (the two adjacent platforms would appear to join together).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Made it a little wider.
- Attachments
-
- wood-bridge-2.zip
- (79.42 KiB) Downloaded 200 times
-
- example-wider.png (106.03 KiB) Viewed 12468 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
vertical
- Attachments
-
- wood-bridge-3.zip
- (66.4 KiB) Downloaded 206 times
-
- example-wider-2.png (100.73 KiB) Viewed 12462 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Updated screenies:
Is it possible to make the ramps same width as the segments?
Also, here's example of what happens when bridges are built end to end:
- placement
- completed bridge
Is it possible to make the ramps same width as the segments?
Also, here's example of what happens when bridges are built end to end:
- placement
- completed bridge
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
like this?
- Attachments
-
- bridge-ramp-east2.png (12.65 KiB) Viewed 12452 times
-
- bridge-ramp-west2.png (12.18 KiB) Viewed 12452 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Perfecto!
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: [Request] Wood, Stone and Steel bridge
It looks really nice, great work Arch666Angelaubergine18 wrote:Perfecto!
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Been working on the vertical bridge today, so far so good...
But it seems much thinner than the horizontal one:
But it seems much thinner than the horizontal one:
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
I've tried scaling the vertical bridge via `scale` prototype property, and also via editing the images, but they look a lot more blurry. The vertical bridge assets might need a re-render at the bigger size to match the scale of the horizontal bridge.
Also, could you do an updated version of the south-facing ramp that's shorter (so it fits in one tile)? Similar sort of thing to what you did with east/west ramps?
And one final request on the wood bridge A 64x64 image for tech tree, and a 32x32 image for the item icon. I tried doing these myself, but the perspective looked weird compared to other icons.
Also, could you do an updated version of the south-facing ramp that's shorter (so it fits in one tile)? Similar sort of thing to what you did with east/west ramps?
And one final request on the wood bridge A 64x64 image for tech tree, and a 32x32 image for the item icon. I tried doing these myself, but the perspective looked weird compared to other icons.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
It will sadly always look a bit wonky because of the perspective, both are 32x32 px but the horizontal will look bigger, because your brain will adjust to the perspective and think it's 1.5 times the size of the horizontal one (which it is in the renderer).
- Attachments
-
- Unbenannt.png (65.3 KiB) Viewed 12378 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Hrm, something strange happened - the bridge4.zip images are even smaller than the bridge3 ones, making the vertical bridge look extremely tiny. Is it possible to make them bigger - so the vertical bridge is same sort of size as the horizontal one, even if that results in the sprites being slightly more than 64px wide?
- ideally the planks on vertical bridge should be wider, taking up most of the tile width
The vertical segments seem to have 4 wood planks where the horizontal have only 3. Maybe that's why the images are getting scaled the way they are (if constrained to 64 px, that extra plank is causing the image to shrink more than the 3-plank horizontal sprites, which in turn make the vertical bridge look even more narrow)?
- horizontal bridge for reference (correct size)
- previous vertical bridge (too small compared to horizontal)
- bridge4 vertical bridge (way too small)
- ideally the planks on vertical bridge should be wider, taking up most of the tile width
The vertical segments seem to have 4 wood planks where the horizontal have only 3. Maybe that's why the images are getting scaled the way they are (if constrained to 64 px, that extra plank is causing the image to shrink more than the 3-plank horizontal sprites, which in turn make the vertical bridge look even more narrow)?
- horizontal bridge for reference (correct size)
- previous vertical bridge (too small compared to horizontal)
- bridge4 vertical bridge (way too small)
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Yeah rendered them the wrong size
- Attachments
-
- bridge4.zip
- (111.38 KiB) Downloaded 184 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
Sooo much better, thank you !
Here is latest iteration of vertical bridge:
The overall size now matches very nicely with the horizontal bridge
Could the gapping between the segments be reduced slightly or maybe randomised a bit like on the horizontal bridge? Also, could the parallel wood logs under the planks be extended downwards a bit more (so they go fully underneath the bridge segment on the tile below them)?
(BTW: If I'm asking way too much, please say so )
Here is latest iteration of vertical bridge:
The overall size now matches very nicely with the horizontal bridge
Could the gapping between the segments be reduced slightly or maybe randomised a bit like on the horizontal bridge? Also, could the parallel wood logs under the planks be extended downwards a bit more (so they go fully underneath the bridge segment on the tile below them)?
(BTW: If I'm asking way too much, please say so )
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- pac0master
- Burner Inserter
- Posts: 5
- Joined: Mon Mar 07, 2016 1:39 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
I've got to say that this looks pretty awesome.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
More variations
- Attachments
-
- re-re-render-wood-bridge.zip
- (320.47 KiB) Downloaded 187 times
-
- Unbenannt.png (303.71 KiB) Viewed 12173 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [Request] Wood, Stone and Steel bridge
And try this for sizes. They are 2x2
- Attachments
-
- bridge2_002.png (61.82 KiB) Viewed 12168 times
-
- bridge2_001.png (66.83 KiB) Viewed 12168 times
-
- bridge2_000.png (35.11 KiB) Viewed 12168 times
-
- Image2.png (153.12 KiB) Viewed 12168 times
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Request] Wood, Stone and Steel bridge
These look amazing! I'm currently refactoring the code to handle the stone bridge, but hope to have some updated screenshots early next week.
The two main problems i'm facing at moment are:
1. pipe-to-ground doesn't accept render_layer = "floor"... this makes ends of bridges sometimes appear above player and adjacent bridge segments
2. The underground sprite for pipe-to-ground seems to be locked at 1x1 tile in size, and I can't work out how to make it bigger. Not only is this preventing me from making a much more appealing image for the wood bridge construction, but it's also making the stone bridge construction look very weird.
If anyone knows ways around those two issues it would be very helpful to know
The two main problems i'm facing at moment are:
1. pipe-to-ground doesn't accept render_layer = "floor"... this makes ends of bridges sometimes appear above player and adjacent bridge segments
2. The underground sprite for pipe-to-ground seems to be locked at 1x1 tile in size, and I can't work out how to make it bigger. Not only is this preventing me from making a much more appealing image for the wood bridge construction, but it's also making the stone bridge construction look very weird.
If anyone knows ways around those two issues it would be very helpful to know
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.