Adam's Lair Forum

game development and casual madness
It is currently 2017/04/25, 12:34

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Tiling Background
PostPosted: 2017/03/24, 13:00 
Junior Member
Junior Member

Joined: 2017/02/05, 13:06
Posts: 27
Role: Hobbyist
I'm trying to create an infinitely (or at least really big) tiling background. I found this post:
https://forum.adamslair.net/viewtopic.php?f=4&t=377

I think what I'm looking for is the "wrap mode" of the Sprite Renderer. But I'm assuming there's been some changes to Duality since that post was made since the sprite renderer doesn't have a property called "wrap mode"

I can make the rect huge but that stretches out the image rather than tiling it.

I have a background image which is 1024x1024 and tiles well but I can't seem to figure out how to get it to do so in the Duality editor.


Top
 Profile  
 
 Post subject: Re: Tiling Background
PostPosted: 2017/03/24, 18:41 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 1948
Location: Germany
Role: Professional
Hey there!

Divarin wrote:
I can make the rect huge but that stretches out the image rather than tiling it.


Have you checked the Texture resource you're using? By default, they're set to clamp, you might need to set that to repeat first.

Other than that, if you want a truly infinite scrolling background, I think this was something that was tackled in the community plugin - can't find the link right now, but maybe someone from the dev crowd of that can provide it ^^

(Note: Shouldn't that be linked somewhere prominently? A Projects forum thread to post progress and share ideas and behind the scenes info? Or at least in the community project list?)

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Tiling Background
PostPosted: 2017/03/25, 10:23 
Veteran Member
Veteran Member
User avatar

Joined: 2016/01/10, 10:56
Posts: 144
Location: Budapest
Role: Hobbyist
Here it is.
Adam wrote:
(Note: Shouldn't that be linked somewhere prominently? A Projects forum thread to post progress and share ideas and behind the scenes info? Or at least in the community project list?)

Unfortunately that repo didn't get a lot of love lately (everyone seem to abandoned it). :( And it's not in the state of a releasable package at the moment. It could be added to the community project list though.


Top
 Profile  
 
 Post subject: Re: Tiling Background
PostPosted: 2017/03/25, 13:32 
Junior Member
Junior Member

Joined: 2017/02/05, 13:06
Posts: 27
Role: Hobbyist
Ah that's what I was looking for, thanks :) I was looking for WrapMode in the Sprite Renderer, not WrapX, WrapY in the texture.

I don't really need infinite as the scene's play area is finite (though much larger than I'd want to make a background for) but an infinite background might come up some day.

Adam wrote:
Hey there!

Divarin wrote:
I can make the rect huge but that stretches out the image rather than tiling it.


Have you checked the Texture resource you're using? By default, they're set to clamp, you might need to set that to repeat first.

Other than that, if you want a truly infinite scrolling background, I think this was something that was tackled in the community plugin - can't find the link right now, but maybe someone from the dev crowd of that can provide it ^^

(Note: Shouldn't that be linked somewhere prominently? A Projects forum thread to post progress and share ideas and behind the scenes info? Or at least in the community project list?)


Top
 Profile  
 
 Post subject: Re: Tiling Background
PostPosted: 2017/03/26, 16:25 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
loeller wrote:
Unfortunately that repo didn't get a lot of love lately (everyone seem to abandoned it). :( And it's not in the state of a releasable package at the moment. It could be added to the community project list though.


Well, I'm still poking around it in my free time.. didn't commit for a while, true, but it's not dead :D
also, if you know which classes to avoid, the rest of the plugin works properly

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group