iCrowdNewswire
Spain Brazil Russia France Germany China Korea Japan

Artificial Intelligence driven Marketing Communications

Jun 18, 2019 6:15 AM ET

Pine: Cross Platform App and Game Framework


Pine: Cross Platform App and Game Framework

iCrowd Newswire - Jun 18, 2019

About

Pine is an open-source cross-platform app and game framework targeting Android, iOS, Windows and Mac, written in Java. I have been personally developing this framework on and off for the past few years, but recently I have been working on it full time as I require it for an app I would like to release. Pine is very close to enjoying it’s first release, and it will be completely free and open-source under the Apache 2.0 licence.

Android Demo:  Play Store Download 

Windows Demo:  Windows Installer (PineSampleApp-v1.0.exe) 

(Note the Windows app is unsigned and may be blocked by an anti-virus, if you run into issues then the app can be directly extracted from the zip here (PineSampleApp-v1.0.zip)

History

It all started a few years ago, when a friend asked if I could help him build an app for his website. The requirements were – it has to be fun, extremely smooth with fluid animations, and work on Android, iOS and Windows. After assessing all the available cross platform frameworks at the time, none of them were quite up to the task. Firstly none of them could build a native Windows application, and secondly they all had various issues relating to performance and cross platform compatibility. The latter is due to how most cross platform frameworks work, which is usually one of the following;

  •  Webkit implementation – apps are basically a website wrapped in a native package
  •  Conversion to native – all your UI is converted to native alternatives, and a common language (such as JavaScript) is used for logic

Both of these techniques have many issues. Webkit is notoriously slow, buggy, and inconsistent – especially on older versions of Android. 

Native conversion is generally quite limited in terms of functionality, it requires that native UI on all devices have the same available methods, and that the framework incorporates those methods properly. Android and iOS have very different ways of achieving similar things, so generating an app that functions the same on both platforms is not an easy task. Moreover, the conversion to native cannot really be done in an optimal way, resulting in a lot of boilerplate code that makes the resulting app slower than native and prone to bugs.

Pine is different

Since none of the exiting frameworks were up for the challenge, it was time to cook up an alternative. At the time, I was teaching myself how to write games, and I was learning how to use the LibGDX cross platform game framework. I was constantly amazed at how powerful LibGDX was – even on the slowest cheapest Android phones, LibGDX would render almost anything you wanted super fast and super smooth. Plus, you can deploy your games to Android, iOS, Windows, Mac, Linux and HTML – covering basically everything. I thought to myself – how hard can it be to use this framework for apps instead of games? Why has nobody done this before?

Well, I was very wrong. Game frameworks generally don’t incorporate any native UI, or any native elements what so ever. Typically they render to a blank canvas, and that is that. It’s up to the user to create all the UI, including text – and text specifically is the real killer. While rending simple scripts such as English is quite straight forward, complex scripts such as Arabic, Chinese, Thai, Korean etc are very complicated, and usually avoided in non-native implementations. To make this problem worse, there is generally no support for advanced text input methods, such as custom keyboards, Swype, voice input etc. But I knew that regardless of these huge hurdles, the benefits far outweigh the issues. 

Long story short – Pine was born. It is a modification and extension of the LibGDX game framework. Among many of its features, it has full support for all languages and scripts, including multi-directional complex scripts. Here  some of the benefits;

  •  Pine is fast. Very fast. Throughout my extensive testing on several Android devices, it is not only as fast as a native app, it’s faster.
  •  Cross platform consistency like you have never seen before – As mentioned earlier, Pine does not rely on any native UI, it simply draws to a blank canvas. This means all the UI, layout logic and rendering is done internally by Pine. Therefore its practically impossible to run into those head scratching cross platform bugs, and no need to implement tedious workarounds for specific devices. You can of course create different UI, layouts, and animations for different platforms, and Pine does this itself to create familiar environments depending on the platform.

Unfortunately, while I did make an epic app in Pine for the my friend, the project was terminated and it never saw the light of day, so I am unable to showcase it.

Features of Pine

  •  Make Absolutely Anything – App? Game? Game within an app? App within a game? 3D layouts in 2D? Pine has you covered. All 2D UI – components, backgrounds, shadows and text, are generated dynamically and tailored to the current device, screen size and resolution. Pine does not use any fixed image assets other than icons. Creating your own dynamic components and backgrounds is very easy using the inbuilt creator classes. To see an example of a 3D layout of 2D UI, check out the ‘Fun Layout Example’ in the Demo app. Videos can also be incorporated in a 3D layout – check out the last video in the ‘Videos’ page! Since Pine has the ability to play multiple videos at once, and apply shaders to those videos – it might the perfect framework for creating advanced VR Media applications. It might be the only framework capable of VR applications with full multilingual text support. 
Fun 3D Layout (Android and Desktop)
Fun 3D Layout (Android and Desktop)
  •  Master of Layout – Pine is filled with tons of helpful layout classes to build any layout you need. It is also extremely flexible and recalculates on the fly during screen resizing (Check any of the layout example pages in the Demo on Windows and resize the screen!). Dimensions of elements can be fixed or dynamic, with ability to clamp sizes to percentages, centimeters, or pixels. 
V Tile Layout (Android and Desktop)
V Tile Layout (Android and Desktop)
  •  Master of Pagination – I spent a lot of time making pagination as useful and robust as possible, while keeping it simple and clean to work with. Without going into too much detail, there is several ‘Pagination Strategies’ to choose from depending on your type of app, and 3 types of pages that can be used. These are ‘Root Page‘, ‘Child Page‘, and ‘Floating Page‘. Root Pages are your top level pages, which you would usually access though the main menu drawer. Child Pages are children to your Root pages, with a tree than can expand indefinitely (Root > Children > Children > … > Children > Child). Floating pages can be paginated to from anywhere regardless of the current page stack, and can be instantiated any number of times. For an example of floating pages, check out the ‘Example Layout 1’, and click one of the product examples to view the product info page. From here, you can click the seller info to view the seller overview page, and from there you can again click one of the products to view that products info page. You can repeat this process as much as you like as the product info page and seller overview page are both floating pages. Navigating backwards will return through all the pages back to the root page.
Menu Drawer (Android and Desktop)
Menu Drawer (Android and Desktop)
  •  Full Material UI implementation – Currently not 100% implemented, but will be for first release. An example of the current Material UI implemented can be seen on the ‘Materials & UI’ page of the demo app. Pine also has full support for Material Icons, and has an automated tool to remove all unused icons prior to a release build in order to reduce app size.
Material UI (Android and Desktop)
Material UI (Android and Desktop)
  •  Advanced Media Support – Pine can play Audio and Video with it’s own inbuilt MediaPlayer. Videos go a step further than native implementations, they can also have rounded corners, and be pinched/zoomed in the full-screen MediaGallery. Check it out in the Demo! (Videos page). Pine also supports use of the device camera and native file explorer for sending media (See the Messages page in the Demo – although device camera is not currently implemented on Desktop)
  •  Advanced Networking Features – Pine has everything you need to making network requests, creating and parsing json, and uploading/downloading media (with progress feedback). The demo app will be updated with networking examples in the near future.
  •  Advanced Local Storage and Sqlite Database – Pine incorporates an Sqlite Database (with Prepared Statement support) and has helper classes such as ‘SqlQueryBuilder’ to help compile database queries and construct prepared statements. Pine also helps you manage your database versioning by requesting Create and Update queries from your Sqlite Modules, making it as easy as possible to ensure correct management of a user’s data during app updates. Pine also includes caching of downloaded images, either permanently, temporarily (1 week), or never. The purpose of this is to ensure pure app functionality when offline, and to reduce unnecessary network usage.

Why Open Source

Lets face it, open source software is the best. While it might not be the most profitable business model, it is certainly the way to make the best software. Isn’t it horrible when you find a problem with software, and there’s nothing you can do but hope there will be an update in the future that will fix it? Or maybe you just want a particular feature that isn’t present. 

With Pine being open-source and licenced under Apache 2.0, you are welcome to modify the source yourself and add what ever you need. This is the only way Pine was able to exist in the fist place, as LibGDX is licenced under Apache 2.0, allowing me to do exactly that.

More importantly, while Pine is already very powerful, the only way it will truly become the best framework in the world is with a good community of people actively adding features and maintaining it.

Why I Need Your Support

While I have been working on Pine in my spare time for over a year now, recently I have been able to work on it full time and it is extremely close to being released publicly. It mainly just needs a bit of clean up, refactoring and documentation. When I started building my friends app, I never expected Pine to become so big and powerful, in fact I never imagined it would even become it’s own standalone project. Because of this, one of the biggest challenges was extracting Pine out of the original app and modifying it to be a generic base for other apps. I have brought it quite far in recent months, but there is still quite a lot of it’s functionality that might not seem very clear or intuitive, and this needs to be resolved prior to being released. 

On top of this, I do not own any Apple hardware. When I was building my friends app, I was able to develop and test for iOS by borrowing his Mac and using an the iPhone emulator. The good news is Pine worked on iOS and is was extremely fast. The bad news is, as many might already know, it is very difficult to develop a mobile app when all you have is an emulator. You simply don’t get the same tools and feedback, and it is a very slow process. Also, Pine has come a long way since I have last been able to test iOS, so there is a fair amount of work that needs doing on the native side.

I need to raise the money to allow me to continue working on Pine full time for the next few months, and to purchase the hardware to finish up the iOS and Mac side of Pine. I estimate the initial release of Pine source code can happen around August – September 2019. Depending on how well the iOS and Mac development goes, it may be available around the same time, if not a few months later.

While the funding goal for this project is just to cover Pine development, I would greatly appreciate all the support I can get. One of the main reasons I started working on Pine again is I had a fantastic idea for an app I want to build for Desktop and Mobile. I can’t disclose too much information about it yet, but I am confident it will revolutionize 3D Printing. I have also designed an amazing 3D Printer that I would love to prototype and bring to the world, so any additional funding will go towards the development of these 2 additional projects.

If you got this far, thank you so much for reading, and if you do support this project I will be forever grateful!

Notes on the Demo apps

1) While Pine does have some advanced and useful networking features, I am unable to demonstrate them in the current release as I do not have a server set up. Depending on the success of this Kickstarter project, I will set up a server and include examples of networking features. The Messages page for example was taken from the original project I built for my friend, and it had everything required for a fully functional responsive messaging system – incorporating Pusher for instant feedback of typing and seen events, OneSignal for native notifications, and Sqlite for local caching of conversations. I intent to incorporate all of this into the sample app demo, and write a comprehensive tutorial of how to do all of these things in Pine. In the current demo release, these functionalities are mimicked with timers, however the Sqlite database is still functional and working – have a play sending messages in the example conversations!

2) Pine apps can be very lightweight, a fairly complex Android app for example can easily be under 10MB in size. The Demo apps are only quite big as they have a lot of videos and pictures for demonstration purposes.

Risks and challenges

I am 99% certain I can get the iOS side up to scratch, but without physical hardware to develop with I can’t be 100%. I also unfamiliar with hosting on GitHub and setting up maven repositories, so this may be a small challenge for me.

Contact Information:

Graham Watson








Tags:    Reward-Donation, Wire, United States, United Kingdom, Europe, English