- Видео 35
- Просмотров 12 936
Gabe K
Добавлен 2 июн 2013
DLLs in Unity and Unreal
0:00 Why DLLs
1:30 Creating DLL
6:00 Unity DLL
8:27 Unreal DLL
DLL Injector video:
ruclips.net/video/PZLhlWUmMs0/видео.html
1:30 Creating DLL
6:00 Unity DLL
8:27 Unreal DLL
DLL Injector video:
ruclips.net/video/PZLhlWUmMs0/видео.html
Просмотров: 44
Видео
Unity encapsulating object creation with the Factory Design Pattern
Просмотров 195Месяц назад
Unity encapsulating object creation with the Factory Design Pattern
Unity Dynamically modify objects with Decorator Design Pattern
Просмотров 199Месяц назад
Unity Dynamically modify objects with Decorator Design Pattern
Unreal Observer Dynamic Multicast - Notify objects when things happen
Просмотров 402 месяца назад
Unreal Observer Dynamic Multicast - Notify objects when things happen
Unreal Singletons Subsystems [C++] -- Access object data anywhere
Просмотров 1272 месяца назад
Unreal Singletons Subsystems [C ] Access object data anywhere
Unity Observer Design Pattern -- Notify objects when things happen
Просмотров 762 месяца назад
Unity Observer Design Pattern Notify objects when things happen
Unity Singleton - Access data from files
Просмотров 912 месяца назад
Unity Singleton - Access data from files
Unity making organized projects -- Mediator and Component Design Patterns
Просмотров 1552 месяца назад
Note: The major difference between the two is that a mediator usually doesn't do anything but relay information, while components are loose, reusable objects that you can tie together. With a mediator pattern, we usually avoid telling the mediated objects about the mediator so there's no dependency.
Glumphus Intro Cinematic
Просмотров 947 месяцев назад
Glumphus Intro Cinematic! If you like what you saw, you can join the discord! discord.gg/7djxDXc7s5
Early Extraction Game Update #2
Просмотров 2369 месяцев назад
This is our second update, ~ 4 months into the project! We're very happy with the progress we've made! If you're interested in playing and helping us make the game, join here: discord.gg/67UF4Jh4hm
C# OOP essentials [pet store]: Polymorphism, Composition and Inheritance
Просмотров 1699 месяцев назад
Pet store code github.com/FlamingoeZpZ/PetStore
Learn to Optimize In Unity! [INTERMEDIATE] Object Pooling and Batching
Просмотров 39811 месяцев назад
Thanks for watching my video on Optimization with Object pooling and Batching, hope you learnt something! Join the discord here: discord.gg/yCJwpUqh6g See the git repo here: github.com/FlamingoeZpZ/Object-Pooling 0:00 - 4:48 Intro and Naive 4:48 - 17:10 Creating an Object pool 17:10 - 23:10 Optimization 23:10 - 24:40 Final results
AI, Animations and the whole shebang, RTS style, Part3
Просмотров 14211 месяцев назад
Download the starter project here: drive.google.com/file/d/1oLpwNwyXJJPAYGtSFGgbDNQw3Q9v4R3Z/view?usp=sharing
AI, Animations and the whole shebang, RTS style, Part2
Просмотров 8911 месяцев назад
Download the starter project here: drive.google.com/file/d/1oLpwNwyXJJPAYGtSFGgbDNQw3Q9v4R3Z/view?usp=sharing
AI, Animations and the whole shebang, RTS style, Part1
Просмотров 12811 месяцев назад
AI, Animations and the whole shebang, RTS style, Part1
Extraction Game - Early development [month 2]
Просмотров 87Год назад
Extraction Game - Early development [month 2]
Enemies And Navigation, Navmesh with waypoints and listening
Просмотров 99Год назад
Enemies And Navigation, Navmesh with waypoints and listening
Easy Optimization! Flyweight design pattern in unity
Просмотров 7 тыс.Год назад
Easy Optimization! Flyweight design pattern in unity
Unity Comprehensive But Simple Polymorphic Weapons
Просмотров 422Год назад
Unity Comprehensive But Simple Polymorphic Weapons
Vertex Shader -- Rotate, and move objects without code
Просмотров 1,6 тыс.Год назад
Vertex Shader Rotate, and move objects without code
Fragment Shader (emission) -- glowing effects and masks
Просмотров 104Год назад
Fragment Shader (emission) glowing effects and masks
[JAVA] Intro to Code Part 3: Bringing it together - Foundation
Просмотров 16Год назад
[JAVA] Intro to Code Part 3: Bringing it together - Foundation
[JAVA] Intro to Code Part 2: Conditional Statements
Просмотров 13Год назад
[JAVA] Intro to Code Part 2: Conditional Statements
Please increase video resolution 😊
Thank you for this, it saved me from dying. :)
really very useful video. your explanation make it easy to understand! gave me new ideas to work and improve my games! thanks
Sup shawty.
@@smoonthy **spits coffee**
@@gabek5760 <3
Finally, a dude that's not talking about beginner "101" stuff. You earned a new subscriber from me. I don't actively look for intermediate and advanced stuff in RUclips so I'm glad I get recommended videos like yours -- I've been wanting to validate my knowledge on these topics and also gain some new insights on how to practice them. I realized from your video that the framework I've built follows the factory pattern in some way. Just to give you some context, I implemented a base ScriptableObject, and relevant Monobehaviour and regular classes that are needed to "build a level/mission." I've had my fun with generics (so much fun that one of my classes have 4 generic types requiring it, and it's nested with generic types too), while it was painful to write at first, it turned out to be solid as I'm able to just "create a new mission type" and have the underlying factory pattern build the mission on runtime without me worrying if the new mission/level type supports the same functionalities as other missions (these functions were enforced from the base classes that comes with that ScriptableObject I mentioned). There were benefits to having this framework: * portable (since the missions are now packaged as ScriptableObjects, it's easy to move them around from project-to-project or directory-to-directory so long as the unity project has the framework in it) * editable - I've built an editor window around that base ScriptableObject class (and just reused their custom Editor if they implement it) which allowed a neat editing experience for the game designer. * you have control over generating game objects - which is a stark contrast if you go with creating missions/levels with prefabs/scenes. There's a recent problem that I encountered where the mission and its objects should scale up/down and transform to a specific "play space" -- for context this is for an AR functionality. * easy to manage - I just drag-and-drop the scriptable object on a mission manager I created, generate the mission, and handle the mission start/restart/end/abandon from there.
Really helpful and clear to understand tutorial.
Very useful video, just what I needed, but the quality made it really difficult to follow. Would be nice to have it HD
Stir fry by migos
A big like to the helpful video. Thankyou so much!!
Thank you, you've helped me a lot! :)
can you please make vertex shader that rotates to the current camera position?
wow, cool game! when does it come out?
HOLY PEAK
Is this a game you made?
Yeah
B A S E D
👌
nice
Love it!!
Scriptable objects are really trash at performance, 2 year project, i made everything with acriotable object at the end of the development cycle i have to remove all scriotable object and link them directly instead of getting from unity assets, a few bytes wrong lilla project but a lot of performance drops will,so stay away from scripts blender objects
Wow, cool game!
I'm pretty much already a pro at this game tbh
thkns its great to have this content !!
Base class should have a virtual method that your child classes will override, ie Jump(), in the pet class should be Virtual void Jump() and in cat or dog, you go Override void Jump() :: As for the List of Pets, I would have made a static list in the Pet class, on construct add to list, on destruct remove from list!
Yes we I do abstract and virtual functions later in the video! We do the classic speak implementation! As for the static list, by making a list static you lose the ability to have multiple pet stores... Given that the assignment that this video is based on is to make a bunch of "courses" and enroll "students" into those courses, I didn't think it'd make sense to show it... I've shown static in some of my other Unity videos because the Utility is lovely. You're definitely right about a destructor, I believe C#'s garbage collection handles all that for us, especially in Game Engines like Unity and Unreal, but native C++ would not* (I think), by all means not a bad practice! (Especially if the list is static, it's very easy for it to get lost in memory) I love code because of all the valid solutions! Thanks for sharing your insights!
HEY! YOUR VIDEOS ARE AWESOME!! LET ME SAVE THEM IN MY PLAYLIST FOR GAMEDEV!!!
Hi there! Awesome video, really useful and clear. One thing I am not entirely sure about is why you use [Field: SerializeField] in your WeaponSO script. Whats the need for it? If you could clear that up that would be great :D
[SerializeField] allows you to access a private property, but in our situation, we want a variable that can be accessed anywhere (public) yet only edited in unity (private)... So we really have two choices: 1) make a variable and function pair [SerializeField] private TYPE name; public Type GetName() { return name; } or 2) Make the variable public get private set: public TYPE name {get; private set;} The only problem is, that the serialized field tag no longer works, (Hence my IDE rider graying it out), so we must force it to work by declaring "field:" Hope that helps, I'll admit the field thing is a bit of voodoo magic to me as well
Why not use a base class that holds the maxHealth variable and derived class can just use it?
You encounter the same issue, each instance would create a new copy of that variable unless it was static, but if the variable is static it also means you’d effectively need a new script for each enemy type.
I use unity 2019 and I have problems with performance like if I add more than 10 object or more than 3 rigid body and max fps is 160 that decrease fast is the problem in my laptop
That does seem super strange, it's worthwhile to take a look at task manager and see where your resources are going... It's very unlikely that anything under a couple hundred objects is causing immense lag... What are your computers specs? In a future video I'll probably do more optimization stuff, because my students love it and it blew up on youtube, but I'm not sure it's gunna help if such a small number of objects cause lag...
Your code example in theory is very good, it compacts memory usage. But there is a slight issue... size of float is 4 bytes (some machines it may be different). But ScriptableObject is a class, and we have a reference/pointer (memory address to the allocated location). And how much memory is a reference/pointer? 8 bytes. So you are increasing the memory usage. And if you have more than 1 common float & not multiple values of that variable, it is better to make is static or const. is the same thing, with no overhead, because it is global to the class itself. But if you have multiple values of multiple global variables, it is still better to leave it as class field. it is only a good optimization if you have multiple values for the global variables & have a lot of them (>= 5 to 10). BTW, keep learning & teaching 😎😎😀😀
Interesting, good to know!
I had the same thought. My life manager class has a max health variable as well, but I set it as a static variable
It's also best to cache the values directly for two reasons when using scriptable objects. One reason being is that it adds a layer of indirection which creates unnecessary overhead each time it needs to fetch the value. It's much faster for the machine to work with the values directly. The second is that it causes centralization. When you have a bunch of objects interacting with a single source it creates an unnecessary bottleneck. It's always best to use scriptable objects as an easy to manage settings file for multiple variants and then cache those values directly into the class that is working with those values.
Another upside of this is that you can tune the values in SOs in play mode and the changes will persist (unlike fields on a Monobehaviour). Good vid!
It's incredible to see someone following basic coding standards like doing early returns. It's weirdly rare to see in a unity video.
Yes! I'm a TA for a bunch of students (who are following these videos), so I'm doing my best to keep everything flexible, optimized and concise!
Great video mate, would love to have a better example of how to use this, maybe using switch statements too.
These videos are made for a course I'm TA'ing I don't want to give them TOO much xD -- Maybe in the future though, I'll do a deeper video into the topic, showing integration... One of my favourite times to use enums is usually pared with delegates, so we'll have to see!
That's awesome mate, I wish you the best of luck! I'd 100% be interested in how you'd use enums + delegates together. There are too many tutorials for absolute beginners, your vids are a nice breath of fresh air :)@@gabek5760
Although it's always a good idea to use ScriptableObjects for shared data, in this particular case (floats / value types) there's no memory savings happening at all, because each time you access the SO.float property, you get a new stack allocated copy of the value, not a reference to it.
Great video, never really considered that this pattern would qualify as a Flyweight lol It's used in a bunch of Unity games as a kind of Config-Presenter pair, where all the configuration (including adding models, behaviour, etc) of an entity is done at design time in scriptableobjects, and a monobehaviour just presents all the data at runtime. Pretty cool
Never seen a video explained scriptable objects good and clean like that, i will use in all my projects, thanks! 😊
TL;DR: use static variables, they are faster to access and don't need an object instance and reference, therefore you won't loose 4 bytes for holding a reference to SO. "We've lost nothing here" - Hm, actually you did. You lost some performance and introduced a few levels of indirection. Before you had a class with local vars, and every access of local var is just a memory lookup. Yes, now every instance will have 4-24 more bytes. First question: is that really a problem? If your game is memory-bound, then answer is yes. If it's not, and most of the games are not, then we don't need to optimize anything. Okay, let's pretend, that our game has 1000's of enemies and we loose some memory (24 bytes * 100_000 enemies gives us 2.4 MB, for example). Now we use reference to ScriptableObject as a memory-optimization technique, and now every enemy has a reference (4 bytes instead of 24). Here comes the problem: enemies shoot a lot, and they have their internal logic which is now slower. How? Every time we need to access weapon parameters, we have to take a reference, then de-reference it under the hood (AFAIK C# does that automatically), and then take the desired variable. 3 steps instead of 1, and de-reference step is slower than a memory lookup. So it's not x3 times slower, but a little bit more. So, we've traded our CPU-cycles for memory. It's quite uncommon, because modern PC's and consoles have a lot of memory, and always we are trying to cache things to prevent unnecessary CPU work. Okay, but if we still want to optimize it? Here comes a better option: static namespaces with constants, or static namespace with static variables. Instead of Scriptable Object we can create a class with just static variables. Accessing it would be slower than accessing local variable (nothing beats that), but still faster than using reference to an object. Some people suggest that C# JIT can optimize static variables like local variables, making them on par, but it needs real profiling. The most important thing is that using static variables doesn't require an instance of a class. Which means that we get the memory optimization too: we don't need 4 bytes no more. And speaking of memory, statics in C# are being stored in High Frequency Heap, which is a special area inside regular heap. Hope it would help.
Wtf since when can you serialize properties?
Honestly, got no idea, saw it In an infallible code video, and I've run with it since... Technically, it's equivalent to writing: [SerializeField] private float val; public float GetVal() { return val; }
It makes sense, auto properties unwrap to fields anyway before compilation, you're just telling C# to add an attribute to the auto-generated field. But yeah, it's a cool trick that isn't mentioned anywhere for some reason
fr
It's actually a c# thing. It was added in c# 7.3.
By the way, you can specify attributes right before the word private in the setter {get; [sf] private set;}. But this is not a good practice because when you encounter other serialization or stripping code it may not work as you would expect
Amazing tutorial i wanted to lear the flyweight pattern for quit some time. Now you vid made it clear
Hi Gabe - Robert accidentally shut down his computer while you were finishing zoom- sorry about that! he says thank you and sorry we couldn't figure out another way to contact you 😂
Ah I see, It was nice talking about Math, Robert's super bright! I really think he should look into Unity stuff (which is why I sent my channel) That way he can put all the math he's learning to use
❤ Groover is so groovy!!!
Great content! Thanks for sharing
Very educational I recommend this channel
Mr Yamis! How is you! I now University Teaching Assistant, and amateur game developer.
Cool!
Hi, you used to code me for RP4K, I was the kid who put the games on a website.
I remember you bud xD I'm currently teaching the next two courses for you, so if you continue we may meet again!
@@gabek5760 can’t wait. I just finished asteroids after like 5 classes.
Great video!
Awesome concept!
Brilliant!
That's epic and stuff, but how do you start the game!? I pressed every key and it didn't work. The controls aren't on the itch.io page, bruh!
Oh my god, not gunna like I'm in shock that someone from youtube even found this video? You press the X in the top left, to close the How to Play Menu. We made it sort of "in your face" because our teacher strongly emphasized the importance of it for marks. My apologies, and thanks for checking out our game!
Game Link: flamingoezpz.itch.io/fishing-game
I'm banning you for reposting my products. Also wrong link lol
@@gabek5760 Oh shit, but consider it done *Shows Uno Card*