Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-19 03:05:47
Okay so starting to realize I'm way over my head here.

After talking with a couple people in the tech industry, I've come across the realization that it's never good to have multiple classes accessing the OpenGL stream. So in short, the rendering must be done in the main class or only in one class.

At first I attempted to use the Executor Service style, but that didn't turn out well. All I ended up doing there was implementing a way for chunks to save ASYNC when you make block changes (previously it didn't save your changes to the world).

So, now realizing I very likely won't be able to offset my calculations needed for rendering, it brings up a new question I'm unable to answer and was hoping someone might have an idea: How could I render ONLY the blocks I am able to see? Or just render enough blocks, not excess. (Currently I'm rendering all blocks next to air within the 9 chunk's square around me. (my current chunk and the 8 surrounding chunks, which is about 4000 blocks rendered per chunk in a 16x16x64 world (generated using a SimplexNoise))

The second question then;
And what would be a good method of implementing the loading of the new chunks as I move into another chunk (assuming it always has the 9 square chunks in memory)?

Sorry if I'm too vague, but this is really starting to drive me nuts, everything I try is just making the game run even slower!
2  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-13 11:27:59
Thanks! Uber helpful, I'll take a look at your face rendering method in an hour! Tongue

Do you mind if I ask how you implemented threading? 
3  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-13 03:48:09
Okay so I've now tried my attempt at threading again, this time with a little more success.

I got so far as to realize that I'm having issues with doing the rebuilding of the chunks inside the subthread. The issue however is that if I queue the loading to be in the main thread, that defeats the purpose of even having the subthread as all of that loading will just end of being done in the main thread anyway...

If you want to see my code, I'm not sure what would be best to post:

The outside loading is being done insdie of the BackgroundProcessing class for reference, the rest of the chunkupdating is being done in the ChunkManager class.

Anyone with any ideas in regards to doing the asynchronous chunk loading or if they have a way of doing chunkloading in a way that it won't slow down my game (in another thread is the only way I can think of) please post! Help would be much appreciated as I only have a couple days left!

Thank you in advance!
4  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-11 19:16:38
Much appreciated sir, we're starting to hit deadlines on this project and not entirely sure our best way to go about this part.  

We're hoping to finish up the render to be efficient enough that you can blockpick (which I'm going to throw my hand at implementing tonight) and delete /add blocks in

Thanks, look forward to seeing what you mean!
EDIT: also just figured I'd back up why we have such bad computers, it's a high school, though next week I'll be outta there after I finish at least a basic version of this game. Actually plan on continuing it after Tongue
EDIT #2: Attempted our hand at implementing Threading.. God that did not end well..
If you want to see our miserable attempt you can just uncomment a couple things but to be honest most of it was so bad we just didn't even save it commented
I'm really curious to see how you went about doing the "toRemove" and "toAdd" Queue's and such! Tongue
5  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-11 19:06:58
Okay, I think I caught a little of that from your thread that you posted earlier, not 100% sure the best way to implement that, did you follow any tutorials at all or any examples? 
6  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-11 19:00:17
To be completely honest with you, I'm not too sure what that even means lol

7  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-11 18:51:23
Ahahaha, it basically is! Max I can reliably do on the computer is 30fps, and the computer itself has about 512MB ram with a Intel graphics chipset from the late '90s (reallllyyy old cpu dual core running at ~2 GHz)
These are the school computers as this is for a school project :p
8  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-06-11 18:33:24
Okay whole new set of issues.
What would the best way of altering our rendering system be?
We seem to have hit a brick wall in regards to rendering only blocks in sight(not blocks that are behind other blocks).
The current way we're doing it is checking for all blocks see if they're next to air, and rendering only those, which is good for small maps.
As soon as we have the larger maps with the randomly generated terrain, this is too resource consuming and is killing the rendering from 30fps to 2-10 fps...
9  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-30 03:37:53
Okay whole new issue, I know you said I shouldn't use your GLUtils class, but unfortunately I'm not good enough at knowing my own code to completely remove it altogether.
How could I go about creating a main menu and a 'pause game' state?
Looking at your code, the original Main() statement is:
   public Main(){
      gameLoop = new GameLoop();

However, I'm unsure of how I would be able to implement the changing of screens as i can't figure out what your screen is called (I'm not sure what 'this' is referring to! X_X)

Might be a really obvious answer or I may be going about solving this wrong, but your help will be much appreciated X_X

*I removed your GLUtils.jar package and instead added your source code from your repo in order to be able to read the source properly and make minor tweaks

Seriously noone uses different screens for their games/menus? :/
10  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-29 11:10:28
Okay so I've added the AABB style collision with a sphere for the player, however my grid for the AABB seems to be different than that of the blocks... meaning that for some reason with a chunksize of 8 (8x8x8), the only blocks it recognizes are from 3 to -3 in all axis... I'm so confused :/
Oh and currently the only movement being collision checked is the downward movement using the 'shift' key

Also, would an array of true/false be more efficient for block collisions than AABB? So not really a collision system, but just when you want to move to the block in front of you, you check the coordinates of that block for being true/false instead. Just wondering since mine seems to be broken :p
Revised code to check in ALL directions, not just the downwards

Found a silly little issue in the code.. realized the AABB guide I followed didn't do it properly for if the object was created not from the origin. Fixed and now the code works. Not seamless, now I need to add momentum and stuff so gravity works properly.

Now, my question is which would be better:
two playersphere's with camera set on the center of the top sphere, or an oval with the camera offset upwards? (I want a little less than two blocks total height.
OR is there a better alternative?
11  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-28 23:20:39
Okay, I've now added AABB-style collision with spheres for the player, just actually implementing it now. How big of a deal is it that I made the Y-axis my height? Just you said your Z-axis was so just wondering Tongue
12  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-28 17:00:57
Ahahah okay thanks so much for the info! I'll see what I can do and definitely take a look at the math if you post some :p

13  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-28 14:55:30
Ahahah that's actually really weird! Man it would have been awesome if you'd continued that series, but I understand. Do you happen to have any ideas on how we could remake our collision detection? I'm still trying to wrap my head around the idea of AABB and stuff  Undecided
14  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-28 12:47:59
I'm not 100% sure as right now loading Eclipse, but I'm almost positive it's under the Camera class that the checking is done for movement

Okay ignore that. After rereading our code I realized our basic implementation of collisions had been removed and put in with a version of Jbullet collision, but ours is for sure broken. Ours actually says it's colliding with everything, and so we have it being looped through to check manually if it collided with the player. (which doesn't work to be completely honest)

So new question, does anyone have any idea of how we could fix our collision detection to work properly?
15  Games Center / Cube World Projects / Re: Voxel-Based Engine Using Game on: 2014-05-28 11:52:47
The code is inside the PhysicsWorld class technically. We create a world of blocks and every time one is committed to the world that's actually going to be rendered, if it's not air, the block is made according to its XYZ coordinates (this is in the Chunk class)
16  Games Center / Cube World Projects / Voxel-Based Engine Using Game on: 2014-05-27 18:02:28
So, basically we're trying to make this very basic Voxel-based engine to use for a school project. We seem to be having great difficulty getting our physics engine to interact with the world that we have it generating... Could anyone enlighten us at all?

The main issue is getting the 'playerBody' to go inside the 'air' gaps, like the code to use seems full proof...

That's about all, if you guys need more info I don't know what to post but I'll gladly post it up!

And yes, don't worry, we know there's code from other people that's been incorporated. If anyone has any issue at all feel free to give us your name and we'll mention you, but this isn't for profit, purely for educational purposes!

Continue down \|/
Pages: [1]
nelsongames (17 views)
2018-04-24 18:15:36

nelsongames (13 views)
2018-04-24 18:14:32

ivj94 (587 views)
2018-03-24 14:47:39

ivj94 (50 views)
2018-03-24 14:46:31

ivj94 (400 views)
2018-03-24 14:43:53

Solater (65 views)
2018-03-17 05:04:08

nelsongames (110 views)
2018-03-05 17:56:34

Gornova (175 views)
2018-03-02 22:15:33

buddyBro (729 views)
2018-02-28 16:59:18

buddyBro (93 views)
2018-02-28 16:45:17
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!