> which was transparent in the centre and fading to black at the edges
> While you are there, why draw all your tiles every frame if you can draw them into a buffer image and only redraw when needed?
> Still, the point was that there are tricks to massively optimise things that aren't immediately obvious and/or that seem more complex than the "slow" method on first appearances.
> I assume that undocumented code is just usable in C++, not Ruby? Hmm, if the OpenGL texture Gosu currently uses is arbitrary, then I guess it is mostly useless in a real app (you could check via tex_info if images shared the same texture, but if they didn't, I suppose you couldn't do anything to fix it).
> if not macroing stuff was a major reason frameworks like Gosu/SDL were relatively slow
> If the wall would be single-colored, you could clip_to() the cutout field of view and make the illusion perfect.
> If you have less than 512x512 pixels of map tiles, you can just load your map tiles first and try it out (they should all be on texture 0).
> All the objects, often simple quads, move relative to each other.
> Sorry, I don't understand why the wall would need to be single-coloured to be affected by being darkened by blitting semi-transparent black on top.
> Can I macro drawing commands as well? They don't use textures, do they? So texture-sharing wouldn't matter, would it?
> I was planning to cache the combined image and render that to speed things up.
>> which was transparent in the centre and fading to black at the edges
>
>If the surroundings are really only black, then this would be *much* better in terms of performance and even looks! If the player is behind a textured wall stuff gets >uglier though, even in C with OpenGL.
> Though, mine are of a set size, so caching the composite image as a separate Gosu::Image using Texplay works fine for me.
> due to Texplay image creation being very slow
> such as if they were carrying a lamp in a dungeon.
> Actually, I just had an epiphany, which was to draw everything normally,
> then draw the player a second time on top of everything at half normal alpha!
> ...I have the problem of having a lot of very large images created at the start...
> Can't you do some sort of amortized cost thing and spread out the creation of images? Or you could cache them on the hard drive if you're going to use them on subsequent runs of the application.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill