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

planet skyscrapers

managed done stretching - using 1 texture sizes, i'll change that. stretched textures on box2d objects

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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -