Show Posts
|
|
Pages: [1] 2 3 4
|
|
1
|
Games Center / Featured Games / Re: Overbind
|
on: 2013-05-18 19:41:04
|
|
Don't drop this game!
Add things like Buttons/Pressure Plates/Timers/Doors/Forcefields, and then make cool new levels with them. Ala: Take some stuff from games like Portal and make new puzzlez with it.
Edit: Or invent some new puzzle elements that are tied to the magnetic propulsion/repulsion ability of the player! Like: A box that the player can push/pull by clicking it.
- Longor1996
|
|
|
|
|
2
|
Game Development / Newbie & Debugging Questions / Re: How do i generate triangles from points on a plane? (in 3D)
|
on: 2013-05-14 17:50:05
|
We're already having a communication problem: You say that all the point are on a plane. If that is the case there's no projection needed.
search: "mesh from point cloud".
Okay, I found something called "Delaunay triangulation", wich seems like the best solution to my problem. Actually, not all point's are on the plane, but these non-plane point's are getting sorted out by a very simple point-on-plane test before they are put into the trinalge generator. Thank's for the advice. - Longor1996
|
|
|
|
|
3
|
Game Development / Newbie & Debugging Questions / Re: How do i generate triangles from points on a plane? (in 3D)
|
on: 2013-05-14 17:31:15
|
You're teacher's correct, since all the points are on a plane it's a 2D problem. But to get an answer to your question you'll have to provide more details. Like what are you attempting to do.
Okay, how does one project points onto a plane and then connect them to make triangle's? Maybe I have luck searching for "project points onto plane and connect hem to triangle's". And I already said what I wan't to do, if you wan't to know for what exactly: It's for a CSG-Raytracer based on triangle-meshe's. I already know how to do everything, the only missing part is the triangle generation. And don't tell me that I can raytrace CSG-body's directly, i already know that. It's just that I would like to use the triangle-generator for some other thing's later too. - Longor1996
|
|
|
|
|
4
|
Game Development / Newbie & Debugging Questions / How do i generate triangles from points on a plane? (in 3D)
|
on: 2013-05-14 16:31:42
|
Hello everyone! I have a question, for that i can't seem to find a good answer for on Google. The question is this: I have a plane in 3-dimensional space, that is stored as a object containing a plane-equation,position and a surface-Normal. And I have a set of n 3D-points, that all are lying on the plane. 1 2 3 4 5 6 7
| class Vector { float x,y,z; -snippedTheRestOfTheClass- } |
1 2 3 4 5 6 7 8
| class Plane { float d; Vector position; Vector normal; -snippedTheRestOfTheClass- } |
Now i wan't to generate Triangle's from these points-on-the-plane. Im somewhat unable to successfully implement a algorythm that does that for me. My math-teacher told me I should try to '2D-project' the point's onto the plane and connect them then using 2D logic. Too bad I don't know how to do this right. Please help! - Longor1996 PS: Im (still) sick, so please write in a way that i don't have problems to understand the things you write. PPS: Also, i wan't to generate as few triangle's as possible, if that is possible. PPPS: The generation of these triangle's is for 'offline'-use, so it doesn't have to be fast.
|
|
|
|
|
5
|
Games Center / Cube World Projects / Re: Voxel Engine Problems
|
on: 2013-05-11 18:07:29
|
Thank you all for your help. I used steg90's method, and it worked. I was expecting something more compilicated with usage of trigonometry to tell you the truth.
-
My current problem is that from some angles, players cannot see the rest of the blocks through a transparent block. At some points it seems like there are no other blocks behind the transparent ones like water. I don't know if my explanation is good enough to understand. I am not sure what causes that.
Paul.
To fix this problem (almost): 1 2 3
| GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glAlphaFunc(GL11.GL_GREATER, (float) 0.1); |
And then you will also have to do depth-sort your chunks. Then render opaque things front-to-back, and then render back-to-front transparent things. Example: 1 2 3 4 5 6 7
| List<?> visibleChunks = ???; Collections.sort(visibleChunks,frontBackDistanceSort);
for(int n = 0; n < visibleChunks.size(); n++) visibleChunks.get(n).renderCall(OPAQUE); for(int n = visibleChunks.size()-1; n >= 0; n--) visibleChunks.get(n).renderCall(TRANSPARENT); |
- Longor1996
|
|
|
|
|
7
|
Games Center / Cube World Projects / Re: Voxel - a start
|
on: 2013-05-09 16:43:55
|
|
I think it's a good idea to use the programmable pipeline. Just don't forget to make some sort of fallback for the systems that don't support shaders.
Have a nice day!
- Longor1996
|
|
|
|
|
8
|
Games Center / WIP games, tools & toy projects / Re: A Java scripting language -- Leola
|
on: 2013-05-09 15:27:30
|
|
Hey, newera32,
before the view-counter/guest-counter in this thread shoot's up rapidly out of no-reason, I think I should tell you that I posted a link to this thread in the english minecraft forum in a very well visited thread.
Little question here: Is it possible to save the bytecode that the leola-vm uses to the harddrive? And is it also possible to execute bytecode from the harddrive?
- Longor1996
|
|
|
|
|
10
|
Games Center / Cube World Projects / Re: Voxel - a start
|
on: 2013-04-28 19:12:06
|
Thanks Longor,
I'm changing mine now to be coded in C++ and using Shaders...
Will take on board what you have said and try the 1d array, I've heard that does speed things up a lot on other forums.
Not so sure about using a singleton pattern for blocks though...as there are many of these.
Here's another tip: Don't switch the programming language to C++. Why? Writing a Voxel Engine in C++ is incredible hard because of memory-management. Also, you won't get any big speed improvements in C++, because Java is as fast as C++ with JIT, Runtime-Optimization etc.etc (i heard so). The biggest problem in C++ are the memory leaks. Java has them too (i heard so), but they aren't very big (i heard so too). Oh, and you can use Shaders in Java too. If you rewrite your Engine in C++, good luck! - Longor1996
|
|
|
|
|
11
|
Games Center / Cube World Projects / Re: Voxel - a start
|
on: 2013-04-27 15:54:34
|
Hello everyone. It seems like (to me) that all of you have problems with Memory usage and Render distances. Is it that hard to make 16³ big chunks and have ~8192 of them rendered with a render distance of nearly 0.5 Km and a RAM usage of 240 Mb? (240 Mb because of Server/Client world chaching, the client alone only has a RAM usage of ~100 MB) Here is a tip on how to speed up your voxel engine like heck-no-what: Use 1 Dimensional Arrays and Integer ID's + MetaData for your blocks. This way here, is slow and memory comsuming: 1 2 3 4 5 6 7 8 9 10
| class Block { boolean isVisible; } class BlockGrass extends Block{ int GrassType; }
class Chunk{ Block[][][] contents; } |
Do this instead: 1 2 3
| class Chunk{ int[] blockData; } |
And use singleton classes to code the behavior of the blocks. Like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| class Block{ abstract void onRightClick(World world,int x,int y,int z); abstract void onNeighborBlockChange(World world,int x,int y,int z); }
class Button{ void onRightClick(World world,int x,int y,int z){ world.setBlockID(x,y,z,BID_BUTTON_ON); } void onNeighborBlockChange(World world,int x,int y,int z){ if(checkIfButtonCanStayHere(world,x,y,z)){ dropBlockAsItem(world,x,y,z); } } } |
If you didn't understand something just ask as many questions as you wan't. - Longor1996
|
|
|
|
|
12
|
Games Center / Cube World Projects / Re: [Experimental] Mass Voxel Render
|
on: 2013-04-24 23:40:26
|
|
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
|
|
|
|
|
13
|
Game Development / Newbie & Debugging Questions / Re: Saving/load system
|
on: 2013-04-24 23:35:49
|
I use an seriziable Named-Binary-Node-Tree. Very useful and no problems with changing classes. Reasons the system is useful. - Small and Compact
- Data is saved in Binary form, very small
- Little-to-No overhead while saving/loading
- Binary Tree is structured like an XML document
- No problems when classes undego major changes
- Longor1996
|
|
|
|
|
14
|
Games Center / Cube World Projects / Re: [Experimental] Mass Voxel Render
|
on: 2013-04-24 23:31:23
|
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'. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 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 C: Receive Assets and use them 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 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
|
|
|
|
|
16
|
Games Center / Cube World Projects / [Experimental] Mass Voxel Render
|
on: 2013-04-24 22:39:21
|
Hello everyone! I made a small experimental mass voxel-renderer. "A picture can say a thousand words..."  "Two pictures even more!"  More pictures!



"Everyone likes Videos!" http://www.youtube.com/v/yMRkRRp0L4o?version=3&hl=en_US&start=The world consists of an infinite amount of chunks, but to spare memory and performance, the amount of chunks is limited to ~8000. Each chunks consists of 16³ blocks, from wich every single block has an Identitifer,SkyLight and BlockLight value. The world is loaded/unloaded while moving around, making the world virtually infinite in every direction. Blocks are saved as 24-Bit Integers, wich are split like this: 1 2 3 4 5 6
| i = Block Identifier l = SkyLight b = BlockLight
Binary: iiiiiiiiiiiiiiiibbbbllll Hexadecimal: iiiibl |
Every block can have an binary-data-tree storage assigned to it, wich allows it to store an virtually infinite amount of extra data. The whole thing uses an Server/Client+Model/View/Controller system, wich makes it extremely dynamic. If you wan't to make a Minecraft clone with it, no problem. If you wan't to make a Cellular Automata Simulator, no problem. If you wan't to make a 3D Picture program, no problem. And because of learning purposes on my side, the whole system uses a server/client model. The biggest fact is: This engine is much more memory efficient than the Minecraft engine. Also, it renders blocks much faster. There is no problem in redrawing 1-3 chunks every single frame. What do you guys think of this? - Longor1996
|
|
|
|
|
18
|
Games Center / Cube World Projects / Re: Voxel Engine Zombies Game - Problem
|
on: 2013-04-22 21:07:55
|
Hi there! Can someone help me on this one problem I seem to keep having;  I can render my players weapon but when I rotate the weapon dosn't rotate and keep at the same position as what I intended it to be at. 1 2 3
| glTranslatef(x+.3f, y-0.3f, z-0.3f); glRotatef(rX, 1.0f, 0.0f, 0.0f); glRotatef(rY-90f, 0.0f, 1.0f, 0.0f); |
This is my code for the model rotation for the weapon can someone help me please and thanks if you do  How about: 1 2 3
| glRotatef(rY-90f, 0.0f, 1.0f, 0.0f); glTranslatef(x+.3f, y-0.3f, z-0.3f); glRotatef(rX, 1.0f, 0.0f, 0.0f); |
That should work. - Longor1996
|
|
|
|
|
19
|
Games Center / Cube World Projects / Re: Voxel Engine Problems
|
on: 2013-04-22 14:53:14
|
Hi Pauler. Thank you. It work but the problem is that the face culling doesn't draw the bot face anymore. It has something to do if it is clockwise or not.
It's incredible easy! Just flip the edge vertices. Clockwise: Triangle A is: A B C Triangle B is: A C D Counter-Clockwise: Triangle A is: C B A Triangle B is: D C A - Longor1996
|
|
|
|
|
20
|
Games Center / Cube World Projects / Re: Voxel Engine Problems
|
on: 2013-04-22 14:06:55
|
Hello there. It's very easy to split a Quad into two triangles. 1 2 3 4 5
| A GL11.glTexCoord2f(spriteX, spriteY + small); GL11.glVertex3f(x1, y1 + height, z1); B GL11.glTexCoord2f(spriteX, spriteY); GL11.glVertex3f(x1, y1 + height, z1 + length); C GL11.glTexCoord2f(spriteX + small, spriteY); GL11.glVertex3f(x1 + width, y1 + height, z1 + length); D GL11.glTexCoord2f(spriteX + small, spriteY + small); GL11.glVertex3f(x1 + width, y1 + height, z1); |
Clockwise: Triangle A is: A B C Triangle B is: A C D Result: 1 2 3 4 5 6 7 8 9
| A GL11.glTexCoord2f(spriteX, spriteY + small); GL11.glVertex3f(x1, y1 + height, z1); B GL11.glTexCoord2f(spriteX, spriteY); GL11.glVertex3f(x1, y1 + height, z1 + length); C GL11.glTexCoord2f(spriteX + small, spriteY); GL11.glVertex3f(x1 + width, y1 + height, z1 + length);
A GL11.glTexCoord2f(spriteX, spriteY + small); GL11.glVertex3f(x1, y1 + height, z1); C GL11.glTexCoord2f(spriteX + small, spriteY); GL11.glVertex3f(x1 + width, y1 + height, z1 + length); D GL11.glTexCoord2f(spriteX + small, spriteY + small); GL11.glVertex3f(x1 + width, y1 + height, z1); |
I hope this helps. - Longor1996
|
|
|
|
|
21
|
Games Center / Cube World Projects / Re: Voxel Engine Problems
|
on: 2013-04-15 20:02:47
|
16384 chunks, 67108864 blocks @60 fps. (vsync enabled)
Yay! Your Engine is as fast as mine. The difference in the FPS comes from my PC. My PC is a big piece of crap, but im happy with it. Oh, and i think you forgot something: Memory Footprint. That's what im interested in the most. - Longor1996
|
|
|
|
|
22
|
Games Center / Cube World Projects / Re: Voxel Engine Problems
|
on: 2013-04-15 19:29:46
|
256 chunks, 1048576 blocks.
And the next Question: How big is the memory footprint with 256,1024,2048,4096 and 8192 chunks? My experimental engine can handle ~16000 16³ Chunks without crashing and a stable framerate of 50 fps. Im just wondering what your engine is capable of. - Longor1996 PS: Your CHunk counter in the video seems to go a little bit, wrong?
|
|
|
|
|
26
|
Discussions / General Discussions / Re: Storing level data
|
on: 2013-04-05 20:33:38
|
|
1 Million Integers?
1 Integer = 4 Bytes 1 Million Integers = 4 Million Bytes
4 Million divided by 1024 = 3906,25 Kilobyte 3906,25 Kilobyte divided by 1024 = 3,814697265625 Megabyte
Correct me if im wrong.
- Longor1996
|
|
|
|
|
29
|
Games Center / Cube World Projects / Re: LWJGL BlockWorld
|
on: 2013-04-03 21:52:23
|
Hi. Does anyone here plan anything?
I may not always think much of the level of software engineering in much of the code that's slung around these parts, but that said: what's wrong with hacking just for fun? There is nothing wrong with it! I was just wondering, because it seemed like no one makes any plans at all for their voxel-engines. A voxel-engine without any planning is going to be refactored a lot. By having a good plan you won't have to refactor that much. Im saying that only because no one should go trough the pain called "code refactoring". But without any plan one will have to go trugh that many many times. - Longor1996 PS: If this post seems somehow unfriendly/non-constructive, please mind that i have an ill, and im not in the best mood because of that.
|
|
|
|
|
30
|
Games Center / Cube World Projects / Re: LWJGL BlockWorld
|
on: 2013-04-03 19:46:29
|
|
Just a random Question again: Does anyone that makes a Voxel Engine make any plans? It seems like everyone just want's to clone Minecraft as fast as possible, ignoring all good programming principles while doing so.
Does anyone here plan anything?
- Longor1996
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|