Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 6 7 [8] 9 10 11
  ignore  |  Print  
  State of Fortune  (Read 38627 times)
0 Members and 1 Guest are viewing this topic.
Offline wreed12345

JGO Knight


Medals: 22
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #210 - Posted 2013-05-03 23:11:57 »

I believe what he is saying that there is no velocity to the position of your person unless you are holding down the forward button - this makes abrupt stops in movement

Offline NegativeZero

JGO Coder


Medals: 14
Projects: 2


Zero but not.


« Reply #211 - Posted 2013-05-03 23:42:55 »

On another note: when can we expect to see the new terrain gen? Looks really cool.
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #212 - Posted 2013-05-04 20:05:41 »

I believe what he is saying that there is no velocity to the position of your person unless you are holding down the forward button - this makes abrupt stops in movement

Indeed, that was our conclusion during the messaging as well Smiley I personally dislike games where you cannot control your character when it is in the air. I know that it isn't realistic, but it does make it much easier to play.

On another note: when can we expect to see the new terrain gen? Looks really cool.

It is all done, but it won't be online until the first game version is online as well so it will probably take like a month or two. I finally figured out the buyable plot locations, next step is to implement it and then make them buyable. The smallest plots will be 10x10 meters and close to the spawn/auction/npc sales (meant for putting up a small store for example). The biggest plots will be 950x950 meters and will be meant for a group of people.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NegativeZero

JGO Coder


Medals: 14
Projects: 2


Zero but not.


« Reply #213 - Posted 2013-05-05 01:06:34 »

On another note: when can we expect to see the new terrain gen? Looks really cool.

It is all done, but it won't be online until the first game version is online as well so it will probably take like a month or two. I finally figured out the buyable plot locations, next step is to implement it and then make them buyable. The smallest plots will be 10x10 meters and close to the spawn/auction/npc sales (meant for putting up a small store for example). The biggest plots will be 950x950 meters and will be meant for a group of people.

Mike

So what, like guilds? That sounds like it would be really cool. How will you obtain $$$ to obtain plots in the first place though?
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #214 - Posted 2013-05-05 02:55:14 »

Yes, like guilds Smiley

You start with a bit of money to buy a plot of land in the outskirts of the city as well as some (for now) plants and other things you can grow. You then harvest your land and sell it, from which you earn money. That's the smaller start, and eventually there will be several professions and materials, I'm still figuring it out Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline NegativeZero

JGO Coder


Medals: 14
Projects: 2


Zero but not.


« Reply #215 - Posted 2013-05-05 03:31:12 »

It would be cool if you could hire NPC workers for your guild once you got enough money. and occasionally they'd do things like go on strike if you weren't paying them enough and stuff Tongue
Offline HeroesGraveDev

JGO Kernel


Medals: 212
Projects: 11
Exp: 2 years


If it wasn't Awesome, it wasn't me.


« Reply #216 - Posted 2013-05-05 03:44:50 »

It would be cool if you could hire NPC workers for your guild once you got enough money. and occasionally they'd do things like go on strike if you weren't paying them enough and stuff Tongue

Or you could hire other players, which in the end would be more realistic than whatever AI.

Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #217 - Posted 2013-05-05 20:22:23 »

Or you could hire other players, which in the end would be more realistic than whatever AI.
This. Wink

The future will tell Smiley

I now have plots programmed, now to add the marker that you can buy them and that you actually can own land Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline NegativeZero

JGO Coder


Medals: 14
Projects: 2


Zero but not.


« Reply #218 - Posted 2013-05-10 11:26:27 »

Getting on now if anyone cares to join me Cheesy
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #219 - Posted 2013-05-21 15:05:00 »

Just dropping by to give an update:
It is now possible to buy land (and highlight it so you can see what you are buying/bought).

When you bought a piece of land only you can build on it and open/close doors (for now, I'm adding permissions later so you can allow other people to do things).

What I am currently working on is adding an inventory so you can place a marker on your land for interactions as well as adding money so you need to pay for the land.

It's still too far off to say when the first version of the game will be available, but I am hoping for somewhere in July.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #220 - Posted 2013-06-02 18:13:21 »

It's now been five months since I started programming State of Fortune.

I finished adding an inventory and when you buy a plot you get a plot deed added to your inventory. If you click on the deed you are able to:
Sell the plot and all items on it
Highlight the borders of the land to easily know where you can build
Go to the plot (for a cost)
(Re)name the plot

I'll add some kind of compass option as well that points you to your plot. I noticed that I also need one that points me to the closest spawn point (the npc store will be at the spawn points) as I keep getting lost otherwise Smiley

Next up is being able to grow things so you can start making money. I'm still aiming on releasing the new version somewhere in July. That is unless I get stuck inside my Occulus and on adding support for it when I get it within two weeks if I am to trust the deliveries Cheesy

I also added a simple forum to the website instead of holding a monologue here Wink I will not be actively posting there though until the game mode is out.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline h3ckboy
« Reply #221 - Posted 2013-06-03 14:21:28 »

I actually really enjoy your monologue just for the record Smiley. It inspires me to actually get off my ass (figuratively) and start coding Wink.
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #222 - Posted 2013-06-19 12:10:14 »

Just a quick update:

1. Improved the performance of the engine, especially the water that is changed a lot, for example showing the sandy bottom when it isn't deep.
2. You now start with some seeds. Seeds can be used to plant wheat (for now) on fertile land.
3. You can make fertile land (not really liking the way it is done at the moment, will see how it ends up).
4. You can harvest the wheat once it grew.

Main bulletpoints before I release a first version:
  • Sell wheat
  • Buy seeds
  • A title screen where you can choose which server you want to connect to, the playground or the game
  • Create more spawn points when the land around one is starting get sold out
  • Add some arrows to guide you to the closest spawn point and the selected plot
  • Bug fixes of things I noticed while testing

I'm still hoping to be done with a first version of the game part somewhere next month. Smiley

And just to show some progress, the new water:


Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #223 - Posted 2013-06-19 16:14:53 »

Looks great!
I think it looks nicer if you interpolate the water from very visible bottom, to no visible bottom.
This way the seam between water and land will be gone.

I really hope your done soon Cheesy
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #224 - Posted 2013-06-19 16:50:39 »

This 'seam' is what happens in reality, normally hidden by patches of grass, or less obvious due to the water typically not being quite so flat. The amount of reflection is determined by the viewing angle, water depth plays a much smaller role. One millimeter of water will be almost 100% reflecting if you look at it from a low point of view.

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

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #225 - Posted 2013-06-19 17:00:49 »

The "seam" is indeed what happens in reality as well, but my seam is extremely straight, making it stand out. As Riven said it would be better if there were some waves on the water, but that won't come for quite some time Smiley

To show the water from the beach towards the deeper water:


Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline cylab

JGO Knight


Medals: 34



« Reply #226 - Posted 2013-06-20 10:02:25 »

If you are able to easily query the water-depth in a shader, you could do some animated noise from a certain threshold to simulate some white foam at the edges.

Mathias - I Know What [you] Did Last Summer!
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #227 - Posted 2013-06-20 11:31:42 »

If you are able to easily query the water-depth in a shader, you could do some animated noise from a certain threshold to simulate some white foam at the edges.

I am not, but that sounds like an awesome idea. I don't think I'll be able to get the depth number though without a lot of fiddling around. I could split the water quad into smaller pieces and put the depth into one of the color channels, but that'd have to be further down the line.

Nevertheless, a really good suggestion, worthy of a gold star! Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline cylab

JGO Knight


Medals: 34



« Reply #228 - Posted 2013-06-20 13:11:00 »

hmm, since you already seem to have two-pass rendering for the reflection, could you not simple store the depth-buffer in the fbo and compare the value with the depth-value of the water-plane?

Mathias - I Know What [you] Did Last Summer!
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #229 - Posted 2013-06-20 14:20:39 »

The fbo's/textures I currently use in the shader is:
Reflection Texture
Depth to bottom of water (from camera)
DUDV
Normal

As I don't have any "how far is it from the water level to the ground underneath" the best guess I can do is "how far is it from the camera to the ground - the distance from the water fragment to the camera". The problem with this is that it will change depending on the where the camera is and the angle the water is looked at. The other challenge is that the depth buffer isn't an absolute number but based on the depth precision and clipping fields. It might work but I'm not sure how good the result will be.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline cylab

JGO Knight


Medals: 34



« Reply #230 - Posted 2013-06-20 17:24:00 »

camToGround-camToWaterFragment was what I meant. you may need to restrict the effect to only be rendered relatively near to the camera, so you don't get precision problems. I am unsure however regarding the non-linearity of the depthbuffer, but maybe you can just write the fragments z position into some custom fbo-attachment to get linearized values.

Mathias - I Know What [you] Did Last Summer!
Offline phu004

JGO Coder


Medals: 4
Projects: 9
Exp: 10 years


NoSuchPersonException


« Reply #231 - Posted 2013-06-21 05:23:02 »

Quote
I am unsure however regarding the non-linearity of the depthbuffer,

As you can see in the image below,  view1 and view2 represent camera rays which are looking at the same point on on the sea bed.  Obviously view 2 traveled a longer distance under water.  If you use that distance to determine water depth you will get inconsistent result.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
           view 1
              |     view 2    
              |      /  
              |     /
--------------|----/----------   water surface
              |   /
              |  /
              | /
              |/
--------------*---------------   sea bed



To find the water depth, we can use a bit of math from similar triangles:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
                                camera position                           
                             C
                            /|
                           / |
                          /  |  D
                         /   |
                        /    |
                       /     |
----------------------O-----------   water surface
             |       /
             |      /
             |     /
             |    /
          d  |   /
             |  /
             | /
             |/
-------------X--------------------  sea bed


C is the camera position
D is the distance from camera position to the water level,
O is where camera ray intersect water surface,
X is where camera ray intersect the sea bed,
and d the water depth will equal to D/CO * OX
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #232 - Posted 2013-06-21 10:50:00 »

Nice! Now just to get the correct distance from the depth map (seeing as it isn't linear based on the perspective). I'll have a look at it. Thanks!

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline phu004

JGO Coder


Medals: 4
Projects: 9
Exp: 10 years


NoSuchPersonException


« Reply #233 - Posted 2013-06-24 02:29:18 »

Thanks for the medal, but after re-thinking  about the idea I purposed, I realized it won't find the depth of the water that directly beneath the "camera ray"-"water surface" intersection.  Sad (I guess that is what you really want to determine where to have animated white foam)

Anyway I enjoyed the sandbox environment you created, it definitely takes more skills to construct stuff in state of fortune than in Minecraft. One thing i have noticed (not sure if it's a bug or not) is that things disappear under the water when you turn the reflection on. I can still see the bottom of the water though.
Offline sproingie
« Reply #234 - Posted 2013-06-24 04:56:41 »

Kudos for the ASCII art, but you need to take refraction into account, as water has a significant refractive index, and not the least of which means if you're looking at the water's surface at an angle below the angle of total internal reflection (Fresnel angle I think it's called?), it's 100% reflective.  The math for this is not anything I could tell you off the top of my head, but googling for "shader water refraction" should turn up a solution or two.
Online BurntPizza
« Reply #235 - Posted 2013-06-24 05:04:25 »

Kudos for the ASCII art, but you need to take refraction into account, as water has a significant refractive index, and not the least of which means if you're looking at the water's surface at an angle below the Fresnel angle, it's 100% reflective.  The math for this is not anything I could tell you off the top of my head, but googling for "shader water refraction" should turn up a solution or two.


Snell's Law gives the angle of refraction based on the angle of incidence.
n1 * sin(thetain) = n2 * sin(thetaref)
where n1 would be 1 for air, and n2 would be ~1.33 for water.
Offline cylab

JGO Knight


Medals: 34



« Reply #236 - Posted 2013-06-24 08:35:52 »

This is not about rendering or physics, but about determining the depth of the water for each water fragment from a previously rendered depthbuffer of the ground. Refraction is irrelevant in this context. After thinking about it, it simple seems not feasible. Querying the heightmap (if the terrain uses one) again seems a better option...

Mathias - I Know What [you] Did Last Summer!
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #237 - Posted 2013-06-30 00:04:56 »

Right, I can store the depth in the color buffer, but it will mean I need to add a lot of vertices (water is currently only a single quad) and that I need to add a bit of work. It's doable in the long run but for now I guess I'll have to be happy with the water as it is Smiley

I didn't do any work on it last week as I had a family vacation.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline cylab

JGO Knight


Medals: 34



« Reply #238 - Posted 2013-07-01 10:51:56 »

You probably would "only" need to render the terrain of the frustum from above in a separate pass and store the elevation in an FBO. Then again you can just compare the water fragment coordinates to that.

Mathias - I Know What [you] Did Last Summer!
Offline Mike

JGO Wizard


Medals: 69
Projects: 2
Exp: 5 years


Java guru wanabee


« Reply #239 - Posted 2013-07-07 00:01:53 »

A nice milestone! The shader, rendering the world in stereoscopic 3d and the movement of your head with the oculus rift is now all working Smiley There are lots of smaller things left to fix, but it is already awesome to walk around in a game I created myself!



Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Pages: 1 ... 6 7 [8] 9 10 11
  ignore  |  Print  
 
 

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (55 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (247 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!