Current State of Game Creation on Juce


My company is currently looking for a cross platform development systems to port its popular iPhone game to and we are very interested in Juce. However, we do have some hesitation as we don’t see any games having been created for it. A few questions we have:

  1. Are there any major roadblocks we should be aware of when trying to make an OpenGL based game using Juce

  2. We noticed many of the examples seem to run around 30fps with Juce. Is this easy to fix (60 fps)

  3. Are there any plans to make Juce friendlier to game programmers with perhaps some examples and a main render loop?

  4. Has anyone successfully made an iPhone/Android OpenGL based game using Juce?



Hi David…

I am a relatively new Juce user myself and the company I’m working for presently has a big 3D engine project to complete and if we can do it cross-platform all the better. I have been working to extend Juce to support 3D better and have made some initial notes in this post Indeed it doesn’t appear anyone has tried to do any 3D apps (OpenGL ES 2.x at least) since the framework didn’t have matrix uniform support extension points enabled until last week or so. This is now the case though and I have not found any problems thus far except that there are some timing irregularities with the Android side of things. IE the Timer callbacks are not happening correctly on Android and I have yet to get a chance to debug. I’d say this should be a bug that can be squashed relatively soon though, however Jules’ and co will have to comment on this. There should be no problems hitting 60 FPS especially if you are fully managing the rendering and not using a Juce graphics context to draw. IE all GL code and you’re fine. The default OpenGL demo uses the graphics context to draw a dynamic texture on the cube and for the background path component and the locking between the message thread and usage of the graphics context in this manner gives FPS irregularities.

I have since that post a week or so ago started on extending Juce to support child GL components that render into the same OpenGLContext since presently an app can only have one top level GL component. I’ll be done with the basic use case (IE without child rotation stacking / clipping) in the next day or so and it’s super handy to be able to use child Components to contain GL code without managing an entirely different scene graph of sorts. I’m basically for now have a separate render stage for each component into an FBO and a composite stage that clips the GLComponent textures. I’d really like to contribute back this effort and am still trying to get things cleared with my employer. Hopefully if this comes through it will provide a starting point for official Juce support for GL child components.

Now I’ll mention another cross-platform abstraction framework you should take a look at that is geared toward game development. It’s called BatteryTech ( I evaluated BT before Juce and it’s nice, but with limited GUI support, but nice integration w/ Lua, Bullet, Box2D, etc. The app I’m working on is fairly heavy on the GUI side + 3D rendering, so Juce was a better fit though it does need to be extended for this use case. Also the one feature that I like in Juce that BT doesn’t have is the IntroJucer or a separate project management tool that auto-updates all the build and project configurations for the end targets being deployed too. It definitely helps for larger teams. There are of course other cross-platform abstraction frameworks more specific for game dev too, but Juce certainly isn’t out of the running per se and should be more capable soon enough. It depends on the use case really.


FWIW I’m keen to see more games getting written in juce, so any requests that you have for games-related features will be taken very seriously!


Since we’re talking about it: I’ve been using OpenGL only via an attached OpenGLContext so far, with ok-ish, but not really great results (60 fps is definitely out of reach, even 30 fps is not possible when larger regions are redrawn). Will there be further optimisations in the JUCE code or am I better advised to finally start learning OpenGL myself? :smiley:


Thanks everyone for the great information! We are currently evaluating the BatterTech SDK and Cocos2D-X for game development

I think you have a platform which could be widely popular with the game development community with some tweaks and some examples. You just need to add in better fullscreen OpenGL support and perhaps make it so you can have a game runtime loop of some sorts. The overall development tools were greatly loved by our Dev team durring evaluation (really the best we had seen), but the lack of game focus kind of scared us. It really is a huge market and I think it could greatly outpace the purchases by the cross-platform sound centric applications. I’ll defiantly be keeping en eye on Juce in the future.


Well, if you liked that, wait until you see the tools I’m currently working on in secret!

Fullscreen functionality is actually in there, but you’re right, there aren’t really any good game-like examples, which is definitely something I need to work on.