MvR, GPU scaling, in-app purchases, bugfixing...

You thought development had stopped? Keep reading :)

First of all, let me announce (if you haven't read it yet) that Pixelatom has released Monkey vs Robots for Android. We've worked closely to bring this game to life and, as a result of this cooperation, I've added some pretty cool features to BennuGD on devices.
But, first of all, the game trailer:
The game is pretty fun to play and if you want to support either a small indie game development studio or BennuGD development on devices, buying the game is a good way to do so. We've also released the Ouya version as a demo. Once you download the demo (from DISCOVER in your Ouya) you're given the option to purchase the full game as an in-app purchase.
So, again, if you want to have a good time playing a nice game or just reward us for our good job :) just:
Or just switch on your Ouya and purchase the full version in-app

Like I said before, while developing the game, I've improved the port in a few ways. Let me talk to you about some of them.

Hardware scaling

I already talked to you about it. GPU scaling is now ready for primetime and I must say it's working beautifully. In the next few days I'll be uploading the code to the SVN server in Google Code. I'll post a small update when it's ready, but you might also want to follow my public twitter account to know about it as soon as it happens.

Ouya in-app purchase module

In order to get the in-app purchase experience going, I had to create an in-app purchase module. If I have to tell you the truth, it's pretty cumbersome to set up and to get it working you probably want to have a notion of what you're doing.
I'll also upload some sample of the module working, and have some "fake" modules so that you can compile your games in your computer.
As a side benefit, this module allows you to tell an Ouya apart from a regular Android device.

Nuts & Scrap

Our friends at Devilish Games recently celebrated their 15th (wow!) birthday. To celebrate, they released Nuts & Scrap -one of their first games ever- on Android for free.
The game is coming to iOS, too (and uses hardware scaling :) and uses Pixjuegos' on-screen controls. In fact, it was Panreyes from Pixjuegos who did the Android port and adapted the game code from Fenix to BennuGD.

PixTemplate

People are complaining that using the Android port is too hard and Panreyes created a template for you to use. It includes all you need to port your BennuGD games to Android (if you're on Windows, that is).
It's pretty useful, and includes some of their goodies (like on-screen controls and a great control abstraction layer). Be sure to give it a try!

Ripollés' Nightmare

Something quite nasty happened to the great guys at PixJuegos with this game that they had already finished. I'll talk to you more about it on a later post but didn't want it to go unmentioned on this one.

That's it for today. I'd say you've got quite a few things to check out!

Happy coding

WIP games, GPU scaling and BennuGD 2

First of all, let me show you something I'm working on with the guys at Pixelatom.
My TV looks small to you?
Buy me a new one!
Yep, Monkey vs Robots is coming to the Ouya and iOS soon.
The game is basically ready but we need to set up the in-app purchase process in Ouya. You can check the game's site (and purchase the Windows version) here.
Here's the game trailer:
While preparing the port something beautiful happened: SDL2 was released, along with some beautiful docs on porting your SDL 1.2 code to the new version.
The docs include specific info on how to put fully rendered frames (like those BennuGD creates) to screen through a texture AND includes info on how to use SDL's new SDL_WINDOW_FULLSCREEN_DESKTOP mode. What this new fullscreen mode does is that instead of changing your monitor's resolution (that flickering you see when launching some games), it creates a window with your screen's native resolution and then scales your game's contect up to that resolution.
Now, that's pretty much what some BennuGD games -including MvR- do using scale_resolution. The problem with BennuGD's current implementation of scale_resolution is that it works completely by software and that is SLOW.
SDL's implementation, however, works completely by hardware if supported by your platform. I did a quick switch to this new method, and here are some preliminary results:
Performance of MvR in an iPod touch  4G while using BennuGD's current software implementation
Performance of MvR (the same DCB file)  in the same iPod Touch 4G when using hardware scaling
XCode shows you how much time your code spends doing different thigs. The graphs above show a metric of how long it takes your program to render each frame, where is that time spent (CPU vs GPU) and how many FPS it's running at.
When rendering the frame completely by software, we can only render ~10fps and it takes 113ms to render each frame, most of which (101 ms) are CPU time. The game is unplayable.
When switching to GPU scaling, the FPS meter goes up to 21fps*. The total CPU time is now 58ms, 46 of which are CPU time.

That this means is that with the current software scaling in BennuGD, the iPod was spent more than half the time just scaling frames, Not drawing stuff or performing game logic: just making the fully rendered frame look bigger. And when we offload that job to the GPU, well... the GPU time doesn't even increase.

The new code is not yet publicly available, but I'll upload it to my SVN server soon, but you should not have to do anything in your BennuGD code to be able to use the new functionality.

This is, obviously, huge for BennuGD and when presented to the rest of the community sparked a very interesting discussion: we might switch the whole rendering pipeline to SDL2's new SDL_Render API.
This should -finally- give us full hardware rendering on targets that support it (Direct3D in Windows, OpenGL in Linux/Mac, OpenGL ES in iOS/Android) while having a software rendering fallback stack on the rest of targets. Most interestingly, to do this we'll have to actually remove a lot of code from BennuGD, and change some other tiny bits.
We might call this BennuGD 2. I'll keep you posted ;)

* Remember that this is an iPod Touch 4G, which won't be supported by iOS 7, so we can consider this the lowest performance we'll get in any iOS device.

Progress update

A lot has happened since the latest blog entry. Here's a summary of what's been going on:

New packager release

I released a new version of the BennuGD Packager, this is what it looks like:
Packaging your games for Android has never been easier!

New features:

  • Support for release builds. Just specify the path to your keystore and let the packager handle everything :) Build created in this mode can be uploaded to Google Play (and probably other marketplaces, too).
  • Automatic decompression of resources. On Android your FPG, MAP and FNT files must be uncompressed. Up until now you had to do it manually but now it's the packager that uncompresses them so that you don't have to.
  • AdMob support! Once you register in the AdMob website and create a new app there, you'll be given a Publisher ID. Just enter that ID into the packager and your app will display ads!
    Monetize your app by releasing both an ad-supported free version and a non-free version.

You'll need:

  • Oracle JDK (not JRE): Get it from here. Again, install the JDK and NOT the JRE.
  • Ant: I'm now distributing the packager with the installer for WinAnt. If you already have ant in your system you don't need to do anything, but you can use this installer to get Ant in case you don't.
  • Android SDK: Within the SDK install the Android 3.2 (API 13) SDK platform and the Google AdMob Ads SDK if you want to be able to use ads.
  • Make sure you uncompress the packager to a path without spaces in Windows.
Of course, if you're running Ubuntu Quantal or one of its derivatives, you can install the BennuGD Packager much easily from my PPA. You'll be happier and you'll receive updates automatically and more frequently.
>>Get the new packager from here<<

First Android games have hit the Play Store

Some brave developers have already uploaded their games to Google's Play Store. Here they are:

Monkey vs Robots Lite

On it's developer's words:
A casual puzzle game with pixelart graphics and classic arcade gameplay.
Monkey vs Robots is a casual puzzle game with pixelart graphics and some mid-nineties retro feeling, with a classic arcade gameplay similar to Puzzle-Bubble or Arkanoid.
Your objective is to wipe robots out of your jungle; the less shoots you use, the better reward you will get. Just avoid the coconuts to bounce on the walls since they break before destroying the robots.
This is the lite version of the game. Full game is not available yet.
If you liked the game and want more stages, enemies and coconuts please rate it and we'll be very happy to work on the full version.
Thanks for playing!
Have a look at the gameplay video:

Pix Frogger


Getk the free version here.
From my friends at Pixjuegos:

PiX Frogger is a multiplayer racing game about frogs crossing the street.
The game allows 2 players playing simultaneously on the same device!
A great casual Frogger clone with a multiplayer touch (it uses mod_multi, by the way :)

Dead Snow

Check the free version here.
From my friends at Pixjuegos:

*This game was made in only 3 hours!*
* Try it, and if you like it, please invite us to a snack by buying the donation version! *
You control a Snow Ball which hates the world and goes down the hill smashing everything.
But avoid trees, they are stronger, and also explossive barrels!
Another great casual game, created in just three hours!

Nerea's Bank Panic 

From the nice guys at Pixjuegos.
Some robbers are attacking the bank, and the only one who can save them is you, the sheriff!
A humble tribute to SEGA & Sanritsu Denki's Bank Panic!
It's dedicated to Nerea for her birthday!
Isn't love wonderful? Panreyes created this game and published it in Google Play for his girlfriend's birthday!

What's left?

People are already uploading games, the port mus t be done, right?
Unfortunately not quite yet. There are a few tasks to do yet:
  • Wider GPU support. There are problems with some Adreno GPUs. I have an idea of why those are happening buthaven't still been able to test the fix.
  • Mouse input support I've been working on patching SDL2 to support real mouse input. Up until now mod_multi simulated mouse events when the user touched the screen. You'll now be able to disable mouse emulation (mouse emulation will be an opt-out feature) and detect real mouse input just as in your PC. The code for this is already written in the SVN and the feature will be bundled with the next version of the Packager.
  • Gamepad/Joystick support I've been looking at patching SDL2 to add gamepad/joystick input. The current implementation lacks any kind of joystick support and all the code must be written. I pretty much know how I'm going to do this but I'll have to sit down and write the code.
  • Bugfixing Bugs will be found and we'll have to mercilessly kill them.
Please note that in order to enjoy full mouse/gamepad/joystick support you'll need to be running Android 4.1 in your device. Older versions of Android will give you some but not all of the features (from Android 2.2 on you'll be able to get left mouse button signals, but you'll need a more recent version to be able to get right mouse button clicks, for example).

Hope you like the news!

Blog Archive