Video Version Asset Creation : https://www.youtube.com/watch?v=udbPym1JjkY&t=192s Shaders: https://www.youtube.com/watch?v=-W_2OzjnUl4 OK so you have that cool 2D Bubble Bobble inspired game but you want to add some modern flare? Or maybe you just got some random pixel assets you'd like to experiment with adding fake "refraction" too? I've got you covered! Cheaters that don't want to read? You when you don't read this tutorial For cheaters, here's the code, right away, to play with : https://github.com/Razzlegames/GodotBubbleShaderTutorial Refrac-What? So what is refraction? In simple terms light bends and changes direction as it goes from one medium to another. For example when it passes through water in a glass, it slows down and changes direction causing a distorted appearance to anyone looking through the glass. Different materials have different refraction amount, and the angle and effect is more pronoun...
Too busy to draw this time.. for now here's a picture of an Android Toy Ok, in this post I am going to talk about how to join C++ native code to a thin Android Java code layer. I am not going to be doing all native code, as I think the easiest route is to use the Android higher level convenience SDK for loading resources/file I/O, setting up OpenGL context and other state management. I won't be using any IDEs or anything else to complicate things. This is as easy as it can get, you get the source and type "make" (I assume you are on a system with GNU make, and your environment is setup correctly. Linux is easiest, but it should run fine on ANY system that can run Make, even Windows!). So the code will be structured like this: ----------------------------------- Android SDK OS Layer code ----------------------------------- Java App Thin Layer to Android OS ----------------------------------- Native C++ code called by...
Optimus prime is a smart pointer. Memory leaks?! He'll straight up kick you in the throat! This isn't Go Bots son! What's the point If you have ever coded in C or C++ you know you've had a memory leak some time or another. Ownership semantics are best, but sometimes those are muddy and, most of the time, the benefit of automatically reclaimed pointers far outweighs any costs (they are not much in terms of resources). What are smart pointers? These are pointer containers/classes with reference counting and ownership semantics built in. The easiest to understand and use is shared_ptr , which when all references are gone delete's the object from memory, and as expected calls the objects destructor (if it exists). For example if you create a raw pointer in a function (and don't store a reference to it anywhere else) you would get a memory leak! void leak_function() { Sprite* sprite = new Sprite(); // Use sprite // After functio...
Nice job, Razzle!
ReplyDelete