Page 1 of 2
Example: effective rendering
Posted: Sun May 17, 2009 10:01 am
by sauer2
A small arcade game, which only renders blocks that are in the visual area to save performance.
Re: Example: effective rendering
Posted: Sun May 17, 2009 10:18 am
by Robin
Fun game, although it's quite hard. I don't know about you, but it is virtually impossible for me to get around that second obstacle (the one where you have to go back).
EDIT: OK, I passed the level. Apparently I just needed some practice
. It was fun and challenging, and the graphics, especially the background, are lovely.
Re: Example: effective rendering
Posted: Sun May 17, 2009 10:48 am
by bartbes
Again, is the setScissor function hidden or something? Because it appears you're trying to do the same thing as setScissor. (which might be more efficient)
The game is fun though.
@Robin: and I think the 3rd is harder than the 2nd, I passed the 2nd after 2 or 3 tries. (not every time though)
Re: Example: effective rendering
Posted: Sun May 17, 2009 11:06 am
by sauer2
I guess it comes to if scissors is implemented in Lua or is an SDL-Binding.
If it's Löve specific, it uses more statements than my solution, because it is more general, hence it's slower.
But if it's a Binding to a SDL function scissor or written in C, it's faster.
Maybe some wih a weak computer wants to compare them?
I can run this fluid even without any rendering limitation.
Re: Example: effective rendering
Posted: Sun May 17, 2009 12:09 pm
by Robin
Scissors actually seems to come from OpenGL, which would make it faster than Lua.
love_opengl.cpp:
Code: Select all
void setScissor(int x, int y, int width, int height)
{
glEnable(GL_SCISSOR_TEST);
glScissor(x, getHeight() - (y + height), width, height);
}
@bartbes: odd, as the rest of the level (including the 3rd obstacle) is relatively easy to me.
Re: Example: effective rendering
Posted: Sun May 17, 2009 12:24 pm
by bartbes
So.. sorry sauer2, the game is great, but the scissoring is already done.
@Robin: maybe that's because I play too wild, I get the object flying after my pointer, instead of on top of.
Re: Example: effective rendering
Posted: Sun May 17, 2009 12:40 pm
by sauer2
bartbes wrote:So.. sorry sauer2, the game is great, but the scissoring is already done.
Ok.
I think, it would be interesting to have the possibility to have several scissor areas and to limit them for some graphics.
Is something like this planned?
Re: Example: effective rendering
Posted: Mon May 18, 2009 1:11 am
by qubodup
You can measure it by printing the fps every second I guess.
pretty good looking, good-feeling game
even though I'm a sworn enemy to the 1mistake-and-u-die genre (as you already know
)
Re: Example: effective rendering
Posted: Mon May 18, 2009 9:16 am
by Xcmd
The version that uses Scissor is actually a lot faster for me, especially in the movement of the ball. Almost unplayably fast, actually. My machine isn't terribly throttled, but I'm running under Linux, Ubuntu 9.04. I've got a 256 MB graphics card, 4GB of RAM and a quad-core 1.x gHz (can't remember the speed right now) AMD Phenom. So, y'know. It's not slow. But the difference between the two is noticeable.
Re: Example: effective rendering
Posted: Mon May 18, 2009 12:51 pm
by sauer2
qubodup wrote:You can measure it by printing the fps every second I guess.
pretty good looking, good-feeling game
even though I'm a sworn enemy to the 1mistake-and-u-die genre (as you already know
)
... 1mistake-and-u-die.. seems a pretty good title for a iwannabetheguy like game.
@Xcmd:Ok, thanks, that makes it a lot clearer to me.