Elpis The Game (Infinite Procedural Terrain - VIDEO)

Thank you very much, really! It is these kind of comments that gives me determination to keep going with my game!
You all made my day! :wink:

Your “Login-Box” is wonderful. it has some really good details and it reminded me of the “Main Menu Box” from Hearthstone.
It’s diffrent materials and colors, but i think the quality of the handpainted texture(s) is nearly the same.
Really good work! I am looking forward for the next updates :smiley:

Just wanted to add myself to the list of people praising this project. I also stumbled across it on youtube quite a while back and am very pleased that it’s still happening.
I love the look of your main character and he moves really nicely.
Go Elpis!

one of my inspirations…
Thanks for your really awesome job .

New video Update with audio commentary! :wink:

I hope you all liked it! Thank you!

:0 that was super neat controller response.

Amazing! How do you implemented the global shadows? I love the day-night cycle.

Hey bro this is an excellent dev diary bro! love how you got xbox controller support for the game! any idea when we can have a play through with this game! its would be awesome if it were playable via Burster! that way we can just go to your site and load up the latest build of the game and have a play through!!! :slight_smile: Keep up the good work bro! its looking great!!! :slight_smile:

I’ve reworked the face texture and the Eyes are now objects!


My custom 2D filters:


Bloom and Mist 2D Filter:

//---------- 2D Texture Samples ----------//uniform sampler2D bgl_RenderedTexture;
uniform sampler2D bgl_DepthTexture;


//---------- Mist Fog Properties ----------//
const float near = 1.0;
const float far = 1000.0;
uniform float R;
uniform float G;
uniform float B;


//---------- Bloom Properties ----------//
const float BRIGHT_PASS_THRESHOLD = 0.5;
const float BRIGHT_PASS_OFFSET = 0.5;


const float blurclamp = 0.002;
const float bias = 0.01;
const float KERNEL_SIZE = 4.0;


//---------- Depth of Field Properties ----------//
uniform float timer;
uniform float focus;
uniform float DOF;
uniform float DOF_P1;
const float bluriness = 10.00;


//---------- Mist Fog Functions ----------//
vec4 generateMist(vec2 coord, vec4 color, vec4 depth){
    vec4 mistTempColor = vec4(0.0);
    vec4 mistColor = vec4(R,G,B,1.0);
    vec4 fog = ((2.0 * near) / (far + near - (depth*1.0013) * (far - near)));
    if (depth.r < 1.0 ){
        mistTempColor = mix(color, mistColor, fog*0.23);
    }
    return mistTempColor;
}




//---------- Bloom Functions ----------//
vec4 bright(vec2 coord){
    vec4 color = texture2D(bgl_RenderedTexture, coord);
    color = max(color - BRIGHT_PASS_THRESHOLD, 0.0);
    return color / (color + BRIGHT_PASS_OFFSET);    
}
vec4 generateBloom(vec2 coord){
    vec2 blur = vec2(clamp( bias, -blurclamp, blurclamp ));
    vec4 bloomTempColor = vec4(0.0);
    for ( float x = -KERNEL_SIZE + 1.0; x < KERNEL_SIZE; x += 1.0 ){
        for ( float y = -KERNEL_SIZE + 1.0; y < KERNEL_SIZE; y += 1.0 ){
            bloomTempColor += bright( coord + vec2( blur.x * x, blur.y * y ) );
        }
    }
    bloomTempColor /= ((KERNEL_SIZE+KERNEL_SIZE)-1.0)*((KERNEL_SIZE+KERNEL_SIZE)-1.0);
    return bloomTempColor;
}


void main(){
    vec2 coord = gl_TexCoord[0].xy;
    vec4 color = texture2D(bgl_RenderedTexture, coord);
    vec4 depth = texture2D(bgl_DepthTexture, coord);
    
    vec4 mistRender = generateMist(coord, color, depth);
    gl_FragColor = mistRender+ generateBloom(coord);
}

Depth Of Field 2D Filter:

// # One pass DoF shader with noise

uniform sampler2D bgl_RenderedTexture;
uniform sampler2D bgl_DepthTexture;


uniform float timer;
uniform float focus;
uniform float DOF;
uniform float DOF_P1;


const float bluriness = 10.00; //blur amount: bigger values for shallower depth of field
 
vec2 rand(vec2 co)
{
    float noise1 =  (fract(sin(dot(co ,vec2(12.9898,78.233)+timer)) * 43758.5453));
    float noise2 =  (fract(sin(dot(co ,vec2(12.9898,78.233)*2.0)+timer) * 43758.5453));
    return clamp(vec2(noise1,noise2),0.0,1.0);
}


void main() 
{
    float depth = texture2D( bgl_DepthTexture, gl_TexCoord[0].xy).r;


    
    
    vec2 coord = gl_TexCoord[0].xy;
    vec2 noise = rand(gl_TexCoord[0].xy);


    vec4 col = vec4(0.0);
    
    if (depth > DOF || depth < DOF_P1){
       
        float factor = ( depth - focus );
        float dofblur = ((depth - DOF)*4.2) * focus;
        
        if (depth < DOF_P1){
            dofblur = ((depth - DOF_P1)*2.0);
        }
        
        float X1 = gl_TexCoord[0].x  + noise.x * dofblur;
        float Y1 = gl_TexCoord[0].y  + noise.y * dofblur;
        float X2 = gl_TexCoord[0].x  - noise.x * dofblur;
        float Y2 = gl_TexCoord[0].y  - noise.y * dofblur;
        
        float invX1 = gl_TexCoord[0].x  + (1.0-noise.x) * dofblur * 0.5;
        float invY1 = gl_TexCoord[0].y  + (1.0-noise.y) * dofblur * 0.5;
        float invX2 = gl_TexCoord[0].x  - (1.0-noise.x) * dofblur * 0.5;
        float invY2 = gl_TexCoord[0].y  - (1.0-noise.y) * dofblur * 0.5;
        
        float invX3 = gl_TexCoord[0].x  + (1.0-noise.x) * dofblur * 2.0;
        float invY3 = gl_TexCoord[0].y  + (1.0-noise.y) * dofblur * 2.0;
        float invX4 = gl_TexCoord[0].x  - (1.0-noise.x) * dofblur * 2.0;
        float invY4 = gl_TexCoord[0].y  - (1.0-noise.y) * dofblur * 2.0;
        
        col += texture2D(bgl_RenderedTexture, vec2(X1, Y1))*0.075;
        col += texture2D(bgl_RenderedTexture, vec2(X2, Y2))*0.075;
        col += texture2D(bgl_RenderedTexture, vec2(X1, Y2))*0.075;
        col += texture2D(bgl_RenderedTexture, vec2(X2, Y1))*0.075;
        
        col += texture2D(bgl_RenderedTexture, vec2(invX1, invY1))*0.125;
        col += texture2D(bgl_RenderedTexture, vec2(invX2, invY2))*0.125;
        col += texture2D(bgl_RenderedTexture, vec2(invX1, invY2))*0.125;
        col += texture2D(bgl_RenderedTexture, vec2(invX2, invY1))*0.125;
        
        col += texture2D(bgl_RenderedTexture, vec2(invX3, invY3))*0.05;
        col += texture2D(bgl_RenderedTexture, vec2(invX4, invY4))*0.05;
        col += texture2D(bgl_RenderedTexture, vec2(invX3, invY4))*0.05;
        col += texture2D(bgl_RenderedTexture, vec2(invX4, invY3))*0.05;
        
    
    }else{
        col = texture2D(bgl_RenderedTexture, coord);
    }
    gl_FragColor = col;
    gl_FragColor.a = 1.0;
}

Set DOF properties:

from bge import logic

from bge import events
cont = logic.getCurrentController()
objs = logic.getCurrentScene().objects
own = cont.owner
focus = objs["Focus_Sphere"]
char = objs["CameraZCube"]


# init
if "focaltarget" not in own:
	own["focaltarget"] = 0.99




own["focaltarget"] = 0.995 + (own.getDistanceTo(focus))/21000
own["DOF_P1"] = 0.9 + (own.getDistanceTo(char))/176


if own["focaltarget"] < 0.1: own["focaltarget"] = 0.1
if own["focaltarget"] > 1.0: own["focaltarget"] = 1.0


own["focus"] = own["focaltarget"] * 0.1 + own["focus"]*0.9
own["DOF"] = own["focus"]


Ray = cont.sensors["Ray"]
focus.worldPosition = Ray.hitPosition




if own["DOF"] > 0.999:
    own["DOF"] = 0.999

Feel free to use the filters as you like!
Leave some feedback if you liked it! Thanks!

Looks nice :smiley:

Lecter’s close-up:



Awesome modeling and texturing! Really slick character!

That’s looking awesome! also the geometry looks so clean, wireframe screenshot maybe ?

Sceenshot with wireframe:


And a image I posted a long time ago:



Obs.: he is with a facia expression on his eyebrows…
:smiley:

What kind of rig are you using for collisions?

Do you have rag dolls yet?
I have not had a chance to download the game, but graphically it looks quite smooth.

Hope this short video answers your question… I had rag doll since blender 2.49, but I’m still working on it… haha

[Edit]:
This one is from blender 2.49b:

this is looking really cool

The controls and animations look really smooth. Nice work! Is any of your project file available for download? I didn’t see a link anywhere. I would love to look into some of your setup.

Thank you jakchit and atheistpally for you comments, unfortunately there isn’t a downloadable version atheistpally, but someday there will be!


The lighting script: :cool:


from bge import logic
from myFunctions import *
scene = logic.getCurrentScene()
objlist = scene.objects
cont = logic.getCurrentController()
Ray = cont.sensors["Ray"]
own = cont.owner
char = None
if "Char_Bones" in objlist:
    char = objlist['Char_Bones']
floor = 0.0
if char != None:
    lights = getClosest(char,"Light_Source",4)
    if len(lights) > 0:
        lamps = own.children["LampsHolder"].children
        shadows = own.children["ShadowsHolder"].children
        own.worldPosition = char.worldPosition
        own.worldPosition.z = char.worldPosition.z+2
        floor = Ray.hitPosition[2]
        for i,point in enumerate(lights):
            lamp = lamps[i]
            lamp.worldPosition = point.position
            shadow = shadows[i]
            trackToPoint( shadow, point.position,"-Y","Z", 1, True)
            dis = shadow.getDistanceTo(point.position)
            shadow.localScale[1] = 20 - (dis/3)
            shadow.localScale[0] = shadow.localScale[1]/4
            shadow.color = [0,0,0, 1-(dis/50)]
            shadow.worldPosition.z = floor
            lamp.color = point.color[:3]
            lamp.energy = point["Light_Energy"]
            s = point["Light_Distance"]
            lamp.distance = s