Completely overhauling my game
5:50
Пікірлер
@lukei9772
@lukei9772 2 күн бұрын
THIS WAS SO GOOD PLS DO ANOTHER VIDEO ON 3D STUFF
@BarneyCodes
@BarneyCodes Күн бұрын
I haven't really explored the 3D side of things too much yet, but it's definitely something I plan on getting into! I'll be sure to make a video showing what I've learnt when I do! Thanks for the comment :)
@SHAO_L1N
@SHAO_L1N 2 күн бұрын
I feel like something like Bevy, sits really nicely in between a game engine and a framework. Its what ive been exploring recently.
@BarneyCodes
@BarneyCodes Күн бұрын
I've been meaning to check bevy out for a while now, it seems really interesting! I think a framework (or similar) might be a really great way for me to still feel hands on and code-oriented, without having to do everything from scratch!
@SHAO_L1N
@SHAO_L1N Күн бұрын
@BarneyCodes Being code orientated while not having to so absolutely everything is what I really like about Bevy. Also, Bevy docs are simply amazing. Ps. Great video by the way 👏🏿
@PaleyDaley
@PaleyDaley 4 күн бұрын
You shouldn't simply add the components together,. You should do height = r*8+g*4+b*2+a which will give you a range from 0 to 15
@BarneyCodes
@BarneyCodes Күн бұрын
Haha yea that was a bit of a fumble on my part, turns out you can pack a full float into the colour channels for lossless data. I knew it was possible in theory but wasn't sure how to implement it!
@aaro1268
@aaro1268 4 күн бұрын
Godot's got a few bugs but it's pretty easy to get going on! Pronunciation's based on the play "Waiting for Godot", so it's close to Guhdough -- not Go-dot.
@BarneyCodes
@BarneyCodes 4 күн бұрын
Thanks for clearing that up! Keen to get started with it!
@kiosmallwood576
@kiosmallwood576 6 күн бұрын
Yes. Now I'll watch the video. Edit. Loads of good points. I'm definitely in the camp of build an engine around a crazy concept and see if a viable game can be made, rather than make a game people want to play.
@BarneyCodes
@BarneyCodes 6 күн бұрын
That's definitely how I got started in game dev too, always just trying something technically interesting that I wanted to code, then try and turn that into a game. I carried that mentality forward though when I was setting out with the goal of making a game which was a bit silly of me haha!
@luigiistratescu2756
@luigiistratescu2756 6 күн бұрын
I loved your video. I totally get you, and I somewhat agree and disagree. Building things from scratch (provided you have experience) is a bit more straight forward because you're familiar with the process. Especially when it comes to 2D games, you can easily make a game without really an engine. I've done it in the past. But using a commercial engine like UE5 or Unity can be sooooo much better ONLY if you already know how to use them. Like you mentioned, lighting, bloom, etc. no need to configure a framebuffer yourself and code it yourself or even tweak shaders, you can just enable Bloom from the game engine option or click and drag a light actor into the scene. But... the downside of an engine is that, very much like programming things from scratch, it takes A LONG TIME TO LEARN THE ENGINE... and get used to it. So, in other words, you're back at square 1. Not to mention some engines require languages you might have never programmed in... such as GDScript or C#... I've only ever done C++. Either way, I don't regret not using an engine because it made me a better programmer. Now I've just installed UE5 and I'm learning Paper2D... Hopefully I can fully transition to it simply because... sound effects and music for free, and letter formatting for free that comes with an engine... as well as other visual effects, ohh that's just so convenient...!!! Less technical work for me to do and more focusing on the actual game! I just subbed, awesome video the way you phrased everything is to the point and very well explained!
@BarneyCodes
@BarneyCodes 6 күн бұрын
Thanks for the great comment! Totally agree that there's a BIG investment in learning everything required to use an engine. Hopefully, having done things from scratch in the past, we'll have a good starting point and the transition shouldn't be too painful! There's always a bit of bumbling around when learning something new (like a new language), but I think the more you do it, the easier it is, because the concepts are transferable, it's the HOW that changes! Good luck for your UE5 journey!
@jackfrost884
@jackfrost884 7 күн бұрын
interesting perspective
@alfredogodoy6854
@alfredogodoy6854 7 күн бұрын
would be awesome if you make some tutorials about gdextension
@BarneyCodes
@BarneyCodes 7 күн бұрын
I'll have to learn about it myself first, but if I come across anything cool I'll definitely share it!
@moodragonx2
@moodragonx2 7 күн бұрын
Very very cool video. I really appreciate the detailed explanations.
@BarneyCodes
@BarneyCodes 7 күн бұрын
Glad it was helpful!
@Jintenzo
@Jintenzo 7 күн бұрын
Please take one step back from the camera lol
@BarneyCodes
@BarneyCodes 7 күн бұрын
Lol yeah I need to get a wider-angle lens, the one I've got is too zoomed in and I can't go back any further hahaha
@ThePouetman
@ThePouetman 8 күн бұрын
You should put visuals of your game in the first seconds of the video, I didn't notice I was looking at one of your videos before I saw the game
@BarneyCodes
@BarneyCodes 8 күн бұрын
Oh that's a good idea, thanks for the tip!
@viikoreaux
@viikoreaux 8 күн бұрын
Trap that's been luring me in: "Games with bespoke engines are easier to release updates for because the engine can be modified at any time. i.e. EVE Online"
@floschy_1
@floschy_1 8 күн бұрын
as a (not game) developer I understand the urge to do everything on your own, that way you know how everything works and you can always customize, expand and change the behaviour to work with the other parts of the project, you don't rely on other packages and you learn a lot of plain knowledge and Principles behind some things as well as learning and having control over optimizations. Since i've never done stupidly big projects it worked out so far, but I can imagine the scope of the project just balloons out of control quick But on the other other hand, when you do a lot of things custom in the right way, eventually you'll have an ever growing toolset that you can use in other projects too, but then you also need to maintain its functions for all applications which is again a lot of work
@BarneyCodes
@BarneyCodes 8 күн бұрын
You can learn sooo much by doing things yourself, and the feeling of control is really nice, but like you say maintaining it all becomes just as much of a job as using it to build things! Very much comes down to what you're trying to achieve I think!
@tsitski
@tsitski 8 күн бұрын
so incredibly real
@ZuranMyllhor
@ZuranMyllhor 8 күн бұрын
Well, I've got this on my mind after a few programmer friends asked me about just moving to an engine while the game is considerably done, so I'll join the rant- I'm currently on like... 8 months of gamedev, and while I didn't go for a game engine, I didn't make it from scratch, per se... I'm using a game library, Raylib to be specific. That did help a bunch because all the work for the collision, the shaders etc have been "skipped", but it's still focused on programming, which is my forte, and I still have the flexibility of coding "from scratch", since I can just overload or not include parts of the game library that I'm using. There is a reason for me to do that, and I'll mention it soon. I've not that much finished-game-gamedev experience. I've only some small platforming things and some collision details solved to my name, but I've tagged along platforming gamedevs on bugs and glitches enough to feel comfortable, and that's what's making me comfortable with my choice, most of all. There's also the thing that I have a long-term plan of supporting the game once I have it done, with varying levels of success taken into account. The capability to be able to adjust the "root" level of the physics to deal with pesky corner cases years after the launch is something that I'm sure that I'll need, and the level of optimization is really important for the genre (Platform Fighter, which needs to be CONSISTENTLY at 60 fps), so those are the main reasons I'm picking the game library route. Would I recommend to go for game libraries to just put commercial games out there? Dear GOD no, even with the "skip" that the library gives its still too much effort. Do I regret going the way that I'm going at it? No, at least not yet, and I got a feeling that I won't. Does it take some major concentration and patience to do it? Yes. Every step needs much more preparation before the reward of seeing stuff take place in your screen. It is a huge commitment, and you need to think thoroughly to go through it. If you think it is necessary though, don't be afraid to do it. Just keep in mind, you'll have to appreciate the smaller things much more to keep yourself motivated. But I'm sure it is worth it.
@BarneyCodes
@BarneyCodes 8 күн бұрын
I didn't mention frameworks in my video which was a bit of an oversight on my part, but I think they're a great middle ground where you get a lot of control, but you've also got some building blocks to work with that hopefully make it realistic/sustainable to actually make things with it! I might have to explore some framework options in the future, because I do really enjoy doing things in a more code-oriented way!
@wchorski
@wchorski 8 күн бұрын
being able to say "I made the game engine from scratch" can be such a good selling point. The fact that a game isn't bound by an engine's limitations is what really makes for unique experiences. But agreed that you'll be spending more time squashing bugs than design and features. Probably a good idea to at least prototype in an engine and then possibly transition to a custom engine when it needs it.
@BarneyCodes
@BarneyCodes 8 күн бұрын
My understanding is very limited, but I feel like there would often be things that are said to be limitations of the engine but are actually limitations of the developer (obviously there would be ACTUAL limitations, but they're probably a lot wider than what some people think) Like you say, it's probably wise to prototype in an engine first and then figure out if you need something custom!
@diegofloor
@diegofloor 8 күн бұрын
While I agree with most of what you are saying, it also gave me the impression that you are underestimating the struggles of using an already made engine. Which isn't to say that your overall message isn't true. I actually agree that making your own engine should be the exception. But the time investment in learning someone else's solution is not negligible, specially when compared to making your own simplified version. I used Unity for years, and I'm too familiar with banging my head against some unity's system, trying to make it work. Weeks later I give up and make my own in an afternoon. This isn't an isolated event. Also not uncommon is updating the engine and breaking the entire project. Also not isolated. Then there's the more pressing problem of not having a very good free and open source solution out there, in my opinion. Licensed engines, like unity will impose extra costs on you as well. Which sucks on a profession that's very hard to make a living on. Anyway, this is a good video. Subscribed. I'm curious to know how your opinion will update after your use one of these engines for your next projects!
@BarneyCodes
@BarneyCodes 8 күн бұрын
That is almost certainly the case, since I haven't done anything more than mess around a little bit in a pre-made engine. I'm sure there are all sorts of struggles and headaches that come along with using them, especially on larger/more complex games! I think frameworks are a very good middle ground of giving you some more control while also giving you enough to finish projects in a reasonable time frame. I'm sure my opinion will become a bit more nuanced as time goes on, but I think in general my stance is "make sure you've got a GOOD reason to do it from scratch" and at the moment, I don't have one!
@diegofloor
@diegofloor 8 күн бұрын
@@BarneyCodes However, one thing is certain: for prototyping, exploring game design, etc, it has to be a full blown engine. You need to iterate quickly. So unity, game maker, have to be part of the toolkit. Even if you want to move it back to another engine later.
@sirsneakybeaky
@sirsneakybeaky 8 күн бұрын
Half way through I found out making the game was like 30% of what I wanted. I want to make my own engine and tools. Because I want to make a publisher. So im just full bar into engine development now. So the idea now is my games will be tech demo's, process refinement, and learning
@BarneyCodes
@BarneyCodes 8 күн бұрын
Oh nice! That's why it's so important to figure out what you're actually wanting to achieve and then figure out the best way to achieve it! Hope it goes well!
@Nerthexx
@Nerthexx 8 күн бұрын
1. Making engines and making frameworks are entirely two different things. 2. Godot is nowhere near enough for practical game developement. 3. Unity is bloated, I don't know a single good game that doesn't lag in comparison with AAA games that don't and actually look better. 4. Unreal Engine is also bloated. Same arguments as with Unity. I remember playing Green Hell and it was... not fun. On my GTX 960 (at that time), Witcher 3 on normal settings was giving me around 80-ish fps and looked good, while green hell looked like a 2011 game at best at settings that gave me at most 60 fps. I understand that people that use these engines usually overlook the underlying processes, techniques and architecture and spiral into the route of bad practices, resulting in a bad player experience. Licensing is another part of all of this. Game engines try to be a magic bullet, solution for all problems, but in reality, you're stuck on reimplementing your own graphics pipeline, your own physics, your own UI, implementing your own game mechanics, and for people that don't - marketplace exists, which add on to the problem by brute-forcing the solution, sometimes trying to fit them all together. IMHO - practical engines/frameworks that solve only one problem (your game) are better for many reasons.
@everettw
@everettw 8 күн бұрын
"Godot is nowhere near enough for practical game development" Have you used godot? Have you seen the shipping games using it?
@Nerthexx
@Nerthexx 8 күн бұрын
​@@everettwYes. And you still have to implement 90% of what you want or find hacky ways because of lack of support. I'm not saying it's impossible, just not practical.
@Kobold666
@Kobold666 8 күн бұрын
Those public engines are made in a way that lets you click together a simple "game" in an evening. Once you're really into using them and coding around their quirks, they become nothing more than a framework that lets you open a window, upload textures and shaders and handle user input. You can have this in a few kilobytes using something like SDL, GLFW, Raylib or whatever, or you can waste a gigabyte for an engine of which you don't have a clue what it even does with all the resources.
@BarneyCodes
@BarneyCodes 8 күн бұрын
I did overlook frameworks quite a bit in this video, which is my mistake! I can definitely see them being a good middle ground where you still get a fair bit of control, but also get given enough to be able to actually finish a project in a reasonable time frame.
@amaryllis0
@amaryllis0 8 күн бұрын
Most voxel games (on the level of Minecraft) even are perfectly suited for game engines; it's only if you want to go super crazy with high fidelity voxels, voxel raytracing, particle physics etc. that an engine might fail you
@GonziHere
@GonziHere 8 күн бұрын
"Don't do everything yourself" and "use an engine" aren't synonymous and shouldn't be used this way, IMHO. I usually compare it to cooking. I don't want to build my own stove and cast my own pan, etc. However, the existing engines are like McDonalds kitchen, which is the other extreme. I want to buy a pan, pick between iron cast or Teflon, maybe go for a wok shape, etc... but ultimately I want to setup my own kitchen for the kind of cooking I'll be doing. I really don't want to go into the McDonalds kitchen to try to adapt it for making pasta or pizza. Even the sentiment of "just make a game". Game isn't a painting that you just paint. Game is a piece of software. Games are basically the only software that have this kind of tooling. Every other software is built via normal build processes, not by launching an app, that has a button to make another app. Like, I don't disagree with your sentiment in general, and most of your points, I'm just adding this to point out why engine still might not be the answer.
@BarneyCodes
@BarneyCodes 8 күн бұрын
Very good point that I somehow managed to miss. Frameworks definitely have a place and can be a great middle ground
@useronyoutube314
@useronyoutube314 8 күн бұрын
Fun fact. I’ve subscribed because you make your own engine 😂
@BarneyCodes
@BarneyCodes 8 күн бұрын
Oh no 😅 I'll still be doing some low level stuff, just not when I want to make a game!
@gyokzoli
@gyokzoli 8 күн бұрын
I don't get that why would anyone think it is a better idea to create an own game engine...
@BarneyCodes
@BarneyCodes 8 күн бұрын
I think learning, having fun, and making a technically complex game that can't be made with a pre-made engine are the only really legitimate reasons. I genuinely enjoy the programming that I'm doing while working on my engine, but my main goal is to release games, in which case, as you say, it doesn't really make sense to make my own engine!
@beidero
@beidero 9 күн бұрын
I think another common trap once you use an engine is to get stuck making tools. Tools are nice to have and you might be able to sell them, but in the end if your goal is to release games then spending time polishing tools does not achieve that goal.
@BarneyCodes
@BarneyCodes 9 күн бұрын
Ahh I'll definitely have to look out for this when I start using an engine, thanks for the heads up!! It's so easy to procrastinate when you can kid yourself that it's productive!
@mikkelens
@mikkelens 7 күн бұрын
I think this totally depends on what tools you're already provided. I have used a "ready for production" game engine (Unity) for quite a few years and its still nearly impossible for me to work on solo projects because I still make editor tools. What matters more, in my opinion, is whether the tools you're provided feel satisfactory or if you feel you could do better.
@HorseyTime
@HorseyTime 9 күн бұрын
Bro I really hope you finish strong and update us along the way. I need some legitimate dev log content in my life
@BarneyCodes
@BarneyCodes 9 күн бұрын
Haha thanks mate, that's the plan!
@adamrushford
@adamrushford 9 күн бұрын
Wicked Engine!
@BarneyCodes
@BarneyCodes 9 күн бұрын
I had to look it up cos I've never heard of it before, but it looks very interesting! I might have to investigate further!
@BarneyCodes
@BarneyCodes 9 күн бұрын
Get 40% off CodeCrafters + 1 week free! app.codecrafters.io/join?via=BarneyCodes Been a while since you've seen my mug on here, hopefully it's not too confronting!
@gamedev_expert
@gamedev_expert 12 күн бұрын
Hello, Barney! I have the same game idea year ago. I suggest you to try generate asteroids images in AI tools. Next step is to downscale to pixel art, and later quantize colors to match your resources palette( i believe that you can use few color for each resource, instead of 1 to achieve better visual). Right now game is not so visually attractive as may be (not clickable), hope you try it :)
@DynestiGTI
@DynestiGTI 14 күн бұрын
I’ve started learning to use OpenGL on LearnOpenGL and it’s been a really difficult and uphill battle, so videos like this are a godsend. Apparently WebGPU is faster and newer than WebGL but it might be harder to use since I think it’s implemented in Vulkan? I assume it would be better to learn WebGPU rather than WebGL, would the implementation be similar to what was done in this video or would it be a bit harder?
@BarneyCodes
@BarneyCodes 13 күн бұрын
Glad you found the video helpful! My understanding is that WebGPU has it's own shading language (it's called WGSL I think?), where as many different frameworks use GLSL (WebGL, OpenGL, Vulkan), which is why I focussed on GLSL here. I guess if you're explicitly wanting to make high-performance stuff for the web, then it would make sense to learn WebGPU. I haven't had a proper look at WebGPU yet, but I would imagine a lot of the core concepts would translate over, just with a slightly different syntax? Let me know how you get on!
@Veptis
@Veptis 20 күн бұрын
You said that there is no GPU debuggers - but that's not true. There is software like RenderDoc which lets you inspect all stages of the render pipeline. Down to the GPU assembly and step a single pixel value. It also works with any program. So you can dissect games and figure out how some Fragment shaders work and reproduce it. Not quite sure how legal that is - but it's really powerful.
@BarneyCodes
@BarneyCodes 18 күн бұрын
Good shout! I've only recently come across RenderDoc, but it should be very helpful in the future!
@lainleaflet
@lainleaflet 27 күн бұрын
hello again! I'm trying to expand on this code by having multiple sets of "tentacles" appear on the screen guided by a mouse click and its position. the best i've gotten is to move the "points = [];" line within the if (point.rad <1){...} statement. however, a current issue i'm having is that once one set is complete, all other sets pause. would you have any guide on how to make each set completion independent of each other?
@BarneyCodes
@BarneyCodes 25 күн бұрын
Hi! Sounds like a fun project! My first thought would probably be to create a class which would handle a single set of tentacles, called something like TentacleManager (or maybe octopus? ha!). Each instance of the manager class would have it's own set of points, so one tentacle burst finishing doesn't interfere with any other. You would then have a global array of the managers, instead of single points, and when a manager has finished (you'll need some function on the manager to check for this!), you can remove it from the array of managers. And when you click, you can adda a new manager! I hope that makes sense, let me know if you've got any questions!
@bababavasadadada9441
@bababavasadadada9441 Ай бұрын
Could u do a video about diferent flow fields, i saw some cool stuff but im not sure how they do it, like spirals/flowing around a point, my guess is that some 3D noise or function is used
@BarneyCodes
@BarneyCodes Ай бұрын
Sounds really interesting, I'd love to see some examples! (might be easiest to share in my discord?) Using 3D noise for flow fields seems like a really interesting idea, might have to explore that! Thanks for the comment!
@bababavasadadada9441
@bababavasadadada9441 Ай бұрын
@@BarneyCodes hey barney, the only examples i found where: kzfaq.info/get/bejne/hq6phtWYsJ3XmmQ.htmlfeature=shared And a demo of "generative garden" channel By 3D i meant using time to change the flow fields angles, i saw it on a video about "steering behaviours" of the coding train.
@beidero
@beidero Ай бұрын
Man watching your videos I feel the amount of work that went into them, particularly the visualizations .
@BarneyCodes
@BarneyCodes Ай бұрын
Haha yea they can take a bit of time but I think they help get the point across better than my words would on their own! (Hopefully!)
@MoonLight-eh7ok
@MoonLight-eh7ok Ай бұрын
Does it also work if the stamp is a gif with transparent background?
@BarneyCodes
@BarneyCodes Ай бұрын
This is a great question, and I don't actually know the answer! I've never tried using a gif in P5js. I'd encourage you to try it out and see how you go (and report back afterwards because I'm curious!!)
@weicco
@weicco Ай бұрын
They are not broken shadows. They are photons interacting with each others creating distortion. So it is not a bug, it is a feature :)
@BarneyCodes
@BarneyCodes Ай бұрын
Absolutely, it's actually the double slit experiment but the slits are so small you can't see them hahaha
@Khazam1992
@Khazam1992 Ай бұрын
Cool, thank you very much.
@BarneyCodes
@BarneyCodes Ай бұрын
No worries at all!
@yashbhatt4498
@yashbhatt4498 Ай бұрын
why js 😭😭😭
@BarneyCodes
@BarneyCodes Ай бұрын
I chose JS so that people can just run the examples in their browser without having to download anything or set any environments up! But the CPU language choice is pretty much irrelevant because the GPU code (which is the main topic of the video) will be the same whether you're using JS, C, Java, C++ or whatever else you want! Definitely use whatever is most comfortable for you!
@saadtunio709
@saadtunio709 13 күн бұрын
Can I do the same in opengl? ​@@BarneyCodes
@theseangle
@theseangle Ай бұрын
32:57 or you could just use bitwise OR instead of the step(0., A + B). As for the multiplication you could also use bitwise AND instead: color &= d
@BarneyCodes
@BarneyCodes Ай бұрын
Great point! Older versions of WebGL/GLSL ES don't support bitwise operations so it slipped my mind, but if you're using a version that supports them, they are incredibly powerful! Thanks for the comment :)
@theseangle
@theseangle Ай бұрын
@@BarneyCodes np, great video! You're doing the god's work with these videos. There's unbelievably small amount of content on graphics programming for beginners
@BarneyCodes
@BarneyCodes Ай бұрын
Thanks so much, I really appreciate it! I'm trying to fill that gap as best I can haha
@kinsukaweerasooriya2933
@kinsukaweerasooriya2933 Ай бұрын
this is pure gold for me ❤
@lainleaflet
@lainleaflet Ай бұрын
hi! i'm a beginner to p5.js and currently trying to have the particles shift colors (like a rainbow or gradient) as they move in the flow field--would you have any guide or tips on that?
@BarneyCodes
@BarneyCodes Ай бұрын
Hi! So glad to hear you're giving P5 a go, it's a lot of fun! And this is a great question! If you want to do anything with rainbow colours, your best bet is to probably use the HSB colour mode (p5js.org/reference/#/p5/colorMode). You're probably familiar with the RGB colour mode, where you specify how much Red, Green, and Blue you want in a pixel, but that makes it very hard to cycle through the rainbow. HSB stands for Hue, Saturation, and Brightness. Saturation is how much colour is present (no saturation will be greyscale, full saturation will be coloured) and brightness is how dark/light the colour is. The magic happens with the hue value, which dictates which colour you want, so if you increment the hue value you will get all the colours of the rainbow! So once you've got P5 running in HSB colour mode, you'll be able to set the colour of the particle just before it's drawn in the draw() function, just before the point(p.x, p.y) line. Since it's drawn using the point function, you'll want to use the stroke function to set the colour, using a hue, saturation and brightness value. To get started, you could try using the particles x coordinate to set the hue (you might want to look at the map function for an easy way to do this! p5js.org/reference/#/p5/map), but once you've got that figured out, you can use whatever you want to choose the position in the rainbow! I hope that helps, and I hope you have heaps of fun on your P5 journey! If you've got any more questions, please don't hesitate to ask!
@lainleaflet
@lainleaflet Ай бұрын
@@BarneyCodes thank you so much for the reply! i'll be sure to check this out!
@omari6108
@omari6108 Ай бұрын
This is amazingly helpful. I’ve been having hell of a frustrating time with OpenGL, and this can aid in my woes 😁 In following along, you’re passing pos in the shaders. Where is the value of it coming from? I do understand what’s going on, but having that bit of info known helps. Am I missing it somewhere?
@BarneyCodes
@BarneyCodes Ай бұрын
Glad you've found it helpful so far! I think I glossed over that in the video a bit. Basically the position value is being set in the vertex shader and is then passed through to the fragment shader (this is why the variable name in the vertex and fragment shaders have to match, because they're being used to pass the value across!) When sending geometry to the GPU to render, you have to specify the position of the vertices, but you can also specify the "UV" coordinates, which are basically the coordinates you'd like that vertex to use when looking up a texture, and this is the value I'm using to set the position variable in the vertex shader. How you set the UV coordinates from your CPU code will depend on what environment you're using, for P5js, they're set automatically! Since the UV/texture coordinate is per vertex, they get set as an attribute, which is only available in the vertex shader, which is why we need to set up the varying variable to pass the value into the fragment shader. I hope that makes sense, it's a bit of a rambling answer! If you've got any follow up questions, please just ask :)
@That_0ne_Dev
@That_0ne_Dev Ай бұрын
The fact that this is just a 2D image with shaders ontop of it amazes me
@BarneyCodes
@BarneyCodes Ай бұрын
It still amazes me too! Not sure how practical it is given how good 3D graphics are these days though hahaha
@That_0ne_Dev
@That_0ne_Dev Ай бұрын
@@BarneyCodes even if it's just used as a showcase project it's still massively impressive
@BarneyCodes
@BarneyCodes Ай бұрын
Thanks so much! :)
@nozome-jin
@nozome-jin Ай бұрын
Greatly appreciated. This video helped me
@BarneyCodes
@BarneyCodes Ай бұрын
That's great! Glad you found it useful!
@CoderDBF
@CoderDBF Ай бұрын
You lost me at the 4 minute mark. Why do you use WebGL en JS?! Show me how to do it in C please, this video is useless.
@BarneyCodes
@BarneyCodes Ай бұрын
This video is more about writing shaders themselves, not setting up the environment to run them in (The GLSL code running on the GPU will be the same whether the CPU is running WebGL in JS or OpenGL in C!). I chose to use WebGL and JS because it's really easy to share with people online and lets people try it out without having to set up a local dev environment just to run some example code. If you do want to use OpenGL and C, there are many tutorials online that will teach you how to set that up, and then you can watch the rest of this video to learn how to write the shaders you'll need I hope that helps!
@gutzimmumdo4910
@gutzimmumdo4910 Ай бұрын
perfectly explained thank you
@BarneyCodes
@BarneyCodes Ай бұрын
No problem, glad you found it useful!
@shauas4224
@shauas4224 Ай бұрын
One of the best videos on practical applications of L systems for procedural plant generation on yt
@BarneyCodes
@BarneyCodes Ай бұрын
Thank you! I think L systems are awesome, but there really doesn't seem to be much out there beyond the basics. Definitely something I'd like to keep working on in the future!
@xKond3i
@xKond3i Ай бұрын
Really well structured video and easly explained subject. Keep up the good work! 😉
@BarneyCodes
@BarneyCodes Ай бұрын
Thanks so much!
@johnyeap7133
@johnyeap7133 Ай бұрын
starts 10:24
@HipToBeeSquare
@HipToBeeSquare Ай бұрын
Demystifies a lot of the syntax that kinda stumped me while giving a cursory glance :)
@noemiklimpel5691
@noemiklimpel5691 Ай бұрын
This was f*ing awesome