three.js vs libgdx for 3D web development - webgl

Libgdx is focused mainly on Android and is written in java but apparently it can run apps on the browser(webGL?). Three.js is a very impressive javascript 3D library which uses WebGL(or 2d canvas) as well for rendering.
So far I haven't seen any comparisons between this two since they have different focuses, but I would like to know the differences, what can one library do that the other one can not.

I don't think I'm too qualified to talk about Three.js, but I have used libGDX for many projects of mine and know its disadvantages when it comes to WebGL (the browser export).
The first factors to consider is what language you are used to, Three.js uses JavaScript and libGDX uses Java. And although libGDX exports to WebGL, it's only because it uses GWT, you still do the coding in Java.
LibGDX is specialized (as you said) in mobile and (to an extent) desktop applications. If you're goal is to create something that works on the web as well as mobile and desktop then libGDX should be considered. However, if you only wish to program things for the web, then I would really consider just doing Three.js for reasons I will explain later.
LibGDX is made mainly for game development, so if the application you're making is a game, you could consider libGDX, as it makes game programming in 3D nice and easy (and you'll be able to port it to multiple platforms, not only web, but mobile and desktop). But if you're making something else, Three.js may be a better option.
If your platform for distribution is going to be your web version I would suggest sticking with Three.js, because libGDX isn't that good for its WebGL export. One of the biggest issues (which is solvable, but a pain to deal with) is that libGDX does not prevent default browser keys from being used. However, if you do choose to use libGDX, make sure you take a look at this to fix that problem (more or less).
For the most part, if you're main platform is going to be web you'll want to program in a language that is meant for web development. If you program in JavaScript using the Three.js framework the code will be cleaner and faster to run. Meanwhile, if you use libGDX it essentially transforms Java code into JavaScript coding making it inefficient and bulky and will contain many lines of JavaScript code that are either useless or can be simplified. It's not an issue with libGDX (or rather GWT) itself, but rather just something that cannot be avoided when automating programming language translation. To give you an example, using the programming language Haxe, if you compile a HelloWorld Haxe to C++ it contains a bunch of unnecessary variables and methods (in the C++ source code) that you could just get rid of. Same in this case.
So in the end it depends on what you're aiming for. If you plan on sticking with just the web version use Three.js, otherwise libGDX should be considered.

Related

Can I implement a rules engine like Jess into Phonegap?

I am soon beginning to develop a mobile application for my Final Year project in computer science. I am keeping my options open in regards what to use to create the application. I heard Phonegap is quite a handy API but can I still implement things such as JESS rules?
It's called Apache Cordova now, Phonegap is a hosted build system (personally not a big fan of it, maybe it has improved now... anyway).
Using Cordova, you write the cross-platform application bits using JS, not Java.
So if you want to write something similar to JESS in JS this is possible and will give you a cross platform app.
I can imagine that calculations on rules might be computationally intensive so maybe not that suited for JS. In that case note that you can write plugins for Cordova using other languages and call those from Javascript. But you will need to implement the plugin for iOS/Android/... separately using their respective toolkits.
Instead of using Cordova you can decide on Android/Java only. This should be easier and faster, albeit not cross platform. In that case, keep in mind that Dalvik (the android JVM) is not the same as stock JVM. This means that not every Java program can be run an Android without modifications.
HTH.

Flex Mobile Project vs. Action script Mobile Project

I am new to development and would like to develop an android application. I have previously built an application with Adobe Flash Builder 4.6 with Flex Mobile Project. I just recently noticed in 4.7 there is an option for Action Script Mobile Project.
Can someone please explain to me the difference between the two and the pros and cons to utilizing either or?
Pros:
Creating a Flex mobile project is easier (use Flex 4.6 with design mode to rapidly prototype, 4.7 to develop) and visually let's you drag and drop
You can use data binding and other convieniant built in tools
Like anything else, there's good and bad about using the Flex mobile project as oppose to a complete ActionScript based solution. Mainly, it's a lot easier to customize your preloadeder, your splash screen and other features similar to tht like customizing how your application handles screen. Below is a couple pros and cons of using the Flex mobile version instead of ActionScript.
Cons:
Slower performance
Can't use Adobe Scout, it's an awesome tool for real time benchmarking and profiling. Using the built in one is ok but it doesn't give you theamazing information that Scout provides.
My advice: if you're savvy enough to do everything in ActionScript, then definitely create an ActionScript project, your users will love you for it. Plus, it's not that much harder and it lets you have a myriad of additional control over your components. Also, you don't have to deal with the overhead that comes with data binding ( it generates event listeners, get and set methods and you can create much more efficient ones on your own). There are a number of other things that benefit you by creating an ActionScript version like refactoring and better subversion but those are more of incentives than anything else.
If you plan on making use of the declarative mark-up, built in UI components, and data binding which the Flex framework provides then you should probably start with a Flex Mobile Project. The downside to this approach is that the additional scaffolding of the Flex framework will incur a slight performance hit and will increase the over-all file size of your project.
On the other hand, if performance is critical and you don't need the declarative markup, built in UI components, or data binding provided by the Flex framework, then you should start with a pure ActionScript mobile project. Really simple applications, games, or applications with highly customised UIs would be examples of projects for which a pure ActionScript approach might be more suitable.
FYI, you can use Adobe Scout on Flex apps. Apache Flex now supports advanced Telemetry.
You can also add advanced telemetry to any SWF with the SWF Scout Enabler.

What is Rikulo dart really?

I have been reading the abstracts on the website http://www.rikulo.org but all those cryptic vague statements do not help me. The examples are all about visuals.
I do not understand what this framework is capeable of doing. The big picture is missing.
What kind of apps can i build with rikulo?
Is there any access to the hardware?
Can is use the smartphones sensordata and send e.g. coordinates from my smartphone to a web service?
What are the limitations?
As described in this blog, Rikulo is aimed to provide a structured UI model for Web and mobile programming. We are the same team who developed ZK. With Rikulo, we'd like to take a step further since many things have been changed since we developed ZK in 2005. Also, both Dart and HTML 5 are young. It is an excellent moment to explore the best possible UI architecture for both Web and mobile programming.
For example, we use absolute positioning to give programmers 100% control the layout of UI rather than spending hours to figure out why it fails in certain combination. Another example is "recursive layered structure", such as layout manager and visual effect handling -- rather than ad hoc features targeting specific problems individually.
On the other hand, we don't have many widgets yet. It might be the reason that confused you. As a Apache licensed project, we hope we can have an active community for building widgets and addons, as long as we can really provide a solid and elegant architecture -- it is what we focus now and keep refining.
To access the hardware, you can use Rikulo Gap which is based on Cordova/PhoneGap. To communicate back the server, you can use Web socket or HttpRequest. We will have more advanced support for jsonizing, caching and communicating Dart objects between client and server, but it is not ready yet.
Technically, there is no limitation. Of course, the current number of widgets is definitely not enough, but it will get more in the near future. Furthermore, you always can create them with HTML 5 (and contribute back). However, for mobile applications, one thing you have to keep in mind: the performance won't be as good as the apps written in Objective C. The good is Rikulo is cross platform and your app can be accessed with Web browsers and as a native app.

Difference between framework vs Library vs IDE vs API vs SDK vs Toolkits? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want some examples. I always get confused, so with some examples I might be able to figure it out better.
Also: Is Eclipse an API or IDE?
An IDE is an integrated development environment - a suped-up text editor with additional support for developing (such as forms designers, resource editors, etc), compiling and debugging applications. e.g Eclipse, Visual Studio.
A Library is a chunk of code that you can call from your own code, to help you do things more quickly/easily. For example, a Bitmap Processing library will provide facilities for loading and manipulating bitmap images, saving you having to write all that code for yourself. Typically a library will only offer one area of functionality (processing images or operating on zip files)
An API (application programming interface) is a term meaning the functions/methods in a library that you can call to ask it to do things for you - the interface to the library.
An SDK (software development kit) is a library or group of libraries (often with extra tool applications, data files and sample code) that aid you in developing code that uses a particular system (e.g. extension code for using features of an operating system (Windows SDK), drawing 3D graphics via a particular system (DirectX SDK), writing add-ins to extend other applications (Office SDK), or writing code to make a device like an Arduino or a mobile phone do what you want). An SDK will still usually have a single focus.
A toolkit is like an SDK - it's a group of tools (and often code libraries) that you can use to make it easier to access a device or system... Though perhaps with more focus on providing tools and applications than on just code libraries.
A framework is a big library or group of libraries that provides many services (rather than perhaps only one focussed ability as most libraries/SDKs do). For example, .NET provides an application framework - it makes it easier to use most (if not all) of the disparate services you need (e.g. Windows, graphics, printing, communications, etc) to write a vast range of applications - so one "library" provides support for pretty much everything you need to do. Often a framework supplies a complete base on which you build your own code, rather than you building an application that consumes library code to do parts of its work.
There are of course many examples in the wild that won't exactly match these descriptions though.
The Car Analogy
IDE: The MS Office of Programming. It's where you type your code, plus some added features to make you a happier programmer. (e.g. Eclipse, Netbeans). Car body: It's what you really touch, see and work on.
Library: A library is a collection of functions, often grouped into multiple program files, but packaged into a single archive file. This contains programs created by other folks, so that you don't have to reinvent the wheel. (e.g. junit.jar, log4j.jar). A library generally has a key role, but does all of its work behind the scenes, it doesn't have a GUI. Car's engine.
API: The library publisher's documentation. This is how you should use my library. (e.g. log4j API, junit API). Car's user manual - yes, cars do come with one too!
Kits
What is a kit? It's a collection of many related items that work together to provide a specific service. When someone says medicine kit, you get everything you need for an emergency: plasters, aspirin, gauze and antiseptic, etc.
SDK: McDonald's Happy Meal. You have everything you need (and don't need) boxed neatly: main course, drink, dessert and a bonus toy. An SDK is a bunch of different software components assembled into a package, such that they're "ready-for-action" right out of the box. It often includes multiple libraries and can, but may not necessarily include plugins, API documentation, even an IDE itself. (e.g. iOS Development Kit).
Toolkit: GUI. GUI. GUI. When you hear 'toolkit' in a programming context, it will often refer to a set of libraries intended for GUI development. Since toolkits are UI-centric, they often come with plugins (or standalone IDE's) that provide screen-painting utilities. (e.g. GWT)
Framework: While not the prevalent notion, a framework can be viewed as a kit. It also has a library (or a collection of libraries that work together) that provides a specific coding structure & pattern (thus the word, framework). (e.g. Spring Framework)
Consider Android Development:
IDE: Eclipse etc..
Library: android.app.Activity library (Class with all code)
API: Interface basically all functions with which we call
SDK: The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android
(----tools - DDMS,Emulator ----platforms - Android OS versions, ----platform-tools - ADB, ----API docs)
ToolKit: Could be ADT Bundle
Framework: Big library but more of architecture-oriented
In other words...
IDE
Even notepad is an IDE (not notepad.exe) - Software you write/compile code with is an IDE.
Library
A bunch of code which simplifies functions/methods for quick use.
API
A programming interface for functions/configuration which you work with, its usage is often documented.
SDK
Extras and/or for development/testing purposes.
ToolKit
Tiny apps for quick use, often GUIs.
GUI
Apps with a graphical interface, requires no knowledge of programming unlike APIs.
Framework
Bunch of APIs/huge Library/Snippets wrapped in a namespace/or encapsulated from outer scope for compact handling without conflicts with other code.
MVC
A design pattern separated in Models, Views and Controllers for huge applications. They are not dependent on each other and can be changed/improved/replaced without to take care of other code.
Example:
Car (Model) The object that is being
presented.
Example in IT: A HTML form.
Camera (View) Something that is able to see the object(car).
Example in IT: Browser that renders a website with the form.
Driver (Controller) Someone who drives that car.
Example in IT: Functions which handle form data that's being submitted.
Snippets
Small codes of only a few lines, may not be even complete but worth for a quick share.
Plug-ins
Exclusive functions for specified frameworks/APIs/libraries only.
Add-ons
Additional modules or services for specific GUIs.
SDK represents to software development kit, and IDE represents to integrated development environment. The IDE is the software or the program is used to write, compile, run, and debug such as Xcode. The SDK is the underlying engine of the IDE, includes all the platform's libraries an app needs to access. It's more basic than an IDE because it doesn't usually have graphical tools.

3D Game Programming in 2010 - Where to begin again?

I dabbled in some game programming a few years back. I got up to using Windows Xp, C++, Ogre3d, Visual Studio, and Blender. I started to make an RTS but then real life happened.
Anyway, I'm looking to get back into it and I am wondering if there are any worthy alternatives to C++, now that Ruby,Python, and C# have become popular.
Is C++ still the preferred language?
I'm running Ubuntu now so I'd have to use some Ubuntu C++ IDE, C++, and Ogre3d.
Anyone used Ogre3d and moved onto something else?
Edit
Goals: Just hobby based 3d programming on the PC
I'm running Ubuntu at the moment but will move to Win7 someday
I imagine a simple game like Startopia
I know a bit about physics engines and sound and I've plugged Ogre3d components together before
So far I've seen that Ogre3d is still widely used. Might look into python and http://www.panda3d.org/
Cheers.
If you like to make games and not just spend all your time working on a feature of your game engine, I recommend you take a look at Unity 3D.
Features:
Game engine (not just a rendering engine)
Script in C#, or JavaScript (modified), or Python, or Boo
Awsome editor
Game can be deployed on: Linux/Windows/Mac/Android/iPhone/iPad/Xbox (and always extending)
Web player to play games in browser (after installing a tiny plugin)
Proven with great commercial games
Having experience with ogre3d is not enough to make a game like startopia as a hobby project. Have you done a finished game before?
Here's a post I found interesting:
http://greyaliengames.com/blog/the-6-steps-to-massive-game-development-success/
IMHO, you should go making 3D games like this at stage 4.
And also depends on whether your hobby is in engineering or making games?
If engineering, using ogre3d would make you learn better engineering skills.
Otherwise, trying to learn how to use an engine like Unity 3D, Torque or UDK would be better.
Everyone mentioned Ogre3D, which is good, but you could also look into Irrlicht: http://irrlicht.sourceforge.net/features.html
it's main advantage (at least to my knowledge) against Ogre3D is that it's more simple, in design and use.
Ogre3d is a fantastic graphics API that is great if you don't want to delve into some crap OpenGL or DirectX shader code for shadows and lighting and alpha ordering etc, but also don't want a true game engine with sound, networking, etc; it's only graphics.
I prefer Ogre3D to Irrlicht over the structure of the API, but it's entirely personal preference.
I might take some flak for saying this, but Java isn't a bad language if you are programming a simple game engine, Java and C++ are getting on pretty equal terms as far as speed nowadays.
C++ gives you a lot of low level access to make small optimizations that if you are experienced enough with, you can get some good performance gains. But optimization is a huge broad topic, especially with game engines.
Typically the average game programmer isn't going to dive into serious low level optimizations with their engines, but large game companies do.
C++ and Ogre are still a viable combination. On the other hand, MICROSOFT wants you to use C# and their XNA framework, and you always want to obey MICROSOFT... oh, wait, anybody know if XNA works with VS 2010 yet? It didn't, when I looked.

Resources