Example: effective rendering
Example: effective rendering
A small arcade game, which only renders blocks that are in the visual area to save performance.
- Attachments
-
- spacemaze.love
- (389.47 KiB) Downloaded 395 times
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Example: effective rendering
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.
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.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Example: effective rendering
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)
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
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.
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.
- Attachments
-
- spacemaze_scissor.love
- (389.48 KiB) Downloaded 275 times
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Example: effective rendering
Scissors actually seems to come from OpenGL, which would make it faster than Lua.
love_opengl.cpp:
@bartbes: odd, as the rest of the level (including the 3rd obstacle) is relatively easy to me.
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);
}
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Example: effective rendering
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.
@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
Ok.bartbes wrote:So.. sorry sauer2, the game is great, but the scissoring is already done.
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?
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Example: effective rendering
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 )
pretty good looking, good-feeling game even though I'm a sworn enemy to the 1mistake-and-u-die genre (as you already know )
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Example: effective rendering
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.
We don't borrow, we don't read, we don't rent, we don't lease, we take the minds!
Re: Example: effective rendering
... 1mistake-and-u-die.. seems a pretty good title for a iwannabetheguy like game.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 )
@Xcmd:Ok, thanks, that makes it a lot clearer to me.
Who is online
Users browsing this forum: No registered users and 0 guests