[Request] Wood, Stone and Steel bridge

The place to share your custom game graphics.
Post Reply
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[Request] Wood, Stone and Steel bridge

Post by aubergine18 »

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...

Image

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...

Image

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.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

Just threw something together this morning
Attachments
wood-bridge.zip
(119.49 KiB) Downloaded 183 times
example.png
example.png (47.56 KiB) Viewed 11500 times
Unbenannt.png
Unbenannt.png (128.93 KiB) Viewed 11500 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

These are fantastic! Quick test with the horizontal segments:

Image

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.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

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).
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.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

Made it a little wider.
Attachments
wood-bridge-2.zip
(79.42 KiB) Downloaded 179 times
example-wider.png
example-wider.png (106.03 KiB) Viewed 11483 times

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

vertical
Attachments
wood-bridge-3.zip
(66.4 KiB) Downloaded 185 times
example-wider-2.png
example-wider-2.png (100.73 KiB) Viewed 11477 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

Updated screenies:

Image Image

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:

Image - placement

Image - 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.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

like this?
Attachments
bridge-ramp-east2.png
bridge-ramp-east2.png (12.65 KiB) Viewed 11467 times
bridge-ramp-west2.png
bridge-ramp-west2.png (12.18 KiB) Viewed 11467 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

Perfecto! :D

Image
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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Klonan »

aubergine18 wrote:Perfecto! :D

Image
It looks really nice, great work Arch666Angel :D

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

Been working on the vertical bridge today, so far so good...

Image

But it seems much thinner than the horizontal one:

Image
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.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

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.
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.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

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
Unbenannt.png (65.3 KiB) Viewed 11393 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

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?
Region capture 1.png
Region capture 1.png (170.75 KiB) Viewed 11368 times
- 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 example.png
horizontal example.png (11.71 KiB) Viewed 11371 times
- horizontal bridge for reference (correct size)
bridge3 example.png
bridge3 example.png (11.6 KiB) Viewed 11371 times
- previous vertical bridge (too small compared to horizontal)
bridge4 example.png
bridge4 example.png (7.49 KiB) Viewed 11371 times
- 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.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

Yeah rendered them the wrong size :P
Attachments
bridge4.zip
(111.38 KiB) Downloaded 161 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

Sooo much better, thank you !

Here is latest iteration of vertical bridge:

Image

The overall size now matches very nicely with the horizontal bridge :D

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 :oops: )
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.

User avatar
pac0master
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 07, 2016 1:39 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by pac0master »

I've got to say that this looks pretty awesome.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

More variations
Attachments
re-re-render-wood-bridge.zip
(320.47 KiB) Downloaded 162 times
Unbenannt.png
Unbenannt.png (303.71 KiB) Viewed 11188 times

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by Arch666Angel »

And try this for sizes. They are 2x2
Attachments
bridge2_002.png
bridge2_002.png (61.82 KiB) Viewed 11183 times
bridge2_001.png
bridge2_001.png (66.83 KiB) Viewed 11183 times
bridge2_000.png
bridge2_000.png (35.11 KiB) Viewed 11183 times
Image2.png
Image2.png (153.12 KiB) Viewed 11183 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Request] Wood, Stone and Steel bridge

Post by aubergine18 »

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 :)
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.

Post Reply

Return to “Texture Packs”