Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (658)
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] 3 4 ... 10
 11 
 on: 2015-08-31 19:15:19 
Started by Cyraxx - Last post by theagentd
First of all, you generally have both a specular intensity (how much specular light is reflected by the surface) and also a specular exponent/roughness/glossiness (how mirror-like the surface is), which affects the shape of the specular highlight. You often need to store both of them. In your case, you can store the specular exponent in the first texture's alpha component, as you only need RGB for diffuse textures.

The lighting process is pretty simple but you're mistaken on a few points. You do not want to process all lights on the screen in a single fullscreen pass. The simplest and fastest way of rendering lights is to generate light geometry. For a point light, that'd be a sphere. Spot/cone lights are a cone/pyramid thing. Directional lights (sun/moon) are indeed a fullscreen pass. The idea is to only process the pixels which are inside the light volume. In the lighting pass, you write to a single GL_RGBA16F render target with additive blending to add up all the lighting results.

 12 
 on: 2015-08-31 19:00:37 
Started by BurntPizza - Last post by BurntPizza
1  
2  
3  
4  
5  
  public static void main(String[] args) throws Exception {
    HashMap<String, Object> map = new HashMap<>();
    map.put("whatever", map);
    int hash = map.hashCode();
  }

Ha Ha! (JDK-8 at least)

Quote from: AbstractMap#hashCode() (also in Map interface)
Returns the hash code value for this map. The hash code of a map is defined to be the sum of the hash codes of each entry in the map's entrySet() view.

This seems to be the case all the way back to Java 5. Neat.

 13 
 on: 2015-08-31 18:51:59 
Started by philfrei - Last post by wessles
A platformer based on magnetic repulsion and attraction, as opposed to jumping. You can reverse your 'polarity' using the jump button. Something like Super Meat Boy in how fast it is, but with this new control scheme. Could be interesting Smiley.

 14 
 on: 2015-08-31 18:47:05 
Started by BurntPizza - Last post by Opiop
Not entirely proud of this but... I ate an entire pack of bacon within 12 hours.

So wait... you are partially proud?  Smiley


Well wouldn't you be after eating an entire pack of bacon?!? I feel like that's what it's truly like to be a grown up, knowing you can eat an entire pound of bacon and no one can tell you no Smiley

 15 
 on: 2015-08-31 18:43:30 
Started by BurntPizza - Last post by DavidBVal
Not entirely proud of this but... I ate an entire pack of bacon within 12 hours.

So wait... you are partially proud?  Smiley


 16 
 on: 2015-08-31 18:34:40 
Started by BurntPizza - Last post by Roquen
1  
2  
3  
4  
5  
  public static void main(String[] args) throws Exception {
    HashMap<String, Object> map = new HashMap<>();
    map.put("whatever", map);
    int hash = map.hashCode();
  }

Ha Ha! (JDK-8 at least)

 17 
 on: 2015-08-31 18:31:53 
Started by guigui768 - Last post by guigui768
Google Play: https://play.google.com/store/apps/details?id=com.gcstudios.crabsinvasion

 18 
 on: 2015-08-31 18:22:53 
Started by Xolitude - Last post by Dane
I had a similar issue when I wrote my first 2d tile based game. Here's the solution I came up with:

Separate the map into chunks (like said above) and give each chunk its own image. That chunk will have a flag called 'update' which is checked every time the game is drawn. If the chunk is due for an update, the image of that chunk will be recreated and the update flag will turn off.

That way instead of drawing 8x8 tiles through a loop, you're drawing a single image which is comprised of those 8x8 tiles.

The cons of this approach is if you want tiles your character goes under, then you will need multiple 'layers' for each chunk so you can render over the character. Also if you have tiles that change frequently (animated) then it might be considerable to add a system which causes only specific tiles to be redrawn to that chunks image.

 19 
 on: 2015-08-31 17:59:32 
Started by BurntPizza - Last post by Opiop
Not entirely proud of this but... I ate an entire pack of bacon within 12 hours. In my defense I was pretty into coding my website so I was just hungry and wanted meat to get my finger strength back. But... all that unhealthy greasy food...

Eating a pound of bacon (1 pack) is about eight strips. 32% of your daily fat in two meaning you just ate 128% your daily intake of fats in the form of good old lard.
(But I must say I have done the same myself. The obesity statistics for diet are very much hindered by myself alone)
I think the pack I had had a few more strips in it, but regardless yeah it was way higher than my daily intake should have been :/ In my defense I have never been able to gain weight so I would be more worried about what kind of havoc it had on my arteries!

I will definitely not be eating bacon for a while now, though Wink

 20 
 on: 2015-08-31 17:42:18 
Started by BurntPizza - Last post by Ecumene
Not entirely proud of this but... I ate an entire pack of bacon within 12 hours. In my defense I was pretty into coding my website so I was just hungry and wanted meat to get my finger strength back. But... all that unhealthy greasy food...

Eating a pound of bacon (1 pack) is about eight strips. 32% of your daily fat in two meaning you just ate 128% your daily intake of fats in the form of good old lard.
(But I must say I have done the same myself. The obesity statistics for diet are very much hindered by myself alone)

Pages: 1 [2] 3 4 ... 10
 
afikri (11 views)
2015-08-31 09:30:22

afikri (18 views)
2015-08-31 09:30:07

afikri (7 views)
2015-08-31 09:27:24

afikri (12 views)
2015-08-31 09:26:40

Roquen (16 views)
2015-08-29 11:30:54

GamerC4 (29 views)
2015-08-22 20:38:50

GamerC4 (25 views)
2015-08-22 20:37:18

GamerC4 (29 views)
2015-08-22 20:37:01

Kefwar (35 views)
2015-08-22 18:07:24

GamerC4 (26 views)
2015-08-22 01:00:24
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37: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!