Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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  
  defcon's water gradient?  (Read 2421 times)
0 Members and 1 Guest are viewing this topic.
Offline SwampChicken
« Posted 2008-08-14 05:27:39 »

does anyone have any idea as to how one would do the 'water gradient' in java similar to what was done in the maps of defcon?

http://www.introversion.co.uk/defcon/about/screenshots.html

cause i'm just loving that 'glow' but I cant really think of how you would code it to evenly/smoothly dispurse away from an irregular coastline....

any ideas ppl?
Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2008-08-14 09:29:04 »

Could be a version of the vector map, scale based on the normals of the vertices and then using vertex colours to provide the graident. The strip of geometry around the outside would have it's vertex colours set to the background colour and inner set to some bright version.

Kev

Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #2 - Posted 2008-08-14 10:48:27 »

2 pixel-based ways:

You could follow the lines (Bresenham) and draw circles with low intensity in white (or change the hsv values in the destination image), then draw the continents with 80% intensity.

If you don't have a Bresenham:
for i=1 to 5
1) draw continent outlines
2) blur the whole image
3) goto 1)

then draw the continents.

The images look like if they did it that way because the continents are ca. 80% black and 20% background color.

lots of sillystupid games: http://www.emaggame.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #3 - Posted 2008-08-14 10:52:37 »

I can't tell from the screenshots - is the gradient actually part of the map/globe, or is it added on top as a regular bloom/glow pass?

I suppose you could even do it as a offline bloom pass and save the result to a texture since the map won't ever change.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #4 - Posted 2008-08-14 11:07:34 »

Not sure of the exact process - but there are 2 polygon meshes, a high detail one used for the borders, and a low detail one - which looks like it maybe used for the glow.
This would account for the apparent discontinuity between the white borders, and the underlying blue highlight.

Not sure if the above behaviour can be changed in the graphics detail settings though.

My guess would be that for every vertex in the low-poly mesh, it is drawing a texture with a radial gradient.

Whatever it's doing, it isn't very efficient - Defcon used to run like a dog on my work PC.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2008-08-14 11:12:32 »

If it's two actual meshes then it's entirely possible it was created by hand. After all Defcon isn't really an art-heavy game and they only have one globe so it's probably much easier to get an artist to spend a couple of days on it than write some complicated rendering method which will probably be slower to draw and exhibit artifacts.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
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.

Riven (6 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (21 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (51 views)
2014-07-17 23:47:54
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!