box2d - Texture Randomly Generated and Sized Rects -
i'm making game (libgdx & box2d) randomly generated planets having skyscrapers on them - see image below.
the skyscrapers random in position, width , height. i'm looking best way texture these.
this general question on how best solve texturing randomly sized objects, don't need supply code, though may.
what options have? make small texture-squares , tile them? stretch them? procedurally generate them (would possible skyscraper-like texture - grey square base , black/yellow windows with/without light)? have consider?
i don't know how go @ moment. ideas welcome!
thank you!
jonas
managed done stretching - using 1 texture sizes, i'll change that.
as said have alot of possebilitys solve this. streching not nice if close those. if fare away solution. in opinion generating take time guess , thats not idea game. have code alot of stuff , simelar guess.
think tileing isn't possible because skytower not on base of tiles. example got 32px tiles , tower 53px high not work because need strech / cut or such 1 of tiles.
i'd take streching solution filter. more 1 picture if have bigger towers take bigger picture better solution. need take care width , height. shouldnt clinch wide tower , should stech thin tower wide one. can randomize bit got different pictures sure.
example filter:
// set linear texture filter improve stretching splashtexture.setfilter( texturefilter.linear, texturefilter.linear );
from tutorial
take @ entry libgdx: know texture filters!
opinion.
to find out filter used default take @ texture
methods.
getmagfilter(); getminfilter()
because set filters this:
setfilter(texture.texturefilter minfilter, texture.texturefilter magfilter)
Comments
Post a Comment