Coding for Mobile Platforms

Random thoughts, sometimes relevant to mobile programming.

  • Mobile Coder

  • Subscribe to Mobile Coder and receive notifications of new posts by email.

    Join 185 other followers

Posts Tagged ‘shiva’

Jelly Bean LWP Retrospective

Posted by error454 on 11/07/2012


My brother and I have been working on a game for the upcoming OUYA console.  We got a little burnt out on a particular design issue and needed a breather, a small fun project to lift our spirits.  So we decided to try our hand at a Live Wallpaper for Android.  1 week later and here we are, you can see the results on the Android market:

Android app on Google Play

Posted in Android, Java, Marketplace & Publishing, Shiva 3D | Tagged: , , , , , | 3 Comments »

Introducing ShiVa Android All In One (AAIO)

Posted by error454 on 10/22/2012


What is this?

This is an open source project that I’ve started to help ShiVa developers get the latest/greatest Android SDK implementations.  The goal for this project is to be a single Android project that contains the implementations for any Android SDK that you could possibly care about.

There are 2 pieces to this project.  The Android code is where the SDK implementations live as combinations of Java and JNI (for interacting with ShiVa).  The ShiVa project is where SDK specific AI implementations go.  So for every SDK implemented, there is an associated ShiVa AI model that exposes the functionality needed to use the SDK from inside ShiVa.

Why did I make it?

I often see folks posting large tutorials in the forums detailing how to implement various SDKs in Android.  These tutorials are awesome and the community members involved in writing them deserve tons of credit.  What happens when you start a new project though?  Do you comb back over the forums, find the 3 SDK tutorials of interest and start copying/pasting all over again?  What happens when the SDK is updated with breaking changes and the tutorial author is busy?

Wouldn’t it be nice if you didn’t have to copy/paste any of this code?  Wouldn’t it be wonderful if all you had to do was select the SDKs that you wanted to use?  I answer yes to these questions and this is why I have started this project.

Read the rest of this entry »

Posted in Android, Shiva 3D | Tagged: , , , , | 1 Comment »

ShiVa3D Flexible Keyboard/Joystick Input Architecture

Posted by error454 on 10/02/2012


There are a couple different ways to do keyboard and joystick handling in ShiVa.  This article explores a unique method whose merits will be compared against the traditional method.

Here is the traditional way of handling input in ShiVa:

Traditional way of handling key input. The sample Menu State simply animates the selected menu.

The pros of this implementation are:

  1. Easy to understand for even the most casual observer
  2. Easy to implement for simple cases
  3. No performance drawbacks

The cons of this implementation are:

  1. State logic is broken up
  2. If your game supports keyboard and joystick, you have to duplicate the state detection code in each handler
  3. Managing multiple AIs that require input can be tiresome

Let’s look at these cons more closely.

Read the rest of this entry »

Posted in Shiva 3D | Tagged: , , , , | 5 Comments »

ShiVa PoC: 2D Platformer

Posted by error454 on 06/22/2012


I finally got around to a little proof of concept for a 2D platform type game.  This PoC is really part tool and part test.  The idea was to test out a design for a 2D platformer that uses the dynamics engine and to make a tool to tweak  physics parameters to dial-in the correct feel.  In the end I don’t think I’ll go forward with this particular implementation.  This project has brought to mind several issues that one might encounter when using the dynamics system for platformer physics.

Left/Right to move, Spacebar to jump

I now think that using the dynamics system for a serious 2D platformer is probably the wrong approach.  The first problem is that you don’t have fine-grain control over jump-mechanics.   For instance it isn’t possible to easily define a way to make your hero  jump exactly 3 game units high. I still haven’t entirely solved the (working perfectly/not working at all)  moving platform problem either.

Read the rest of this entry »

Posted in Shiva 3D | Tagged: , , , , , | Leave a Comment »

ShiVa PoC: Newton’s Cradle

Posted by error454 on 06/03/2012


This is an attempt to replicate a Newton’s Cradle device.

a newton's cradle

Click to run the demo

Read the rest of this entry »

Posted in Shiva 3D | Tagged: , , , , , | Leave a Comment »

ShiVa PoC: Box Particle Lighting

Posted by error454 on 06/02/2012


I have started a new code repository on github where I will be placing various self-contained Proof of Concept projects for the ShiVa game engine.  Each project will be contained in a separate directory for easy dissemination.  I will also include live web-based samples of all projects here on my blog as I create them.  This is the first of those projects, click the image to load the live web version.

Click to load the web-based demo!

This demo is meant to test particle interaction with colliders along with a moving dynamic light source.

Read the rest of this entry »

Posted in Shiva 3D | Tagged: , , , , | Leave a Comment »

ShiVa Native Projects for Android – A Guide for the Forgetful

Posted by error454 on 04/14/2012


This article covers the basics of exported Android ShiVa projects.  If you are trying to integrate Java or C libraries, for instance the ScoreLoop API, the following information could come in handy.  I had to stumble through this process with the scattered bits of documentation and I get tired of re-learning it every time I start a new project.  The article assumes basic familiarity with Eclipse, Java, C, Android and JNI.

Most of this content is based on the file that Stonetrip provides, on windows it is:

C:\Program Files (x86)\Stonetrip\ShiVa Authoring Tool\Data\Windows\Windows\Build\S3D SDK – Readme.txt

Read the rest of this entry »

Posted in Android, Java, Shiva 3D | Tagged: , , , , | Leave a Comment »

Design Diary – Shiva3D Screen Boundary Detection in 2 Steps

Posted by error454 on 08/24/2011


In a previous design diary, I talked about screen boundary detection.  What is an easy way to determine when an object has left the screen so that you can act on it?

I discovered a new solution  that is incredibly cheap and easy with a few caveats:

  • You will not know which edge of the screen the object has passed (so it won’t work for wrapping objects around on the screen)
  • You only get one notification when the object moves beyond the camera (unless you setup a timer)

Read the rest of this entry »

Posted in Shiva 3D | Tagged: , , , , , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 185 other followers

%d bloggers like this: