Skip to main content

Show HN: A full AR helicopter action game built as a Snap lens https://ift.tt/3tYNAOp

Show HN: A full AR helicopter action game built as a Snap lens I built a complete game using Snap's AR platform in about 6 weeks. I'd been intrigued by Snap's AR ambitions and wanted to kick the tires on their platform. The YouTube video description contains a link to the Lens: https://ift.tt/3nYHo5b... How to play: - Joypad y axis moves the helicopter along the ray pointing from the camera. You can therefore tilt the phone up to fly "up". - Altitude is also controlled by aiming the phone. The helicopter tries to match the altitude of a point that is fixed in front of the camera. So you can move up by aiming up or by actually lifting the phone higher. - Joypad x axis strafes. - If you lose track of the helicopter, a blue arrow will appear after about 5 seconds. - Blow up enemies and try to stay alive :) How it works under the hood: - Loads of JavaScript. Lenses are surprisingly programmer-friendly. As a non-artist, this is great. Almost everything can be driven completely by code, although most creators opt to use pre-made components with minimal scripting. - The game uses a custom physics engine with OBB-based collision detections that I wrote from scratch. Snap now has integrated physics that seem to be based on PhysX (i.e., the same as Unity's) but this was released well into my development process after I had already rolled my own. - I opted not to use environmental mesh reconstruction because it is performance intensive and gives dubious results on lower-end phones. When I started development, it was only enabled for Lidar-based phones but is since available everywhere. - I instead detect horizontal planes using an API that Snap hasn't really documented. I found a snippet of code in their API docs and opened up the Lens Studio .exe to find the names of the other plane events I needed. - Planes are used to create collision boxes that extend to the floor so the helicopter can bump into furniture. - AI-controlled enemy helicopters plot routes using a heightmap generated from the plane data to avoid colliding with obstacles when possible. Takeaways: - This has arguably become my favorite AR prototyping platform. Much faster idea-to-PoC iteration time than anything else out there. - The platform is surprisingly full-featured. - The Lens Studio Editor is remarkably polished and, despite some bugs here and there, is very stable. - The deployment story is second to none. Deploying to the phone involves a single click and is done over the Internet (no need for any tethering or wireless pairing). - Debugging on-device is still challenging (all you can do is log a few lines) but I was assured that an actual debugger is coming soon. - Economic viability: unfortunately, it is not really possible to directly monetize lenses. Most creators contract with brands to create branded lenses. Future plans: - I'll definitely be keeping an eye on Snap's ecosystem. - No plans for any more full-fledged lenses but I do have some ideas for prototypes I'd like to try in anticipation of commercially viable mixed reality HMDs hitting the market soon (e.g., Meta's Project Cambria). - I may update the game with a tutorial mode and a co-located multiplayer mode (co-op play or PvP) provided I get the necessary support from the Snap dev team. Hope you enjoy and are inspired to dive into AR if you haven't already :D https://www.youtube.com/watch?v=O_1dJ_x7vXw January 26, 2022 at 01:27AM

Comments

Popular posts from this blog

Women Pioneers at Muni: Adeline Svendsen and Muni’s First Newsletter

Women Pioneers at Muni: Adeline Svendsen and Muni’s First Newsletter By Jeremy Menzies To close out Women’s History Month, here’s a look back at one woman whose work to bring Muni staff together in the late 1940s created a legacy that lives on to this day. Adeline “Addy” Svendsen was founding editor of Muni’s first internal newsletter, “ Trolley Topics .” Adeline Svendsen sits at her desk in the Geneva Carhouse office building in this 1949 shot. Trolley Topics was a new venture when it started in February 1946. As Svendsen wrote in the first issue it was created, “to bring a little fun, a little news, and a lot of good will to all our fellow employees in the Railway.” Just two years prior in 1944, Muni merged with the Market Street Railway Company, expanding the small municipal operation into the largest transit provider in the city with hundreds of employees, vehicles of every shape and size, and dozens of facilities scattered across town. The newsletter was meant to help unite ...

Show HN: StreetComplete, an OpenStreetMap Editor for Humans https://ift.tt/2J8IL02

Show HN: StreetComplete, an OpenStreetMap Editor for Humans StreetComplete is an OpenStreetMap[0] editor directed at people who want to contribute and want to do this using their smartphone, without learning how to edit things[1]. It is available as an Android application. It is intended to be used as one walks, with quests appearing as markers on the map. Selecting a marker allows one to answer a simple question. The answer will be added to the OpenStreetMap database, with app handling selecting objects for editing, transforming answer into OSM tags and making edits. OpenStreetMap account is needed to apply edits, but it is possible to start without it, make some edits and login/register later. Note: I am not the main author, but I am one of the active contributors. Github page is at https://ift.tt/2g8lasH and https://ift.tt/3nR9PzS shows what was recently released. [0]OpenStreetMap is a Wikipedia of maps, available on the open licence. This dataset is already used for many interestin...

Show HN: Launch VM workloads securely and instantaneously, without VMs https://ift.tt/2QwJ1Kd

Show HN: Launch VM workloads securely and instantaneously, without VMs Hello HN! We've been working on a new hypervisor https://kwarantine.xyz that can run strongly isolated containers. This is still a WIP, but we wanted to give the community an idea about our approach, its benefits, and various use cases it unlocks. Today, VMs are used to host containers, and make up for the lack of strong security as well as kernel isolation in containers. This work adds this missing security piece in containers. We plan on launching a free private beta soon. Meanwhile, we'd deeply appreciate any feedback, and happy to answer any questions here or on our slack channel. Thanks! April 29, 2021 at 07:50AM