Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Hexagon/Triangle Prism Engine (Game in development)  (Read 7097 times)
0 Members and 1 Guest are viewing this topic.
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Posted 2013-01-03 20:51:25 »

My latest project:

A 3D game. Construction-based similar to Minecraft, but with a difference. A big difference.
I will not be using cubes
(For the landscape. Characters will by made from cubes because it's easier and looks reasonable)

New Screenshots:

For more, see my posts below, or check out my blog.

Old Stuff:

I started off with cubes because they were easy to render. But a box looks boring, so I made a sphere:


Then, I messed around with trig functions and randomness:


Then, I was ready... to do Hexagon Prisms:


I may use triangle prisms instead once I create the world, because hexagons make it impossible to create flat surfaces. Then again, I may not. It's too early to decide.

Anyway, I had better get back to work. I will post updates as I get cool things working.

EDIT: There are currently NO optimizations in place. That explains the FPS drop in one of the screenshots.
EDIT 2: Some optimizations in place.

Offline Kroniz

Senior Newbie





« Reply #1 - Posted 2013-01-04 15:16:21 »

Well, This is certainly nice.
I like the way it all fits so nicely, Not that this really is a game or anything yet.
But very nice! Any chance for a little early test ride just for the lolz?
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #2 - Posted 2013-01-05 04:31:21 »

Well, This is certainly nice.
I like the way it all fits so nicely, Not that this really is a game or anything yet.
But very nice! Any chance for a little early test ride just for the lolz?

Not of the screenshots shown earlier, because that was just rendered data.
Now I have implemented an actual world.

Along the way I learnt how Simplex Noise generation works, as well as messing around with my own implementation.
I removed the normal permutations table and made it generate one from a seed.

I have also been messing around with the GL11 lighting functions which work quite nicely for so little work.

Here are some screenshots:





More can be found here on my blog.

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

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #3 - Posted 2013-01-06 06:13:54 »

Okay, I finally got shaders working.
Well actually, they could have been working a few weeks ago, I just didn't realise I didn't need uniform variables (which were what I needed to finish of my Shader loading class).
Anyway, I skipped the Uniforms, and had a test run. It worked fine, but obviously the lighting was gone. I spent a while learning GLSL and all the functions etc. before google-ing lighting shaders. Eventually, I found enough info to merge a few together, and that gave me the effect I wanted.

Screenshots:




EDIT: Special thanks to davedes for his tutorials. Smiley (Even though they got me confused about uniforms Wink)

Offline cheatsguy

Junior Member


Medals: 3


Gamer turned Pixel Artist turned Programmer


« Reply #4 - Posted 2013-01-07 02:22:00 »

Looks awesome so far! It will be great to see where this might go! I'd love to see a fighting mechanic that revolves around stealth over brute force, or at least an option to use non-lethal force that is rewarded in gameplay. This is a project I'll be looking out for! Way to go so far!

Busy between school, work, life, games, programming and general screwing around.
If you'd like some pixel art for your game, send me a PM, i'll see what I can do.
Current project: http://elementalwarblog.wordpress.com/
Offline Agro
« Reply #5 - Posted 2013-01-07 02:22:58 »

Yeah, it looks pretty awesome in such a short amount of time! The hexagonal prisms add really nice "whoosh" to the terrain! 8D

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #6 - Posted 2013-01-07 04:18:12 »

Yeah, it looks pretty awesome in such a short amount of time! The hexagonal prisms add really nice "whoosh" to the terrain! 8D

hehehe...

This afternoon I've been hunting down an annoying bug. Still haven't found it. Don't expect the momentum to last for long.
EDIT: Fixed bug. momentum going again for now.

Looks awesome so far! It will be great to see where this might go! I'd love to see a fighting mechanic that revolves around stealth over brute force, or at least an option to use non-lethal force that is rewarded in gameplay. This is a project I'll be looking out for! Way to go so far!

I'm unsure of where to go with the fighting mechanics. It's too early. I will post something on my blog when I think of it, but almost everything will probably change before this is done.

Offline davedes
« Reply #7 - Posted 2013-01-07 04:56:24 »

What was confusing about uniforms? I could change it up to make it less confusing for new readers. Smiley

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #8 - Posted 2013-01-12 06:14:37 »

This week, not much was done as I was on holiday.

However, I did get infinite terrain generation working with minimal fps drop, and I also made a fog shader knowing abaolutely nothing about them except the effect I wanted. I also changed the background colour to make it more sky-like, and made the player-controlled entity.

Then I got stuck on collision detection. Still working on this one.

What was confusing about uniforms? I could change it up to make it less confusing for new readers. Smiley

The uniform part is fine... If you already know about shaders. You should explain what the code is doing for setting uniforms, getting the uniform location etc.
The part that confused me was how to actually use the code, as your tutorials on shaders rely on the spritebatcher.
I reckon an example of rendering a quad using uniform variables would be enough.
An explanation of how to set up the attributes would also be nice, as I had to dig through your source code to find what I was supposed to put in the HashMap, but then again, I guess it filters out the n00bs Wink

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #9 - Posted 2013-01-12 06:22:21 »

I almost forgot the new screenshots:




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

Junior Member


Medals: 3


Gamer turned Pixel Artist turned Programmer


« Reply #10 - Posted 2013-01-15 19:16:56 »

Are you planning on doing something with the 3D simplex noise? It'd be great for floating island levels, but outside that I can't see much use. This thing really makes me want to make my own take on the system Grin too bad I don't have the skill yet...

Busy between school, work, life, games, programming and general screwing around.
If you'd like some pixel art for your game, send me a PM, i'll see what I can do.
Current project: http://elementalwarblog.wordpress.com/
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #11 - Posted 2013-01-15 21:22:46 »

The world is infinite (to the limit of 32 bits), so I may generate floating islands way, way, way above the ground. Maybe even asteroids in space. Shocked And don't forget that 3D noise can be used for caves way, way, way below the ground. persecutioncomplex

Still stuck on collision detection Huh
May just have to leave it as is and come back later.

Offline cheatsguy

Junior Member


Medals: 3


Gamer turned Pixel Artist turned Programmer


« Reply #12 - Posted 2013-01-15 21:35:59 »

Just realized something we both overlooked Tongue these would make some epic looking overhangs/mountainsides Smiley and that sucks about collision detection, hope you get it working soon!

Busy between school, work, life, games, programming and general screwing around.
If you'd like some pixel art for your game, send me a PM, i'll see what I can do.
Current project: http://elementalwarblog.wordpress.com/
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #13 - Posted 2013-01-15 21:52:51 »



Black is where I want the collisions to be.
Red is where they are.

Yes, I know that I am not checking it right. This is just the closest I've got to working. Everything else so far results in getting stuck where there's nothing and falling through the 'gaps' between blocks. The problem is my coordinate system. It's skewed, like it should be, but that makes it hard to work out the specific hexagonal coordinates from Cartesian coordinates. (unskewing is easy though)

This is going to require some heavy maths...

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 783
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #14 - Posted 2013-01-15 22:15:12 »

Turn you hex into triangles and do collision detection / response with those.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #15 - Posted 2013-01-15 22:19:45 »

Turn you hex into triangles and do collision detection / response with those.

I've been trying to avoid this as long as possible in the hope there is a quicker method, but now it seems like that's my only best choice.

(Secretly, the hexagons actually are triangles. persecutioncomplex)

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 783
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2013-01-15 22:23:44 »

What else could they be?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #17 - Posted 2013-01-15 23:44:16 »

What else could they be?

I meant this:

Offline pitbuller
« Reply #18 - Posted 2013-01-15 23:55:51 »

You could approximate hexagon as cylinder that would make math easier and probably faster too.
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #19 - Posted 2013-01-16 00:00:12 »

You could approximate hexagon as cylinder that would make math easier and probably faster too.

I was considering that a while ago.
But because of my grid skewing, it will just turn the rhombi in the image further up into ovals. Not what I want.
I'll see what I can do though.

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #20 - Posted 2013-01-16 22:03:09 »

I'm still stuck on collision detection due to the skewing of the hex-grid.
I may have to change the orientation to allow for at least one axis to remain the same direction to help with the math.

Anyway, yesterday (those who looked at my blog would've noticed), I added in trees.

Here are some screenshots:




Right now I'm working on minimizing RAM usage.

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #21 - Posted 2013-01-16 23:00:16 »

I tweaked the 3D simplex noise generation a bit. For a description of what it does, click the link in my signature to see my blog post.

There were lots of screenshots. They are all on my blog.

Here's my favourite:


Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #22 - Posted 2013-01-17 02:16:52 »

I realised there was a "mistake" in my lighting shader.
Not a really big mistake. I just had a bad light source position.

Things look much nicer now. The terrain feels smooth, and trees...
Well trees look like a mess of triangle prisms attached to a pole. Perfect!


Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #23 - Posted 2013-01-19 01:58:55 »

Collision Detection is now working!!!!

Unfortunately, now the grid skewing is affecting wall-sliding.

But still, Collision Detection is now working!!!!

Offline cheatsguy

Junior Member


Medals: 3


Gamer turned Pixel Artist turned Programmer


« Reply #24 - Posted 2013-01-19 04:24:15 »

Good news! This project is looking pretty solid so far! (just wondering, what are your eventual plans for this thing?)

Busy between school, work, life, games, programming and general screwing around.
If you'd like some pixel art for your game, send me a PM, i'll see what I can do.
Current project: http://elementalwarblog.wordpress.com/
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #25 - Posted 2013-01-19 05:07:48 »

Well, a few days ago, I realised this could be a huge task. But then I remembered that Minecraft started out as Minecraft Classic.
And Minecraft Classic is quite simple (apart from Multiplayer)

(I realise lots of my inspiration is from Minecraft. I don't want to make this game a Minecraft clone, but when I think of it as Minecraft, it seems like a smaller task, so I attempt to get things done quickly)

I noticed that as soon as collision detection and a few other things were working, I would only have to add content to get to the level of Minecraft Classic (Singleplayer only). Then I would be free to call it a game, and add whatever I felt like without worrying about 'scope creep' as the game to me would already be done.

So, I decided this morning to sit down at my seat and do the maths for collisions. And it worked (apart from the lack of wall sliding Undecided)

I was so inspired, that this afternoon, I got something else cool prototyped:



Player Models. Shocked Shocked Shocked Shocked Cool
(btw, that's not the final player model Grin)
AND: a third person camera mode (WIP. Has a fixed distance. Needs clipping).

To avoid making this post too large, I will post a more detailed plan on my blog shortly (possibly tomorrow). Definitely tomorrow.

Offline Kroniz

Senior Newbie





« Reply #26 - Posted 2013-01-19 14:33:44 »

what is your trick to render Hexagons like that?
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #27 - Posted 2013-01-19 19:42:44 »

what is your trick to render Hexagons like that?


Don't know what you mean. Please be more specific. Pointing

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #28 - Posted 2013-01-20 01:33:31 »





Do the eyes need adjusting?

Offline Rorkien
« Reply #29 - Posted 2013-01-20 01:41:45 »

Definitely not, but the rest of the body does  Roll Eyes

Good job
Pages: [1] 2
  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.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (30 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (43 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
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!