BGMC 11 Tom on Mushrooms

Hi,

this is my WIP thread for my BGMC entry. I`m making a game where you have to stay as long high as possible. To do this, you have to find and eat mushrooms.

I made a vertex-color-based terrain system, a godray filter and a motion blur filter.

Attachments




Cool game!

Hi,

my game is now called THE ISLAND and it is finished. Here is a download link:


Could you please try it and report any bugs? You can walk on a lonely island and enjoy the nature. No Mushrooms or something like that.

Thank you,

Raphael

some Screenshots



Begin sound FX block JAW BANGS ON FLOOR ‘Okay, follow the light.’ BLEEEEEEEP ‘The light moves!’ ‘Toggle fly mode…’ SCREAMS ‘I’m going so fast!’ STOPS GAME ENGINE FAINTS End sound FX block

Great game! Although I don’t understand the objective, the rounded Minecraft style is very good. Good luck!

Tested, looks very nice. Here’s the output I get on the console when I start the game:

Character motion enabled on non-character object (Camera), falling back to simple motion.

Blender Game Engine Started
2D Filter GLSL Shader: compile error:
 1  uniform sampler2D bgl_RenderedTexture;
 2  uniform float bgl_RenderedTextureWidth;
 3  uniform float bgl_RenderedTextureHeight;
 4  
 5  uniform float xspeed;
 6  uniform float yspeed;
 7  
 8  uniform float sigma;
 9  uniform float xfac;      // The sigma value for the gaussian function: higher value means more blur  
10                          // A good value for 9x9 is around 3 to 5 
11                          // A good value for 7x7 is around 2.5 to 4 
12                          // A good value for 5x5 is around 2 to 3.5  
13                         // ... play around with this based on what you need :)
14  float blurSize = xfac/bgl_RenderedTextureHeight;  // This should usually be equal to
15                           // 1.0f / texture_pixel_width for a horizontal blur, and 
16                          // 1.0f / texture_pixel_height for a vertical blur.
17  
18  float pii = 3.14159265;
19  uniform float numBlurPixelsPerSide;
20  vec2  blurMultiplyVec = vec2(xspeed/numBlurPixelsPerSide, yspeed/numBlurPixelsPerSide);
21  
22  void main()
23  {
24    // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)
25    vec3 incrementalGaussian;
26    incrementalGaussian.x = 1.0 / (sqrt(2.0 * pii) * sigma);
27    incrementalGaussian.y = exp(-0.5 / (sigma * sigma));
28    incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y;
29    vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0);  float coefficientSum = 0.0;
30     // Take the central sample first... 
31    avgValue += texture2D(bgl_RenderedTexture, gl_TexCoord [0]) * incrementalGaussian.x;
32    coefficientSum += incrementalGaussian.x;
33    incrementalGaussian.xy *= incrementalGaussian.yz;
34  
35     // Go through the remaining 8 vertical samples (4 on each side of the center)
36    for (float i = 1.0; i <= numBlurPixelsPerSide; i++) 
37    {
38           avgValue += texture2D(bgl_RenderedTexture, gl_TexCoord [0] - i * blurSize * blurMultiplyVec) * incrementalGaussian.x;
39           avgValue += texture2D(bgl_RenderedTexture, gl_TexCoord [0] + i * blurSize * blurMultiplyVec) * incrementalGaussian.x;
40           coefficientSum += 2.0 * incrementalGaussian.x;
41           incrementalGaussian.xy *= incrementalGaussian.yz;
42     }
43  
44      gl_FragColor = avgValue / coefficientSum;
45  }

Fragment shader failed to compile with the following errors:
WARNING: 0:31: warning(#402) Implicit truncation of vector from size: 4 to size: 2
WARNING: 0:38: warning(#402) Implicit truncation of vector from size: 4 to size: 2
ERROR: 0:38: error(#162) Wrong operand types: no operation "-" exists that takes a left-hand operand of type "default in 4-component vector of vec4" and a right operand of type "2-component vector of vec2" (or there is no acceptable conversion)
WARNING: 0:38: warning(#402) Implicit truncation of vector from size: 4 to size: 2
WARNING: 0:39: warning(#402) Implicit truncation of vector from size: 4 to size: 2
ERROR: 0:39: error(#162) Wrong operand types: no operation "+" exists that takes a left-hand operand of type "default in 4-component vector of vec4" and a right operand of type "2-component vector of vec2" (or there is no acceptable conversion)
WARNING: 0:39: warning(#402) Implicit truncation of vector from size: 4 to size: 2
ERROR: error(#273) 2 compilation errors.  No code generated

The game runs fine (Ubuntu 13.10 - crappy RadeonHD5450 with amd drivers, glx 1.4)

This gameplay concept sounds hilarious! :smiley: