Author Topic: Terrain Generator  (Read 14883 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4396
    • View Profile
    • FUED
Re: Terrain Generator
« Reply #15 on: 2014-Jul-19 »
nice, me wonders if you can stress test the amount...would also be lovely to see explosions ;/

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Terrain Generator
« Reply #16 on: 2014-Jul-19 »
In the OG Minecraft, the lag increase with view distance settings. This main concern discussed earlier, and me also wonders, is about rendering chunks in the far distance and whether they need to be delay drawn or down-rendered like how lower res texture maps are uses for objects far away.

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: Terrain Generator
« Reply #17 on: 2014-Jul-19 »
Seems to be running quite smoothly even with 16-chunk render distance atm. Of course, I haven't added in all the goodies like mobs and crafting/cooking/brewing/etc.
Cool stuff and whatever

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Terrain Generator
« Reply #18 on: 2014-Jul-19 »
Can you make a techdemo to try it out?
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4396
    • View Profile
    • FUED
Re: Terrain Generator
« Reply #19 on: 2014-Jul-19 »
would love to try that tech demo too! :good:

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: Terrain Generator
« Reply #20 on: 2014-Jul-19 »
I will when I fix the physics and add a bit of threading to chunk updates, as they freeze the game for a quarter-second maybe each time you place a block.
Cool stuff and whatever

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Terrain Generator
« Reply #21 on: 2014-Jul-20 »
I will when I fix the physics and add a bit of threading to chunk updates, as they freeze the game for a quarter-second maybe each time you place a block.

Hmm. That problem would also extend to other things that change blocks like water, lava and explosions I guess. Hope you find a nice solution!

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: Terrain Generator
« Reply #22 on: 2014-Jul-20 »
thanks!
Cool stuff and whatever

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: Terrain Generator
« Reply #23 on: 2014-Jul-20 »
Its looking very nice!
Sounds a bit like youre using native GLBasic X_OBJ... commands to create youre chunks? If you do so, X_OBJ... is a bit to slow to use it at runtime, you may consider using native OpenGL instead. That would be way faster, but you could not use GLBasics shadow system.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Terrain Generator
« Reply #24 on: 2014-Jul-20 »
GLBasic use OpenGL 1.1 right?
There is no VBO ( comes with OpenGL 1.5, imho ) to speed this thing up( you have still a nice FPS-Count !)...

Maybe you have to look into Gernots threading post here:

http://www.glbasic.com/forum/index.php?topic=3642.0
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Terrain Generator
« Reply #25 on: 2014-Jul-20 »
Although I like to keep it pure GLBasic, this has really become a back-end engine issue again. So let's consider detailing switching techniques! To calculate, store and render less faces for distance chuck objects, where a chuck group of blocks are reduces to one block because seen at from afar. A general example, and would apply a normal game, by switching to lower res meshes and textures.  :S
« Last Edit: 2014-Jul-20 by matchy »

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: Terrain Generator
« Reply #26 on: 2014-Jul-20 »
I think I'm going to wait until I have a bunch more features before I optimize the graphics to use VBO. Though it would help chunk updates and loading times a bit. As of right now I'm getting a solid 800FPS with just native stuff.  8)
Cool stuff and whatever

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4396
    • View Profile
    • FUED
Re: Terrain Generator
« Reply #27 on: 2014-Jul-20 »
Are the explosions and massive block destructions in yet?  ;)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: Terrain Generator
« Reply #28 on: 2014-Jul-21 »
GLBasic use OpenGL 1.1 right?
There is no VBO ( comes with OpenGL 1.5, imho ) to speed this thing up( you have still a nice FPS-Count !)...
No this is not correct, on mobile GLES you need to decide if you want to use 1.1 or 2.0 and GLBasic has locked us at 1.1. But on desktop OpenGL you can always use all versions that are supported by the hardware/drivers. Its just that 1.1 OpenGL commands are easier to load/use than higher version ones (thats general on windows, no GLBasic special) and Gernots wrapper gives us only the 1.1 function - but if you need other ones, you can simply load them by yourself. So you should be able to use VBO, but ive not tested this yet.
BTW I dont think you would need to use VBOs - simple glDrawArrays is way faster than X_OBJ...+X_DRAWOBJ - and its really easy to do this.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Terrain Generator
« Reply #29 on: 2014-Jul-21 »
ah ok, thx for the Info!

But VBO's are much faster then immediate mode....
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard