[Prototype] Mass Voxel Render

Hello everyone!

I made a small voxel-engine!

“Pictures can say a thousand words…”

http://abload.de/img/javaw2013-11-1820-54-pasf9.png


http://abload.de/img/javaw2013-11-2820-08-y6s7z.png


http://abload.de/img/javaw2013-12-2818-44-yqs2k.png

A video of me playing a bit around in the engine.

-axg0Ylv9aU

-need to rewrite technical information-

What do you think of this?

Have a nice day!

  • Longor1996

Very impressive :slight_smile:

Would be interested to know about the server/client model - I’m looking at putting in multiplayer into mine.

Thanks

The networking is based on raw Java NIO/TCP and my own network protocol called NetPac.
It’s pretty fast. It takes just 8-20ms to send 8 chunks from one PC to another PC in a local network.

  • Longor1996

Sounds good to me.

I need to look into doing something similar, any advice of where to look?

Thanks

In the Networking or the Voxel handling?

Here is a more detailed explanation of the Server/Client model.
‘C’ is the Client, ‘S’ is the Server. ‘>>’ means that ‘X goes from A to B’.


C: Create Socket and try to connect to Server
S: Accepts Connection
C >> S: Sends Login Request Packet
S: Checks if the login is valid (Player isn ot already there/Server is not full, etc.etc.)
Not-Accepted: Send ConnectionKill Packet to Client and Stop.
Accepted{
 S >> C: Send Asset-Count and Assets //NYI
 C: Receive Assets and use them //NYI
 C >> S: Send the Asset Packet back
 C: Create local World Instance
 C: Go into infinite Packet reading loop
 S: Start a new Thread and go into an infinite Packet reading loop
 S >> C: Send Spawn-Area Chunks
 
 // LOOP START
 C: Read every Packet and execute it using the assigned Handler
 S: Read every Packet and execute it using the assigned Handler
}

Btw:
The NetPac system is a modular multipurpose tcp-packet networking system i made for my applications.
How Packet’s are handled still has to be specified for every Server/Client instance.
But that isn’t really hard to do.

  • Longor1996

Hi,

Network handling. I take it the app needs to be running on both computers - just wanting to do something like in MC where you can search for LAN games and join them.

Thanks

How to search for LAN-Games:
Send a UDP Packet with some client informations to all units in a network.
This happens by sending the UDP packet to the address ‘255.255.255.255’.
When a Server receives one of these messages, it just has to sent a info packet back to the client.

  • Longor1996

Edit:

I managed to work on this project again.
The result is a (nearly) 1km view distance!

Some pictures: (The fog is a bit too close I think)

http://abload.de/thumb/javaw2013-08-2619-46-pwsnm.png


http://abload.de/thumb/javaw2013-08-2620-14-ipssw.png


http://abload.de/thumb/javaw2013-08-2620-50-dpsio.png


http://abload.de/thumb/javaw2013-08-2620-50-11sjv.png

The FPS where just around 60 while I took the pictures.

  • Longor1996

reopened on request :point:

Yay! Now I can post that update video!

-axg0Ylv9aU

Would anyone want to try out the prototype?

Have a nice day!

  • Longor1996

This is really impressive, nice work!

Very nice. Every voxel project on this forum that I’ve looked at seems to use display lists. Is there a reason that they’re used versus VBOs? I’m just curious.

I am not using displays in the way everyone else does.


GL11.glNewList(...)
VertexArray.batch()
GL11.glEndList()

Its pretty fast. I tried to switch it out with VBO’s once, but it was terribly slow compared to this method.
Although I think it doesn’t work on every graphics-card…

Have a nice day.

  • Longor1996

I believe Minecraft also uses the display list and vertex array method to render too, just for reference.

Good job Longor! It’s impressive.

Yes, Minecraft does use that method too.
I realized after a lot of testing that this method is the fastest, and easiest way, for rendering tons and tons of chunk-meshes.
And it has a surprisingly small memory-foorprint!

Have a nice day.

  • Longor1996

reopened on request :point:

Yay! Now I can post that update video!

-axg0Ylv9aU

Would anyone want to try out the prototype?

Have a nice day!

  • Longor1996

This is really impressive, nice work!

Very nice. Every voxel project on this forum that I’ve looked at seems to use display lists. Is there a reason that they’re used versus VBOs? I’m just curious.

I am not using displays in the way everyone else does.


GL11.glNewList(...)
VertexArray.batch()
GL11.glEndList()

Its pretty fast. I tried to switch it out with VBO’s once, but it was terribly slow compared to this method.
Although I think it doesn’t work on every graphics-card…

Have a nice day.

  • Longor1996

I believe Minecraft also uses the display list and vertex array method to render too, just for reference.

Good job Longor! It’s impressive.