Hexel Raycasting - PlanetSmith Episode 10

Поділитися
Вставка
  • Опубліковано 1 лип 2024
  • Join our Discord to learn more: / discord
    Wishlist now on Steam: store.steampowered.com/app/25...
    Follow PlanetSmith on Kickstarter: www.kickstarter.com/projects/...
    Previous Episode: • Saving Worlds - Planet...
    In this episode I upgrade our mesh raycasting to Hexel raycasting.
  • Ігри

КОМЕНТАРІ • 113

  • @IncandescentGames
    @IncandescentGames  9 днів тому +25

    It has been a while since the last devlog! Hope you enjoy this one. I enjoyed making it and I have more explosive plans. Let me know what you think of the new video style and don't forget to join our discord if you want to be notified for the demo weekend! discord.gg/eSS2pYU7Nw

    • @Vanilama-modded
      @Vanilama-modded 8 днів тому +2

      Can you please add hexel outlines i can never see which hexel you're looking at.😢

    • @IncandescentGames
      @IncandescentGames  8 днів тому +4

      @@Vanilama-modded Coming soon!

  • @Paint_The_Future
    @Paint_The_Future 8 днів тому +72

    What are you when you build the Death Star laser in PlanetSmith?
    .
    .
    .
    .
    .
    PlanetSith.

  • @michaelchance6125
    @michaelchance6125 8 днів тому +70

    I'm glad you're actually focusing on performance first for a lot of things! My computer is an absolute potato so I was worried I wouldn't be able to play smoothly!

    • @IncandescentGames
      @IncandescentGames  8 днів тому +35

      Will be potato friendly for sure! Long term plan is to have a mobile version with some form of cross play. I love the idea of being able to log onto your pc world when out and about.

    • @michaelchance6125
      @michaelchance6125 8 днів тому +9

      @@IncandescentGames that actually sounds cool, that makes it better honestly if it can run on a phone then even my PC should run it.

    • @635574
      @635574 8 днів тому +4

      ​@@IncandescentGames Just dont get caught up in starting another platform before the game is mostly complete.

    • @henrycgs
      @henrycgs 8 днів тому +6

      @@IncandescentGames damn, a voxel game for mobile phones... in unity? that'd be one hell of a challenge.

    • @IncandescentGames
      @IncandescentGames  8 днів тому +6

      We are a few years away but its defintaly possible. Game is highly performant especialy when texture quality is reduced from 512x512 per block.

  • @cidjo3525
    @cidjo3525 8 днів тому +36

    At 2:43, I really like that the background for the code explanation is a screenshot from the game and not only a plain dark color. feels more appropriate for the game :)

  • @NICK....
    @NICK.... 8 днів тому +18

    the speed at which the world updates is pretty impressive

  • @Nyquil98
    @Nyquil98 8 днів тому +8

    If we eventually have space travel in this game, the laser would be a really cool late game weapon/tool to be able to build into your ship

  • @tungsten8or
    @tungsten8or 8 днів тому +25

    WE JUST GONNA IGNORE THAT ABSOLUTELY BEAUTIFUL MESA GENERATION? oml, stunning

    • @IncandescentGames
      @IncandescentGames  8 днів тому +5

      Thanks! Currently it has a bad seams with other chunks but sometimes it can look good, just needs more work.

    • @tungsten8or
      @tungsten8or 8 днів тому +2

      @@IncandescentGames chunk borders seem like a pain for most biomes tho right?

  • @mangoes1012
    @mangoes1012 8 днів тому +16

    One thing I've noticed in these devlogs is that the player movement looks very jerky and the jump seems floaty as well. Maybe some player movement updates would be helpful before a demo release. Great video

    • @IncandescentGames
      @IncandescentGames  8 днів тому +8

      Definatly, it one of the main things i need to do before the demo weekend. It was thrown together orignaly just so it was good enough to test the world.

    • @Maxmaxs5
      @Maxmaxs5 6 днів тому

      Agreed, stuff is looking so awesome, but I do feel the movement and feeling when placing blocks feels off somehow. I believe in you!

    • @SuperFart1000
      @SuperFart1000 5 днів тому

      When is the demo

  • @blakehagins3069
    @blakehagins3069 8 днів тому +12

    WOW!!!! I cannot believe that laser runs so smoothly. The performance of this game is astounding. Great work :)

  • @allofitatoz5930
    @allofitatoz5930 8 днів тому +5

    The laser beam thing could be a fun way to mine in space in the later game

  • @nega-guy
    @nega-guy 8 днів тому +8

    Excellent job! I'm in the hopes this project doesn't go down as many other minecraft clone projects and fail, this one has future and I see it. Keep working on it and it could turn out to be surprisingly popular! But that's just my theory. Cheers.

    • @IncandescentGames
      @IncandescentGames  8 днів тому +5

      Yes, we don't have any technical blockers we just need to grow as a community for PlanetSmith to be a success.

  • @dialog_box
    @dialog_box 8 днів тому +12

    1:00 of course voxel just means volumetric pixel (which in turn just means picture element) so i feel like the hexagonal blocks of planetsmith could still accurately be called voxels. but hexel is fun too

  • @SandwichGamesHeavy
    @SandwichGamesHeavy 8 днів тому +5

    Nice! An Idea: A weeled drill that allows you to drill through terrain, using this new technique!

  • @ziggyzoggin
    @ziggyzoggin 8 днів тому +6

    Nice! I love the look of the death laser, and I'm super excited for the demo weekend!

  • @beholdergamedesign
    @beholdergamedesign 8 днів тому +4

    I'm frankly shocked at how performant you got this using such an inefficient raycast system. But congrats, it's looking great!

  • @mrdoctor175
    @mrdoctor175 8 днів тому +2

    This is absolutely huge! This makes me genuinely excited for the project, can't wait for the next devlog!

  • @samuelthecamel
    @samuelthecamel 7 днів тому +3

    Now that you've got proper raycasting, you can implement explosives!

  • @stickguy9109
    @stickguy9109 8 днів тому +2

    You should totally keep the death laser in the final game. Maybe as a creative mode tool it looks so satisfying.

    • @IncandescentGames
      @IncandescentGames  8 днів тому +1

      Yeh. Feels a bit powerful for survival but a tonned down version could be good.

  • @evanofthe711
    @evanofthe711 8 днів тому +1

    Idea : rings for planets / moons possibly? , I just really like the idea of having rings on your world and how cool they would look at night

  • @CraftyMCFish
    @CraftyMCFish 8 днів тому +2

    In my opinion I think the interaction should remain the same way, with being able to place through fences etc. As soon as you did that I was like "Woah thats so awesome I wish minecraft did that" then you said you might change it lol.

  • @biomerl
    @biomerl 6 днів тому +1

    Spore space mode with this would kick ass

  • @NeuralSensei
    @NeuralSensei 8 днів тому +1

    There's sthis revolutionary GI tech invented for PoE2 which might work for you too, and it has shocking performance, basically reinventing lighting, Radiance Cascades. It can be made both in screen space and world space, the PoE example is screen space because that's good enough for an isometric game.

  • @bLindWebber
    @bLindWebber 7 днів тому +1

    This gets crazier and crazier. Kudos to you and your perseverance! :D

  • @vystaz
    @vystaz 8 днів тому +3

    you can't show us a laser without showing us you burning a hole through the entire world!

    • @IncandescentGames
      @IncandescentGames  8 днів тому +4

      No blocks in the center. World is a crust (think of it like earths crust), I talk about why in the other logs.

  • @ocks_dev_vlogs
    @ocks_dev_vlogs 8 днів тому +2

    an ideas for the double mesh method, so long as the ray mesh and player collision mesh are the same, all you would need is two bits and one mesh data. The first bit toggles it’s use for player collision and the second bit toggles it’s use for the ray. You wouldn’t need to actually store an secondary mesh unless the raycast mesh was different from the collision mesh (which it probably shouldn’t be)

  • @montageofchips9704
    @montageofchips9704 8 днів тому +3

    sacrifice to the algorithm (great vid)

  • @Verosment
    @Verosment 7 днів тому +1

    i think it would be cool to have a colored block that can be changed to any color hex value. I'm not sure how it would work in survival game mode setting, but it could be a great building block for building in a creative mode

  • @iLOLZU42
    @iLOLZU42 8 днів тому +2

    6:28 I cant believe you called the quadratic formula *'this'* equation.

  • @therealdnold
    @therealdnold 8 днів тому +1

    This looks amazing I enjoy your little explanations, I am thrilled to see more

  • @brandonmack111
    @brandonmack111 8 днів тому +1

    I kinda hope now that a much more balanced version of that laser makes it into the actual game

  • @Queezz
    @Queezz 8 днів тому +2

    Amazing work!

  • @EmilMacko
    @EmilMacko 8 днів тому +1

    Might be worth using a GPU buffer/texture where you render all the hexels' positions (either world-space or per chunk?) and then your raycast would just need to be a texture look-up. Hell, you wouldn't even need to render the entire screen, only like a 16x16 texture or less of the center of the screen where the crosshair is. This would eliminate issues with stair hexels and other odd-shaped hexels. For things like grass and flowers, you could render the untextured plane instead so it would be easier to raycast with.

    • @IncandescentGames
      @IncandescentGames  7 днів тому +1

      Problem is that prevents raycasting against culled blocks making the laser imposible, also this method is super easy to calculate its blisteringly fast

  • @erick6194
    @erick6194 8 днів тому +2

    Neat editing work! The video looks super smooth and i even got to understand code stuff that i wouldn't even try to get before

  • @Random_Games601
    @Random_Games601 18 годин тому +1

    I've been watching since part 1🎉🎉🎉

  • @DevJorvan
    @DevJorvan 7 днів тому +1

    As usual, awesome job, mate 🤝

  • @lemonlordminecraft
    @lemonlordminecraft 6 днів тому

    Oh shit! You got Frost (Seb Ruiz) on your youtube members. Looks like the folks at Second Wind are keeping an eye on you!

  • @TimmyGC
    @TimmyGC 22 години тому

    6:59 you probably already though of this, but since the stair blocks are facing corners, you could set it to position with the back to the nearest corner. That would make placement here easier while still allowing the other corner to be placed against.
    But I kinda suspect that's what you're about to make possible now with this ray stuff, so I'll watch the rest of the vid now.

  • @danielbodon14
    @danielbodon14 8 днів тому +2

    that is very nice video editing)

  • @emanekaf1
    @emanekaf1 9 днів тому +3

    Hexels is honestly also a 😊 is name for the game

  • @tommith.
    @tommith. 8 днів тому +1

    11:08 I CAN SEE THE NETHER YAY ik its the laser light im just so excited for this game and the nether

    • @IncandescentGames
      @IncandescentGames  8 днів тому

      Actually its a bug with the volumetric atmospehre lol (its on my todo list but not a priority currently)

    • @tommith.
      @tommith. 8 днів тому

      ​@@IncandescentGames thanks for the reply i hope development gose gose well and have a good day

  • @OneMonthStudio
    @OneMonthStudio 4 дні тому +1

    There needs to be a "highlight" around the block that you're interacting with (like in Minecraft), or a preview of where the block you're placing will go. Right now it looks really difficult to know where you're digging and where the block is placed.

  • @sxs512
    @sxs512 8 днів тому +2

    Whilethe laser is cool if you look closer the blocks there is a visible delay. I assume that's because of the low amount of world update ticks. You've said there's only 20 per second. Upping that to at least 30 could help.

    • @IncandescentGames
      @IncandescentGames  8 днів тому

      yeh that's something i will play with when everything is working. Its just a number so easy to change. I have lots on plans that will effect this.

    • @sxs512
      @sxs512 8 днів тому

      @@IncandescentGames Yeah, I'm a game dev myself, so I get it. I of course don't know the exact details of your implementation, but many games use a queue and apply those changes on a separate thread to handle them as fast as possible while not blocking the main thread. That makes the delay only happen if that thread can't catch up to the changes.
      Multithreading in unity isn't something I have a lot of experience in, so not sure how hard that'd be. I know of a library called "UniTask" that pretty much replaces coroutines and allows you to use the c# async syntax. It also has mechanisms to run on separate threads and is zero alloc.
      Might be worth checking it out.

  • @exciting-burp
    @exciting-burp 8 днів тому

    Merely because you may need it later: the usual method for different types of collisions is collision masks, or collision groups. I'm not sure if Unity has them but I would be incredibly surprised if it didn't. Either way, it should be a matter of assigning each face to a group/mask while building the mesh, and that becomes a single integer per face (which is probably already being stored by unity anyway) instead of a whole new mesh.

    • @IncandescentGames
      @IncandescentGames  8 днів тому +1

      True you can, I could, but this still has the issue where it doesn't work for blocks that are not meshed at all because they are behind another block and are culled. Also i plan to make it so there are no collison meshes as this is currently the bigest bottleneck. (by a lot)

  • @deserttortoise21
    @deserttortoise21 5 годин тому +1

    Speaking of destruction, will you ever be able to figure out how to allow the player to mine all the way through the planet? I know you mentioned that you have a layer of "bedrock" because as you get closer to the center of the planet, the hexagons get thinner and thinner, so why not just make the layers that become too thin for the player to fit hollow?

  • @omayoperations8423
    @omayoperations8423 8 днів тому +1

    It's a shame you aren't gonna be able to go to the center of the planet. Makes sense though, since that would be a hastle, and the way it works with the hexels would have to fundamentally change in order for them to not just be a twig.

  • @andrewkovnat
    @andrewkovnat 8 днів тому +2

    The speech is pretty slow in this video. It's only 12 minutes long but you can save some time by putting it to 2.0x speed.

  • @valedesardi6252
    @valedesardi6252 7 днів тому +1

    Very very amazing🤩I can't wait to play this game. Just one question: will the final game have something like redstone in mc?

  • @krajsyboys
    @krajsyboys 8 днів тому +1

    Really cool progress!
    I'm wondering if there was any issues with the raycasting calculations around the pentagons within some chunks, and if so, how you solved that.
    Also, it would be cool to see if you could generate planets which are "inside out", so it's hollow but the inside edge has trees and grass growing upside down. (I understand some blocks would be difficult because of how they might work such as grass blocks, but I'd love to see it anyway xd)

    • @IncandescentGames
      @IncandescentGames  8 днів тому +1

      Inside out planets would work! And yes your right to be worried about the pentagons... currently they can't be raycasted but its not a big issue i just havent written the code for it yet, its no more complex just difrent and wasn't a priority for this video.

    • @krajsyboys
      @krajsyboys 8 днів тому

      @@IncandescentGames That's fair. I think we have all done a few "Ehh, I'll fix it later" moments haha

  • @flameofthephoenix8395
    @flameofthephoenix8395 7 днів тому

    3:24 Hm, another potential method you could use to determine which block the player is trying to interact with would be to find the block that has the lowest score calculated by (Nearest pixel to cursor distance plus one)*(Block depth), if something is far away it is less likely to be chosen, if the nearest pixel from that block is far away from the mouse it is also less likely to be chosen, however, finding the nearest pixel of each block to the mouse pointer would be extremely slow. This would be pretty much infeasible, but it's worth a shot as it would ensure you don't have really awkward collision like Minecraft, in what world am I trying to hit the tall grass when I very clearly had my cursor on the other block behind it?

  • @Wolfboy607
    @Wolfboy607 8 днів тому +2

    The stair block is really bothering me. I haven't tested every possible use case, but isn't a stair step cut corner to corner significantly more versatile than the ones cut as they are, edge to edge? You could then make rings or curves, and straight stairs would just have the rounded character that all the hills have. Part of "the aesthetic". Perhaps both sets of stairs to allow 12 directions of stairs, that would be sick.

    • @IncandescentGames
      @IncandescentGames  8 днів тому

      Stairs are half baked currently need a lot of work still. I have a redesign i talked about in a livestream it will remove the flat faces and get them to connect when appropriate. On my TODO list and that's half done but not currently working on it.

  • @bread6851
    @bread6851 8 днів тому +2

    i love this and have since around EP1 or 2 but cant help but notice that the player movement seems a little jittery? Possibly because the player is being moved every game tick instead of frame. I really can't tell if this is an issue though and if its not i am sorry for making you check.

    • @IncandescentGames
      @IncandescentGames  8 днів тому

      Character controler is something i threw in just so i could explore. Its the next thing on my todo list!

  • @nessthecat
    @nessthecat 8 днів тому +2

    Have you put any thought into the possibility of semi procedurally generated animals/enemies for other planets. Like, make the first planet always earth like, so Earth based animals/enemies, but on other worlds, get a little more out there with it, one more interesting reason for people to explore further, maybe bring their new weird animal friends home? -V

    • @IncandescentGames
      @IncandescentGames  8 днів тому +1

      I haven't. Doesn't make sense for my imidate plans, but does for some future ones!

  • @SbastianLuna
    @SbastianLuna 9 днів тому +4

    🫂

  • @andrewkovnat
    @andrewkovnat 8 днів тому +2

    Holy moses your voice was very quiet!

  • @RobertLedesma-yk5po
    @RobertLedesma-yk5po 8 днів тому +2

    Can you please add a giant sand worm in the desert region like in dune?

  • @flameofthephoenix8395
    @flameofthephoenix8395 7 днів тому

    1:37 Hm, you should be able to get away with moving a few hexels into the future with more standard grid calculations ignoring the spherical warping before having to perform a check to make sure the ray didn't stray too far from the actual hexel it is meant to be on.

  • @TerranSpacePolice
    @TerranSpacePolice 8 днів тому +2

    please say those are copies of the amazing builds being destroyed at the end of the vid

  • @geokou7645
    @geokou7645 3 дні тому +2

    Erm, why are you using 4 co-ordinates? What is W?

    • @IncandescentGames
      @IncandescentGames  3 дні тому +1

      It's used to so the coordinates work on a sphere. Think of it as an extra dimension for the linking of areas

    • @geokou7645
      @geokou7645 3 дні тому

      @@IncandescentGames ah ok

  • @chri-k
    @chri-k 6 днів тому

    I wonder how possible it is to do this using rhombic dodecahedra for the blocks and allowing completely exposed vertices to be truncated.
    ( or do something similar with cuboctahedra, but i haven't thought that one out yet )
    Sounds like an absolute pain to implement but i've been meaning to try it for forever now, just need to get other stuff out of the way
    The biggest problem i see is having to deal with hexagonal co-ordinates on the GPU somehow and then actually making it efficient
    But if you can render 5D space on a GPU and not have it explode, surely you can do this

  • @Lastered
    @Lastered 8 днів тому

    For raycasting onto objects which don't collide with the player, why didn't you utilize Unity's layer collision matrix?
    That way the player layer doesn't collide with a non-collidable hexel (such as foliage) and the raycast can still hit its collider?

    • @IncandescentGames
      @IncandescentGames  8 днів тому +1

      You still have the problem that culled hexels don't exist in the world. Also this method is a lot faster! I plan to remove collision meshes completely soon!

  • @NICK....
    @NICK.... 8 днів тому +1

    :3

  • @Akira-Aerins
    @Akira-Aerins 7 днів тому

    Yo! to anyone in the comments, I'm looking to bring three of my favorite games back into playable states, by making my own versions. very simple games, but I have zero experience and could use a slight but of guidance.

  • @tirkentube
    @tirkentube 7 днів тому +1

    you never showed what happens now whenever you try to remove a water block, and, importantly, if you lose the functionality of removing a block on the other side of a water block, which is a useful feature for say, draining pools, or creating a river, or making a river deeper, especially if when removing a water block is instantly replaced by the water around that block, such as in terraria and (i believe?) minecraft.

    • @IncandescentGames
      @IncandescentGames  7 днів тому

      At the minute it just removes the water block, but in the future i will make it tool dependent (ie you need a bucket or whatever tool i decide to use) outerwise it will remove the block below like in MC. Water doesn't flow yet either its just a transparent block.

  • @gsestream
    @gsestream 7 днів тому

    calculate radiance for each triangle (voxel) surface async, for example using cubemap view (6x projected camera) either with raster or equivalent ray tracing, for recursive diffuse lighting bounces nice and complex? not if you use normal free orientation triangles as the voxels. so why not automatically calculate a default sphere collision mesh for all objects. that default collision mesh is only for rough first check, you can do accurate collisions then with the triangles. prevents excessive triangle-triangle (pixel-pixel) testing. so why are you not updating the voxels block immediately after edit. queue why. there are some major data structure design issues going on here. spherical coordinates are not worth the hassle logical complexity, keep it rectangular. no matter if the original triangles are generated in spherical coordinates, the most simple is to the results coordinates be in cartesian coordinate system. even if game logic is in spherical coordinates. for graphics gpu reasons. triangles for everyone, no reason to need to resort to different systems for different stuff. design to prevent head-aches.

  • @UltimatePerfection
    @UltimatePerfection 7 днів тому

    Why hexels and not more classic voxels?

    • @IncandescentGames
      @IncandescentGames  6 днів тому

      You can't make a seamless spherical planet with cubes

    • @UltimatePerfection
      @UltimatePerfection 6 днів тому

      @@IncandescentGames You can, if you have them march instead of being in the same place.

    • @IncandescentGames
      @IncandescentGames  2 дні тому

      @@UltimatePerfection you can't make a sphere no matter what you try as squares have zero guassian curvature. You can make a donut though that apears to be a sphere when on the surface.

    • @UltimatePerfection
      @UltimatePerfection 2 дні тому

      @@IncandescentGames Blender: Add mesh -> UV Sphere.
      You were saying?
      Also, Marching Cubes and Dual Contouring say hi.

    • @IncandescentGames
      @IncandescentGames  4 години тому

      ​@@UltimatePerfection watch devlog video one, UV sphere have huge distrotion. At the seams they look more like triangles than cubes (from the side not top down) Everything you build would look weird!

  • @thechh8297
    @thechh8297 8 днів тому

    What happens when you fly through the planets core? How does everything orient as you get close to the centre of everything? Also, it would be an interesting fast travel method to jump into a hole through to the other side of the planet, fall and accelerate through the planets core, then be slowed as you pass the core until you safely pop up on the other side of the planet. it would also be funny if you could get stuck in the core and become soft locked with no way out of the simulated gravity well.
    Mining the planets core could also be an interesting game mechanic, if you made a crystal or something at the very centre. What happens when you take the planets core? Game over? Portal to another dimension? Or it allows you to fly into space to build a new planet? Achievement unlocked?