Mythruna
April 25, 2024, 12:59:21 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How does he reach that Game Performance??  (Read 5834 times)
Exxenmann
Donators
Newbie
***
Posts: 3



View Profile WWW
« on: May 12, 2012, 11:28:50 PM »

Hi im the new guy Smiley

Im looking forward to see this game released and buy it! Cheesy

But one question really goes through my mind since i saw it...
I am a quite good programmer myself.
I really have written many lines of code in most programming languages
I have also fooled around a lot with JMonkey myself Smiley
BUT how the hell does he reach that performance???

That must be millions of Geometry or Spatial Objects (Blocks) with each 4 Vertices and 6 Faces...
I added 1 million Geometry boxes to the RootNode for fun and it died already at creation with "out of memory" exception...
I cant even imagine the performance if i could have used the fly cam...

How The Hell does he reach that perfect performance?  Huh

I truely appreciate your answers as this leaves me no rest  Wink
Logged

"Though I Fly Through the Valley of Death, I Shall Fear No Evil. For I am at 80,000 Feet and Climbing."
- SR-71 USAF base (Kadena, Japan)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #1 on: May 13, 2012, 12:10:25 AM »

This comes up on the JME forum so often that someone added hover text for "block world" that pops up "Block worlds are not made of boxes".

And they aren't.  They are made of air-facing quads batched into single large meshes.

If you press F11 in Mythruna you can turn on the detailed JME style stats.  It will show you how many objects and how many triangles there are.  Unless you've placed a LOT of custom objects, you should only see several hundred objects but millions of vertexes.  I think the initial single player view has a few hundred thousand triangles... and maybe 400-500 objects or something.  (Objects are JME Geometry objects in this case.)

The concepts are fairly straight forward but I still say the block worlds are the hardest type of game to write for still-learning 3D developers.

Mythruna also makes it more complicated because all of the odd block shapes.  Efficiently finding the non-air exposed faces is trickier then a simple block->block check.
Logged
Exxenmann
Donators
Newbie
***
Posts: 3



View Profile WWW
« Reply #2 on: May 13, 2012, 12:31:19 AM »

Thanks a lot for your fast and informative reply!

Now that you say that this is one of the FAQs on JME Forum i start to realize that i behaved like a newbie -.-
It just overwhelmed me to just ask you Smiley
Sorry for that...

Question answered.
Thread closed.
Donation coming.
Logged

"Though I Fly Through the Valley of Death, I Shall Fear No Evil. For I am at 80,000 Feet and Climbing."
- SR-71 USAF base (Kadena, Japan)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #3 on: May 13, 2012, 12:46:00 AM »

Thanks a lot for your fast and informative reply!

Now that you say that this is one of the FAQs on JME Forum i start to realize that i behaved like a newbie -.-
It just overwhelmed me to just ask you Smiley
Sorry for that...

No big deal.  Sometimes our excitement outweighs our ability to find the most productive path to answers. Smiley

Some people have also posted some block engine code to the JME forums.  I hear it's tricky to get running and is probably pretty basic... but might be worth a look.  Something called bloxel or something like that.  Search voxel on the forums and you'll get a ton of hits, I think.
Logged
Exxenmann
Donators
Newbie
***
Posts: 3



View Profile WWW
« Reply #4 on: May 13, 2012, 01:04:57 AM »

Im on it.

Thanks a lot!
This will be an interesting week  Grin
Logged

"Though I Fly Through the Valley of Death, I Shall Fear No Evil. For I am at 80,000 Feet and Climbing."
- SR-71 USAF base (Kadena, Japan)
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #5 on: June 01, 2012, 08:27:27 PM »

Once I started reading this I thought "Sides that you aren't facing on 6 faced squares don't show! So of course the speed would be good!"
Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: June 03, 2012, 10:48:29 AM »

Once I started reading this I thought "Sides that you aren't facing on 6 faced squares don't show! So of course the speed would be good!"

It's not really about facing.  It's about eliminating the sides that will never show because they are between blocks.  The back faces are still part of the mesh but the GPU takes care of not rendering them.

But if you have a 2x2x2 block of cubes, there are 24 quads that you don't even need to draw... out of 48 possible quads (8 cubes * 6 sides each), that's a pretty significant savings.  And the savings is even better for larger blocks where cubes are entirely embedded.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!