Lenovo Want Ashton Kutcher As More Than Just a Pretty Face Oct 30th 2013, 21:34 Nerval's Lobster writes "It's not clear whether managers at Lenovo were too starstruck to say 'no,' or whether the once-respected PC maker is having so much trouble hiring technical help it genuinely intends to allow lowbrow-sitcom staple Ashton Kutcher serve as both celebrity spokesman and full-on product engineer. Lenovo announced that it had hired Kutcher as a product engineer who will 'work with the company's engineering teams around the world to develop and market the Yoga line of tablets by providing input and decision-making into design, specifications, software and usage scenarios.' Kutcher – former Calvin Klein underwear model, star of such quality entertainment as That '70s Show, Punk'd, current star of Two-and-a-Half Men and, most recently, portrayer of Steve Jobs in the biopic Jobs – has a successful track record of investing in tech companies, Lenovo's announcement said as partial explanation for the arrangement. Kutcher also studied biomechanical engineering as an undergraduate at the University of Iowa, which USA Today and other news outlets used to help bolster the idea that the star of Dude, Where's My Car? could function effectively as part of an engineering product-development team. Kutcher did list his planned major at the university as biomechanical engineering when he enrolled in 1996, but he dropped out during the 1997-98 school year. He did found A-Grade Investments, which has been involved in or funded tech companies including Spotify, Path, Airbnb and Uber, according to Lenovo." Read more of this story at Slashdot. | Google Nexus 5 Posts Best Gaming Benchmark Among Android Smartphones Oct 30th 2013, 20:54 MojoKid writes "Rumors around the what and when of Google's upcoming Nexus 5 smartphone have been plentiful, and ahead of the supposed release date on Halloween, a benchmark score for the handset has slipped out from Rightware, and it's downright impressive. According to Rightware's Power Board, the Nexus 5 delivered the second-highest Benchmark X gaming score among smartphones, behind only the iPhone 5S, making it the most powerful Android-based handset in the land. The LG-made phone shares a GPU (the Adreno 330) with the third-place Sharp Aquos SHL23 but bested the latter handset with a score of 14.27 to 13.10. A leaked user manual revealed that the Nexus 5 will boast a full HD 4.95-inch display, Snapdragon 800 processor (2.3GHz), 2GB of RAM, 16GB or 32GB of onboard storage, and 8MP rear-facing and 1.3MP front-facing cameras." Read more of this story at Slashdot. | Most Sensitive Detector Yet Fails To Find Any Signs of Dark Matter Oct 30th 2013, 19:27 ananyo writes "A U.S. team that claims to have built the world's most sensitive dark matter detector has completed its first data run without seeing any sign of the stuff. In a webcast presentation today at the Sanford Underground Laboratory in Lead, South Dakota, physicists working on the Large Underground Xenon (LUX) experiment said they had seen nothing statistically compelling in 110 days of data-taking. 'We find absolutely no events consistent with any kind of dark matter,' says LUX co-spokesman Rick Gaitskell, a physicist at Brown University in Providence, Rhode Island. Physicists know from astronomical observations that 85% of the Universe's matter is dark, making itself known only through its gravitational pull on conventional matter. Some think it may also engage in weak but detectable collisions with ordinary matter, and several direct detection experiments have reported tantalizing hints of these candidate dark matter particles, known as WIMPs (Weakly Interacting Massive Particles). Gaitskell says that it is now overwhelmingly likely that earlier sightings were statistical fluctuations. Despite the no-shows at XENON-100 and LUX, Laura Baudis, a physicist on XENON-100 at the University of Zurich in Switzerland, says physicists are not ready to give up on the idea of detecting WIMPs. They may simply have a lower mass, or may be more weakly interacting than originally hoped. 'We have some way to go,' she says." Read more of this story at Slashdot. | NSA Broke Into Links Between Google, Yahoo Datacenters Oct 30th 2013, 18:45 barlevg writes "The Washington Post reports that, according to documents obtained from Edward Snowden, through their so-called 'MUSCULAR' initiative, the National Security Agency has exploited a weakness in the transfers between data centers, which Google and others pay a premium to send over secure fiber optic cables. The leaked documents include a post-it note as part of an internal NSA Powerpoint presentation showing a diagram of Google network traffic, an arrow pointing to the Google front-end server with text reading, 'SSL Added and Removed Here' with a smiley face. When shown the sketch by The Post and asked for comment, two engineers with close ties to Google responded with strings of profanity." The Washington Post report is also summarized at SlashBI. Also in can't-trust-the-government-not-to-spy news, an anonymous reader writes: "According to recent reports, the National Security Agency collects 'one-end foreign' Internet metadata as it passes through the United States. The notion is that purely domestic communications should receive greater protection, and that ordinary Americans won't send much personal information outside the country. A researcher at Stanford put this hypothesis to the test... and found that popular U.S. websites routinely pass browsing activity to international servers. Even the House of Representatives website was sending traffic to London. When the NSA vacuums up international Internet metadata, then, it's also snooping on domestic web browsing by millions of Americans." Read more of this story at Slashdot. | Selling Responsive Web Design To Clients Oct 30th 2013, 16:26, by Jeremy Girard Designing and developing websites that work well on mobile devices is an important aspect of the work we do on today's Web. This importance is reflected in the conversations I have with clients, almost all of whom list "support for mobile devices" as one of their top goals for a redesign — all except one, that is. Late last year, I began a redesign project for a company that sells pressure-treated lumber products. Early on in our conversation, I turned to the topic of support for mobile devices and responsive Web design. Normally, this topic is met with enthusiasm, but not this time, as the client explained: Our customers don't use mobile phones to come to our website. This isn't the first time I've heard this comment from a potential client. I've had many conversations in which the company severely underestimates the number of people who access their website on a phone or other mobile device. Typically, a look at the analytics will open their eyes to the true impact that mobile is having on their website's traffic. But when I looked at the analytics for this particular client, I was the one left in shock. Two percent. That was how much of its traffic was coming from mobile devices at the time. That's it! Jumping ahead to the end of this story, I did end up working with this client to redesign their website, and that website is now fully responsive. The path we took to that point, however, provides an interesting glimpse into how we as designers can go about selling responsive websites, and when we should push for a solution that we know to be an important best practice and yet whose need is not immediately obvious. Determine Whether They Actually Need A Mobile Web Experience The title of this article, "Selling Responsive Web Design To Clients," might sound like a shady salesperson attempting to convince a customer to purchase something they don't need. That is not what I am advocating for at all. So, let me start by stating that the first step in this process should be to determine whether the client actually needs a given solution at all. Make sure that the solution you are selling fits the client you are pitching it to. (Image: echerries) When considering a responsive design for a website that doesn't currently support mobile devices, begin by looking at the big picture. Do the traffic figures show that the client is attracting mobile users? If the mobile traffic figures are similar to those of this client of mine, then maybe they don't actually need a mobile Web experience at this time — especially if the website has no other issues. If a website is currently working well for the organization — meaning that it is converting visitors, features an attractive design, and has a high-quality user experience (for desktop visitors at least), while drawing an incredibly low percentage of mobile users — then redesigning or rebuilding that website only to make it responsive wouldn't make financial sense. You could argue that even a small percentage of visitors getting a poor experience is unacceptable and could be resolved by developing a responsive design. The designer in me can appreciate that argument, but I also understand the business side of the situation. Undertaking a responsive redesign to accommodate just 2% of the audience will be a very tough sell, no matter what company you are speaking with. This is why you need to look beyond just the traffic figures and think about more than just the design-related benefits of responsiveness. Try To Solve Other Problems They Are Having While support for mobile devices was not a compelling enough reason for our client to redesign their website, other concerns brought them to us in the first place. Two of these concerns were the visual design of their website, which was outdated and did not reflect their current marketing, and the lack of a content management system (CMS) or any tools to enable them to update the website on their own. So, I focused my proposal on solving these problems. A redesign would bring the look and feel of the website in line with the rest of the client's marketing, while also improving the overall aesthetics and usability of the website itself. We would bring the website up to current standards and integrate it into a CMS (in this case, ExpressionEngine) — which would solve the second problem of being able to update the website. As I discussed with the client this proposal and the process we would follow, I mentioned that we would make the website responsive as we rebuilt it. As expected, the client questioned whether this was necessary or added cost to the project — which, of course, it would have. The key here is that I was now able to steer the conversation towards the benefits of responsive design above and beyond the support for mobile devices. Focus On More Than Just Phones When we talk about responsive design, we often focus on phones. This makes sense because smartphones are most unlike the type of devices that we've designed for in the past — that is, desktop screens. Creating one website to be marketed and managed and to deliver a high-quality experience to all devices, from desktops to smartphones, is an excellent way to demonstrate the flexibility and power of responsive design. But for this client, phone users were seemingly not a factor. Luckily, responsive design is about so much more than phones. The devices and screens we design for today are a variety of sizes. (Image: Edwin Torres) In speaking with the client, I discovered that a complaint they often receive from customers is that the website appears "small." The reason is that it had been designed to a fixed width many years ago — so long ago, in fact, that it was built for an 800 × 600-pixel resolution. When a user on what is now a typically large desktop screen visited the website, they saw a very narrow column, with a lot of unused space on either side. Yet, the company still had a number of other visitors on old desktops and laptops with low resolutions. So, merely making the website bigger wasn't the right solution. The company needed a website that would work well both on large screens and on old small screens. This was a problem that could absolutely be solved by a responsive design. Instead of focusing on phones and small screens, I explained to the client that a responsive design would enable us to effectively present a layout for today's large desktop screens and also reflow to accommodate laptops and old desktop monitors that don't have a high resolution. As we demonstrated a responsive website for the client using a large desktop screen and a much smaller laptop, they got excited and told us that they had hated the "smallness" of the website for years, but their previous designer explained to them that, to support visitors with old computers, they had no choice but to design for this "lowest common denominator." Responsive design would solve this problem, and by this point our client was pretty much on board because they saw that it solved a problem they had (the "smallness" of the website), without addressing a problem that they didn't think needed to be solved (support for mobile devices). Build For The Future, Not Only The Present When I discuss responsive Web design with my clients, I rarely use the term "mobile support" because it makes those clients think only of phones or, perhaps, tablets. I instead prefer the phrase "multi-device support," which better encompasses the wide range of devices and screen sizes we are really designing and developing for these days. One of the advantages of responsive design is that it doesn't focus merely on the devices and screen sizes out there today. Because a responsive website reflows to fit a screen of any size, with an experience and a layout suited to each, the approach is very future-friendly. The prospect of having a website that continues to work well into the future, even as new devices and screen sizes come to market, appealed to our client. We further explained that, even if the website didn't draw a lot of mobile visitors today, it might in the future. A responsive approach would ensure that those mobile visitors get an experience optimized for them. The client remained skeptical that they would ever attract mobile visitors, but they were sold on responsive design because of the other problems it would solve. Additionally, because we were rebuilding the website anyway, making it responsive at the same time made financial sense. Trying to strap responsiveness onto an existing non-responsive website can be daunting and expensive, whereas incorporating responsiveness early on in the design process is much easier, especially if it is a core part of your process and you've developed a workflow for it, which we have. That workflow helped us to make this approach both technically and financially viable for our client. Moving forward with the project, we knew that we would have to keep an eye on traffic once the website went live to prove our theory about the lack of mobile traffic. Looking to the future will help us to build websites that work well even as new devices and screen sizes come to market. (Image: Joe Penniston) Break The Cycle Two percent of traffic from mobile devices is so low a figure that, when I first saw it, I questioned its accuracy. This particular company does not market or sell to the general public. It is a B2B company that works with a relatively small group of distributors and contractors from a defined geographic area. The client attributed the low mobile traffic to this demographic, which would access the website from an office desk, not on the road with a phone. I agreed that mobile figures would likely be lower for this demographic than for a typical audience (for the websites we manage, 30% of traffic comes from mobile visitors, although some websites get over 50%) — but not this low. I felt that something else was happening here, and my gut told me that part of the reason was that the website worked so poorly on mobile devices. I suspected that the lack of a mobile experience kept mobile visitors away. I did not share this theory with the client at the time, but in the year since the new design went live, the mobile traffic figures have climbed, from 2 to 17%. Granted, that is still lower than what many other websites get these days, but it is a sizeable jump and cannot be ignored. The only reason we can point to for this jump is the website's responsiveness. Neither the demographic nor the market has changed. The only difference is in how the website works on mobile devices. The improved experience has increased traffic. This was one of the reasons why I pushed for responsiveness, even when the traffic figures suggested otherwise. Solving Problems Part of our job as Web professionals is to solve problems for our clients. But we have to solve not only the problems that the client tells us about, but the ones that they do not even know they have. Our clients' problems are opportunities for us to provide high-quality solutions based on our experience and expertise. (Image: Donna Grayson) With the redesign of the website, our team was able to solve a number of problems that the client brought to our attention, including the outdated design and the absence of a CMS. And our solution to the problem that they weren't aware of — a lack of mobile visitors due to a lack of support — validated our responsive approach, even when the traffic figures did not show the need for it. We knew that a responsive design would fix the layout on large desktop screens as well as on small old monitors, but would also help turn around the website's unusually low traffic from mobile visitors, and we were proven correct. We knew that part of the rise from 2 to 17% could be attributed to existing customers who had been sticking to a desktop computer out of obligation but were now switching to a mobile device. Those users are now able to access the website's content on their preferred device, confident that they will get an experience suited to the device. Another reason for the increased mobile traffic is undoubtedly new business. The movie Field of Dreams is instructive here: "If you build it, they will come." If a website does not support mobile devices, then a mobile visitor will likely leave immediately upon noticing it, never to return. This was part of the reason for the low numbers. But the website no longer turns mobile users away, and the users in turn will not leave as soon as they arrive. Rather, they will find the information they are looking for and might visit again or point other people in their organization to the content. Mobile support encourages mobile use. By addressing the customers' problems, including ones that the client was not aware of, we were able to sell a responsive approach. The improved experience has boosted the mobile audience, as well as boosted the leads that the company is getting from the website. In Summary Selling a responsive design is no different than selling anything else. It all starts with solving problems. For this project, we highlighted the benefits of a responsive approach beyond the familiar benefit of support for mobile devices that we normally mention to prospective clients. Here are some of the key points we made in discussing the value of a responsive approach for a website without an obvious need for mobile support: - We would be supporting a variety of screen sizes that aren't typically considered when discussing responsive design, including large new desktop monitors with very high resolutions and old small screens with correspondingly low resolutions.
- The website would scale into the future as new devices and screen sizes come to market and as mobile users begin to visit.
- We would save time, money and technical complexity by doing this work now, as part of the redesign process, rather than trying to cram it in later when the website is set.
(al, il) © Jeremy Girard for Smashing Magazine, 2013. | Cisco Releases Open Source "Binary Module" For H.264 In WebRTC Oct 30th 2013, 16:04 SD-Arcadia writes "Mozilla Blog: 'Cisco has announced today that they are going to release a gratis, high quality, open source H.264 implementation — along with gratis binary modules compiled from that source and hosted by Cisco for download. This move enables any open source project to incorporate Cisco's H.264 module without paying MEPG LA license fees. Of course, this is not a not a complete solution. In a perfect world, codecs, like other basic Internet technologies such as TCP/IP, HTTP, and HTML, would be fully open and free for anyone to modify, recompile, and redistribute without license agreements or fees. Mozilla is fully committed to working towards that better future. To that end, we are developing Daala, a fully open next generation codec. Daala is still under development, but our goal is to leapfrog H.265 and VP9, building a codec that will be both higher-quality and free of encumbrances.'" Read more of this story at Slashdot. | Root of Maths Genius Sought Oct 30th 2013, 14:51 ananyo writes "He founded two genetic-sequencing companies and sold them for hundreds of millions of dollars. He helped to sequence the genomes of a Neanderthal man and James Watson, who co-discovered DNA's double helix. Now, entrepreneur Jonathan Rothberg has set his sights on another milestone: finding the genes that underlie mathematical genius. Rothberg and physicist Max Tegmark, who is based at the Massachusetts Institute of Technology in Cambridge, have enrolled about 400 mathematicians and theoretical physicists from top-ranked US universities in a study dubbed 'Project Einstein'. They plan to sequence the participants' genomes using the Ion Torrent machine that Rothberg developed. Critics say that the sizes of these studies are too small to yield meaningful results for such complex traits. But Rothberg is pushing ahead. 'I'm not at all concerned about the critics,' he says, adding that he does not think such rare genetic traits could be useful in selecting for smarter babies. Some mathematicians, however, argue that maths aptitude is not born so much as made. 'I feel that the notion of "talent" may be overrated,' says Michael Hutchings, a mathematician also at Berkeley." Read more of this story at Slashdot. | Google presenta la seconda generazione dei Glass Oct 30th 2013, 13:15 Google ha pubblicato due nuove foto della prossima generazione dei Google Glass che dovrebbero arrivare sul mercato consumer entro la fine del 2014 anche se non è stata ancora ufficializzata alcuna data. La nuova versione ha un ingresso per gli auricolari anziché un altoparlante ed è stata progettata per essere utilizzata anche indossando gli occhiali da vista. Recentemente Google ha anche annunciato di voler espandere il programma Glass Explorer consentendo agli utenti che hanno già potuto testare la prima versione del dispositivo (circa 10.000 in tutto il mondo) di poter invitare fino a tre amici a entrare a fare parte del programma. Il costo per il dispositivo si aggira intorno ai 1.500 dollari. | Resumable.js – Resumable Uploads via HTML5 File API Oct 30th 2013, 07:05
Advertise here via BSA Resumable.js is a JavaScript library providing multiple simultaneous, stable and resumable uploads via the HTML5 File API. The library is designed to introduce fault-tolerance into the upload of large files through HTTP. This is done by splitting each file into small chunks. Then, whenever the upload of a chunk fails, uploading is retried until the procedure completes. This allows uploads to automatically resume uploading after a network connection is lost either locally or to the server. Additionally, it allows for users to pause, resume and even recover uploads without losing state because only the currently uploading chunks will be aborted, not the entire upload. Resumable.js does not have any external dependencies other than the HTML5 File API. This is relied on for the ability to chunk files into smaller pieces. Currently, this means that support is limited to Firefox 4+, Chrome 11+ and Safari 6+. Requirements: - Demo: http://www.resumablejs.com/ License: MIT License SponsorsProfessional Web Icons for Your Websites and Applications | Build HTML5 WebGL Games with Babylon.GameFX Oct 30th 2013, 07:03
Advertise here via BSA We've recently released a simple & powerful WebGL 3D engine named Babylon.JS: a complete JavaScript framework for building 3D games with HTML 5 and WebGL While he was writing his engine, we've built a small team made of Pierre Lagarde, Sébastien Pertus, Michel Rousseau and I to imagine a framework on top of Babylon.JS to help developers building games in a very simple way. This framework is named Babylon.GameFX and mainly targets people that are not very comfortable with some 3d gaming concepts and don't consider themselves as 3d gurus. But it could be useful also for more advanced developers as we've tried to implement some boring tasks for you also. By the way, if you're a 3d beginner, you should have a look to this series: Tutorial series: learning how to write a 3D soft engine from scratch in C#, TypeScript or JavaScript Pierre and I have just finished a v0.1 of the client part. You can download it from Github: BabylonJS.GameFX & you can find some simple samples on our website: http://gamefx.babylonjs.com/ Sébastien has almost finished a back-end set of APIs to help you handling a leaderboard in a near future. We'll then talk only about the client part here. By the way, please note that we're mainly working on this framework on our part time and that v0.1 means that this is far from being completed. So, please be kind with us if everything is not perfect yet :) But we'd like to start sharing with you what we've done so far, listen to your feedbacks and continue/enhance it in the next weeks. We will then iterate with your feedbacks in the next releases. In this first tutorial, we're going to see how to use the main features we've shipped. By following this tutorial, you'll be able to create the following result in less than 30 lines of code: – or click here: open Babylon.GameFX first tutorial demo in a separate window – Use the keyboard to control the ship, if you have a touch screen touching the left part will display a virtual cyan touch joystick to control the same ship and touching the right part will display a yellow joystick to control the enemy. The joysticks can be controlled with your mouse also. Please also have a look to this sample: controlling the camera with 2 virtual touch joysticks. It takes the same 3d objects and let you move the camera around these 2 awesome meshes thanks to your finger. If you don't have a touch screen or a WebGL compatible browser, have a look to these 2 videos instead: Ok, let’s now see how simple it is to build such cool games. What are the features in the v0.1? You'll see that we're already handling a lot of tasks for you. The idea is to take default decisions that would match 80% of what you would probably like to do in your game. We're hiding a lot of the complexity. Of course, a possible drawback is that you won't be able to do exactly what you want with our framework by default. But this is not a very big problem as you can override most of the default decisions we've made. And it's JavaScript: you can do whatever you want to tweak it! ;-) The framework currently includes the following features' list: - a game world/assets manager/game entities concepts to abstract most of the BabylonJS complexity. They will handle the async loading, the initialization of the BabylonJS engine, the gaming loop, the collisions between the game entities and so so. – a keyboard manager that will control a specific game entity with a default inertia algorithm setup. – a virtual touch joystick that will be able to control a specific game entity or to control the camera of the game (for FPS like games) We're going to have a first contact with those features in this tutorial. You'll see also that we're creating a default camera & a default light for you. You can then start learning 3D concepts in a simple way and change our default parameters to really match your inspiration later on. Creating your first Babylon.GameFX game Minimum structure needed To create your first game, you'll need to download the Babylon.JS framework and the Babylon.GameFX framework from Github. Then, you classically need a basic HTML document: <!DOCTYPE html> <html> <head> <title>Introduction Tutorial to Babylon.GameFX for WebGL games</title> <link href="index.css" rel="stylesheet" /> <!-- BABYLON 3D ENGINE REFERENCES --> <script src="/babylon.js"></script> <!-- BABYLON GAMEFX ENGINE REFERENCES --> <script src="/GameFX/hand-1.0.14.js"></script> <script src="/GameFX/babylon.gamefx.collection.js"></script> <script src="/GameFX/babylon.gamefx.keyboardmanager.js"></script> <script src="/GameFX/babylon.gamefx.virtualjoystick.js"></script> <script src="/GameFX/babylon.gamefx.assetsmanager.js"></script> <script src="/GameFX/babylon.gamefx.dashboard.js"></script> <script src="/GameFX/babylon.gamefx.gameworld.js"></script> <script src="/GameFX/babylon.gamefx.gameentity.js"></script> <script src="/GameFX/babylon.gamefx.gameentity3D.js"></script> <!-- YOUR GAME LOGIC REFERENCES --> <script src="./js/tutorial_001.game.js"></script> </head> <body> <canvas id="renderCanvas"></canvas> <div id="loadingText" class="loadingText"></div> </body> </html> Please download also this basic CSS stylesheet: index.css Let's play with the framework First download the assets here: Omega Crusher Assets and unzip them in an "assets" folder. They will act as our 3D content for this tutorial. Then, create a tutorial_001.game.js file and copy/paste this first JS code: var ship; var gameWorld; document.addEventListener("DOMContentLoaded", initializeGame); function initializeGame() { gameWorld = new BABYLON.GameFX.GameWorld("renderCanvas"); } You're creating here a new instance of the GameWorld object. You just need to provide him the id of the canvas where you'd like to render your game. It will then initialize the BabylonJS 3D engine, create a default camera and light for you and expose a series of services we'll see later on. Tip: you can of course develop your game with our framework with any of your favorite IDE. It's web development. But if you choose Visual Studio, you can boost your productivity with IntelliSense easily. If you'd like to test it, you can download this free version : Visual Studio Express 2013 Preview for Web. Then, simply add this special comment at the beginning of your JS file to indicate the linked resources: /// <reference path="/GameFX/babylon.gamefx.gameworld.js" /> /// <reference path="/GameFX/babylon.gamefx.gameentity3D.js" /> And now, here is the kind of help Visual Studio will bring you: It's really useful to discover a new framework! GameEntity3D We're now going to use the GameEntity3D object to load a specific mesh from a .babylon file. Let review it through a simple code sample: function initializeGame() { gameWorld = new BABYLON.GameFX.GameWorld("renderCanvas"); var initialShipPosition = new BABYLON.Vector3(0, 0, 10); var initialShipScaling = new BABYLON.Vector3(0.1, 0.1, 0.1); var initialShipRotation = new BABYLON.Vector3(0, 0, 0); ship = new BABYLON.GameFX.GameEntity3D("Vaisseau", "./assets/", "OmegaCrusher.babylon", initialShipPosition, initialShipRotation, initialShipScaling, false, gameWorld); // Push all the GameEntity3D objects you'll need during your game in the assetsManager collection gameWorld.assetsManager.push(ship); // Then request to load all these entities, you'll be call-backed once the loading will be done gameWorld.assetsManager.loadAllEntitiesAsync(startGame); } // Assets have been loaded, we can start the game function startGame() { // remove the loading screen, otherwise you won't see your game! gameWorld.dashboard.endLoading(); } The GameEntity3D are looking for the following parameters: - the name of the entity to load from the .babylon file (here it's "Vaisseau"). – the directory to load from – the name of the file in the .babylon format containing the asset you'd like to load – the position, rotation & scaling details using BABYLON.Vector3 objects – a boolean indicating if this mesh has to be loaded to be cloned later on (true) or should we load it immediately & display it (false) – the instance of the GameFX.GameWorld you've created before Create as many GameEntity3D instances you need to. Then, push them into the assetsManager collection. You're then indicating all the resources you'll need in your game. They can all come from the same .babylon file or from different files. Finally, to request the loading and to start the asynchronous operation, call the loadAllEntitiesAsync function and pass it a callback function (startGame here). Finally, call the endLoading function on the dashboard object to say you're ready to display & play to your game. It will remove the loading screen and show your wonderful 3D world. Here's a link demonstrating this first result: http://david.blob.core.windows.net/babylongamefx/introtutorial/part1/index.html You can see in this sample the 3d mesh of a game we're working on. It's the main ship of Omega Crusher and has been designed by our lovely Michel Rousseau. This is cool but you can't play with the ship yet. Keyboard & gaming loop Default behavior Let's now move the ship with the keyboard. The GameFX exposes a KeyboardManager that will do a lot of the magic for you. Let's see how simple it is to use it via this sample code: function startGame() { gameWorld.addKeyboard().connectTo(ship); // if you don't start the main game loop, nothing will happen gameWorld.startGameLoop(); // remove the loading screen, otherwise you won't see your game! gameWorld.dashboard.endLoading(); } Well, I hope that this code is pretty obvious as it was designed to be! :) You see that you only need 1 line of code to create a keyboard and to connect it to one of your gaming entities. By default, the keyboard will listen to the left/right/up/down keys to control the X & Y axis of the position of the entity in the 3D world. You need to explicitly start the game loop to make this keyboard works as expected. The GameWorld object contains a main game loop for you. This game loop check if you've got a keyboard defined and/or some virtual joysticks to ask them to do their job. It also contains logic to handle some collisions between your gaming entities. Here is the result after adding these 2 new lines of code to the previous sample: http://david.blob.core.windows.net/babylongamefx/introtutorial/part2/index.html Simply move the ship up & down and left & right using the arrow keys. Setting borders You see that the ship can disappear from the 2d window view point. This is normal as we're moving in an infinite 3d world. If you'd like to block the move to specific X, Y or Z values, you can set those values through setMinMaxX, setMinMaxY or setMinMaxZ. But how to know the X or Y values to stop at to avoid the ship getting out of the 2d window of the current screen? Call getVirtual2DWindowOnZ(value). Indeed, those values depends on the distance (depth) where the mesh is living from the camera. By default, the camera lives at 0, 0, –30. In the first sample code, we've set the position of the ship to 0, 0, 10. In conclusion, the ship lives at 40 from the camera on the Z axis. Add these lines of code: var borders = gameWorld.getVirtual2DWindowOnZ(40); gameWorld.Keyboard.setMinMaxX(borders.top.x, borders.bottom.x); gameWorld.Keyboard.setMinMaxY(borders.top.y, borders.bottom.y); View the result in your browser here: http://david.blob.core.windows.net/babylongamefx/introtutorial/part3/index.html You'll see also that the KeyboardManager adds some default inertia to the movements. It brings more natural animations. Overriding some of the default behaviors What if you'd like now to change the default behavior? For instance, if you'd like to control the Z axis with up & down keys? Or change the up & down keys to map them to other keycodes? Using the previous demo, if you'd like the control the Z axis on up/down arrow keys, add this line of code: gameWorld.Keyboard.setAxisForUD("Z"); The equivalent for left/right is setAxisForLR. If you'd like to inverse the controls on up/down, use this one: gameWorld.Keyboard.reverseUpDown = true; The equivalent for left/right is reverseLeftRight. If you'd like to change the up/down/left/right actions to other keys, use this line of code: // map to Q,Z,D,S in AZERTY. gameWorld.Keyboard.setBasicKeysCodes(81, 90, 68, 83); If you'd like to customize what the keyboard is doing on your game entity, you've got 2 options: 1 – completely override the default behavior (moving the entity with inertia) to your own code 2 – keep the default behavior and add your logic executed just after that Let change for instance what's being done on the left key, use that: gameWorld.Keyboard.setKeysBehaviors([{ key: "left", associatedBehavior: function () { console.log("myCustomLogicForLeft"); }, addLogic: false }]); Just using this line, you will just override the left key. It won't move your entity anymore but will call the code of the function passed to the associatedBehavior parameter. If you'd just like to add some logic, use rather that instead: gameWorld.Keyboard.setKeysBehaviors([{ key: "left", associatedBehavior: function () { console.log("myAdditionnalCustomLogicForLeft"); }, addLogic: true }]); Your entity will still move with the left key but the KeyboardManager will also call your additional logic contained in the function passed. Rotating on the axis relative to the 3d mesh Currently, when we're moving, we're using the axis defined by the world containing all our assets. But you can change that to ask to rotate on the axis relative to the mesh/game entity itself instead. For that simply call the activateRotationOnAxisRelativeToMesh() function. You can test a sample rotating on X and Z via the keyboard's arrow keys here: http://david.blob.core.windows.net/babylongamefx/introtutorial/part4/index.html If you need to come back to default behavior, call the activateMoveOnAxisRelativeToWorld() function. Virtual Joysticks The VirtualJoystick logic is creating a touch-enabled analogic-like joystick for phones, tablets and any kind of touch devices like Windows 8.1/RT machines. It uses our HandJS polyfill to be compatible with all implementations of various touch specifications (Pointer Events and Touch Events). It's based on the job I've already done before here: Creating an universal virtual touch joystick working for all Touch models thanks to Hand.JS The VirtualJoystick is exposing all the same functions and behaviors as the KeyboardManager. You can create 2 virtual joysticks maximum, one living on the left of the screen & one living on the right. It's very simple to use and will work on all touch devices! Let's review its usage via a simple sample. We're going to load 3 meshes : the same ship as before, an enemy and a sphere that will act as a sky dome. We're going to declare a left virtual joystick that controls the main ship with some X & Y borders limits and a right virtual joystick that will control the enemy on the X axis on left/right and on the Z axis on up/down. The left joystick will be cyan (the default color) and the right one will be yellow. This will then build the sample you've seen at the beginning of this article. To do that, you need exactly 28 lines of code: var ship; var enemy; var gameWorld; document.addEventListener("DOMContentLoaded", initializeGame); function initializeGame() { gameWorld = new BABYLON.GameFX.GameWorld("renderCanvas"); ship = new BABYLON.GameFX.GameEntity3D("Vaisseau", "./assets/", "OmegaCrusher.babylon", new BABYLON.Vector3(-20, 0, 10), new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0.1, 0.1, 0.1), false, gameWorld); enemy = new BABYLON.GameFX.GameEntity3D("Ennemi1", "./assets/", "OmegaCrusher.babylon", new BABYLON.Vector3(20, 0, 10), new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0.1, 0.1, 0.1), false, gameWorld); var sky = new BABYLON.GameFX.GameEntity3D("Ciel", "./assets/", "OmegaCrusher.babylon", new BABYLON.Vector3(0, 0, 100), new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(1, 1, 1), false, gameWorld); // Push all the GameEntity3D objects you'll need during your game in the assetsManager collection gameWorld.assetsManager.push(ship); gameWorld.assetsManager.push(enemy); gameWorld.assetsManager.push(sky); // Then request to load all these entities, you'll be call-backed once the loading will be done gameWorld.assetsManager.loadAllEntitiesAsync(startGame); } // Assets have been loaded, we can start the game function startGame() { var borders = gameWorld.getVirtual2DWindowOnZ(40); gameWorld.addKeyboard().connectTo(ship); gameWorld.Keyboard.setMinMaxX(borders.top.x, borders.bottom.x); gameWorld.Keyboard.setMinMaxY(borders.top.y, borders.bottom.y); gameWorld.addLeftJoystick().connectTo(ship); gameWorld.LeftJoystick.setMinMaxX(borders.top.x, borders.bottom.x); gameWorld.LeftJoystick.setMinMaxY(borders.top.y, borders.bottom.y); gameWorld.addRightJoystick().connectTo(enemy); gameWorld.RightJoystick.setAxisForUD("Z"); gameWorld.RightJoystick.setMinMaxX(borders.top.x, borders.bottom.x); gameWorld.RightJoystick.setMinMaxZ(5, 50); gameWorld.RightJoystick.setJoystickColor("yellow"); // if you don't start the main game loop, nothing will happen gameWorld.startGameLoop(); // remove the loading screen, otherwise you won't see your game! gameWorld.dashboard.endLoading(); } You can test the result directly in your browser here: http://david.blob.core.windows.net/babylongamefx/introtutorial/part5/index.html Use your fingers or a mouse to activate the virtual joysticks. Finally, if you'd like to control the camera with 2 virtual joysticks like the second video you may have seen at the beginning, it's just 2 lines of code: gameWorld.addLeftJoystick().connectTo(gameWorld.camera); gameWorld.addRightJoystick().connectTo(gameWorld.camera); And you're done! Isn't that cool? ;-) You can test this sample here: controlling the camera with 2 virtual touch joysticks We're done for this first introduction to Babylon.GameFX. We've not completely covered everything but I hope you'll get the philosophy behind our framework: simplicity. This article is part of the HTML5 tech series from the Internet Explorer team. Try-out the concepts in this article with free virtual machines @ http://modern.IE. SponsorsProfessional Web Icons for Your Websites and Applications | Crashing Rockets Could Lead To Novel Sample-Return Technology Oct 30th 2013, 05:07 vinces99 writes "During spring break the last five years, a University of Washington class has headed to the Nevada desert to launch rockets and learn more about the science and engineering involved. Sometimes, the launch would fail and a rocket smacked hard into the ground. This year, the session included launches from a balloon that were deliberately directed into a dry lakebed. Far from being failures, these were early tests of a concept that in the future could be used to collect and return samples from forbidding environments – an erupting volcano, a melting nuclear reactor or even an asteroid in space. 'We're trying to figure out what the maximum speed is that a rocket can survive a hard impact,' said Robert Winglee, a UW professor of Earth and space sciences, who heads that department and leads the annual trek to the desert. The idea for a project called 'Sample Return Systems for Extreme Environments' is that the rocket will hit the surface and, as it burrows in a short distance, ports on either side of the nose will collect a sample and funnel it to an interior capsule. That capsule will be attached by tether to a balloon or a spacecraft, which would immediately reel in the capsule to recover the sample. 'The novel thing about this is that it developed out of our student rocket class. It's been a successful class, but there were a significant number of rockets that went ballistically into the ground. We learned a lot of physics from those crashes,' Winglee said. The technology, which recently received $500,000 over two years from NASA Innovative Advanced Concepts, could have a number of applications. It would allow scientists a relatively safe way of recovering samples in areas of high contamination, such as Japan's Fukushima Daichi nuclear power plant, or from an erupting volcano, or even from an asteroid in space, in advance of a possible mining project." Read more of this story at Slashdot. | |