3d game engine suggestions [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am developing a 3d shooter game that I would like to run on Computers/Phones/Tablets and would like some help to choose which engine to use.
I would like to write the application once and port it over to Android/iOS/windows/mac with ease.
I would like to make the application streamable over the internet.
The engine needs some physics(collision detection) as well as 3d rendering capabilities
I would prefer to use a scripting language such as Javascript or Python to Java or C++(although I would be willing to learn these if it is the best option)
-My desire is to use an engine that is Code-based and not GUI-based, an engine that is more like a library which I can import into my Python files(for instance) than an application which forces me to rely on its GUI to import assets and establish relationships between them.
This desire stems from my recent experience with Unity3d and Blender. The way I had designed my code required me to write dozens of disorganized scripts to control various objects. I cannot help but think that if I had written my program in a series of python files that I would be able to do a neater, faster job.
I'd appreciate any suggestions. The closest thing to what I want is Panda3d, but I had a difficult time working with textures, and I am not convinced that my application can be made easily available to mobile phone/device users. If there is a similar option that you can think about, I'd appreciate the tip.

For the requirements that you have Unity3d is probably one of your best bets. As roy said there aren't any other 3D engines out there that will span that wide a range of platforms. Why do you think that going to a completely code based system would save you from creating a variety of classes with various responsibilities ?
The coding effort and the amount of code and classes will stay the same. The only thing that does change is the way that you interact with the system that you are producing. With any large scale system you will quickly run into hundreds of files. I am just finishing up a smaller sized unity project 3-4 month coding including learning unity it runs at 10k lines of code plus another 8k from external libraries and over 100 classes. But this amount wasn't driven by how unity works it was driven by the requirements of the project. While coding this I have learned a lot about how unity runs and what kind of patterns it requires and will be able to come up with better solutions for the next project. Look back at what you did and think about how you can organize it better. I think it is a save bet to say that you will need about the same amount of code with any other system to achieve a similar result.
The advantages that unity does have are a good multiplattform support and a excellent asset pipeline. Importing and utilising art assets, 2D, 3D and audio is for me one of the most onerous tasks of this kind of development and it is extremely well supported in unity.

You've mentioned iOS -- that pretty much limits you to going native or using web stack. Since native is not what you want (because that'd be different for each platform you mention), you can go JavaScript. The ideal thing for that would be WebGL, but support is still experimental and not available in phone systems. You can still use one of JS libraries built on top of 2D <canvas>. You can't expect great performance from that though. You can find examples here: http://www.javascriptgaming.com/

Well I see you've checked Unity3D already, but I can't think of any other engines work on PC, Telephones and via streaming internet that suport 3D (for 2D check EXEN or any others).
I'm also pretty sure that you can use Unity code-based, and it supports a couple of different languages, but for Unity to work you can't just import unity.dll (for example) into your code, no you have to use your code into unity so that unity can make it work on all these different platforms.

Related

Accessing GPU via web browser

I came across this proof of concept earlier today (on TechCrunch.com) and was blown away and intrigued as to how they had managed to accomplish the end result. They state that they don't use webGL or any plugins yet they are able to interact directly with the GPU and render 3D visuals at up to 60 fps using nothing but Javascript. Any ideas how this could be done, or how to access the GPU from Javascript in general without the use of plugins?
Site Address is: famo.us
ps: Try using your arrow keys to shift orientation its far out!!
They're using standard HTML5 Javascript APIs to achieve this.
I saw several references to requestAnimationFrame in their code. This method allows one that uses a compatible browser, to display more fluid and optimized animations, with far better frame rates than setInterval based animations will ever allow you to have. This is certainly achieved by using the GPU and the available hardware background.
GPU or every other hardware component cannot be accessed directly using any Javascript routines. Instead, the browser, based on the called JS directives and the execution context, will use the GPU if possible to optimize some specific treatments, calculus and renderings.
EDIT
For future references, I recently found out (7 years after the original answer) that a new initiative - the W3C GPU for the Web Community Group, has recently been created in 2020 to do just that. It describes itself as follow.
The mission of the GPU on the Web Community Group is to provide an interface between the Web Platform and modern 3D graphics
and computation capabilities present in native system platforms. The
goal is to design a new Web API that exposes these modern technologies
in a performant, powerful and safe manner. It should work with
existing platform APIs such as Direct3D 12 from Microsoft, Metal from
Apple, and Vulkan from the Khronos Group. This API will also expose
the generic computational facilities available in today's GPUs to the
Web, and investigate shader languages to produce a cross-platform
solution.
In the long-term, this initiative might allow developers to directly interact with the GPU from all web browsers. You can track the implementation status of the WebGPU API Spec on Github here.
Concerning famo.us: they did analysed the bottlenecks of the Webkit rendering pipe and then found a way to bypass them while building the pages. Basically: the DOM tree construction, the Render tree construction, the Layout of Render Tree are bypassed. Take a look on this article for a whole explanation.
They're using CSS 3D transforms. Web browsers are increasingly using hardware acceleration to do these kinds of CSS3 things.
i think the webGL glsl.js library might be good for this, though i havnt seen benchmarks...
https://github.com/gre/glsl.js/
also this approach seems viable;
basically to use the gpu in the way we like to, hardware optimised functions (have a little look into "blas") are used, you do not want to write these! strangely it seems that people still use the old fortran blas.... there is some stuff with compiling via llvm and then using emscripten to turn it into javascript.
Use Emscripten with Fortran: LAPACK binding
the emscripten way seems the most versatile, im just about to check it out, but it looks like a mountain, also this topic seems to be somewhat of a call to arms, emscripten only works with fortran if you hack it (see links from the second link). i think what we are looking for is blas support in javascript, this is not a closed issue by any means, and for a few of us out here it is very frustrating! hopefully someone has a link to these blas libraries we cant find...
please let me know if i dont quite have my head round this issue, js is new to me.
also, suggesting html5 is sufficiently "optimised" to use the hardware, how can we trust this!? we need gpu optimised blas (basic linear algebra subprograms) e.g. dot product.
i think maybe also that these old fortran blas arnt actually the right thing for a modern gpu? node-cuda seems very likely the best thing i have found...

OSS License for "look but don't use it to compete with us"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Is there a well known Open Source license that would allow me to open source some mission critical code in such a way that the community could read it, but that would simultaneously prevent competitors from using it to gain an advantage over us?
I'll give you a bit more context. We are developing quite a complex and serious business analytics tool for which we decided to create our own in house javascript MVC framework. As part of the project we also built a bunch of reusable controls that seamlessly integrate with the framework for things like switches, tables, autocomplete search boxes, navigation controls, etc. (think Cocoa controls or jQuery UI).
We'd like to release the framework itself and the controls to the community for better or worse under the Apache2 license, fairly standard stuff there. However, and this is really what I'm asking, we would also like to show the source of our SaaS analytics app (the one that powers our business and generates revenue) for the purpose of demonstrating how a complex enterprise app can be built on top of our framework, for it to be sort of like a rigorous proof-of-concept/case study/demo. But we don't want competitors to just clone the repo and deploy it on their servers with some rebranding and start stealing our customers. Is there a well known open source license that could facility this type of information sharing for the benefit of the community whilst simultaneously precluding competitors from gaining a competitive advantage from it? (I mean obviously our competitors might learn a thing or two and that's fine, but we want to have legal power in case they blatantly copy parts of our code and use it to compete against us; and the judgement of whether they are copying or not should be at our sole discretion).
I think you should look at the Microsoft Reference Source license..
Microsoft does pretty much what you outlined up there with the .NET library.
But as always with these license questions:
Don't take the word of a bunch of internet strangers - ask a lawyer familiar with the topic before you do anything you might regret.
Also, on a side-note: With all my love for OSS software - Regardless of what your competitors do, the second they have your source they can blatantly copy you (and they will if you are successful enough). And once that has happened you have to spend a pile of money on lawyers trying to get to your rights.
Especially when it's the heart of an operation, I'd label that as "competitive advantage" and not release it to the public. It's your IP, once you give it out to someone anyone can simply take your ideas and write his own app with it - no license in the world can prevent that (besides stupid patents you probably don't have).
So my advice here would be to just wait a bit and see how the MVC lib turns out.
Look at Ruby on Rails. It's been developed as part of Basecamp at 37 Signals, but the Basecamp source code never became public simply because there is no need for that. If the framework is any good people will use it and you'll get organically to sample applications.
Having real world examples is nice, but especially for JavaScript frameworks you should aim to be pretty backend-agnostic - so it shouldn't really matter if you run ASP.NET MVC or Rails or Node on the backend. The logical consequence is that the backend code is of no real interest to your library users.
They can see the library working on your site, that in itself should be enough to show useful usage patterns.
If you take some parts out of your app and show them to users you'll be fine without the risk of lawyering to get to your rights..
No. The purpose of any Open Source license is to give the code to the community to further develop, fork, or use for other purposes. The whole point of having a license is purely to prevent complete theft of code without attribution. If code that is claimed as original appears down the road can be proven to be based on your work, you have sufficient grounds for legal action.
The best way to demonstrate a proof of concept is to take discrete parts of your work as an overall demonstration of the value of the framework.
But, I'm no lawyer so I would suggest that you consult with one before doing anything that might jeopardize your business or your job.

Face detection javascript/html5/flash [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What is the best way for face detection in a web page ?
Which is the most used one ,actually what i need is detect the faces ,capture one face.
i have no experience about this .
is there any js solution available ?
whats ur suggestions and opinions ?
Thank you.
Friends : I am testing all your answers : i will come back with result.
You have a few possibilities here, it depends which is the target language you want to use for implementation. One of the possibilities would be Flash, where you can use a Ohtsuka Masakazu face detection library ported to AS3 originally implemented in OpenCV.
http://www.libspark.org/wiki/mash/Marilena
This was refined by Mario Klingemann. You can find the project here: http://www.quasimondo.com/archives/000687.php, which includes the source codes.
If the desired platform is the native web browser, without any proprietary plugins, then the new WebRTC W3 initiative is one of the alternatives. There is another one, which w'll discuss later. You can find the implementation here: http://neave.com/webcam/html5/face/.
The other solution would be to use websockets for front end communication with the back end server, where the heavy image detection analysis is happening. There whole process can be summarized in a few steps:
We access the webcam by using the getUserMedia function which is a HTML5 specific feature.
Then we send the webcam data to the server using websocket.
Here we analyze the received data, using for example JavaCV/OpenCV to detect and mark any face that is recognized.
We send back the data to the client using again websockets.
There are a few options we can use at the backend site:
Jetty: Provides websockets and many other integration.
OpenCV: Library that has all kind of algorithms for image manipulation. We use their support for face recognition.
JavaCV: Provides wrappers to commonly used libraries by researchers in the field of computer vision. Using this java wrapper we can analyze the images directly by data received from Jetty.
And here is a cool implementation of the description above.
UPDATE
At the moment the most impressive JS face recognition library is: clmtrackr which is a library for fitting facial models to faces in videos or images. A thorough explanation of the technology is found here: http://auduno.tumblr.com/post/61888277175/fitting-faces
This demo uses only JavaScript and the getUserMedia API for real-time, client-side face detection: http://neave.github.com/face-detection/
You may use a free API from face.com. It can be used in any language you want (AS, JS, etc).
It has some nice features (face features detection - eyes, mouth, etc), age detection, and more
It's limited to 5ooo photos per hour, but in most cases that's more than enough.
Not sure if it's available but you could certainly port one. My opinion is it's definitely possible though may need to pair with Flash to access the cam.
Definitely google this one, it's pretty well covered. E.g. there's even a www.facedetection.com -- plus numerous APIs/SDKs such as in the comment above.
If you have the time why not try to craft your own / improve on what's out there. You may discover some easy way to do it that's lightweight and is just what you want. :)
If you are interested in more than just detection then:
You need to consider are you doing recognition or identification.
Recognition you need to search for the image face in your face database.
Identification you need to confirm the image face matches the given identity.

Should I be learning Flash/Flex/ActionScript or HTML/CSS/JS ("HTML5")? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I'm fairly new to this whole web-development thing (2 weeks maybe, my 1st scraping of code exists here, I quite like it) and I ended up learning to use Adobe's Flash Builder 4, which I have come to quite like (although Action Script annoys me at times).
Recently however I've been reading a lot about "the future" of web development, RIAs, web 2.0 etc, and it appears the whole Flash/Flex/ActionScript frame work's main competition will be the HTML/CSS/JS stack (or "HTML 5").
So obviously I don't want to take the time to learn a language (Flash/Flex/AS3) that will end up dead in a couple of years and end up having to learn another one (HTML/CSS/JS), when I could just move over now.
My main interests are fairly information rich (database orientated) web sites, with high levels of user interactivity for customisation, uploading, etc. I like the whole mobile web aspect, and would like to have the capacity to also develop for that platform, as well as mobile apps etc. I love the whole "live" aspect (like the tour de flex light up map that shows user activity), not particularly bothered by uber complex animation and obviously want things to be responsive and user friendly.
So yea, any input on this would be much appreciated, I'd just like some advice for overall direction for my personal learning and development.
Thanks!!
You're making some basic mistakes in the question. The HTML/CSS/JS combination is different from HTML 5, That combination works just fine with current implementations (ignoring some of the annoyances of IE for the moment.) HTML 5 is a new extended definition of HTML with a number of new features like local storage.
HTML 5 is also not completely settled, nor completely supported.
You should learn HTML and CSS to start with; in general, you still need a web page in which to embed your Flash stuff. You should get some basic knowledge of Javascript for much the same reason.
Conveniently, the Javascript will carry over to Actionscript, which is a variant of the same ECMAscript standard.
Flash isn't going anywhere for a long time, and given the glacial pace that the HTML5 committee is working at, the HTML 5 spec won't be fully standardised for a while yet either.
Plus before all these lovely HTML5 web apps can become commonplace, the world's windows users will need to have a better browser than internet explorer 8. Given that 10-20% of web users are still stuck on IE6, i don't think we'll be seeing html5 becoming dominant for quite a few years. Of course then by that time we'll be seeing HTML6 and the slow painful process of getting the world to upgrade will start again.
Personally i don't do flash, because for what i do i really don't need it, but flash is a really useful tool outside of web development too. Lot's of triple A Games have flash built menu's and user interfaces for instance.
But really, become good at either/both technology, and you'll probably not be short of work
Learning a language like Actionscript can never be a waste of time , the mindset you will develop from it will enable you to understand the concepts of programming and it'll be easier for you to move to other languages if/when you so desire. Learning HTML & CSS is essential if you plan to develop for the web but it will not bring you the same type of knowledge, as it uses a very different logic. If you like the idea of developing web applications, one day you may want to develop desktop applications, HTML won't be of much use then, whilst the programming knowledge acquired with AS3 will not be lost.
Is this just for the fun of learning, or do you have any specific tasks to accomplish? I like to use the correct tool for the job. If you don't have a specific job to accomplish, or any constraints to work under, I would just pick the most marketable skill and go with that. Unfortunately, I'm not exactly sure which is the most marketable skill.
My recommendation would be to check out some JSON type stuff in JavaScript. That seems to be a pretty stable (might I even say fad-resistant) AJAX evolution which is pretty wide spread and likely to stick around for a while. If you focus on the high level theoretical concepts, the specific comings and goings of implementations won't be as important (in my opinion).
I think learning AJAX (using JSON rather than XML) is a good way to go so you learn about implementing asynchronous information rich sites. If you have to redraw the site entire site when you pull information, you're doing something wrong. The AJAX concepts will come in handy regardless of your platform.
Good luck!
-Brian J. Stinar-
Don't bother with flash.
Yes, it's pretty and powerful and fairly ubiquitous. It's also on its way out the door, as you observed in your question.
Let's compare Flash and its newly-arrived competitor, the HTML5 canvas element.
Flash is only supported by Adobe; if you want quality development tools or resources you'll have to buy from them (for the most part).
HTML5 canvas doesn't need proprietary development tools. HTML5 canvas is supported by every major browser vendor -- Mozilla, Apple, Google, Microsoft. All vendors will provide documentation and competition for each other, which should result in a more refined product.
When OpenGL support (direct gfx card access) was in discussion for HTML5 Canvas, guess who was the only holdout? Adobe, of course. Everyone else wanted hardware graphics support for canvas.
In other words it's Adobe against everyone else here, and Adobe's not going to win. They might keep the status quo for a while, but eventually they'll lose their foothold and canvas & co will take over.
tl;dr: No use learning the dying proprietary technology when you can learn the modern open technology that's going to replace it.
HTML5 is still very unstable, so you shouldn't try it.
For me, HTML5 is great, but some business haven't moved off of IE6, given its current state. Flash, while useful, can be very very tedious at times and other times it doesn't even work on some computers or makes some computers truly a pain in the "insert word here".
It's better to start with CSS and HTML4. Get the basics, then start going for more.
By then, you'll know what to want.
Personally I think all the answers here are overcomplicating things. Here's my take:
Use whichever technology excites you, and is best for what you want to build right now.
If the app you want to build right now feels perfect for Flex, use Flex. If something about HTML5 has caught your fancy and won't let go, dive into it. You can always change technologies in a year or three, and You'll be taking everything you've learned about design and architecture and usability with you - learning a new scripting language and some new tools won't be that bad. The only way you can make the "wrong" choice here is if you, for whatever reason, pick a technology that you wind up not enjoying enough to get anything built.
The reason I feel this is the best way is, nobody here can tell you anything useful about what technologies will or won't be around in a few years' time. Adobe could go bankrupt; Steve Jobs could die; Google could get broken up in an antitrust suit. Hell, Flash could be on the iPhone next year for all we know - or HTML6 could adopt a new, strongly-typed JITable programming language. Or a hundred other things could happen to render your (and our) predictions moot.
I mean, personally I expect that both Flash and HTML5/6/7 will be vibrant and flourishing in five or ten years - because they both have successful organizations behind them investing in their futures, and because I've never heard a whit of a meaningful argument why the success of one should require the failure of the other. But that's just a guess, and my guess is no better than yours. Focus on getting good stuff made now, and the technology road map of the future will come when it comes.
In my opinion – everything is worth learning, especially when it comes to HTML/CSS/JS/Flash, which are each completely different systems/skill pools tailored to entry-level developers.
HTML is tagged markup, and very important because it outlines XML usage. CSS is writing visual formatting rules. JavaScript is a scripted language, and a great way to get your feet wet with simple programming logic. And Flash is a great system in which to get into object-oriented programming within a compiled language.
As you keep venturing out, you'll find that a lot of technologies are really just different flavors of the same ice cream. While different languages have their own nuances, there are fundamental similarities between –say– most compiled languages. I came from Flash and got into iPhone development... while Objective-C is a way bigger and uglier system to dive into, I still generally knew my ass from my elbow while building my first app after several years experience with AS3. The same goes for .NET and Java. Also, I would second the notion that Flash is not dead, despite loosing traction in the wake of the iPocalypse. Whether it dies in a few years or not, it doesn't make AS3 any the less valuable to have learned in addition to HTML/CSS/JavaScript.

Processing language vs javascript?

I'm going to develop a comprehensive educational software which runs on the browser and has many visualization and simulation works (electrostatic and electromagnetic visualization, 2D and 3D).
Which language(Processing, javascript or something else) is the best toward my purpose?
The question is indeed broad but I will answer from the experience I've had.
Javascript is not really meant to do mathematical calculations, which is what might be necessary to calculate a lot of E&M phenomenon quickly (Especially if they are not represented as a closed form solution). It really goes into how much detail you want in your graphs as well (More steps = more calculations). You may find yourself needing to do more optimizations to make up for the performance difference.
I did some visualizations of antenna arrays (They had closed form solutions, only simple arrays) in Flash and it worked out ok. Javascript will definitely not be up to par with any 3D simulations you might want to do.
I wonder if Silverlight might be a better solution, because you may find more mathematics libraries for .NET than for Actionscript, that could save you a lot of work of writing the math out yourself (But you might end up doing this anyways because of the performance issues).
As others have suggested javascript is not that strong of a language when it comes to visualization.
Processing is a really good language for what you're trying to do, it's easy to learn and is Java based. Data visualization is built directly into the language, as well as temporal space (ie advance "1 tick" in time and have the visualization react to that.)
Also if you're interested in going that route I'd suggest picking up Visualizing Data which is pretty much a Processing primer.
Flash may be the more common application stack right now for what you are looking for, but Silverlight is looking primed to take the title from them based on the powerful features that it contains.
I would go Flex or Silverlight myself
Plenty of re-usable libraries
Native support for multimedia
Native support for graphics and animation
I'm a little late to the show, but what you want, has been implemented in JavaScript, and you'll find this incredibly useful. I recommend running it under Chrome as the JS processing engine is extremely fast. (You may even want to try Chrome 2 which is even faster)
http://ejohn.org/blog/processingjs/
http://ejohn.org/apps/processing.js/examples/basic/ (91 basic demos.)
http://ejohn.org/apps/processing.js/examples/topics/ (51 larger, topical, demos.)
http://ejohn.org/apps/processing.js/examples/custom/ (4 custom "in the wild" demos.)
See also: http://www.chromeexperiments.com/
I second LFSR Consulting's opinion: Processing is used a lot for educational purposes, it is free, and fast (Java is faster than Flash in general) and easy to learn, so you have faster results. It supports 3D, you can tackle Java libraries for simulation and computing, etc. And it has a great community! :-)
JavaScript is a bit light for such usage. JavaFX is hype, but it hasn't really 3D (although one used Java3D with it) and it is still a bit young.
Flash and Silverlight: no comment, not much experience in the field. OpenLazlo can be an alternative...
You really have two choices ActionScript in Flash or VB.NET/C#/other in Silverlight.
So first you need to decide which of these platforms you will target.
You may be able to split the problem into two parts, the user-interaction and display part, and the heavy calculations part.
If you can move the heavy calculations to a server then you can still show everything in javascript.
One difficulty with javascript is that it is interpreted and you will need to write more of the equations yourself, so there is a performance hit and development time, but it will work without any plugins, unless you don't want to do 3D in the canvas tag.
Flash and Silverlight may have better options, but then you are learning new languages and requiring plugins, depending on what version of Flash you want to use.
Check out processing.js, xcode, and iprocessing!
ProcessingJS is great for data visualization but lacks in interactivity.
You should probably try python. It is a really good language for educational and computational purposes it has a pretty decent community and the syntax is not so tough. Even though it was designed to for command line you can create front end gui's for it using some external package and it also provides packages like Scipy, Numpy and Matplotlib for advanced plotting and data visualization.

Categories