Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
4. October 2012

 

Earlier this morning, this news article came across my desk and caught my interest for a number of reasons.  Basically as the title states, Appcelerator - the makers of the popular Titanium mobile development suite have funded a game development technology startup Lanica.

 

Lanica Logo

So, why should you care?

 

Well first off, Appcelerator Titianium is a very nice development environment.  For a few different reasons I chose not to develop with Titanium, the inability to debug on Android devices being the biggest hindrance ( and mostly Google's fault for making such a terrible emulator ), however this fault may have been removed!  ( I will be looking into this very shortly ).

 

Next, while working in HTML5 on mobile is nice, the question still remains if it is feasible for high performance games.  PhoneGap brings HTML5 to mobile devices in native app form, but it doesn't bring the performance.  There are a number of other technologies working on this problem, but one more is always a nice thing.

 

Finally Lanica does have some pedigree.  One of the two founders is Carlos Icaza, who among other things, was the founder and first CEO of Ansca mobile, the people that make the popular Lua based Corona SDK.  ( Recently featured in this comparison of Lua game engines ).

 

So, they have funding, they have experience and they are creating a game engine using a technology I am interested in.  You can certainly colour me intrigued.

 

A little bit ( so far as I can gather ) about the engine itself, Platino:

Platino allows Titanium users to build casual to high-end games in JavaScript using a carefully optimized, C++ native-built, cross-platform game engine.

But wait, there’s more:

  • OpenGL ES 2.0:  We’re bringing you the industry standard in hardware-accelerated, cross-platform API for 2D and 3D graphics.  The OpenGL engine is a flexible and powerful low-level interface between software and graphics acceleration, so you get the best performance with the most efficient (i.e. lowest possible) use of resources.
  • Isometric Tile Engine:  We have developed our own internal isometric engine, written entirely in C++.  The best part? It features direct hardware rendering and occlusion detection for your maps to be rendered at full hardware speed, giving them near real-time interactivity.
  • Sprite Sheets:  We also have developed our own internal sprite sheet engine, which also is optimized for performance and rendering.
  • Box2D:  The same physics engine that drives Angry Birds and some of the most popular mobile games on the market is embedded in the Platino game engine.
  • Particles:  We know you’re too creative for a “one size fits all” approach. So, using our Particle Designer plug-in, you can now create stunning visual effects at hardware speeds by customizing every aspect of your particle emitters.
  • Shaders:  Our game engine leverages OpenGL’s shading language to calculate rendering effects on images, vertices, and pixels – giving you a high degree of flexibility and rendering capabilities for your games.
  • 2.5D Support:  Built natively (yet again!) to give your game that extra “depth” needed to create pseudo-3D effects.
  • Native Interface Access:  Full access to your creations, so you can tinker with the native UI, mouse events, accelerometer, and more through Titanium’s powerful JavaScript methods and classes.


So if you like to work in JavaScript, want to create a game targeting iOS and Android but with native performance, Lanica/Platino/Titanium are certainly worth keeping an eye on!

 

As of right now, they appear to be in the pre-beta stage, although there is a sign up page here.  Hopefully I am able to get more access to Platino shortly, so I can bring you a bit more information. Neither pricing nor a release date have been announced yet.

News


10. September 2012

 

The C++ mobile SDK Marmalade just announced release 6.1.

 

I suppose I can’t really refer to it as a mobile SDK any more, as one of the biggest features of 6.1 is the ability to target Windows and Mac OS desktops.

 

Other new features in this release are:

 

  • Target the desktop: With Marmalade 6.1 you can now deliver your apps to current Windows (7, Vista, XP) and Mac OS X platforms, as well as to Android MIPS devices and the latest LG Smart TVs.
  • Full flexibility: With Web Marmalade’s Plugins you can now mix HTML5 with native platform code, providing full flexibility and creativity.
  • Improved: Desktop graphics support, making it easier to develop and test Marmalade titles on a wide variety of desktop hardware.
  • Updated: You can now use floating-point within the graphics pipeline, allowing more intuitive manipulation of 3D assets.

 

 

Marmalade has been used to release a number of big name projects across many devices.  There is a free trial available, with pricing ranging from 149$ a year ( with a Splashscreen ), to 500$ a year ( no splash screen ) or a negotiated commercial license with full support ( including service level agreement ) and private beta access. 

 

One of the major features of the Marmalade SDK is the ability to target iOS without the need for a Mac.  I know there are a ton of small developers out there that want to make games for the iPhone and iPad, but don’t want to drop 1000$+ on an Apple computer.  If this description fits you, Marmalade might be the perfect option!

News


5. September 2012

 

In this section we are going to do something we probably shouldn’t… work with the keyboard.  As you will soon see, when dealing with mobiles, this isn’t a particularly smooth journey! Mobile and keyboards go together like peanut butter and hand grenades.

 

As is always the way, let’s jump right in with code:

 

screenWidth = MOAIEnvironment.screenWidth
screenHeight = MOAIEnvironment.screenHeight
print("Starting up on:" .. MOAIEnvironment.osBrand);

if screenWidth == nil then screenWidth =640 end
if screenHeight == nil then screenHeight = 480 end

MOAISim.openWindow("Window",screenWidth,screenHeight)

viewport = MOAIViewport.new()
viewport:setSize(screenWidth,screenHeight)
viewport:setScale(screenWidth,screenHeight)


layer = MOAILayer2D.new()
layer:setViewport(viewport)

MOAIRenderMgr.pushRenderPass(layer)


chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'

font = MOAIFont.new()
font:loadFromTTF('comic.ttf',chars,60,72)


text = MOAITextBox.new()
text:setString('Press a key')
text:setFont(font)
text:setTextSize(60,72)
text:setYFlip(true)
text:setRect(-320,-240,320,240)
text:setAlignment(MOAITextBox.CENTER_JUSTIFY,MOAITextBox.CENTER_JUSTIFY)


if(MOAIInputMgr.device.keyboard) then
    print("Keyboard")
    MOAIInputMgr.device.keyboard:setCallback(
        function(key,down)
            if down==true then
                text:setString(string.char(tostring(key)))

            end
        end
    )
else
    print("No Keyboard")

    if(MOAIEnvironment.osBrand == "iOS")   then
        MOAIKeyboardIOS.showKeyboard()
        MOAIKeyboardIOS.setListener(MOAIKeyboardIOS.EVENT_INPUT,function(start,length,textVal)
            text:setString(textVal);
        end
        )
    else
        print("The keyboard is a lie");
        -- Android, no keyboard support :(
    end
end

layer:insertProp(text)

 

Here is the program in action:

 

image

 

Exciting eh?  Again, we are going to skip over the familiar bits and jump right in to the new stuff.

 

One thing you might notice compared to prior tutorials, the line:

 

print("Starting up on:" .. MOAIEnvironment.osBrand  .. " version:" .. MOAIEnvironment.osVersion)

 

Has changed to

 

print("Starting up on:" .. MOAIEnvironment.osBrand);

 

Why is this?  Well remember when I said it was up to the host to implement the various values in MOAIEnvironment.  Well, I finally got around to testing on iOS and apparently MOAIEnvironment.osVersion isn’t implemented, at least, it isn’t on the Simulator.  As I recommended earlier, never trust these values to exist on all platforms! In production code, be sure to check for Nil.

 

Now the new code, let’s start with:

chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'

font = MOAIFont.new()
font:loadFromTTF('comic.ttf',chars,60,72)

 

The first line is a string of characters representing the individual characters we are going to be using.  If you need additional characters ( such as punctuation ) be sure to add them to this string.  We then create a new MOAIFont object, then load the font from a ttf file, comic.ttf ( I copied from the Windows font directory, you cannot legally redistribute fonts you don’t license! ).  Regardless to where you got it from, be sure to place a ttf file in the same directory as main.lua.  I moai to create the font created at a font height of 60 pixels and at a resolution of 72dpi.

 

Next up:

text = MOAITextBox.new()
text:setString('Press a key')
text:setFont(font)
text:setTextSize(60,72)
text:setYFlip(true)
text:setRect(-320,-240,320,240)
text:setAlignment(MOAITextBox.CENTER_JUSTIFY,MOAITextBox.CENTER_JUSTIFY)

 

Now we are creating a MOAITextBox, which is a bit misleading in name, especially if you have done some prior WinForm or ASP.NET programming.  A MOAITextBox is simply a text area on screen, often referred to as a label or text area in other libraries.  We then set text’s string value to “Press a Key” using the setString() method, set the font to the font we created earlier with a call to setFont(), and set the text size and dpi to match the values we used to create the font.  Next we call setYFlip to invert the font.  For reasons I don’t completely understand, MOAI renders text upside down by default… so this inverts it to the proper position.  Next we position and size the MOAITextBox with a call to setRect, telling it to position centered and use our full 640x480 screen ( again, remembering that coordinates are relative to 0,0 being the middle of the screen ).  Finally we center the text horizontally and vertically within the text area with a call to setAlignment().

 

Now we actually deal with handling keyboard entry:

 

if(MOAIInputMgr.device.keyboard) then
    print("Keyboard")
    MOAIInputMgr.device.keyboard:setCallback(
        function(key,down)
            if down==true then
                text:setString(string.char(tostring(key)))

            end
        end
    )
else

 

Here we are testing to see if a MOAIInputMgr.device.keyboard has been defined.  If this value is assigned, it means we have a keyboard ( currently this means we are running on a PC or Mac host, but don’t expect that to stay true forever ).  If a keyboard is in fact available, we set a callback function to handle key input.  This callback takes the key code ( as a number ) and a boolean, indicating if it was pressed or released and will be called every time a key is pressed.  We check to see if the key was pressed ( as opposed to released ), and if so, we simply convert the key code to an actual character and display it in our text box.

 

However, if there isn’t a keyboard…

 

else
    print("No Keyboard")

    if(MOAIEnvironment.osBrand == "iOS")   then
        MOAIKeyboardIOS.showKeyboard()
        MOAIKeyboardIOS.setListener(MOAIKeyboardIOS.EVENT_INPUT,function(start,length,textVal)
            text:setString(textVal);
        end
        )
    else
        print("The keyboard is a lie");
        -- Android, no keyboard support :(
    end
end

 

First we check to see if we are running on an iOS device.  If we are, we display the on screen keyboard, then set an event listener using MOAIKeyboardIOS listening for EVENT_INPUT events.  We then set the typed value textVal to our text box, which will be the currently typed character.  Otherwise we assume we are running on Android in which case we are…

 

 

Screwed.  Basically.  As of exactly this moment, there is no MOAIKeyboardAndroid available, although one has been developed so it should be available soon.  Until then, you can’t really handle keyboard entry on Android, unless you extend the host yourself.  I will update this guide when Android support is officially added.  You may be thinking to yourself “what about my hardware keyboard, it surely works, right???”.  Actually no.  Alternatives do exist ( there is a GUI package with an onscreen keyboard included ) that we will cover later, but for now at least until Android keyboard support is made publically available, you are kinda screwed.

 

 

Finally, we add our MOAITextBox to the layer with a call to

layer:insertProp(text)

 

Now you are happily traveling along with full keyboard support in your application!  Well, unless of course you have an Android device, in which case you are probably sulking in a corner.

 

 

Programming


23. May 2012

It looks like GameFly, the Netflix of gaming, has decided to enter the mobile gaming space in a big way.

 

First, about a week back, it announced a partnership with Future US increasing their marketing reach:

 

The collaboration will encompass international 360-degree content, e-commerce and advertising. Both companies will also work on various content deals including cross-linking, mobile apps content and contextual e-commerce promotions.

The new deal will help grow GameFly's audience and revenue by tapping Future's established network of loyal gaming fans through both print and digital outlets, and will further GameFly's ability to offer promotions for mobile titles that can be downloaded directly from GameFly onto iOS and Android devices. Simultaneously, this partnership will advance Future's charge into the digital space by delivering an audience of over 10.8 million unique visitors, while expanding its GamesRadar network. Future's media offerings will also be diversified by representing GameFly's mobile app and GameFly Media in the advertising marketing sector.

 

Future US has a pretty impressive portfolio of gaming and tech magazines including PC Gamer as well as the official XBox and PlayStation magazines, so this is a pretty big deal for GameFly.

 

Then came todays big announcement of their iOS and Android development fund coupled with their upcoming Android game store:

GameFly will launch a development fund to support the creation of new mobile games, and expects to release its first title this summer. The company said it will seek to work with developers who are in the process of building great games but lack the financial resources necessary to properly publish and promote their efforts. GameFly is currently accepting submissions at [email protected].

 

The forthcoming GameFly GameStore, expected to reach Android smartphones and tablets in time for the holiday season, will curate thousands of recommended Android games and offer daily deals. Ratings and reviews from the gaming community will accompany all Android titles sold in GameFly GameStore; GameFly also will leverage its social networking platform to drive discovery via friend recommendations. The firm already offers a Game of the Day spotlight feature within its GameFly App for iOS.



Oddly enough, beyond the [email protected] email address, no official details at all have been released directly from GameFly.

 

In somewhat related news, Facebook have entered the mobile game space with their Send to Mobile, although their solution will utilize existing app stores.

Facebook has detailed how its upcoming dedicated games and applications solution App Center aims to help developers drive mobile installs through convenience for users.

When accessing apps through the mobile App Center, Facebook will redirect the user to the specific App Store or Google Play marketplace pages, or load the app if it has already been installed before.

A "Send to Mobile" button will also be added to the browser version of the App Center, which will automatically install the app on any device connected to the Facebook account. Facebook says that the simplicity of the approach will make it easier for developers to increase install bases for mobile games and apps.

 

Truly interesting times to be a indie game developer!  With the horrid job Google did with the Android market, it's nice to see Amazon, and soon GameFly and Sony enter the fray.  Hopefully more developers will start making money on Android gaming now! 

 

News


30. April 2012

image

 

 

 

Research in Motion, of Blackberry and Playbook fame, recently released Gameplay 1.2, a cross-platform 3D game programming library aimed at Indie developers.  As a game maker, it is easy to ignore RIM these days, especially with their CEO making comments like:

 

"We plan to refocus on the enterprise business and capitalise on our leading position in this segment,"

 

That doesn’t exactly give you the warm and fuzzy about the future of RIM consumer devices now does it?

 

That said, ignoring GamePlay would be a foolish thing to do.  Why?

 

Well first off, it’s free.  I like free.  As in, I really like free.

 

Second and perhaps most amazingly, it is cross platform.  You can target Mac OS, Windows, iOS 5.0 or higher devices, Android 2.3 or greater devices in addition to Blackberry Tablet OS 2.0 and Blackberry 10 devices ( when they arrive ).

 

Third, it’s IDE agnostic, except when required otherwise ( aka, compiling for iOS ).  I can work in my preferred Visual Studio environment.  You however have the choice between Visual Studio, XCode or Momentics IDE ( an Eclipse based IDE Rim inherited from QNX ).

 

Fourth, it’s open source and hosted on GitHub.

 

Here is a screen shot from a demo game in development:

 

 

I have to say, it looks impressive to me.

 

 

Oh, did I happen to mention it’s C++ based?  I think I just heard half of you cheer, while the other half swore! Winking smile

 

 

I do have to say, the folks at Marmalade probably aren’t pleased.  They both fill the same niche… but gameplay is free.  Now the question is, how good is it?

 

Feature-wise, here is what you can expect:

 

Current features in gameplay
  • Written completely in C++ and well documented using doxygen.
  • Solution and workspaces for Visual Studio 2010, XCode 3.2.1 and Momentics IDE’s.
  • Platform-Game abstraction layer separating all operating system code from game engine code.
  • Input system support for Mouse, Keyboard and Touch.
  • Full vector math library with classes for Vector2/3/4, Matrix, Quaternion, Ray, Plane. Also Frustum and BoundingBox/BoundingSphere classes for object culling.
  • Solid OpenGL 3.2+ (for Desktop) and OpenGL ES 2.0 (for Mobile) based rendering system with classes for RenderState, FrameBuffer, Mesh, Material, Effect, Pass and Techniques.
  • Easy-to-use and efficient Font and Sprite classes.
  • Scene-graph components such as Scene, Node, Light, Camera and Model.
  • Binary encoding tool for creating optimized bundles for loading TTF fonts and 3D game assets supporting both COLLADA and FBX formats.
  • Extensible animation system with classes for Animation, AnimationClip and Curve with built-in AnimationTarget’s on Transform and MaterialParameter’s classes.
  • Complete 3D audio system with additional support for compressed audio using OGG and supporting HDMI gaming.

 

New features in gameplay v1.2
  • Newplatforms now supporting:
    • BlackBerry Tablet OS 2.0 and BlackBerry 10 ready!
    • Apple iOS 5.1 for iPhone and iPad
    • Google Android 2.3+
    • Microsoft Windows 7
    • Apple MacOSX
  • New shader-based material system with built-in common shader library.
  • New declarative scene binding.
  • New declarative particle system.
  • Improved physics system with rigid body dynamics and constraints.
  • New character physics and ghost objects.
  • Improved animation system supporting animated skeletal character animation.
  • New declarative user interface system with support for declartive theming and ortho, and 3D form definition with built-in core control classes such as Button, Label, TextBox, Slider, CheckBox, RadioButton. Also includes Layout classes such as Absolute/Vertical and FlowLayout.
  • New cross-platform new game project wizard scripts.
  • New game developer guide.
  • New game samples and tutorials.

 

 

With the following coming soon:

 

The ‘next’ feature branch for v1.3, v1.4, v1.5
  • Optimizations and Performance improvements
  • Shadows
  • Terrain and Sky
  • Gamepad input for Wii, Xbox 360 and Bluetooth® HID controllers
  • Scoreloop Social integration
  • Editor

 

 

Editor hmm?  Wonder what that means?

 

 

I am going to download and play with the SDK, and if I get some time ( something I am chronically short of lately ) I may post a walk around and possibly a tutorial or two.  Has anyone out there been playing with this technology?  Any opinions?

 

 

If you are interested, check out the announcement blog post as well as the source on GitHub.  Oh and perhaps most impressive of all for an open source gaming product… there is actually documentation. The documentation is available here including this development guide[direct pdf link].

 

I have to say, congratulations to Sean Paul Taylor and Steve Grenier on this impressive release!

General


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List