Implementing Viewer Suggestions in my City-Builder

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome back to my journey of creating a city builder game from scratch using my own engine and today i'm going to be doing another day in the life video and i'm also going to be implementing some of the feedback i got about the roads in the last devlog video so it's 7 40 in the morning right now still very dark and gloomy outside um i'm not getting started with work just yet i'm gonna have some breakfast first then i always have a few chores to do in the morning and um i'll aim to start programming at around nine-ish [Music] so i'm ready to get started with some programming now just finished off all my chores for the day watered the plants walked the dog answered some emails and i'm ready to get started now so the plan for today is to work through some of the feedback i got after the last devlog video about the road updates and uh the road placement tools so i'm gonna get started with that and i'll show you what i'm working on in a bit [Music] so starting off today with a quick change to the placement tool so as i showed you last week a road can bend two ways it can bend either this way when you're placing it or it can bend this way and the way that it bends just depends on which direction you go from the start tile so you can choose which way it bends however in some situations it only really makes sense for the road to bend one way so for example if i'm building a road from here to here this is the only way that it really makes sense for the road to bend it doesn't really make sense for it to bend this way because then it's going over that road at the top but sometimes what happens is that when you're building a road you go too fast and you go the wrong direction from the start tile and this ends up happening and it just feels wrong it feels like it shouldn't be happening so i've just made a quick change to the placement code and added a check and to see whether one way makes more sense to bend than the other way so now even if you go the wrong way from the start it knows that the road should really be bending this way after the last devlog video i got a lot of suggestions regarding the issue i was having with the ugly seams between the road tiles and a few people suggested something that i think would actually fix it quite easily which is to use an array texture instead of a texture atlas if you remember the issue last time came from me having to use the modulo operation to calculate the texture coordinates which i had to do because when using a texture atlas you need to have the exact texture coordinates but if i use an array texture instead then i can straight up just use the vertex positions as the texture coordinates along with gl repeat so no need to mod anything which means no problem so thanks a lot to those people who suggested that as i mentioned last time i do actually plan to use a completely different technique for rendering the road markings anyway and that is still the plan but i've never actually used array textures before and i'd quite like to learn about them so i thought this would be a good opportunity to do that so right now i'm just reading up about them and in a bit i'm going to try implementing them and see if i can fix that issue 20 to 12 now i'm still just working on the array texture stuff i haven't quite got it working yet and i'm thinking i might actually leave it till tomorrow so so i can get some other stuff done today um but something i can show you is something i implemented last week which was some changes to the delete tool so in the game previously to delete stuff you had to click on every tile individually which was obviously very tedious so like i did with the road placement tool i added a click and drag option so that you can now delete large areas of the world um at a time and i'm not really happy with the visuals of this yet i don't really like the the big square pattern it creates um so i'll work on that at some point but for now i just wanted to get that functionality into the game so i'm just going to take a quick break now i'm planning to make some homemade pasta for lunch and to do that i need to make the dough now so that it has time to rest in time for lunch so i'll get that done now and then i'll probably have a bit more time to do some programming before i have my lunch [Music] one more quick update before lunch so in the last video you might have seen that i added an animation to the placing of the roads and a few people pointed out that it looked a little bit strange because the road starts first at ground level then goes up and then does the bounce and they suggested quite rightly that it would look better if the road started in the air and then just fell to the ground and did the bounce so i changed the easing function a bit it was literally just this one line here to shift it um all a bit to the to the right so the left and that now looks i think a lot nicer the roads just kind of fall to the ground in a cascade so that's all good and it's time to have some lunch [Music] this afternoon i'm working on a new mode for the road placement tool so in the last video you saw me create this placement tool here which allows you to drag out long sections of road and that's great for creating these long straight roads but a few people mentioned that it might be nice to also have another mode which allows you to kind of draw the road onto the world so that every tile that your mouse cursor goes over has a road added to it and that's what i've got started working on here so you can see you can click and hold and then you can kind of draw the roads and then you let go of the mouse button to place it or you can right click to cancel the placement so i know it looks like this is already pretty much done but all that's happening at the moment is that every time the cursor goes over a new square a road gets added to that square it doesn't matter if there's a house there if there's already a road there or anything so it's very basic right now and obviously needs a lot more work just been working on a new feature for this new placement mode which is that when you're drawing your roads if at any point you make a mistake and you want to redo it you can just kind of retrace your steps and that allows you to redo that part of the road so you can pretty much retrace as much as you want so you can basically edit the road as you're making it um without having to cancel and start again so that's good i'm going to take another quick break now i just want to get outside enjoy the sun before it disappears and go for a bike ride [Music] back to work on the road placement and i've just been sorting out how it interacts with other roads so you can see you can go across them without any problems now just ignores them and it can actually also self-intersect without any issues so all that i've got to do now is to sort out how it interacts with other objects because that's not good and i also need to sort out invalid road placements because this also isn't good [Music] so you've just been fixing how the road placement works with obstacles so if it comes across an obstacle it now stops and it won't continue until you move your cursor back to the final tile and then you can continue and the same happens if you try and go into an unplaceable road position like this tile here this tile is not possible because then there'd be four roads all together which isn't allowed so again it stops until you return your cursor to that end road tile and then you can continue so that's all looking good all coming along nicely um also another good news a package just arrived for me containing lots of spices that i ordered which is good timing because i wanted to make a curry tonight um but i'm getting ahead of myself it's not quite dinner time yet i've still got some final bits of programming to do today i'll pass five just been adding the final touches to this new road placement tool so i fixed some stuff to do with the highlighting um so that the roads that already exist also get highlighted when you go over them like this so you can still see where your end tile is and then when you go into a tunnel where a road can't be placed it now highlights it in red um just to give some feedback to the player so i think that's it i think this new placement tool this new placement mode is now fully working and complete so that's great so i'm gonna stop now can have a bit of a rest make some dinner and enjoy the evening [Music] just been cooking the curry for dinner and today i thought i'd also try cooking something that i've never cooked before it's cassava flour porridge i've never used cassava flour before i don't think i've used it right here either and um it looks a bit like mashed potato it tastes like not very much actually um but i probably made it wrong but i thought i'd give it a try i ended up doing one more bit of programming this evening it was just bugging me a bit that i hadn't got those array textures working so i had another look at it had another go and i managed to get them working this time so instead of that texture atlas that i was using last time for the road markings i now have one image for every different road marking and they get loaded up as an array texture which as i talked about earlier fixes that issue so there are now no more ugly marks between the seams which is wonderful so that's going to be it for today and probably for this year as well so i hope you all have a fantastic time over the holidays have a merry christmas have a great start to the new year and i'll see you all next time
Info
Channel: ThinMatrix
Views: 120,205
Rating: undefined out of 5
Keywords: devlog, indie game, city building, game, gamedev, game development, city builder, thinmatrix, opengl, java, sandbox, simulation, day in the life, indie developer, programming, game engine, roads, network, lwjgl, low poly, model, house, building, cars, traffic, indie game developer, art, low poly houses, low poly art, animations, ai
Id: jD75cKoMTS4
Channel Id: undefined
Length: 10min 9sec (609 seconds)
Published: Fri Dec 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.