Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  First ever 3D Game  (Read 2525 times)
0 Members and 1 Guest are viewing this topic.
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Posted 2014-02-02 00:53:11 »

This is my first 3D game, and I must say, I though it was a stretch, but it wasn't too bad.

I call this creation craft, it is NOT a minecraft remake, but simply isolates the most popular feature of minecraft, creation.

Current Features:
  • Block Creation/Destruction
  • Player Position Saving and Loading
  • Map Saving and Loading
  • Grass, Leaf, Wood, and Stone blocks
  • Optional Fog
  • Delta time

Future Features:
  • More block types
  • Being less of a hypocrite (as suggested my SwordsMiner)
  • All touching terrain into one mesh
  • An option for noise map generation
  • Smiley I will take suggestions


Controls:
Right click: Place
Left click: Destroy
WASD to move
esc to un grab mouse
esc+left shift to exit
f to toggle fog
1, 2, 3, 4 to change block types
1=Grass
2=Leaf
3=Stone
4=Wood

Source Code: https://github.com/zFollette/Creation_Craft
Executable Jar https://dl.dropboxusercontent.com/u/59761129/Creation%20Craft.jar Supports Windows, and as far as I know, Unix systems too (Mac and linux)

I use a Ray Picking library that I created for convenience, source can be found at: https://github.com/zFollette/RayPicker
(If you want to use it, go ahead, but be aware that it is set up for 1x1x1 cubes.)

Have fun.

Humor will keep you alive.
Offline SwordsMiner

JGO Coder


Medals: 3
Projects: 2
Exp: 1 year


The one and only.


« Reply #1 - Posted 2014-02-02 01:41:45 »

I call this creation craft, it is NOT a minecraft remake
Hypocrite.

If I made you laugh, helped you at all, or did something cool, I only ask that you smash that appreciate button with your nose.
Offline Slyth2727
« Reply #2 - Posted 2014-02-02 02:08:25 »

Interesting, however there's no need to specify that you're not making a Minecraft clone. But do as you wish.

A tip: if you're not already doing this create the terrain as 1 big mesh eg, make all the block objects, iterate over all the blocks in the chunk or level and for each block face, if there are no adjacent blocks, add a quad to the mesh. Improves performance drastically.

Add in SSAO once you have the basics down, it just makes a voxel game look so much better.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #3 - Posted 2014-02-02 02:17:37 »


What is hypoctritical about it? It is not a mine craft clone, but It isolates the CREATION aspect of mine CRAFT. All I did was mix the names. Just because it has 'craft' in it, does not make it a mine craft clone.

EDIT: Dick.

Humor will keep you alive.
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #4 - Posted 2014-02-02 02:22:37 »

Interesting, however there's no need to specify that you're not making a Minecraft clone. But do as you wish.

A tip: if you're not already doing this create the terrain as 1 big mesh eg, make all the block objects, iterate over all the blocks in the chunk or level and for each block face, if there are no adjacent blocks, add a quad to the mesh. Improves performance drastically.

Add in SSAO once you have the basics down, it just makes a voxel game look so much better.

Why would I make all of the blocks objects? That seems like a waste of new instances. Though, since my block adding method uses a a form of normal vectors to add blocks adjacent to the selected face, I can definitely do that, I just don't know how to add multiple textures to a face. But I think I can figure it out.

Humor will keep you alive.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #5 - Posted 2014-02-02 02:28:25 »

Statically create one instance of every block type and re-use that one. You're correct, a new instance for every block would be entirely way too wasteful.

Also, Swordsminer maybe you could be less offensive? Does it matter that much? Let the man make what kind of game he wants, he doesn't need that kind of useless criticism.

Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #6 - Posted 2014-02-02 02:33:41 »

Statically create one instance of every block type and re-use that one. You're correct, a new instance for every block would be entirely way too wasteful.

Also, Swordsminer maybe you could be less offensive? Does it matter that much? Let the man make what kind of game he wants, he doesn't need that kind of useless criticism.

Ahh, every block type, I though he meant every block. I do create a static instance of every block type, maybe not in the way you'd think (a block object) I just make an array of floats indicating the x value of each texture (all 6 faces) and the y value of where the textures are located.

1  
2  
3  
4  
public static float[] grassBlock = {0.25f, 0.25f, 0.25f, 0.25f, 0f, 0.5f, 0f};
public static float[] woodBlock = {0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0f};
public static float[] leafBlock = {0f, 0f, 0f, 0f, 0f, 0f, 0.5f};
public static float[] stoneBlock = {0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.5f};


Since textures are the only difference in my blocks.

Humor will keep you alive.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #7 - Posted 2014-02-02 02:34:53 »

I guess that system could work, I haven't looked at your code though, so I couldn't say!

Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #8 - Posted 2014-02-02 02:36:06 »

I guess that system could work, I haven't looked at your code though, so I couldn't say!

It works very well for what I need it to. I plan on doing as suggested an making all touching blocks into one mesh.

Humor will keep you alive.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #9 - Posted 2014-02-02 02:42:02 »

That's called greedy meshing (if you didn't know!) and it's useful in some cases, but not all. Do you plan on doing lighting or having attributes for different blocks? Greedy meshing only works with blocks that are exactly the same, or else things become buggy. It's still worth it though!

I really recommend removing faces that don't touch air at least. Frustum culling is another huge performance boost, and have a view distance limiter where only chunks within a certain area are loaded, other wise keep the chunks on the disk.

There are a lot more optimizations, those are just some big ones I know of!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #10 - Posted 2014-02-02 02:44:33 »

That's called greedy meshing (if you didn't know!) and it's useful in some cases, but not all. Do you plan on doing lighting or having attributes for different blocks? Greedy meshing only works with blocks that are exactly the same, or else things become buggy. It's still worth it though!

I really recommend removing faces that don't touch air at least. Frustum culling is another huge performance boost, and have a view distance limiter where only chunks within a certain area are loaded, other wise keep the chunks on the disk.

There are a lot more optimizations, those are just some big ones I know of!

I may hold on the 'greedy meshing' for now, as it would screw with my Ray Picking. I have a view distance limiter. What is frustrum culling? And I will look into the air thing.

Humor will keep you alive.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #11 - Posted 2014-02-02 02:49:27 »

Frustum culling. The frustum is (in the most basic sense) what the player can "see". Everything that is on your screen being rendered is in the frustum. It's much more technical than that, but Google loves being asked questions!

Frustum culling is the act of not rendering "something" that isn't in the frustum. In your case, you wouldn't render chunks that aren't visible in the frustum. It helps immensely with performance, mainly because the engine isn't rendering so many vertices when the late cant even see them.

For instance, in an old voxel engine I could have thousands of chunks loaded at once because the renderer was only ever rendering at max less than a hundred. If I didn't have frustum culling, the engine would have to render all the chunks, which obviously would never happen.

Offline Slyth2727
« Reply #12 - Posted 2014-02-02 02:52:28 »

I was thinking about my game, my bad. For my puzzle game built with blocks I have to haev a seperate instance of each block. I'm fully aware that what I said was wasteful I just was thinking in my game at the time. So yes, create one instance of each block.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline SwordsMiner

JGO Coder


Medals: 3
Projects: 2
Exp: 1 year


The one and only.


« Reply #13 - Posted 2014-02-02 04:16:43 »

It ends in craft. But its not a minecraft clone. I think so.

If I made you laugh, helped you at all, or did something cool, I only ask that you smash that appreciate button with your nose.
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #14 - Posted 2014-02-02 04:31:52 »

It ends in craft. But its not a minecraft clone. I think so.

By any chance, do you work in the sword mining business? I think not.

Humor will keep you alive.
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 133
Projects: 4
Exp: 3 years



« Reply #15 - Posted 2014-02-02 07:41:40 »

How is this constructive at all? Maybe you think your game is more original - uh, wait, it's based off a tv show. And normally I would be fine with that, but now you're calling other people hypocrites...
Offline Roquen
« Reply #16 - Posted 2014-02-02 09:29:12 »

I assume that all the plane equation/picking questions were related to this.  This is a prime example of the importance of asking questions about the problem you want to solve rather than how you think you want to solve it.
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #17 - Posted 2014-02-02 20:29:29 »

I assume that all the plane equation/picking questions were related to this.  This is a prime example of the importance of asking questions about the problem you want to solve rather than how you think you want to solve it.

I don't really follow your question, but yes, my picking equation questions were for this. But I understand them now, and am able to solve them 9/10 times with pencil and paper. I for one like to understand what I am implementing.

Humor will keep you alive.
Offline Dxu1994
« Reply #18 - Posted 2014-02-02 21:26:38 »


Do you even know what Hypocrite means?

Doesn't seem like it.

Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #19 - Posted 2014-02-02 22:00:07 »

How is this constructive at all? Maybe you think your game is more original - uh, wait, it's based off a tv show. And normally I would be fine with that, but now you're calling other people hypocrites...


This is great, for once, I am glad I got nonconstructive criticism.

Humor will keep you alive.
Offline Roquen
« Reply #20 - Posted 2014-02-03 09:09:02 »

What bugs me is games like populus which nobody notices are totally minecraft inspired.  They don't notice simply because minecraft hadn't been written yet.  Sheesh.

I don't really follow your question, but yes, my picking equation questions were for this. But I understand them now, and am able to solve them 9/10 times with pencil and paper. I for one like to understand what I am implementing.
There was no question. I was making a statement.  And  I'm not picking on you.  A very high percentage of questions people ask are how they think they want to solve a problem and not the problem itself.  Wanting to understand what you're implementing is a very good trait.  Another is reducing what functionality you need into minimal form to meet your requirements...assuming you need/desire to implement that functionality at all (vs already have a solution and/or can find one within a reasonable time)

Most problems of the form "I need to intersect a ray with a plane" are problem misstatements.  In this case you needed two functions.  The first to find the starting point and direction of the ray for the pick.  And a second to examine the world with the ray.  For this second problem you don't need planes at all...a 3D DDA is much easier to write and (should be) much faster.  Of course picking is of no performance concern, but this function can be used for all ray vs. world checks.
Offline Damocles
« Reply #21 - Posted 2014-02-03 09:22:17 »

The first game that Ive played where you can create a world out of block elements and walk around them in 3D
was in the beginning of the 90s.
An Amiga game called "Tower of Babel".

The concept of a 3D "Block" world is quite old in itself.

Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #22 - Posted 2014-02-03 17:06:47 »

The first game that Ive played where you can create a world out of block elements and walk around them in 3D
was in the beginning of the 90s.
An Amiga game called "Tower of Babel".

The concept of a 3D "Block" world is quite old in itself.

Well, it was my first game. Let me just break out my 3D CAD artists and texture designers and make some call of duty style fps. No, but in all seriousness, I think a voxel engine was a good start.

Humor will keep you alive.
Offline Pauler
« Reply #23 - Posted 2014-02-03 17:50:20 »


Well, it was my first game. Let me just break out my 3D CAD artists and texture designers and make some call of duty style fps. No, but in all seriousness, I think a voxel engine was a good start.

Of course it is a great start for 3d development, don't worry you did a great job. They didn't want to offend you.
Offline SwordsMiner

JGO Coder


Medals: 3
Projects: 2
Exp: 1 year


The one and only.


« Reply #24 - Posted 2014-02-03 23:28:37 »

  • Being less of a hypocrite (as suggested my SwordsMiner)
Thanks for taking my advice  Wink [/troll] Its a very good start for a 3d game, and let alone your first. I cant do anything close to this Tongue

If I made you laugh, helped you at all, or did something cool, I only ask that you smash that appreciate button with your nose.
Offline zFollette

Junior Member


Exp: 2 years


I like jokes


« Reply #25 - Posted 2014-02-04 02:56:42 »

  • Being less of a hypocrite (as suggested my SwordsMiner)
Thanks for taking my advice  Wink [/troll] Its a very good start for a 3d game, and let alone your first. I cant do anything close to this Tongue

I studied counter trolling at Yale, but as for your statement:

Humor will keep you alive.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (20 views)
2014-09-24 16:12:06

Grunnt (45 views)
2014-09-23 14:38:19

radar3301 (28 views)
2014-09-21 23:33:17

BurntPizza (64 views)
2014-09-21 02:42:18

BurntPizza (33 views)
2014-09-21 01:30:30

moogie (42 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!