ShiVa 3D products

You will find below a list of products designed for games made with ShiVa 3D.

The packs can be used for free while running in ShiVa Editor, so feel free to download and try them.

Show demo


> Fall in love for the Annual Pass and save up to 70% <

Why not provide to your project all of the features it needs and create the most amazing game in no time at a very attractive price? The Annual Pass grants you access to every plugin and every scripting pack you can see on the site, during one year.

Give to your game a new dimension, with a large choice of scripting packs and plugins : tweening, in-app purchases, ads, social, json, sprites and much more.

In addition to what you can see on the site, owning the Annual Pass also means you will have access to the upcoming products, with no additional fee!

You can renew your Annual Pass at any time and if you decide to, your Annual Pass will be extended by 1 year. The Annual Pass is not a subscription,it won't be automatically renewed.
Nothing happens to your games when the Annual Pass expires, you just won't be able to activate the plugins (or packs) for your next games.

There's also an Annual Pass dedicated for the scripting packs, and one other for plugins in case you have specific needs. The most attractive one is obviously the Global Annual Pass.

The Annual Pass is for sure what you need!


Packs
Annual Pass
$390
($610.00)
Global
Annual Pass
$250
($1350)
Plugins
Annual Pass
$250
($740.00)


By purchasing the Packs Annual Pass, you get access to everything in this category during 1 year By purchasing the Plugins Annual Pass, you get access to everything in this category during 1 year

By purchasing the Global Annual Pass, you can access both categories during 1 year!

ShiVa packages Read the introduction

Why?

I have programmed a lot of games during the past years and I've aquired a nice experience with ShiVa. Each time I have a new game to do, there are things that are similar to the previous games I did, some identical features, some identical problems too...

That's why I've decided to create these packs that can be included to a game to not have to reinvent the wheel each time I have a new game to do. Each pack is independent. It does a single task, but it does it well. With these packs, you (and I) will save a lot of time and by using packs your code will become much more readable, also more maintainable.

What is it?

Packs are the easiest and most effective way to add new features to your game.

What I call a 'pack' is a .stk file. This kind of file is not only used to hold the ShiVa game that will be executed, but can also contain independent resources. The pack can be loaded at runtime by the game in order to use the resources it contains.

The main objective of the packs provided here is to allow games to embed complex behaviours with very simple implementation. A pack can provide features that are very difficult to develop but thank to these packs you'll get the thing with only a few lines of code. The development time you save is just huge.

How does it work

The use of these packages is very simple: place the .stk file in your project directory, load it and use it.

To facilitate the loading step of these packs, you will find below a file named JPPackLoader allowing you to load these packages with a single line of code.

At publish time, you just have to add the packs into the "Additional files" section of the Authoring Tool.

Pack vs Plugin?

Packs can contain any kind of ShiVa resources (AIModels, textures, models, ...). However, most packs you'll find below contain only AIModels. Just like plugins, packages can create new script APIs, so what differences are there with plugins?

The packs have two disadvantages: the completion is not available for their APIs (Ctrl+Space shortcut not available and no LUA colorisation) and they only work with LUA projects (no C++ compilation). This last point is actually an advantage against the plugins because it allows the pack to be compatible with all platforms because there is no need to recompiled it, which also means that the packages are already compatible with platforms that have not been released yet!

Another advantage for the packs, their very small size. Let's compare the pack JPTweener to the Tweener plugin (available in the officiel ShiVa Store): they both provide the same functionalities but JPTweener is only 25KB while the plugin is 4.5MB!

In fact the lack of completion and API colorization is not a problem because there's a workaround. For each pack available on this site, a "LUA extension" is prodided which is a "small plugin" that will provide you the completion and colorization, and you will use it only while in ShiVa Editor, it won't be exported. The combination of packs and their small plugin is the best possible solution because it offers the advantages of each of them without having the disadvantages.

Pricing policy

- A bought product can be activated for an unlimited number of your games

- If a product is updated with new features, its price may be increased. However, if you've purchased a previous version of this product, you'll get the upgrades for free.

Requirements

ShiVa 1.9.2 or greater required.

Pack loader Samples Tutorials My Account

jppackloader jppackloader JPPackLoader v1.6 Tool to load the packs available on this site into your games Free

JPPackLoader is an AIModel that will allow you to load .stk files in your games. It will be useful for all packages offered below.

Once the AIModel is added to your game, the process to add a pack to your game is as follows:
- Add the .stk files you want to load to the root directory of your ShiVa project.
- Send an event to JPPackLoader.
- Activate your packs

Here is an example of loading and activation, with the JPAnimation pack (who must have been placed in your project root directory):

--------------------------------------------------------------------------------------------------------------

local hUser = application.getCurrentUser ( )
user.sendEventImmediate ( hUser, "JPPackLoader", "onLoadLocalPacks" )
JPAnimation.activate ( "<email>", "<activation_key>" )

--------------------------------------------------------------------------------------------------------------

Note that if the pack is stored locally, you can use the pack directly because it is loaded instantly when "onLoadLocalPacks" is called. However, some games may require to store the pack on a distant server, so the pack has to be downloaded and this process may take several frames. JPPackLoader is able to do it, and this is now a 2 steps process: download request made by you to JPPackLoader, and callback event sent to you by JPPackLoader when all the packs have been downloaded and are ready to be used. Here are the steps to follow:

--------------------------------------------------------------------------------------------------------------

local hUser = application.getCurrentUser ( )
user.sendEventImmediate ( hUser, "JPPackLoader", "onLoadPack", "JPAnimation", sUrl ) --Parameters are <pack_name> and <pack_uri>
--Do the same to request the download of any other pack here

user.sendEventImmediate ( hUser, "JPPackLoader", "onLoadPacksEnd" ) --Tell JPPackLoader that all the download requests have been made to allow it to send the callback event when they all are downloaded

--------------------------------------------------------------------------------------------------------------

Simply send the "onLoadPacksEnd" event to inform JPPackLoader that all the pack requests have been made. JPPackLoader will notify you when they are all downloaded and ready to use with the "onPacksLoadingDidEnd" handler. You can start using your packs in this handler, starting with the activation:

--------------------------------------------------------------------------------------------------------------
function MyAIModel.onPacksLoadingDidEnd ( )
--------------------------------------------------------------------------------------------------------------

      JPAnimation.activate ( "<email>", "<activation_key>" )

--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------
API
ChangeLog
Download file

Packs

jpanimation jpanimation JPAnimation v5.0 Magic tool to animate everything you want in your game. Easiest implementation ever. $50

JPAnimation pack is truly magical. It is a system that will allow you to create animations in your games using the easiest possible way, by using the functions of the ShiVa base API. Usually, when you use a ShiVa function, the effect is instantaneous. With JPAnimation, you can choose at any time to enter or exit the 'animation mode', a mode where all the functions that you use will be applied not instantly but gradually from the current value to the new value, over a defined duration. See for yourself how this works:

--------------------------------------------------------------------------------------------------------------
object.setTranslation ( hObject, 0, 0, 0, object.kGlobalSpace )
JPAnimation.enterAnimationMode ( )
object.setTranslation ( hObject, 5, 0, 0, object.kGlobalSpace )
JPAnimation.leaveAnimationMode ( )
--------------------------------------------------------------------------------------------------------------

The object is firstly placed at the origin of the scene. Then is declared an animation block (between enterAnimationMode and leaveAnimationMode). Everything in that block will be interpreted as functions that have to be animated. Here is defined a new position of the object (5,0,0). This will make the object moving from the position (0,0,0) to (5,0,0) over a duration of 1 second (which is the default animation duration).

You can also define an AIModel and a handler to be called when all of the animations defined in the block have ended. Thanks to JPAnimation, you can develop your game with a "event-driven programming" style, no need to create states or onEnterFrame anymore to animate things, JPAnimation does it for you.

The animation proposed by JPAnimation follows a linear curve. By installing the JPTweener pack, you can offer to JPAnimation all of the JPTweener transition curves. The combination of JPAnimation and JPTweener is very powerful, it allows you to make great animations in your game with very few lines of code. Try the sample to see what these packs are capable of. Here's how to use JPTweener with JPAnimation:

--------------------------------------------------------------------------------------------------------------
JPAnimation.setAnimation ( "easeInSine" )
--------------------------------------------------------------------------------------------------------------

JPAnimation works with most of the get/set function pairs of the ShiVa API, such as for objects (translation, rotation, scale, ...), for scenes (colors, shaders, ocean, fog distance, ...) and all of the other APIs. To know the list of the functions JPAnimation supports, please refer to the API page by clicking the corresponding button below. In case a function you need is missing, please contact me and I will be happy to complete the pack. In the meantime, you can reference the missing function into JPAnimation by yourself thanks to the great function: JPAnimation.addFunction

JPAnimation also offers to call any other function with a delay, by using JPAnimation.callFunction ( nParamCount, sApiDotFunction, vParam0, vParam1, ... ) like that:

--------------------------------------------------------------------------------------------------------------
object.setTranslation ( hObject, 0, 0, 0, object.kGlobalSpace )
JPAnimation.enterAnimationMode ( )
object.setTranslation ( hObject, 5, 0, 0, object.kGlobalSpace )
JPAnimation.callFunction ( 2, "object.setVisible", hObject, false )
JPAnimation.leaveAnimationMode ( )
--------------------------------------------------------------------------------------------------------------

As a result, the object will translate to its new position, and then will be hidden.

JPAnimation also provides a function JPAnimation.callFunctionWithDelay ( nDelay, nParamCount, sApiDotFunction, vParam0, vParam1, ... ). With this function, you will be able to delay the call of any function without having to declare an animation block:

--------------------------------------------------------------------------------------------------------------
JPAnimation.callFunctionWithDelay ( 5, 2, "hud.setComponentVisible", hComponent, true )
--------------------------------------------------------------------------------------------------------------

The HUD component will be visible in 5 seconds.

Requirements:
- ShiVa 1.9.2 or greater

6 samples are available for this product!

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpbutton jpbutton JPButton v2.1 Significantly improves the HUD buttons default behavior $20

JPButton replaces the default ShiVa behavior for "onClicked" event of HUD buttons which stupidly trigger the event when the user's finger (or mouse) is released over the button.

JPButton will inform you in real time when the button state changes: normal or pressed state. When the user places his finger on a button, it enters the state "pressed". Now if, without releasing his finger, the user moves his finger on the screen farther or closer to the button, it will switch between "normal" and "pressed" states according to distance between the finger and the button's area.

JPButton does much more: it also checks if the button has not been moved, for example if it is present in a list, in order not to trigger the event if it was moved because of the list scrolling causing the button to remain under the user's finger.

All this is automatic, the event is triggered by JPButton. All you have to do (if you want to) is to implement the "onButtonDidEnterNormalState" and "onButtonDidEnterPressedState" handlers in order to animate your buttons, for example by changing their color to make them darker when pressed. Even better, you can use it with JPSprite to set a specific sprite for each of the button states:

--------------------------------------------------------------------------------------------------------------
function MyAIModel.onButtonDidEnterNormalState ( sButton )
--------------------------------------------------------------------------------------------------------------

      JPSprite.setComponentSprite ( sButton, "button_normal_sprite" )

--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------


--------------------------------------------------------------------------------------------------------------
function MyAIModel.onButtonDidEnterPressedState ( sButton )
--------------------------------------------------------------------------------------------------------------

      JPSprite.setComponentSprite ( sButton, "button_pressed_sprite" )

--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

JPButton also allows you to enlarge the area of effect of your buttons, which is very convenient for small buttons (or for the large fingers...).

But wait, that's not all, by combining JPButton with JPMultitouch, you provide to your HUD buttons the possibility to be used in multitouch, I mean you will be able to click on several buttons at once. Very convenient for games using a virtual game pad, for instance! There's nothing else to do than to add these 2 packs to your game and call JPButton.enableMultitouch ( true ) and it will work like a charm!

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpedittext jpedittext JPEditText v2.2 Significantly improves the HUD edit text default behavior (placeholders, key repeat, paste, undo...) $30

JPEditText allows you to add new features to the ShiVa's Edit Texts

The first feature is the possibility to set a placeholder to a HUD Edit Text. When the component is empty, you will be able to set a default text with a specific color. For instance, if you have a search bar, if there's nothing entered yet, JPEditText allow you for instance to display "Search..." in grey until the user enters his search keywords. As soon as the user enters text, the placeholder will disappear and the user's text will show up in the right color. If he deletes the text, the grey "Search..." text will be displayed again. It's really an amazing feature.

Another great feature is is the keyboard keys repeat when a text is added to the component. By default, if you press a key, even if you hold it only one character will be written. With JPEditText, the character will be repeated until the key is released.

This feature also works when moving the edit cursor position with the keyboard arrows and when deleting text with both Del. and BackSpace keyboard keys.

JPEditText also grants the possibility to paste text using the Ctrl+V shortcut and undo using Ctrl+Z.

Some keys doesn't work at all with default Edits behaviour, like the math symbols of the numpad (/ * - +). With JPEditText, they are taken into account!

Finally, JPEditText handles the Return key to add a new line in the text.

In short JPEditText modify the default archaic behaviour of the ShiVa's Edit Texts to obtain smart components by giving them multiple behaviours that are present in most of the text editors.

The usage of JPEditText is very simple, load it in your game, activate it, and... you are done, nothing else to do, JPEditText is completely autonomous!

Note : As this pack is based on the keyboard events, consider buying this pack only if your game will be published on a device using a keyboard that triggers the onKeyboardKeyDown/Up events. For instance, it won't work with the iOS native keyboard which does not triggers those events. It will work for the Android native keyboard (that you can add in your game by using plugins like jpVirtualKeyboard) as it sends the keyboard event.

About Android, JPEditText offers to fix a bug with android applications, that does not allow to delete letters with the native android keyboard backspace key. By using JPEditText, this bug will be gone.

Requirements:
- ShiVa 1.9.2 or greater

1 sample is available for this product!

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpevent jpevent JPEvent v1.7 Cancel/pause/resume posted events $25

Who has never be in need to cancel a posted event?

JPEvent is a very useful tool. With this tool, you will be able to control events you have posted. It allows you to cancel events, to pause or resume them, and also to add some additional delay.

You will be able to do actions on several events at once, thanks to the patterns support.

JPEvent provides various functions, to target object events only, user events, events sent in a scene or in the whole application. Here are a couple of functions:

--------------------------------------------------------------------------------------------------------------
--All of these functions can be used with patterns!
user.cancelEvents ( hUser )
scene.pauseObjectEvents ( hScene, "MonsterType.*", ".*" )
object.resumeEvents ( hObject, ".*", "onAttack" )
application.delayEvents ( 3 )
--------------------------------------------------------------------------------------------------------------

All of the available functions can be found in the API page of JPEvent.

JPEvent also provides a new feature when sending events, the possibility to use a pattern in place of the AIModel name. With this king of feature, you will be able to send events to several AIModels at once. This feature works for both users and objects, with postEvent, sendEvent and sendEventImmediate. Also, 3 new functions are available, to be able to send events to the current user without having to use its handle:

--------------------------------------------------------------------------------------------------------------
application.postEventToCurrentUser ( nDelay, sAIModelPattern, sHandler, vParam0, ... )
application.sendEventImmediateToCurrentUser ( sAIModelPattern, sHandler, vParam0, ... )
application.sendEventToCurrentUser ( sAIModelPattern, sHandler, vParam0, ... )
--------------------------------------------------------------------------------------------------------------

Finally, it offers a very interesting feature: it sends a "onWillBeDestroyed" to any AIModel, just before it will be destroyed. This is really great, it allows you for instance to free the allocated resources during the AIModel life time. It works for any AIModel, for both users and objetcs, an occurs in the following cases:
- When you manually call removeAIModel
- When a scene is closed
- When a user or object is destroyed
- When the application quits or is restarted

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpextendedapi jpextendedapi JPExtendedAPI v4.0 Adds new functions to the default ShiVa APIs $30

JPExtendedAPI is a very nice pack. Its particularity is that it does not create a new API, but it improves the existing ones by adding new functions very useful when creating your game.

A good example is the ability to know at any time if a key is pressed or not. This feature seems elementary, but is not present in the API offered by ShiVa, and therefore it was necessary to track by yourself the events for each of the keys you were interested in and store its state using a boolean variable, which is very boring... Now, thanks to JPExtendedAPI you have the input.isKeyboardKeyDown ( kKeyCode ) function that can be called from anywhere in the code, without having to manage the keyboard events by yourself.

Below some features offered by JPExtendedAPI:

--------------------------------------------------------------------------------------------------------------

hashtable.push ( htHashtable, sKey, vValue )

hud.setContainerRotation ( hComponent, nRotation )
hud.sizeComponentToFitText ( hComponent )

sRes = table.implode ( tStringsToImplode, sDelimiter )

table.sort ( tTable, bOptSortStringNumbersLikeNumbers )

--------------------------------------------------------------------------------------------------------------

These functions represent a small part of what JPExtendedAPI offers, to know all of them, go to API page by following the link below.

Requirements:
- ShiVa 1.9.2 or greater

2 samples are available for this product!

API
ChangeLog
Download the LUA extension
Download pack

jpgesture jpgesture JPGesture v1.7 Multitouch gestures detection $25

JPGesture is a pack for multi-touch gesture and device shaking detection.

It detects the majority of usual gestures:
- Taps
- Long presses
- Swipes (up, down, left and right)
- Pinch in / pinch out
All of these gestures can also be detected with up to 5 fingers.

JPGesture also detects:
- Rotations (for all of the previous gesture events)
- Horizontal and vertical shaking of the device

JPGesture will inform you in real time of the gesture the user is currently drawing on the screen with the "onGesturePending" handler. Once the user has finished the gesture, you will be notified through the "onGestureDetected" event.

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpinput jpinput JPInput v1.5 Collects device input sources related values. $20

JPInput is the pack to have if you want to easily get values about most of the device input sources.

No need to implement mouse, keyboard, joypad handlers to be informed of the sources state anymore. JPInput provides functions you can call from everywhere to get these values.

For instance:

--------------------------------------------------------------------------------------------------------------
--Mouse
bYes = JPInput.isMouseButtonDown ( nButton )
--Keyboard
bYes = JPInput.isKeyboardKeyDown ( kKeyCode )
--Joypad
bState = JPInput.getJoypadButtonState ( nJoypad, nButton )
nAxisX, nAxisY, nAxisZ = JPInput.getJoypadState ( nJoypad, nPart )
nAxisX, nAxisY = JPInput.getJoypadStickState ( nJoypad, nStick )
--------------------------------------------------------------------------------------------------------------

Note that JPInput can also provide values about multi touch. This feature requires the JPMultiTouch pack.

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpjson jpjson JPJson v1.8 Cross-platform Json parser $30

Json is an alternative to XML. It is a human-readable text format to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data to/from a server.

The Json format has several advantages over XML:
- It is easier to read as it is not based on tags.
- More compact than XML, resulting on less network consumption to transmit the same data.
- Clever structure based on arrays, maps and standard types (number, boolean, string, null)

Have a look to an XML structure:

--------------------------------------------------------------------------------------------------------------
<xml>
      <name>John</name>
      <id>82</id>
      <rank>3</rank>
      <score>32410</score>
      <rank>3</rank>
      <friends_id>
            <id>119</id>
            <id>384</id>
            <id>42</id>
            <id>746</id>
      </friends_id>
      <location>
            <city>New York</city>
            <country>US</country>
      </location>
</xml>
--------------------------------------------------------------------------------------------------------------

Now, look at the equivalent Json structure, with the same data:

--------------------------------------------------------------------------------------------------------------
{
      "name":"John",
      "id":82,
      "rank":3,
      "score":32410,
      "rank":3,
      "friends_id":[119,384,42,746],
      "location":{
            "city":"New York",
            "country":"US"
            }
}
--------------------------------------------------------------------------------------------------------------

The Json is roughly 40% lighter and easier to read because it is consisting of attribute–value pairs while XML is based on tags.

JPJson offers 2 ways to create a Json object:
- From a Json string: jJson = JPJson.createFromString ( sJson )
- From a Json you have downloaded: JPJson.receive ( sTag, sURI ) and jJson = JPJson.getFromTag ( sTag )

Now if you want to get the name of the player or its score, it's really easy, look:

--------------------------------------------------------------------------------------------------------------
local sName = jJson["name"]
local nScore = jJson["score"]
--------------------------------------------------------------------------------------------------------------

Accessing a sub-element is also a piece of cake:

--------------------------------------------------------------------------------------------------------------
local sCountry = jJson["location"]["country"]
--------------------------------------------------------------------------------------------------------------

This was for accessing values contained in maps (or objects as it is commonly named in Json).
Here is how to browse an array (defined with square brackets):

--------------------------------------------------------------------------------------------------------------
for i = 0, JPJson.getSize ( jJson["friends_id"] ) - 1
do
      local nFriendId = jJson["friends_id"][i]
      --Your code here
end
--------------------------------------------------------------------------------------------------------------

It is really easy, no need to use the API for browsing the Json element, you can access it directly with keys and indexes!

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jplensflare jplensflare JPLensFlare v1.0 LensFlare manager $30

JPLensFlare is a wonderful lensflare manager.
A lens flare is a visual effects that appears when you look at a source of light, a beautiful effect that cross the screen, starting from the light position to the opposite of the screen/field of view.

Lens flares are so beautiful that they can make a game that has poor graphics look amazing. You can take a look to a sample game using JPLensFlare by clicking the link below.

Requirements:
- ShiVa 1.9.2 or greater

1 sample is available for this product!

API
Download the LUA extension
Download pack

jpmultitouch jpmultitouch JPMultiTouch v1.7 User friendly multitouch managment $25

ShiVa's multitouch is really hard to manage, compared to the mouse. "Taps" in the "onTouchSequenceChange" handler are not very convenient because all the inputs are sent to a unique handler and when the number of detected fingers change, the input order can change.

With JPMultiTouch, you are done with all of these problems, the multitouch management becomes so easy, using the same method than the mouse. Each time a finger is pressed, moved or released, specific handlers are called for each one: "onTouchInputBegin", "onTouchInputChange" and "onTouchInputEnd".

But wait, that's not all, by combining JPMultiTouch with JPButton, you provide to your HUD buttons the possibility to be used in multitouch, I mean you will be able to click on several buttons at once. Very convenient for games using a virtual game pad, for instance! There's nothing else to do than to add these 2 packs to your game and call JPButton.enableMultitouch ( true ) and it will work like a charm!

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpmultitouchsimulator jpmultitouchsimulator JPMultiTouchSimulator v1.4 Simulate multi touch by using the mouse Free

There are some things that are different on the platform and in ShiVa. This is the case for the multi touch.

JPMultiTouchSimulator provides you a simple way to simulate fingers touching your application, using the mouse and the buttons.

This pack can be used to simulate gestures for instance, here is how it works:
- Move the mouse cursor with the left button down to simulate 1 finger (swipes, taps, long presses, with 1 finger).
- Move the mouse cursor with the right button down to simulate a 2 fingers gesture, with fingers doing the same thing (swipes, taps, long presses, with 2 fingers).
- Move the mouse cursor with the middle button down to simulate a 2 fingers gesture, with fingers doing the opposite gesture (pinches and rotations, with 2 fingers).

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpnotification jpnotification JPNotification v1.6 Send notifications to object or user. Objects can now receive user events. $20

JPNotification allows you to send notifications to objects or users AIModels.

Any object or user can register to a specific event. At any time, if you decided to trigger this event, all of the AIModels registered to this event will be notified. It is very useful, who can tell he has never be in need of this feature at a time in the development of a game?

JPNotification also offers a very interesting feature: the possibility for objects to receive events that are usually sent to users. For instance, an object will be able to know the joypad position or the state of the keyboard keys.

Requirements:
- ShiVa 1.9.2 or greater

1 sample is available for this product!

API
ChangeLog
Download the LUA extension
Download pack

jppicker jppicker JPPicker v2.2 Optimized list or picker items management $50

A picker is a list of items which can be scrolled and where the item at the middle is the selected one. JPPicker will do all the hard stuff of computing the picker position and will give you the state of the list and the middle item in real time. Then you are free to use the values provided by JPPicker on any kind of elements, for instance HUD components or scene objects.

The JPPicker animation is very pleasant and smooth, there is a bonce effect when the list is out of the start or end position. It is possible to enable an option to make the picker to always end its scrolling on an exact item position.

Its usage is very easy, just tell JPPicker the number of items in the list and you are almost done:

--------------------------------------------------------------------------------------------------------------
function MyAIModel.onInit ( )
--------------------------------------------------------------------------------------------------------------
      local hObjectDelegate = nil
      local nItemCount = 20
      JPPicker.addPicker ( hObjectDelegate, nItemCount )
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
function MyAIModel.onPickerPositionDidChange ( sID, nPosition, nItemIndex )
--------------------------------------------------------------------------------------------------------------
      this.updateItemsPosition ( nPosition )
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
function MyAIModel.onPickerCenterItemDidChange ( sID, nIndex, bListCurrentlyScrollingToItem )
--------------------------------------------------------------------------------------------------------------
      this.setSelectedItem ( nIndex )
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

The result is very impressive. Take a look at the JPPicker example in the demo, at the race selection screen.

JPPicker also provides a wonderful function, named JPPicker.helpMeUpdateMyItems, to help you manage your picker in order to have a huge number of items without any performance issues. I have created a tutorial on that subject you should read if you want to learn more about the impact of your Scripting Strategies on your Game Performance.

Requirements:
- ShiVa 1.9.2 or greater

2 samples are available for this product!

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpscoreanimator jpscoreanimator JPScoreAnimator v1.0 Bring life to the scores displayed in your games. Free

JPScoreAnimator is a small but very powerful pack. The kind of pack that adds life in your game in no time.

Give it a label, a score and a few parameters and enjoy the show :)

No more bla bla. This pack comes with a very nice sample showing what you can achieve if you use it in your games. The sample can be found by using the link below.

1 sample is available for this product!

API
Download the LUA extension
Download pack

jpscrollview jpscrollview JPScrollView v3.1 Allows a HUD container to become a scroll view $50

Like UIScrollView for iOS, JPScrollView will allow you to scroll the entire contents of a HUD container.

Simply define a container as a ScrollView and all its children will get the possibility to be scrolled in the view (the container) with the finger or mouse, like for a web page in a browser, with rebound effects when you are out of the area. This pack is the perfect choice for a lot of things in games, such as display of scores, trophies or for lists of objects of your in-game store for example.

JPScrollView also enhance views with very nice scrollbars that you'll love for sure!

With such a pack you will increase significantly the quality of your game, it will look well polished, fluid, enjoyable, etc.. Try the sample to see for yourself!

Requirements:
- ShiVa 1.9.2 or greater

3 samples are available for this product!

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpshortcut jpshortcut JPShortcut v1.2 Associate your game actions with customizable shortcuts (keys, mouse/joypad buttons). $30

In your game, when you want to do an action like moving a character, you will be listening to the keyboard events, to know if the key to move forward, backward or to start a specific action is pressed or released. That's great, but as soon as you allow the user to customize the actions key, it becomes much more complicated.

With JPShortcut, you will be listening for action events instead of keys. JPShortcut will send you events to let you know when an action shortcut is pressed or released, whatever the shortcut is.

JPShortcut embeds functions to be called by your shortcut editor interface. Tell JPShortcut that the "Forward" action has been clicked by the user to be edited, and JPShortcut will automatically change the shortcut as soon as a new key is pressed, and will notify you of the new key to let you update the interface with the new action key name.

JPShortcut is compatible with mouse buttons as well as joypad buttons.

Here is a quick example, starting from the setup step:

--------------------------------------------------------------------------------------------------------------
function JPShortcutSample.onInit ( )
--------------------------------------------------------------------------------------------------------------
      JPShortcut.createAction ( "Forward", input.kKeyUp )
      JPShortcut.createAction ( "Backward", input.kKeyDown )
      JPShortcut.createAction ( "Left", input.kKeyLeft )
      JPShortcut.createAction ( "Right", input.kKeyRight )
      JPShortcut.createAction ( "Crouch", input.kKeySpace ) --Special action
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

Here's the code if you want to do something as long as the action shortcut is pressed:

--------------------------------------------------------------------------------------------------------------
function JPShortcutSample.onEnterFrame ( )
--------------------------------------------------------------------------------------------------------------
      if ( JPShortcut.isActionShortcutDown ( "Forward" ) )
      then
            --Move forward
      end
      --Same for the other actions
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

And here the code for actions called once, in the onActionShortcutPressed (or Released) handler, automatically called by JPShortcut when the action is triggered:

--------------------------------------------------------------------------------------------------------------
function JPShortcutSample.onActionShortcutPressed ( sAction )
--------------------------------------------------------------------------------------------------------------
      if ( sAction == "Crouch" )
      then
            --do the crouch action
      end
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

In these 2 cases, even if the shortcut changes, your script remain the same as it is looking for actions state instead of keys or buttons states.

Requirements:
- ShiVa 1.9.2 or greater

1 sample is available for this product!

API
ChangeLog
Download the LUA extension
Download pack

jpsimulator jpsimulator JPSimulator v1.4 Debug tool to simulate a specific configuration or device Free

JPSimulator is a debug tool allowing you to simulate several things in your game, helping you to test a language, an OS or a Client Type for instance, and let you see how your game behaves if it was executed on a specific device or in a particular configuration, without leaving ShiVa Editor.

The functions system.getOSType ( ), system.getOSLanguage ( ) or system.getClientType ( ) will return the simulated value instead of the real ones.

Other values can be simulated, like the screen resolution. Please refer to the API page for more details.

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpsound jpsound JPSound v1.1 Huge new features for sounds $25

JPSound adds ease of use for implementing the sounds of your games, because you can play, stop (and more) sounds just by using their name: no worries about what is the index of a sound, and no problem if you move a sound of your SoundBank to another index.

Another great feature is the possibility to play several sounds of the same name at once just by using its name: reference the sound several times in your SoundBank and JPSound will automatically play the one that is not currently playing. Very powerful for sounds that must be played repeatedly quickly, like a machine gun for instance.

JPSound has many wonderful features, here's the full list of what it has to offer:

- Master sound volume.

- Global volume for sounds played by objects.

- Global volume for sounds played by users.

- New sound.getVolume and hud.getSoundVolume functions.

- Most of the functions of the 'sound' API and the hud functions related to sounds can now be called by using a sound name instead of a sound index.

- Possibility to play several sounds of the same name simultaneously just by giving its name to the hud.playSound or sound.play functions

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpsprite jpsprite JPSprite v3.1 Atlases, sprites and animated sprites manager $50

JPSprite is a pack for atlases, sprites and animated sprites management.

All the best games use an atlas system because it is the best solution to optimize your game: improved performance because the sprites are using the same texture (less draw calls) and reduced memory consumption (a lot of wasted space if each sprite had its own texture).

JPSprite is based on TexturePackerGUI which is a software for atlases creation, which generates a texture containing the sprites and an xml to describe the UV coordinates for each of them.

Once your atlas and its xml file are generated by TexturePackerGUI, import and reference them in your ShiVa game.

Give to JPSprite a HUD component and the name of a sprite and it will apply the correct texture to your component and the corresponding UV coordinates.

It also embeds an animation system. If your atlas contains a serie of sprites ending with consecutive index (starting from 0), JPSprite will consider it as an animation. There are many options, such as the ability to choose the frame rate of the animation, change its scale, and much more.

JPSprite is also equipped with a formidable optimization system. If you decide to enable it, this system will adjust the performances of JPSprite depending on the state of your game. If your game frame rate is low at some time, JPSprite will automatically reduce its own working speed to maximize the resources available for the rest of your game, without any visible impact on the animated sprites.

--------------------------------------------------------------------------------------------------------------
--Load the atlas. JPSprite will detect the sprites and animations
JPSprite.setupAtlas ( "Avatar" )
--Set the animation named "Talking" to the HUD component, with loop mode enabled
JPSprite.setComponentAnimation ( "ScreenRoot.Avatar", "Talking", true )
--If needed, enable the optimization system
JPSprite.setOptimizationSystemEnabled ( true )
--------------------------------------------------------------------------------------------------------------

As an example, the game Babel Rising: Cataclysm which can be found in my portfolio uses a similar sprite and optimization system, and the game can display several hundreds of animated sprites at once, keeping a good framerate.

Below the parameters I recommand to generate your atlases with TexturePackerGUI:
- Data Format: Generic XML
- Size constraints: POT (Power of 2)
- Force squared: enabled
- Allow rotation: disabled
- Trim sprite names: enabled

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Show in demo
Download the LUA extension
Download pack

jpstringnumber jpstringnumber JPStringNumber v1.7 Operations on large numbers without precision loss. $30

Good bye to the number type limitations, say hello to JPStringNumber.

With JPStringNumber, you will be able to do operations on numbers containing an infinite count of digits without having to carry about precision loss (1.52416e+018 -_-').

JPStringNumber is able to do most of the math operations on those numbers using their string representation.

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpthread jpthread JPThread v1.2 Execute a single function over several frames $20

JPThread is another magic pack, allowing you to think your game conception in a new manner. It allows you to execute the code of a function over several frames.

--------------------------------------------------------------------------------------------------------------
JPThread.create ( this.preloadSceneResources )
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
function MyAIModel.preloadSceneResources ( )
--------------------------------------------------------------------------------------------------------------
      for i = 0, table.getSize ( this.tTextures ( ) ) - 1
      do
            local sTextute = table.getAt ( this.tTextures ( ), i )
            application.forceResourceToStayLoaded ( sTexture, application.kResourceTypeTexture, true )
            JPThread.addYieldPoint ( )
      end
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

As a result, the loading process will be executed over several frames, at a speed of 1 texture loading per frame. Your game execution will be much more fluid. JPThread.addYieldPoint ( ) mean the function execution pauses here and will start from here at the next frame. Of course, you can add this call several times in your function code.

Here is a screenshot of the Performance Reporter in ShiVa, you can see clearly that the function does not create a freeze at all as it is executed over several frames:

This feature is also very useful in many other cases, think for instance how you currently load a file into the cache. Now, you will be able to do the whole process with a single function call:

--------------------------------------------------------------------------------------------------------------
function MyAIModel.loadFile ( sFile, sUrl )
--------------------------------------------------------------------------------------------------------------
      cache.addFile ( sFile, sUrl )
      while ( cache.getFileStatus ( sFile ) >= 0 and cache.getFileStatus ( sFile ) < 1 )
      do
            JPThread.addYieldPoint ( )
      end
      
      local nStatus = cache.getFileStatus ( sFile )
      
      if ( nStatus == 1 )
      then
            --Success
      else
            --Fail
      end
--------------------------------------------------------------------------------------------------------------
end
--------------------------------------------------------------------------------------------------------------

This pack is really powerful.

Requirements:
- ShiVa 1.9.2 or greater

1 sample is available for this product!

API
ChangeLog
Download the LUA extension
Download pack

jptweener jptweener JPTweener v2.2 Create complex transitions $30

JPTweener is the perfect companion for all those who wish to add some transitions and fluidity in their games. With its multitude of transitions, you'll be able to add rich and varied animations to your games.

Its usage is very simple, give it a time factor for instance and it will give you the value corresponding to the transition that you choosed. Rebounds effects, elastic curves, ... the only limit on its implementation will be your imagination! Try the sample below to see what can be achieved with this pack.

You can find all the transitions curves, animated, on this site.

JPTweener also embeds special curves, like pulse and shakes and allows you to create your own custom curves based on polynomial numbers. Don't be afraid it is very simple thanks to the curve generator.

You can also create new eases from constant values or from your own function, JPTweener lets you do everything!

Note that this pack can be combined with JPAnimation. Thanks to JPAnimation, you will not have to worry coefficients anymore, JPAnimation does it for you. Go to the appropriate section for more details.

Requirements:
- ShiVa 1.9.2 or greater

8 samples are available for this product!

API
ChangeLog
Download the LUA extension
Download pack

jptype jptype JPType v1.4 Know the type of any variable or convert it into string Free

JPType is a small but very useful pack allowing you to know the type of any LUA variable.

Like LUA variables are untyped, they can contain any value, that's sometimes a problem when trying to do operation between 2 incompatible variables or when passing a parameter with a wrong type to a function of the API

Thanks to JPType, you can now know what is the type of a variable, for instance string, boolean, number etc.

JPType is available for free!

Requirements:
- ShiVa 1.9.2 or greater

API
ChangeLog
Download the LUA extension
Download pack

jpvirtualjoypad jpvirtualjoypad JPVirtualJoypad v1.2 MultiTouch Virtual Joypad manager. $20

JPVirtualJoypad is the easy way to get virtual joypads work in your game in no time.
Provide to JPVirtualJoypad the graphics (HUD components) of your virtual joypad sticks/buttons and JPVirtualJoypad will do the logic for you.

Your virtual joypads will work just like a real joypad, and will send their values to the native onJoypadStickMove handler. This is the same with the virtual buttons and the onJoypadButtonDown/Up handlers.

JPVirtualJoypad will move your stick components, the only thing you have to do is to handle the values of the sticks. JPVirtualJoypad takes a few optional parameters. You can for instance set the visibility condition of the back and thumb textures of the stick. For instance the thumb could be visible only when the stick is not active and the thumb when it is active.

You can also tell JPVirtualJoypad that a stick must return values in a limited number of directions, for instance in 8 directions like the directional arrows of the playstation gamepad.

It also has an extra function, transformStickValues, that helps you apply a dead zone to the joypad stick values.
Another great feature is the possibillity to use a tweener curve to the stick values. This way the stick values can be non linear when the stick moves. JPTweener is required for this feature.

Requirements:
- ShiVa 1.9.2 or greater
- The JPMultiTouch pack is required

API
ChangeLog
Download the LUA extension
Download pack