What’s the point of “taking a mighty swing at the troll” if all you have is a static image on the screen? Exactly. If you want to play a game that has already done this well for voice (in my opinion), check out Skyrim. My long-term goal for this game is to create a procedurally-generated RPG game where you fight monsters, complete quests, and gather treasure. Stickiness: I personally quite enjoy this game and played it well beyond what was required to test it myself.
![animated troll home screens for android animated troll home screens for android](https://wallpaperaccess.com/full/2081852.jpg)
In theory, both the tiles and scoreboard should animate, I may play with the timing of the commands a little to see if I can get this to work. Everything else is controlled by Pager commands, including the scoreboard. The only time the game receives a new RenderDocument is if you customize the tiles or background (“Alexa, customize”). By simplifying these Tiles, I also reduced the number of rendered elements. #2 I created backgrounds and pagers for each tile (4x4 = 16) and created a custom Tile layout, which eliminated repeated code and greatly reduced response size. = ? viewport.width / 6 : (viewport.width > viewport.height ? viewport.height / 4 : viewport.width / 4)} These calculations are used to place the X/Y grid of objects (Containers within a Container) in the correct location based on screen size/shape. #1 I solved through some ternary operations based on viewport shape and width/height ratio. There were two primary challenges for this project: 1) adapting to different screen sizes and 2) rendering and controlling all the tiles and keeping it within performance and response size limitations. You can play it on headless (no screen) devices, but it’s not the best experience. I’d suggest trying it out to get a feel for how it works.
![animated troll home screens for android animated troll home screens for android](https://vignette.wikia.nocookie.net/dreamworks/images/f/f6/Peppy.png)
2048 (Board Game)Īs the only skill for this piece launched so far, this one is the most polished and playable. I will keep the below relatively code-light, see the gists above or the related videos for more details. My personal goals for all these projects were 1) use RenderDocument directives only when absolutely necessary (a scene change) 2) animate everything possible and 3) create games that were enjoyable and sticky. I wanted to experiment with a variety of game types so I created a board game, a first person RPG, and a 2D side scroller/platformer. I will touch on 2048 and two other projects I currently have underway (both of which may never be seen by the public).
![animated troll home screens for android animated troll home screens for android](https://c.tenor.com/8-OZUCO9B-YAAAAC/troll.gif)
This allows for complex scenes to be built and minimizes RenderDocument directives.Ĭombine these together and you could get a pretty decent top-down 16-bit style game. Example sprite animation here - “bird” (video).Ģ00+ element APL documents: By being smart about reuse of Layouts, you can fit hundreds of APL components into the response sent to Alexa. Example item animation here (video).įrame-based sprite animation: using a Pager you can approximate a sprite animation by flipping between the different pages using SetPage commands Sequentially. I used 1vh square empty Frames to accomplish this. X or Y axis item animation: using a Sequence with small, hidden items, you can animate the primary item in the Sequence around the screen by using Scroll commands Sequentially. Example background animation here (video). X or Y axis world animation: using a Sequence (or nested Sequences) you can break up the background into tiles (in pixels or percents of viewport) and use Scroll commands Sequentially to move the world. If you don’t care about my projects and want to get to the meat of the content, here you go! There are likely more possibilities, but here’s what I’ve made work so far: For this, I broke from APL convention to get the results I needed. If you’ve seen some of my other posts or followed some of my projects, you know I don’t let convention or intended use limit me. One of the big blockers I ran into was the lack of game-type animation available through existing APL components and commands.įaced with this challenge, I figured out how to make animation work (X and/or Y axis movement for world and objects sprite-based animation).
![animated troll home screens for android animated troll home screens for android](http://2.bp.blogspot.com/-kXj5Kgc4sXU/UopQFW9037I/AAAAAAAAEn8/Bjd8qpGoCBA/s1600/carlton-banks-fresh-prince-bel-air-trollface-troll-face.gif)
This game has a million clones across mobile and web, but I didn’t find an Alexa version.Īlthough I have used APL previously, for these games, I dove deep into the limits of functionality, response size, and performance. I’ve been exploring the Alexa game space for fun and just launched my first personal Alexa game skill: a voice-controlled version of the popular game 2048 ( UK version, US version, others coming soon) built with screen devices in mind (Spot, Show, FireTV). I will highlight animation, as I’ve spent the majority of my time making that work. The purpose of this article is to share what I’ve done over the last two months by using (and misusing) Alexa Presentation Language (APL) to create visual games for Alexa.