Manic Digger

It is currently Tue May 21, 2013 6:25 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Optimizations - 5x faster.
PostPosted: Thu Dec 23, 2010 8:29 am 
Offline
Site Admin

Joined: Mon Jun 21, 2010 12:02 pm
Posts: 384
1. Tiling halves triangle count. When texture atlas is one dimensional (1x256 instead of 16x16, http://i53.tinypic.com/34tbdeh.jpg), textures can be tiled in one direction.

See http://notch.tumblr.com/post/176620207/i-rewrote-the-tesselator.

This was an early test. Three top faces can be tiled into one. (Front faces too)
Image
Side effect: game sees multiple rail blocks and tries to tile, so this ramp is created. This bug is nice because such ramps were planned. (however bug only works in one direction).
Image

2. In previous versions fog wasted a lot of view range. Blocks hidden in fog were rendered anyway.
Current view range 32 is the comparable to previous 64. Even fog range 16 works, with 3k-6k triangles used - a software renderer could handle that.

I don't remember why, but fog color had to be changed to blue (to sky color).

Compare triangles used: (in reality the improvement is just 3x-5x because OpenGL display lists perform their own view frustum culling anyway, at least on Geforce 7600GT)
Image

3. CPU usage is 5x-10x lower. This was done by replacing OpenGL immediate mode calls with vertex arrays, caching, replacing Lists with arrays, and using some better algorithms.
Image


Top
 Profile  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Thu Dec 23, 2010 9:56 am 
Offline

Joined: Sun Dec 19, 2010 8:02 pm
Posts: 11
exe wrote:
...replacing Lists with arrays...


So in your experience, vertex arrays are better than lists?

Also, I wonder why the front page is not updated anymore :)
The last post there is July 28th...


Top
 Profile  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Thu Dec 23, 2010 10:03 am 
Offline
Site Admin

Joined: Mon Jun 21, 2010 12:02 pm
Posts: 384
I mean replacing List<int> with int[] ;) It's at least 2x faster. And yes, i should have been replacing immediate mode with MeshBatcher (display lists), not with vertex arrays.

Front page is not updated because there are no new versions. (only 2010-08-19 is missing from the page).


Top
 Profile  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Thu Dec 23, 2010 10:16 am 
Offline

Joined: Sun Dec 19, 2010 8:02 pm
Posts: 11
exe wrote:
I mean replacing List<int> with int[] ;)


Ah, I see.


Top
 Profile  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Fri Dec 24, 2010 3:33 am 
Net_Bastard wrote:
Ooh, exe! I did not expect an update so sudden! I was wondering if this project was dead or not.


Hopefully in the future, this game will become something that those damn Minecraft fanboys will get jealous about. :twisted:

Seriously, this is worse then the Minecraft posts.


Top
  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Sat Dec 25, 2010 12:45 am 
Hello Mr. Exe. This is a blatant copy of minecraft and I suggest you delete it now before I refer to drastic measures. Fear me. :evil:


Top
  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Sat Dec 25, 2010 12:47 am 
Oh yes one more thing, stop stealing the formulas from notch. I will kick your ass mentally and personally if you keep doing this.
P.S. tell your mother ragnatas says "hi". Fear me. :evil:


Top
  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Sat Dec 25, 2010 2:16 am 
Offline

Joined: Sat Dec 25, 2010 2:11 am
Posts: 3
exe wrote:
I mean replacing List<int> with int[] ;) It's at least 2x faster. And yes, i should have been replacing immediate mode with MeshBatcher (display lists), not with vertex arrays.

Front page is not updated because there are no new versions. (only 2010-08-19 is missing from the page).

Hi exe, my name is markus. I've been seeing some of your work and I absolutely love it! I just wanted to help you out a little bit via this cool program called team viewer! I was gonna give you some codes and files via team viewer. It's also free! So when you get it. Send me a PM or reply to me showing me your team viewer ID and password (it's required to get the veiwer working). You can trust me. I live in Kelowna BC, Canada 711 Glenburn St. Nobody that was suspicious would give out there personal info like that right? Please pm me as soon as possible. :D :geek:


Top
 Profile  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Wed Dec 29, 2010 10:55 am 
Markus Lachance wrote:
Hi exe, my name is markus. I've been seeing some of your work and I absolutely love it! I just wanted to help you out a little bit via this cool program called team viewer!

It's a trap!


Top
  
 
 Post subject: Re: Optimizations - 5x faster.
PostPosted: Thu Dec 30, 2010 10:22 pm 
Markus Lachance wrote:
exe wrote:
I mean replacing List<int> with int[] ;) It's at least 2x faster. And yes, i should have been replacing immediate mode with MeshBatcher (display lists), not with vertex arrays.

Front page is not updated because there are no new versions. (only 2010-08-19 is missing from the page).

Hi exe, my name is markus. I've been seeing some of your work and I absolutely love it! I just wanted to help you out a little bit via this cool program called team viewer! I was gonna give you some codes and files via team viewer. It's also free! So when you get it. Send me a PM or reply to me showing me your team viewer ID and password (it's required to get the veiwer working). You can trust me. I live in Kelowna BC, Canada 711 Glenburn St. Nobody that was suspicious would give out there personal info like that right? Please pm me as soon as possible. :D :geek:

Hey Markus you little fag! Guess what? If you keep putting this faggy butt-buddy posts I will hack your dumbass! You got me? Gtfo asshole! Fear me :evil:


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group