Hexel Raycasting - PlanetSmith Episode 10

Ойындар

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.

Пікірлер: 100

  • @IncandescentGames
    @IncandescentGames3 күн бұрын

    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

    2 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

    @@Vanilama-modded Coming soon!

  • @Paint_The_Future
    @Paint_The_Future2 күн бұрын

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

  • @everybodyants

    @everybodyants

    2 күн бұрын

    Dad humour

  • @michaelchance6125
    @michaelchance61252 күн бұрын

    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

    2 күн бұрын

    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

    2 күн бұрын

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

    2 күн бұрын

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

  • @henrycgs

    @henrycgs

    2 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

    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
    @cidjo35252 күн бұрын

    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....2 күн бұрын

    the speed at which the world updates is pretty impressive

  • @tungsten8or
    @tungsten8or2 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

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

  • @tungsten8or

    @tungsten8or

    2 күн бұрын

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

  • @blakehagins3069
    @blakehagins30692 күн бұрын

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

  • @mangoes1012
    @mangoes10122 күн бұрын

    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

    2 күн бұрын

    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

    22 сағат бұрын

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

  • @Nyquil98
    @Nyquil982 күн бұрын

    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

  • @allofitatoz5930
    @allofitatoz59302 күн бұрын

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

  • @SandwichGamesHeavy
    @SandwichGamesHeavy2 күн бұрын

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

  • @nega-guy
    @nega-guy2 күн бұрын

    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

    2 күн бұрын

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

  • @ziggyzoggin
    @ziggyzoggin2 күн бұрын

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

  • @mrdoctor175
    @mrdoctor1752 күн бұрын

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

  • @dialog_box
    @dialog_box2 күн бұрын

    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

  • @bLindWebber
    @bLindWebber2 күн бұрын

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

  • @vystaz
    @vystaz2 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

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

  • @beholdergamedesign
    @beholdergamedesign2 күн бұрын

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

  • @biomerl
    @biomerlКүн бұрын

    Spore space mode with this would kick ass

  • @evanofthe711
    @evanofthe7112 күн бұрын

    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

  • @stickguy9109
    @stickguy91092 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

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

  • @ocks_dev_vlogs
    @ocks_dev_vlogs2 күн бұрын

    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)

  • @therealdnold
    @therealdnold2 күн бұрын

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

  • @samuelthecamel
    @samuelthecamelКүн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    Күн бұрын

    Sounds like you saw the script for the next video

  • @Verosment
    @VerosmentКүн бұрын

    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

  • @NeuralSensei
    @NeuralSensei2 күн бұрын

    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.

  • @iLOLZU42
    @iLOLZU422 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    2 күн бұрын

    Yeah... probaly should have named it!

  • @CraftyMCFish
    @CraftyMCFish2 күн бұрын

    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.

  • @brandonmack111
    @brandonmack1112 күн бұрын

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

  • @montageofchips9704
    @montageofchips97042 күн бұрын

    sacrifice to the algorithm (great vid)

  • @DevJorvan
    @DevJorvan2 күн бұрын

    As usual, awesome job, mate 🤝

  • @lemonlordminecraft
    @lemonlordminecraft18 сағат бұрын

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

  • @erick6194
    @erick61942 күн бұрын

    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

  • @Queezz
    @Queezz2 күн бұрын

    Amazing work!

  • @emanekaf1
    @emanekaf13 күн бұрын

    Hexels is honestly also a 😊 is name for the game

  • @EmilMacko
    @EmilMacko2 күн бұрын

    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

    Күн бұрын

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

  • @danielbodon14
    @danielbodon142 күн бұрын

    that is very nice video editing)

  • @bread6851
    @bread68512 күн бұрын

    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

    2 күн бұрын

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

  • @andrewkovnat
    @andrewkovnat2 күн бұрын

    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.

  • @omayoperations8423
    @omayoperations84232 күн бұрын

    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.

  • @Wolfboy607
    @Wolfboy6072 күн бұрын

    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

    2 күн бұрын

    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.

  • @tommith.
    @tommith.2 күн бұрын

    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

    2 күн бұрын

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

  • @tommith.

    @tommith.

    2 күн бұрын

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

  • @sxs512
    @sxs5122 күн бұрын

    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

    2 күн бұрын

    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

    2 күн бұрын

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

  • @andrewkovnat
    @andrewkovnat2 күн бұрын

    Holy moses your voice was very quiet!

  • @RobertLedesma-yk5po
    @RobertLedesma-yk5po2 күн бұрын

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

  • @flameofthephoenix8395
    @flameofthephoenix8395Күн бұрын

    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
    @nessthecat2 күн бұрын

    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

    2 күн бұрын

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

  • @exciting-burp6613
    @exciting-burp66132 күн бұрын

    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

    2 күн бұрын

    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)

  • @krajsyboys
    @krajsyboys2 күн бұрын

    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

    2 күн бұрын

    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

    2 күн бұрын

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

  • @valedesardi6252
    @valedesardi62522 күн бұрын

    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

    Күн бұрын

    Probaly but likely difrent rules

  • @valedesardi6252

    @valedesardi6252

    Күн бұрын

    @@IncandescentGames Jippiiiiii🤩

  • @chri-k
    @chri-kКүн бұрын

    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

  • @SbastianLuna
    @SbastianLuna3 күн бұрын

    🫂

  • @TerranSpacePolice
    @TerranSpacePolice2 күн бұрын

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

  • @IncandescentGames

    @IncandescentGames

    Күн бұрын

    Yes they are!

  • @flameofthephoenix8395
    @flameofthephoenix8395Күн бұрын

    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.

  • @Lastered
    @Lastered2 күн бұрын

    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

    2 күн бұрын

    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!

  • @tirkentube
    @tirkentubeКүн бұрын

    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

    Күн бұрын

    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.

  • @NICK....
    @NICK....2 күн бұрын

    :3

  • @UltimatePerfection
    @UltimatePerfectionКүн бұрын

    Why hexels and not more classic voxels?

  • @IncandescentGames

    @IncandescentGames

    17 сағат бұрын

    You can't make a seamless spherical planet with cubes

  • @UltimatePerfection

    @UltimatePerfection

    17 сағат бұрын

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

  • @Akira-Aerins
    @Akira-AerinsКүн бұрын

    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.

  • @gsestream
    @gsestream2 күн бұрын

    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
    @thechh82972 күн бұрын

    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?

Келесі