Thanks for the info Devon. I'm using separate 8x8 pixel images for my tileset though, so I don't think that's the issue. It could be the filtering when scaling up after resizing the window. I'll see what happens when I apply the different texture filtering.
On May 18, 2:07 pm, devon <[email protected]> wrote: > 0.3.1 beta should have the changes. > > If the filtering is creating the grid, and you like it better non- > filtered you can also turn off the filtering by applying something > like this to all the textures you are using (all the sprite's texture > members in the tilesheet): > > def texture_set_mag_filter_nearest( texture ): > glBindTexture( texture.target, texture.id ) > glTexParameteri( texture.target, GL_TEXTURE_MAG_FILTER, > GL_NEAREST ) > glBindTexture( texture.target, 0 ) > > The grid-like effect is probably because it's sampling adjacent tiles > to interpolate the edges (if you're using a tilesheet as opposed to > separate images), adding a 1-2px empty/alpha padding around tiles > should solve that, but you will have to adjust the offsets in the > tiles xml. > > On May 18, 12:42 pm, Dorkmaster Flek <[email protected]> wrote: > > > > > Ah, I'm using the 0.3.1 beta but I could give the SVN version a try. > > I had initially tried a resizable window like you suggest before > > attempting this whole viewport idea. The problem I encountered there > > was that when I resized the window, I would get this weird grid-like > > effect around all my tiles. In order to stop that, I used the > > "do_not_scale" flag, but obviously then it doesn't scale at all. > > Also, the viewport example can scale without actually filtering so it > > looks purposely pixelated, which is also cool. > > > P.S. I just noticed you guys added a parallax argument to the > > ScrollingLayer class in the 0.3.1 beta, which is awesome. Granted, > > it's really simple to do, but now I don't have to do it myself. :) > > > On May 18, 1:10 pm, devon <[email protected]> wrote: > > > > Are you using the svn cocos or 0.3? There were some fixes to the > > > scrolling manager in svn as well as some aspect ratio fixes when you > > > resize the window. > > > > Also, I'm not entirely sure what you are trying to do. If you just > > > want a low res pixel art game you can set the initial resolution low > > > and it will stretch it to fill the screen when you go to fullscreen or > > > resize the window. > > > > director.director.init( width=320, height=240, resizable=True ) > > > > On May 18, 8:29 am, Dorkmaster Flek <[email protected]> wrote: > > > > > Actually, I tried to handle that by replacing the original height/ > > > > width in the director, and the scrolling manager rendered the correct > > > > area of the tiled map, however it doesn't actually scroll correctly. > > > > It behaves as if I started with a window of my target size, but I > > > > resized the window to my screen size. The view_h and view_w > > > > properties of my scrolling manager are set to my target resolution > > > > when it is initialized, so there must be something else deeper > > > > inside. I'll take a look around when I get home and see what I can > > > > find; I'm at work right now. It seems I'm on the right track, I just > > > > need to get the scrolling manager working entirely with the target > > > > resolution. > > > > > One other question though; The overriding of the director's on_draw > > > > method seems ugly to me. Is there a clean way to subclass the > > > > director to make my adjustments in that fashion? The issue being that > > > > the director is already instantiated when you import the module. If I > > > > replace director.director with an instance of my subclass, will the > > > > other modules pick it up? > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "cocos2d discuss" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/cocos-discuss?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "cocos2d discuss" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group > > > athttp://groups.google.com/group/cocos-discuss?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "cocos2d discuss" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/cocos-discuss?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "cocos2d discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/cocos-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
