3D Forest Walking Simulator - convex terrain

0 favourites
  • 13 posts
From the Asset Store
Platform HTML5 game, where the little Dinosaur must cross the forest, desert and snow forest.
  • I did a little test side project, FPP walking on non-flat surface.

    You can play it on Scirra Arcade:

    https://www.construct.net/en/free-online-games/forest-walk-sim-34983/play

    Subscribe to Construct videos now

    Some details:

    This is an experimental project that uses DrawingCanvas perlin noise for procedural ground mesh distorion displacement and for handling Z position for native Construct 3 plugin like: 3DCamera,3Dshape and sprite billboards. The forest is randomly created on the layout start then the shadows from trees & ground details are baked to the ground texture on each startup. Also this little project is using Sound positioning with IR reverb audio file for convolution effect(it is not a 3D sound for fpp game but it creates some kind of positional space sound but not accurate in terms of direction).

    I found out that on some devices pixel reading from Drawing Canvas snapshot for player camera Z doesn’t work properly. Sometimes it reads incorrectly height of the character. If you play this little game and feel that your character is too high above the ground level, please leave the comment about it. Thank you.

    Happy walking!

    Update: The Z position is now read from the Array instead of Drawing Canvas SnapshotRedAt. Maybe this will help with the Z reading issue but for sure helps in terms of memory. Array is 30 MB with 2 decimals and Canvas snapshot was 80MB.

  • I found out that on some devices pixel reading from Drawing Canvas snapshot for player camera Z doesn’t work properly.

    You mean the rgb data?

    The values between browsers can vary a fair amount unfortunately.

    Probably the same for gpu hardware as well.

  • > I found out that on some devices pixel reading from Drawing Canvas snapshot for player camera Z doesn’t work properly.

    You mean the rgb data?

    The values between browsers can vary a fair amount unfortunately.

    Probably the same for gpu hardware as well.

    newt

    Yep, exactly the rgb data.

    Thank you for pointing it out! I found one device soo far that reads it differently on integrated gpu. Now I am concerned that this convex substrate method is not safe enough :( Maybe I will do some rgb spot test for auto calibration.

  • Impressive and oozing with character as always! Very cool.

    When the reading of the pixels is wrong, could the image be flipped?

    Messing with webgl before to read pixels I ran into the issue of the image being flipped on some devices. Not sure why it wasn’t consistent. Anyways my solution was to check if the pixel data comes out flipped and then flip if needed. This would only need to be done once as the flipping was consistent. Anyways to do it i’d get the pixels from a 1x2 image with a white pixel over a black one. Then if the top read pixel was black we know the image was flipped, otherwise it wasn’t. That should be doable with the canvas too. Reading the image flipped should just be a matter of:

    RedAt(x, height-y)

    Anyways, Just an idea.

    -cheers

  • R0J0hound

    I haven't discovered the problem with the flipped image yet. Maybe because I don't paste anything to drawing canvas, just red channel snapshot after Advanced Random perlin noise is complete.

    But I will be aware of what you pointed out & I'll try your suggestion if necessary. Thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just in case, Update:

    The Z position is now read from the Array instead of Drawing Canvas SnapshotRedAt. Maybe this will help with the Z reading issue but for sure helps in terms of memory. Array is 30 MB with 2 decimals and Canvas snapshot was 80MB.

  • This is, once more, awesome! I especially like the daytime lighting changes - very moody!

    Array is way faster when it comes to reading data.

    I used canvas to store lighting data but it's slow if you want to extract data from a coordinate. Array is also way better to apply realtime data changes like lighting changes or terrain manipulation.

  • Thank you Colonel Justice

    Sky is just a ping pong snaphot img scroll:

    Hopefully this experiment goes further in our HUM game.

    Can't wait to see your next bigger project using new features!I remember your love to raycasters. Thanks for confirming the speed of the Array.

    Best

  • Very impressive ! Nice job!

  • Thank you Colonel Justice

    Sky is just a ping pong snaphot img scroll:

    Hopefully this experiment goes further in our HUM game.

    Can't wait to see your next bigger project using new features!I remember your love to raycasters. Thanks for confirming the speed of the Array.

    Best

    That's clever!

    I'm still working on the raycast engine, I managed to incorporate the algorithm and blend the 2D viewport layer on 3D layers. Like this I still can use 2D billboard sprites which can rotate, scale properly etc. One day in the far future, I will be satifsied :D

  • Colonel Justice

    I totally understand your determination but I personally gave up the massive ray shooting temporarily. Good luck with the hybrid raycaster!

  • Hi rufson what you did is actually amazing. Would you mind getting a little more into details regarding how you make the 3D Camera change its Z Height according to the Mesh of the terrain please? I'm also curious about the game you're working on and if you have manage to add jumping and if so, also how ^^ Thank you

  • lol great creation

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)