Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Posts posted by gamecreator

  1. You can try two other things:

    1.  Reinstalling OpenAL
    2.  Do you have a copy of a published standalone project from before that worked (a backup)?  If so, can you still run that?  If you can, compare the files in that project with the one in a project you try publishing now (in the base directory) to see if any files are missing.  If you want, I can upload a blank published project for you to compare with.

    • Sad 1
  2. I played with this late last year and I use C/C++ so I don't know how much this will help; it may have broken since then.  Getting the achievements to show worked but it wasn't instant.  Sometimes it took a few seconds.  It was acting weird but it's supposed to be better when you actually release the game.  Resetting achievements worked fine.  I just called SteamUserStats()->ResetAllStats(true) for that.

    • Thanks 1
  3. 2 hours ago, reepblue said:

    Yeah. There is a Leadwerks::Print(), but there is no such thing as Print() unless you make your own function.

    Ah, I didn't know that.  Thanks.

    1 hour ago, Thirsty Panther said:

    I'm going OK just started arrays, vectors and containers. Its a bit of a step up from Lua but I'm feeling a little more comfortable with C++ than I thought I would.

    Good job.  Seems you're picking it up fast.

    • Like 1
  4. I might be being pedantic here so bear with me:

    Good catch on the semicolon but those won't affect your program.  Toss some extra semicolons in your program between functions and it'll still compile.  Still, while it will run just fine, agreed that it's unnecessary.

    As for the namespace thing, that's only if you include Leadwerks commands, right?  For these simple C++ examples, I don't believe it's necessary.  (He does talk about namespaces in the first C++ tutorial page.)

    Finally, it should be printf, not Print.  Like, everywhere.  ?

    • Like 1
  5. I had to try this myself.  I added textures but the results were what you would expect:

    Brushes:

    brushes.thumb.jpg.b5975ae7fa22b8b53c28d6b75d1f6345.jpg

    Models:

    models.thumb.jpg.8526fc2d1f32e01bd1ad8433a3a6ae40.jpg

    I then combined all boxes into 1 mesh and all collision boxes into 1 collisionmesh in 3DS Max and exported it.  The speed was again good:

    1625472919_modelscombined.thumb.jpg.c83429cb262ed7bd31aa8e6c227e16c9.jpg

    I think the lesson is that limbs slow Leadwerks down a lot and yet individual brushes don't.

    • Like 3
  6. 2 hours ago, Ma-Shell said:

    The difference comes from the fact that the entire thing is collapsed to just a single model. This means that every piece of code, which iterates over all instances only walks over this object once instead of 1000 times. Also there is only one transformation matrix which is getting updated and pushed back and forth from CPU to GPU and which takes much less space (which can be used for caching again)

    Does this mean that if reepblue combined all of those boxes into a single mesh that it would be the same speed?  Because that's probably how you would want to export the house in the original post anyway.

  7. 8 hours ago, cassius said:

    I don't understand. Why create basic shapes when there are physics options in the model editor. Or am I missing something?

    The automatic physics options don't work very well for most shapes and certainly not for complex ones.  Even something relatively simple like the scene below (a single FBX), the various options either overdo it or give horrible results.  The final one is convex decomposition with the maximum (6) iterations.

    scene_polymesh.jpg.663ace6986c68b7d9221b

    scene_convex_hull.jpg.d5c1fc2f8aefc42a35

    convexdecompisition_6iterations.jpg.4711

  8. Leadwerks doesn't seem to be very good at creating even simpler collision meshes (as per my thread) so I think you'll need to use Marcousik's suggestion and make them in your modeling program yourself.

    Edit: just realized that the thread is in the LE5 beta forums though it discusses LE4 so I don't know who will have access.

  9. 6 hours ago, Marcousik said:

    I m actually really curious about what of games leadwerks five will let us construct.. What do you think Josh? Will it be possible to build kind of just cause 3 with it, including all features of the game???

    What is your current limitation in LE4?  Is it framerate?

  10. In Steam, if you right-click on Leadwerks, go to Properties and Betas tab, you'll see if you're opted in.  But the one that is generated with release for me is 1,767 bytes and this is the entire thing:

    SHADER version 1
    @OpenGL2.Vertex
    #version 400
    
    uniform mat4 projectionmatrix;
    uniform mat4 drawmatrix;
    uniform vec2 offset;
    uniform vec2 position[4];
    
    in vec3 vertex_position;
    
    void main(void)
    {
    	gl_Position = projectionmatrix * (drawmatrix * vec4(position[gl_VertexID]+offset, 0.0, 1.0));
    }
    @OpenGLES2.Vertex
    
    @OpenGLES2.Fragment
    
    @OpenGL4.Vertex
    #version 400
    
    uniform mat4 projectionmatrix;
    uniform mat4 drawmatrix;
    uniform vec2 offset;
    uniform vec2 position[4];
    
    in vec3 vertex_position;
    
    void main(void)
    {
    	gl_Position = projectionmatrix * (drawmatrix * vec4(position[gl_VertexID]+offset, 0.0, 1.0));
    }
    @OpenGL4.Fragment
    //This shader should not be attached directly to a camera. Instead, use the bloom script effect.
    #version 400
    
    //-------------------------------------
    //MODIFIABLE UNIFORMS
    //-------------------------------------
    uniform float cutoff=0.15;//The lower this value, the more blurry the scene will be
    uniform float overdrive=1.0;//The higher this value, the brighter the bloom effect will be
    //-------------------------------------
    //
    //-------------------------------------
    
    uniform sampler2D texture0;//Diffuse
    uniform sampler2D texture1;//Bloom
    uniform bool isbackbuffer;
    uniform vec2 buffersize;
    uniform float currenttime;
    
    out vec4 fragData0;
    
    void main(void)
    {
    	vec2 icoord = vec2(gl_FragCoord.xy/buffersize);
    	if (isbackbuffer) icoord.y = 1.0 - icoord.y;
    	vec4 scene = texture(texture0, icoord); // default
    	vec4 blur = (texture(texture1,icoord)-cutoff); // glowmap
    	blur.r = max(blur.r,0.0); blur.g = max(blur.g,0.0); blur.b = max(blur.b,0.0);
    	float pixelbrightness = scene.r * 0.3 + scene.g * 0.59 + scene.b * 0.11;
    	fragData0 = scene + (overdrive * blur * max(0.5, 1.0 - overdrive * pixelbrightness ));
    	//fragData0=blur;
    }

    Try creating a new project and see if Leadwerks creates this for you too in the Utility folder.

×
×
  • Create New...