Select a Tutorial

Selected ShiVa Tutorials

Android Plugins part 5: Google AdMob

Building on all the previous tutorials, we are going to put everything we have learned to the test by integrating Google AdMob into our test project. Since it is currently one of the most popular ways to monetize your game, we will be looking at video rewards specifically.


Android Plugins part 4: No plugins!

For part 4 of the Android Plugin tutorial series, we are not going to use plugins at all. Instead, we will be looking at ShiVa’s event hook mechanism and modify the Android Studio project directly.


Android Plugins part 3: S3DXAndroidTools and native Android calls

In part 3 of the Android Plugin tutorial series, we are going to have a closer look at S3DXAndroidTools.jar, a ShiVa library which makes it easier to communicate with the Android API. With the help of this JAR, we are going to show you how to create a Toast, native message boxes, and...


Android Plugins part 2: JNI and JAR

Welcome back to part 2 of the Android Plugin tutorial series. This time, our C++ plugin will communicate directly with some Java code that is stored inside a Java Archive (JAR) using the Java Native Interface (JNI).


Android Plugins part 1: Pure C++

Welcome to a new tutorial series for ShiVa where we will be looking at various ways to create and use plugins in your Android applications. Part 1 will cover the general setup, the creation of a test project in ShiVa and Android Studio respectively, and look at potential pitfalls in the coding pipeline.


Tables with tables in tables

ShiVa is a C++ engine with a Lua scripting interface. While this works great for calling API functions, it does have its pitfalls when it comes to organizing and storing data. Since tables are the main (in fact, the only) data structuring mechanism in Lua, these pitfalls become especially apparent when trying to combine...


An Introduction to ShiVa iOS plugins

ShiVa games run natively on a large number of platforms without the need for the developer to adjust anything. Our STK + engine architecture was designed with the “build once, run everywhere” philosophy in mind. There are times however when you want to use a feature that is native to your target platform, ...


True multithreading in ShiVa pt.3: Object threads

Welcome to the last part of our multithreading tutorial series. In part 3, we are going to have a look at the unique challenges in Object AI threads and think about scaling our system from a single consumer (User AI) to potentially hundreds of objects in a single scene.


True multithreading in ShiVa pt.2: User states and events

Now that we are familiar with spawning and detaching threads, know about data races and lock_guarded mutexes, it’s time to put all that knowledge to good use and make all those threads do actual work in your ShiVa game! In this tutorial, we will be looking at two possible design patterns for...


True multithreading in ShiVa pt.1: Introduction

Lua Coroutines, which we discussed before in other tutorials, offer a nice way of running long calculations step by step every frame over a period of time, so your programs do not appear to be stuck or frozen while you wait for those functions to return. Unfortunately, Coroutines do not offer true multithreading, which means...


ShiVa Lua unlocked Pt.4: code injection, garbagecollector, coroutines

Welcome to the probably last entry in this tutorial series. Today, we are going to have a look at the last remaining undocumented RealtimeAPI functions, which allow you to load arbitrary external Lua code, control the garbage collector, and let functions run seemingly in parallel.


ShiVa Lua unlocked Pt.2: Editor DLL modules

Modules for the ShiVa 2.0 Editor are written in Lua (logic) and XML (UI). With far over 2000 Editor API functions and constants, you can write very sophisticated modules with the Editor Lua API alone. Although from time to time, you might run into C/C++ code that does exactly what you need...


ShiVa Lua unlocked Pt.1: tables, os, io

At its core, ShiVa is a C++ engine which also allows developers to use Lua directly inside the editor for easy coding. ShiVa has an extensive API with over 5000 functions and constants to choose from. Most of them are covered in our documentation. To make the Lua interface possible, ShiVa ships with...


ShiVa HTML5: JavaScript Interaction

With the latest ShiVa 2.0 beta 2, you can take advantage of our greatly improved HTML5/WebGL engine, which now sports IE11 and gamepad support, better performance, and canvas resizing among other enhancements. The feature we want to talk about in this tutorial is the new JavaScript (JS) bridge that allows your games to communicate...


Caching and External Sources

Learn how to use the cache and system APIs to stream remote videos, textures, and game content to your ShiVa application!