[Ship Randomizer] The Randtrel v1.3.0

Distribute and discuss mods that are functional. Moderator - Grognak
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby Russian Rockman » Sat Sep 20, 2014 12:17 am

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 :roll:

That is a very impressive and useful algorithm karto!!! I can't wait to see that in Superluminal.
rannl
Posts: 335
Joined: Sun Nov 25, 2012 11:13 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby rannl » Sat Sep 20, 2014 6:03 am

Russian Rockman wrote:
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 :roll:

That is a very impressive and useful algorithm karto!!! I can't wait to see that in Superluminal.


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 stage :)
User avatar
Estel
Posts: 466
Joined: Sat Jun 22, 2013 4:03 am

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby Estel » Sat Sep 20, 2014 12:53 pm

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... ;)
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby kartoFlane » Sun Sep 21, 2014 11:11 am

Well, thank you for all the praise :P
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 :lol:

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
User avatar
Estel
Posts: 466
Joined: Sat Jun 22, 2013 4:03 am

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby Estel » Sun Sep 21, 2014 11:32 am

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


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.

/Estel

// Edit

Proposed said approach of layout-agnostic greebles to greeble's artists, already.
rannl
Posts: 335
Joined: Sun Nov 25, 2012 11:13 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby rannl » Sun Sep 21, 2014 3:56 pm

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.
rannl
Posts: 335
Joined: Sun Nov 25, 2012 11:13 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby rannl » Mon Sep 22, 2014 7:49 pm

I'm thinking about adding hull images to the random pools. Here are a few example, you are welcome to comment.

Image
Image
Image
Image
Image
Image
Image
Image
Last edited by rannl on Mon Sep 22, 2014 10:33 pm, edited 1 time in total.
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby Russian Rockman » Mon Sep 22, 2014 10:19 pm

I really like the dark one with the blue stripes. :D

The pink one is FAAAAABULOOOOUUUUSSSSS!!! :lol:

The stealth cruisers were really fun for me to mess around with the hues. They look so awesome!
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby stylesrj » Tue Sep 23, 2014 8:29 am

Can I throw in a Rusty Kestrel skin?

Image

I've also made gibs for it as well.
User avatar
Estel
Posts: 466
Joined: Sat Jun 22, 2013 4:03 am

Re: [Ship Randomizer] The Randtrel/Randorus/Randasio v0.6

Postby Estel » Tue Sep 23, 2014 10:04 am

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 :D Nice work, nevertheless.

/Estel