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.
  • เกม

ความคิดเห็น • 106

  • @IncandescentGames
    @IncandescentGames  6 วันที่ผ่านมา +24

    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 5 วันที่ผ่านมา +2

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา +4

      @@Vanilama-modded Coming soon!

  • @Paint_The_Future
    @Paint_The_Future 5 วันที่ผ่านมา +72

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

  • @michaelchance6125
    @michaelchance6125 5 วันที่ผ่านมา +68

    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  5 วันที่ผ่านมา +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 5 วันที่ผ่านมา +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 5 วันที่ผ่านมา +4

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

    • @henrycgs
      @henrycgs 5 วันที่ผ่านมา +6

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา +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 5 วันที่ผ่านมา +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.... 5 วันที่ผ่านมา +18

    the speed at which the world updates is pretty impressive

  • @tungsten8or
    @tungsten8or 5 วันที่ผ่านมา +25

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา +5

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

    • @tungsten8or
      @tungsten8or 5 วันที่ผ่านมา +2

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

  • @mangoes1012
    @mangoes1012 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา +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 3 วันที่ผ่านมา

      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 2 วันที่ผ่านมา

      When is the demo

  • @blakehagins3069
    @blakehagins3069 5 วันที่ผ่านมา +12

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

  • @Nyquil98
    @Nyquil98 5 วันที่ผ่านมา +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

  • @nega-guy
    @nega-guy 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา +5

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

  • @allofitatoz5930
    @allofitatoz5930 5 วันที่ผ่านมา +5

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

  • @ziggyzoggin
    @ziggyzoggin 5 วันที่ผ่านมา +6

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

  • @mrdoctor175
    @mrdoctor175 5 วันที่ผ่านมา +2

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

  • @bLindWebber
    @bLindWebber 4 วันที่ผ่านมา +1

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

  • @SandwichGamesHeavy
    @SandwichGamesHeavy 5 วันที่ผ่านมา +5

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

  • @dialog_box
    @dialog_box 5 วันที่ผ่านมา +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

  • @therealdnold
    @therealdnold 4 วันที่ผ่านมา +1

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

  • @Queezz
    @Queezz 5 วันที่ผ่านมา +2

    Amazing work!

  • @beholdergamedesign
    @beholdergamedesign 5 วันที่ผ่านมา +4

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

  • @samuelthecamel
    @samuelthecamel 4 วันที่ผ่านมา +3

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

    • @IncandescentGames
      @IncandescentGames  3 วันที่ผ่านมา +3

      Sounds like you saw the script for the next video

  • @montageofchips9704
    @montageofchips9704 5 วันที่ผ่านมา +3

    sacrifice to the algorithm (great vid)

  • @DevJorvan
    @DevJorvan 4 วันที่ผ่านมา +1

    As usual, awesome job, mate 🤝

  • @erick6194
    @erick6194 5 วันที่ผ่านมา +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

  • @stickguy9109
    @stickguy9109 5 วันที่ผ่านมา +2

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา +1

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

  • @ocks_dev_vlogs
    @ocks_dev_vlogs 5 วันที่ผ่านมา +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)

  • @biomerl
    @biomerl 3 วันที่ผ่านมา +1

    Spore space mode with this would kick ass

  • @CraftyMCFish
    @CraftyMCFish 5 วันที่ผ่านมา +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.

  • @danielbodon14
    @danielbodon14 5 วันที่ผ่านมา +2

    that is very nice video editing)

  • @vystaz
    @vystaz 5 วันที่ผ่านมา +3

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา +4

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

  • @evanofthe711
    @evanofthe711 4 วันที่ผ่านมา +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

  • @NeuralSensei
    @NeuralSensei 4 วันที่ผ่านมา +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.

  • @Verosment
    @Verosment 4 วันที่ผ่านมา +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 5 วันที่ผ่านมา +2

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

    • @IncandescentGames
      @IncandescentGames  5 วันที่ผ่านมา

      Yeah... probaly should have named it!

  • @EmilMacko
    @EmilMacko 4 วันที่ผ่านมา +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  4 วันที่ผ่านมา +1

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

  • @brandonmack111
    @brandonmack111 5 วันที่ผ่านมา +1

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

  • @lemonlordminecraft
    @lemonlordminecraft 3 วันที่ผ่านมา

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

  • @emanekaf1
    @emanekaf1 5 วันที่ผ่านมา +3

    Hexels is honestly also a 😊 is name for the game

  • @OneMonthStudio
    @OneMonthStudio วันที่ผ่านมา +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.

  • @andrewkovnat
    @andrewkovnat 5 วันที่ผ่านมา +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.

  • @tommith.
    @tommith. 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา

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

    • @tommith.
      @tommith. 5 วันที่ผ่านมา

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

  • @sxs512
    @sxs512 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา

      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 5 วันที่ผ่านมา

      @@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.

  • @omayoperations8423
    @omayoperations8423 5 วันที่ผ่านมา +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.

  • @exciting-burp6613
    @exciting-burp6613 5 วันที่ผ่านมา

    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  5 วันที่ผ่านมา +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)

  • @Wolfboy607
    @Wolfboy607 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา

      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 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา

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

  • @flameofthephoenix8395
    @flameofthephoenix8395 4 วันที่ผ่านมา

    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?

  • @nessthecat
    @nessthecat 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา +1

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

  • @krajsyboys
    @krajsyboys 5 วันที่ผ่านมา +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  5 วันที่ผ่านมา +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 5 วันที่ผ่านมา

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

  • @valedesardi6252
    @valedesardi6252 4 วันที่ผ่านมา +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?

    • @IncandescentGames
      @IncandescentGames  4 วันที่ผ่านมา +1

      Probaly but likely difrent rules

    • @valedesardi6252
      @valedesardi6252 4 วันที่ผ่านมา

      @@IncandescentGames Jippiiiiii🤩

  • @andrewkovnat
    @andrewkovnat 5 วันที่ผ่านมา +2

    Holy moses your voice was very quiet!

  • @RobertLedesma-yk5po
    @RobertLedesma-yk5po 5 วันที่ผ่านมา +2

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

  • @NICK....
    @NICK.... 5 วันที่ผ่านมา +1

    :3

  • @flameofthephoenix8395
    @flameofthephoenix8395 4 วันที่ผ่านมา

    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.

  • @SbastianLuna
    @SbastianLuna 6 วันที่ผ่านมา +4

    🫂

  • @chri-k
    @chri-k 3 วันที่ผ่านมา

    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

  • @TerranSpacePolice
    @TerranSpacePolice 4 วันที่ผ่านมา +2

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

  • @Lastered
    @Lastered 5 วันที่ผ่านมา

    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  5 วันที่ผ่านมา +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!

  • @geokou7645
    @geokou7645 14 ชั่วโมงที่ผ่านมา +2

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

    • @IncandescentGames
      @IncandescentGames  ชั่วโมงที่ผ่านมา +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 37 นาทีที่ผ่านมา

      @@IncandescentGames ah ok

  • @tirkentube
    @tirkentube 4 วันที่ผ่านมา +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  4 วันที่ผ่านมา

      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.

  • @Akira-Aerins
    @Akira-Aerins 3 วันที่ผ่านมา

    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.

  • @UltimatePerfection
    @UltimatePerfection 3 วันที่ผ่านมา

    Why hexels and not more classic voxels?

    • @IncandescentGames
      @IncandescentGames  3 วันที่ผ่านมา

      You can't make a seamless spherical planet with cubes

    • @UltimatePerfection
      @UltimatePerfection 3 วันที่ผ่านมา

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

  • @gsestream
    @gsestream 4 วันที่ผ่านมา

    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.

  • @thechh8297
    @thechh8297 4 วันที่ผ่านมา

    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?