Textures

50 views
Skip to first unread message

Wallace Davidson

unread,
Sep 5, 2012, 5:04:21 AM9/5/12
to pyglet...@googlegroups.com
Is there anything larger than a texture or any way of making textures larger? I tend to get "memory error" on textures larger than 4500 x 4500. I am using them as a game map and blitting pictures onto them. Is this ineffective? :/

Thanks

Wallace

Richard Jones

unread,
Sep 5, 2012, 5:32:36 AM9/5/12
to pyglet...@googlegroups.com
The pictures you're blitting onto them - are they like tiles in a tile
map (http://en.wikipedia.org/wiki/Tile_engine)? If so then yes, you're
going about it the hard way :-) The wikipedia page may have some
insights. Otherwise you now have a useful google search term (perhaps
try "tile mapping pyglet" or variations :-)

The cocos2d engine (which works on top of pyglet) implements tile
mapping. There's probably a number of other tile mappers implemented
to run over pyglet.

If not, and your game map is entirely unique, then your texture is
still far too large. You should be able to blit your map pictures
directly to the screen and only retain those pictures in memory that
are needed for any given render.


Richard

Wallace Davidson

unread,
Sep 5, 2012, 5:51:23 AM9/5/12
to pyglet...@googlegroups.com
Thanks for the quick response :) You're right, I am blitting all the the tiles onto the texture. The main reason I was doing this was because scrolling seemed much easier as I didn't have to worry about offscreen tiles and stuff like that. However I think I have a plan for making a simple tile mapper. I have considered a few times using cocos2d but never made a solid attempt. I will look into it if I can't get a tile engine up and running :-)


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.


Reply all
Reply to author
Forward
0 new messages