Spooky Dwellers 4 is out now on major portals and coming soon to others, just in time for Halloween! Become the sole heir to the Goldenthirst fortune in this thrilling Match 3 adventure. After your eccentric ancestor Maximilian appears in your dreams begging for help, you must venture into his abandoned mansion to break a terrible curse, a curse born from his pact with a sinister entity. New challenges await in Spooky Dwellers 4!
Spells are a new feature of DragonScales 7: A Heart of Dark Flames. You can have up to 14 spells, comprising attack, defensive and healing spells. Using a spell is really straightforward: just load the spell on any of your playable scales, place the scale on the board, and then simply make a combination which includes that scale you placed on the board (the scale with the spell.) All the spells are activated like this. Here’s a video showing the activation of a few spells in the battle of Level 1-12.
The lightning spell will be awarded just by progressing in the game. However, the other spells have to be retrieved from the question marks on the boards. They are hidden in those question marks. The Avenger’s shield, for instance, is hidden in a question mark of Level 2-6. Once you get a spell for the first time from those question marks you’ll be able to replenish it in the Store.
Replaying the battle of Level 1-12 with all the 14 spells
These are the 14 spells you can get in DragonScales 7:
Lightning: Automatically received in Level 1-9. Cast a lightning spell on the enemy currently marked as target.
Multi-lightning: Cast a lightning spell on all your enemies.
Spiky Mace: Try to kill a random enemy. It’s a cheap spell but its success depends on luck. You can improve the “luck” of this spell by rising the attribute “Luck for Killing Spells” with your Stars. “Luck for Killing Spells” also improves a bit when the Avenger levels up.
Dragon’s Claw: Kill the enemy with lowest Health Points (HP.) It always succeeds. However, it’s an expensive spell and a few enemies (the ones with the little blue crown, such as the rightmost enemy in the above image) are immune to it.
Dagger: Reduce 1/4 of the Health Points (HP) of all susceptible enemies. Again, enemies with the blue crown are immune.
Apple: Recover 30 HP of the Avenger.
Turnip: Recover 2 HP of the Avenger per each scale on the board. Therefore, it’s wise to place plenty of scales on the board before activating this spell.
Red Potion: Recover all the HP of the Avenger.
Avenger’s shield: Guard from 3 enemy attacks. It protects from direct attacks only. A few enemies have attacks that can go past this shield.
Sandglass: Extend turn. Similar to the effect you get if you rise the Rank of the Avenger’s Village. However, the extra turns you get via the Sandglass are temporal. The extra turns you get from the Village are permanent.
Berserker mask: Destroy all the scales placed on the board.
Arts filler: Fill up your arts. You have two arts: a magical rod to break a single scale, and prescience to replace your currently playable scales. Both arts charge up a bit when you make combinations. By using this spell you can entirely fill them up at once.
Hand of Power: Double the power of your next 3 attacks. This is for scales attacks only. It’s not wise to mix this Spell with the lightning or killing spells. Remember you can use the Stars you get in the boards to improve the status of the Avenger. If you improve the “Power: Basic Scales Attack”, the damage caused by your basic attacks (the ones resulting from simply forming combinations on the board) will be higher. This Spell is perfect for those players who rise “Power: Basic Scales Attack”. Furthermore, sometimes you’ll see a CRITICAL message when you attack (it depends on luck). When you get a CRITICAL you cause double the damage. As with “Luck for Killing Spells” you can also improve your rate of criticals with “Luck for Critical Attack”. Strategically speaking, rising this “luck for critical” goes well with rising “Power: Basic Scales Attack” too, and with being a frequent user of the “Hand of Power” spell. It depends on your play style. For example, you can totally forget about this spell and rely only on lightning spells.
Chains: Silence a random enemy. The silenced enemy won’t be able to attack for a while.
Localization in Unity with No Such Localization is easy and truly convenient. We used that package to localize our game 10th Corpse into several languages, and it was a straightforward process. When the time came to localize our game, we evaluated the localization options available for Unity. The canon choice, so to speak, is Unity’s own Localization package which, however, required us to update our project and also, at that time, did not have an expedited installation (it had to be installed manually.) In the long run, Unity’s Localization package is likely to become the standard and the first choice of Unity developers, but for now it’s still at the preview stage.
For 10th Corpse, however, No Such Localization was a wise choice. In fact, No Such Localization offers much more than what we really needed to localize our game, which only required localization of strings. No images and no audio had to be localized in 10th Corpse, but if your project needs that, No Such Localization easily allows for it.
What is No Such Localization?
It’s a localization package for Unity, and it comes in 2 versions: Lite and Pro. Both versions are available in the Unity Asset Store. The Pro version (paid) offers even more features, such as support for Right-To-Left (RTL) languages (Hebrew, etc.), automatic variable replacement, and translation source classes for JSON and CSV files (more about this in a while.) Even the Lite version is awesome and, as told above, it offers much more than what our game’s localization required. No Such Localization integrates naturally with the Unity editor, and requires no coding unless you want to extend its functionality. And that’s the beauty of the package: its architecture, which makes it a breeze understanding and extending its functionality.
How to work with No Such Localization?
Let’s first understand the architecture of No Such Localization. The official documentantion is here and is very good. You’ll work with 3 classes of components. The most important of these components is the LocalizationService. It’s the core of your localization, and you should have a single instance in your scenes (ideally, use DontDestroyOnLoad to have single, persistent LocalizationService object if your project comprises multiple scenes.) Just create an empty object and append a LocalizationService component. Now, in the Locales list, add the languages you want to support, e.g., English and German. There are a few attributes, but you’ll be mostly changing Current Locale. Once you complete the localization process, modifying this Current Locale will immediately switch your project’s content to the localized strings and assets corresponding to such language.
So, main component: LocalizationService. We have yet to work with other two components: ComponentLocalizer and BaseTranslationSource. LocalizationService is our core, our hub, the ruler of all the localization of your game. However, it needs to know what scene’s objects (strictly speaking, components) it has to localize, and it also needs to know where it’s going to find the content with which it will localize those objects. For instance, let’s suppose you have a Text object (again, strictly speaking, an object with a Text component) displaying a “Welcome” string. The LocalizationService can automatically localize that object, but it needs to know that such object has to be localized (that’s the responsibility of ComponentLocalizer), and it needs to know what content it will use to localize the object (that’s the responsibility of BaseTranslationSource.) You can subclass both ComponentLocalizer and BaseTranslationSource to adapt them to the requirements of your project, but No Such Localization comes with classes that will suffice for basic requirements. For instance, the package includes a TextLocalizer component.
In continuation of our example, let’s add a TextLocalizer to our Text object having the “Welcome” string. You’ll notice that the TextLocalizer component has a Phrase attribute. When localizing, you’ll have to remove string literals (e.g., “Welcome”) from your components and replace them with unique IDs. The localization components will used those unique IDs to identify the content. Place unique IDs in that Phrase attribute, e.g., welcome_text. Now we need a Translation Source with an entry for that unique ID, welcome_text. The package comes with a very basic translation source, StandaloneTranslationSource which we can recur to for a simple use case like this. Create another object, add a StandaloneTranslationSource component, and edit its Translation List attribute to add welcome_text as an entry of such list, with translations for Locale English and Locale German.
Translation List of a Standalone Translation Source
That’s all. All the components of No Such Localization will connect among them automatically, and if you go back to your LocalizationService component and change the Current Locale you’ll see your text component modifying its content accordingly. It’s like magic!
Of course, if your project is medium or large sized, working with the StandaloneTranslationSource can be tiresome and error-prone. You might want to read your content from a file (the Pro version of this component comes with translation sources for JSON and CSV files.) The wonderful thing about architecture of No Such Localization is that you can extend it as you wish (we created our own Translation Source class for 10th Corpse.) And you can also create your own ComponentLocalizer for your specialized widgets, for example. You can localize text, images, sound, etc. Further information in the official documentation. An excellent tool for localizing your Unity project!
Coding “Hello world” with DEBUG will be a blunt exercise on programming futility. Or an exercise on retro, old-school coding. More than two decades ago I used to code in x86 (Intel) assembly, almost daily. I remember the masochist approach to learning the opcodes and the hardware architecture. The famous RBIL (Ralf Brown’s Interrupt List) was, back then, my favorite “reference”. First painful steps were taken and first crashes happily followed. I remember trying to code, as expected, the traditional “hello, world!”, using a strange tool included in DOS, DEBUG.COM. I wrote a post about this “hello, world” with DEBUG.COM elsewhere, and yesterday I found the time to reread it: I verified, first with awe, then with horror, and finally, with relief, that I had almost completely forgotten how to code in assembly. So I’ll revisit this here, mostly as a self-imposed disciplinary measure, an exercise on programming, specifically, an exercise on programming futility. Heck, DEBUG isn’t even available on the Windows 10 machine I’m typing this on. However, DEBUG looked pretty cool back then: it could assemble, disassemble and dump hexadecimal output. You could create little programs, or inspect programs and peek memory areas.
Specifically what I want is to build a minimal “hello, world!” program using DEBUG.COM. I don’t have any use for this, but it comes as a “relaxing” post after several weeks focused on the release of “DragonScales 3: Eternal Prophecy of Darkness” on Steam and the localization of “DragonScales 5: The Frozen Tomb”. After we execute DEBUG.COM we’ll meet a prompt with a “-” symbol. Now we can input our commands. I want to assemble, i.e., I want to type assembly language instructions. The command for that is “a”, which might be optionally followed by a memory address. By default, instructions will be placed starting from CS:0100, so I’ll use that address. Equivalently, I could type “a 0100” or “a 100” to achieve the same result.
-a
Now we have to place the data in memory. For this little program I only need the characters for “hello, world!!”. Notice I want two “!!” at the end. That’s because I want the final program to occupy exactly 32 bytes; we’ll see the reason for this later on. I’ll use the pseudo-instruction “DB” to define our string. With DB I can neatly provide the string using ASCII values, like this:
db "hello, world!!"
Those are 14 bytes. However, I want a prettier output, with a newline character before and after our string. A newline is in fact two characters: a carriage return (CR is ASCII 13) and a line feed (LF is ASCII 10). In hexadecimal, CR is 0Dh, and LF is 0Ah. OK. Now our DB would be modified to look like this:
db 0d,0a,"hello, world",0d,0a
Those are 18 bytes. We are not done yet with our data. In order to effectively print the message to the standard output I’ll recur to the function 09h of INT 21h. Check RBIL D-2109. In short, I have to place the value 09h in register AH, and DS:DX should point to the beginning of our string. The function will print every character until finding a “$” character (i.e., “$” acts as the “zero” in null-terminated C strings). ASCII value of “$” is 36, or 24 in hexadecimal. Therefore, we modify our DB instruction again:
This post will discuss how to render a triangle with OpenGL. In the following, renderization of a triangle assumes modern OpenGL, i.e., the old, fixed-function pipeline is of no concern for us in this post, as we’ll be using OpenGL buffer objects and shaders.
A Simple Triangle
By following the tutorials in the previous posts (Setting up Eclipse CDT for OpenGL and the GLFW Example) we were able to create a minimal program displaying an empty window. Now we want to draw something with OpenGL on that window, specifically, a triangle. Why a triangle? Well, the geometric shape more frequently used to approximate surfaces is the triangle. Approximation of 3D surfaces in real-time graphics by means of simpler shapes is known as tessellation. For our tutorial purposes, a single triangle will suffice.
GPU Power
Modern GPUs are quite fast and can also have a considerable amount of dedicated memory. When rendering, we’d like for as much rendering data as possible to be read by the GPU directly from its local memory. In order to render a triangle with OpenGL we’ll need, obviously, to transfer the 3 vertices of the triangle to the GPU’s memory. However, we do NOT want our rendering to go like this:
read a vertex from our computer RAM
copy it to the GPU memory
let the GPU process that single vertex
and then repeat this whole process for the next vertex of the triangle.
Ideally, what we want is to transfer a batch of data to the GPU’s memory, copying all the triangle vertices, and then letting the GPU operate with this data directly from its local memory. In OpenGL we have the concept of Vertex Buffer Object (VBO) to represent these data placed on GPU’s memory.
The data to render the triangle in OpenGL
Normally, we think of a vertex as a point, which in 3D space leads to a representation with 3 coordinates, commonly designated by x, y and z. However, in this case I’d like to think of a vertex as a more abstract concept: a minimal data structure required to define a shape. Given a vertex, we can “link” attributes to it to further define our shape. Thereby, one of such attributes of a vertex can be its position (the “x, y, z values”.) Other attribute might be the vertex’s color. And so on. In this tutorial we will “link” two attributes to our vertices: position and color. For position we will have three coordinates, each a floating point value. If a float takes 4 bytes, then our position attribute would require 3 x 4 = 12 bytes. For the color attribute, we’d have 3 extra components, following the RGB model. Each color component would then take 4 bytes, and the color attribute would also require 12 bytes. In total, each vertex would take 24 bytes, 12 for its position attribute, and 12 for its color attribute.
Now we have to specify how to process these vertices.
Here I’ll briefly discuss a tiny GLFW example. Previously, I explained how to setup Eclipse CDT to work with OpenGL, using GLFW and GLAD. However, I instructed to copy-paste the example code on GLFW Documentation page, without providing any details. In the following I’ll present some code that you can add to the little project of our setup post, and will include GLAD initialization too.
OpenGL is an API to render 2D and 3D graphics. Remember that an API (Application Programming Interface) is an interface for interaction between components of a system. Typically, an API defines a set of functions, protocols and/or tools. I’ll skip the details about the client-server model, but OpenGL allows a client program to communicate with GPUs (Graphic Processing Units, e.g., your videocard) to achieve faster, hardware-accelerated rendering. That’s why OpenGL is a common topic in the game development scene.
OpenGL is focused on just rendering. It’s an API to write and read data from a framebuffer, and that’s it. It won’t handle user input, or sound playback, or loading a PNG image. It does not even have functions to create or close a window. We’ll need auxiliar libraries for all of that.
A minimal OpenGL window
So we want to build a minimal OpenGL application on Windows. We’ll create an empty window with an OpenGL context, using the GLFW and GLAD libraries. In the following, I assume we’re using a 64 bits version of Windows. I’ll also be relying on mingw-w64. In summary, these are our assumptions:
Windows operating system (64 bits.) Things will be a tad different for macOS and Linux users.
Eclipse CDT.
mingw-w64 to build GLFW from sources. Besides, our Eclipse CDT project will be compiled with the gcc version of mingw-w64.
GLFW and GLAD libraries.
What’s GLFW?
As told, OpenGL does not provide any facility to create a window, retrieve user input, create the OpenGL context, etc. These functionalities depend on the operating system. GLFW is a C library which provides a neat abstraction layer to handle all of this on several platforms. Notice that GLFW is focused on management of windows, OpenGL contexts, user input and time. It will not play sounds, or load images, etc.
Level 9-6 of DragonScales 4: Master Chambers demands a high level of dexterity with the game’s strategies. In the following, we present a possible solution.
1- First activate the top arrow (the one going upwards.) It’s essential not to activate the arrow going down (yet.)
2- Then play your scales in order to occupy the cells around the bomb strategically. We aim to activate the arrow going down and, in doing so, yield a combination to explode the bomb. In our example, notice that the two green scales (one of them having the bomb) will combine with the lone green scale we’ve placed at the bottom left. When the arrow is activated, a combination will be formed immediately, exploding the bomb.
3- That’s it for the hardest moves. Now it only remains to activate the other arrow to descend the bomb.
4- Explode the bomb.
5- Finally, activate the arrow and conquer the top red cross-scale.
In DragonScales 3 you’ll have to destroy some special monsters by using the Sacred Axe. Specifically, all the levels of World 15 are full of such pesky creatures. Destroying them is easy, though. Pay attention to the scales you receive to play. Some of such scales will contain a little axe. Try to place the scale with the little axe in a cell of a column containing a monster. Then continue playing to form a combination which includes the scale with the axe. When such combination is formed, the Sacred Axe will appear to smash the monster (see Figure 1.)
Figure 1
Further on, in Level 16, you’ll find the traditional DragonScales symbols on the board. To remove them simply form combinations on the cells with the symbols (see Figure 2.)
All of NagiQ’s islands can be unlocked in the full version of the game.
In the full version of the game each island will be immediately unlocked after you complete the previous one. Then you’ll be able to click on an island image to select a level to play. Notice that some levels introduce gameplay variants to keep the game fresh, fun and challenging!