That is a very impressive and useful algorithm karto!!! I can't wait to see that in Superluminal.kartoFlane wrote:Some progress: I worked on floor generation again today, and figured out an algorithm that can reliably trace the outline of any ship, both inside and outside. Boring pictures that a way! (description is on the right hand side of the screen)
What remains now is figure out how to use this data to draw rounded corners and airlocks
[Ship Randomizer] The Randtrel v1.3.0
-
- Posts: 819
- Joined: Fri Jan 10, 2014 11:43 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
-
- Posts: 335
- Joined: Sun Nov 25, 2012 11:13 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Nicely done KF! I'm guessing your algorithm maps the attributes of each square unit which comprises the ship, (each square edge is either an inner or outer wall, with or without a door) so finding out corners which should be rounded (a square with 2 near edges with outer walls) and airlocks (a square edge with an outer wall and a door) should be simple at this stageRussian Rockman wrote:That is a very impressive and useful algorithm karto!!! I can't wait to see that in Superluminal.kartoFlane wrote:Some progress: I worked on floor generation again today, and figured out an algorithm that can reliably trace the outline of any ship, both inside and outside. Boring pictures that a way! (description is on the right hand side of the screen)
What remains now is figure out how to use this data to draw rounded corners and airlocks

- Estel
- Posts: 466
- Joined: Sat Jun 22, 2013 4:03 am
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Considering that we're getting more and more lovely ship's greebles, it could be interesting to check feasibility of incorporating random greebles "tiles" into floor generation algorithms... 

- kartoFlane
- Posts: 1488
- Joined: Mon Jan 14, 2013 10:20 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Well, thank you for all the praise 
Either way, I've gotten this little project to a usable stage. Some pictures:
Obligatory Kestrel: http://i.imgur.com/SHz9Lqn.png
The Red-Tail: http://i.imgur.com/HYE350l.png
The Fregatidae: http://i.imgur.com/qW0uCVZ.png
In the end, the fancy pathing algorithm I created ended up being completely unnecessary, but oh well, at least I had the opportunity to use graphs & paths in practice
I'm not really sure whether I should add code to prevent drawing of corners when there are two airlocks at the corner, like in the Red-Tail and the Fregatidae -- thoughts?
Code: floorgen
Customizable parts include distance of border from room walls (floor margin), border width, and border & floor colors. Size of corners currently depends on floor margin.
@rannl
More or less -- it breaks the rooms into single tiles, and then adds the four points constituting each tile into a graph, and connects them. The nodes can be connected either diagonally or orthogonally, totalling to 8 edges. This information is then used to determine whether the node is a corner (3 edges), an outer wall (5 edges), a "dent" (7 edges), double "dent" (6 edges), or inner wall (8 edges)
@Estel
Considering that the algorithm absolutely minimizes the empty floor space, and is not aware of the hull image's shape in any way, this might prove rather difficult

Either way, I've gotten this little project to a usable stage. Some pictures:
Obligatory Kestrel: http://i.imgur.com/SHz9Lqn.png
The Red-Tail: http://i.imgur.com/HYE350l.png
The Fregatidae: http://i.imgur.com/qW0uCVZ.png
In the end, the fancy pathing algorithm I created ended up being completely unnecessary, but oh well, at least I had the opportunity to use graphs & paths in practice

I'm not really sure whether I should add code to prevent drawing of corners when there are two airlocks at the corner, like in the Red-Tail and the Fregatidae -- thoughts?
Code: floorgen
Customizable parts include distance of border from room walls (floor margin), border width, and border & floor colors. Size of corners currently depends on floor margin.
@rannl
More or less -- it breaks the rooms into single tiles, and then adds the four points constituting each tile into a graph, and connects them. The nodes can be connected either diagonally or orthogonally, totalling to 8 edges. This information is then used to determine whether the node is a corner (3 edges), an outer wall (5 edges), a "dent" (7 edges), double "dent" (6 edges), or inner wall (8 edges)
@Estel
Considering that the algorithm absolutely minimizes the empty floor space, and is not aware of the hull image's shape in any way, this might prove rather difficult

Superluminal2 - a ship editor for FTL
- Estel
- Posts: 466
- Joined: Sat Jun 22, 2013 4:03 am
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Hm, Considering that ship's hull doesn't change, and that your algorithm creates room "walls" (no empty, unused walls sitting for nothing), it could just get overlayed on ship's greeble image appropriate for said ship's version (A, B, C...). But, it would require greebles creators to do greebles for WHOLE ship, not only parts visible with default room layout, as with the random nature of generators, we can't be sure which part end up uncovered by rooms.kartoFlane wrote: @Estel
Considering that the algorithm absolutely minimizes the empty floor space, and is not aware of the hull image's shape in any way, this might prove rather difficult
/Estel
// Edit
Proposed said approach of layout-agnostic greebles to greeble's artists, already.
-
- Posts: 335
- Joined: Sun Nov 25, 2012 11:13 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Top notch KF. Great code.
Maybe you could add internal greebles ? Instead of boring, empty rooms, you might be able to provide some random textures.
As for the greeble issues, all I can add in the context of the ship randomizer is that if any ship creators are interested in providing their greebled images so they could be used in random image pools for the Randtrel/Randorus/Randasio, I'd be delighted. It'd be a nice feature, I think
PS. You are more then welcome to post images of your randomly generated ships here, and comment on what you got. Might be interesting, and will help out in rounding out the asset pools.
Maybe you could add internal greebles ? Instead of boring, empty rooms, you might be able to provide some random textures.
As for the greeble issues, all I can add in the context of the ship randomizer is that if any ship creators are interested in providing their greebled images so they could be used in random image pools for the Randtrel/Randorus/Randasio, I'd be delighted. It'd be a nice feature, I think

PS. You are more then welcome to post images of your randomly generated ships here, and comment on what you got. Might be interesting, and will help out in rounding out the asset pools.
-
- Posts: 335
- Joined: Sun Nov 25, 2012 11:13 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
I'm thinking about adding hull images to the random pools. Here are a few example, you are welcome to comment.
















Last edited by rannl on Mon Sep 22, 2014 10:33 pm, edited 1 time in total.
-
- Posts: 819
- Joined: Fri Jan 10, 2014 11:43 pm
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
I really like the dark one with the blue stripes.
The pink one is FAAAAABULOOOOUUUUSSSSS!!!
The stealth cruisers were really fun for me to mess around with the hues. They look so awesome!

The pink one is FAAAAABULOOOOUUUUSSSSS!!!

The stealth cruisers were really fun for me to mess around with the hues. They look so awesome!
- stylesrj
- Posts: 3644
- Joined: Tue Jul 08, 2014 7:54 am
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
Can I throw in a Rusty Kestrel skin?

I've also made gibs for it as well.

I've also made gibs for it as well.
- Estel
- Posts: 466
- Joined: Sat Jun 22, 2013 4:03 am
Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6
I like the idea of random hull colors (although, indeed, gibs would need re-coloring, too), but I'm not sure if they should be *so* diverse... Maybe a little less radical variations? also, some hulls are more happy to receive maaaany various colours (Stealth, or Mantis), while some start looking a little too much into the grotesque side (pink Kestrel, green Engi...).
Re rusty kestrel - hey, if you would tell me he is rusty, I would call it swag one - he looks like brass or gold plated
Nice work, nevertheless.
/Estel
Re rusty kestrel - hey, if you would tell me he is rusty, I would call it swag one - he looks like brass or gold plated

/Estel