Tuesday 8 March 2016

Being bad is fun

Well at least it is when its to do with coding.
I have been trying to get OpenGLES2.0 to do something its not really designed to do, use RAM based double buffers as a display system. There's no real way to do it, as OGLES2  does not let you do CPU manipulation of a texture once it has been set up.

But its an important  "bad design" decision in my book, which will let them do something that works on almost any machine, yet is clearly very CPU intensive and not using the GPU at all well. (sorry mum this is tech talk)

But I managed to make it work by constantly killing and remaking textures every frame to allow a new buffer to be set up and displayed.. It is genuinely an awful system, but..and this is the point it work, perfectly well, you can display any number of graphics you want with little or no effort, since now you can copy stuff into the display buffer and it will magically appear on screen.

But the point its its wasting the power of the GPU and totally consuming the CPU, but it does make code based manipulating of objects very simple, very clear and very very easy to understand...which is the point. The reader can now easily get the idea that putting things on screen is simple, that will let them focus on doing that rather than trying to make sense of the way OGLES2 needs to be set up to do it properly.

Once I've done a few games with this system and we explain the disconnect between display systems and logic,  I will then demonstrate how truly awful it is and talk them through a way to alter the display system to something much more OGLES2 based with a massive boost in performance...Sometimes the only way to let people see that a bad decision that works, is still a bad decision is to let them do it, and expose the limitations.

It was actually very frustrating working out some way to do a double ram buffer, in the end the constant thrashing of killing and adding tetxures is even worse than I imagined it would be...every time you do that routine, a kitten dies!!! Lots of kittens are going to die now.

bwahahahah

Ahthankyew

No comments: