From Tech: This viral app is Dance Dance Revolution, but for your face

Think Dance Dance Revolution, but for your face.
The Face Dance app, a music facial recognition based game, is going viral across Asia because of its seriously ridiculous gameplay videos.
SEE ALSO: I hate the ‘Dancing Hotdog!’ game so much, but I can…

Read more

From GeekWire: Microsoft delays major Xbox One X title Crackdown 3 to 2018, leaving hole in launch lineup


Microsoft is delaying the release of the highly anticipated game Crackdown 3 from Nov. 7, the same day the new Xbox One X drops, to spring 2018. Polygon first reported the news, and Microsoft officials told the gaming site that the delay is to give the title’s developers more time to deliver the best game possible. Head of Xbox Phil Spencer echoed the sentiment on Twitter. It’s always disappointing to move a date. We are very committed to shipping @Crackdown 3 to the level of quality the fans deserve. — Phil Spencer (@XboxP3) August 17, 2017 Shannon Loftis, Microsoft Studios… Read More

Read more

From Engadget RSS Feed: Twitch starts its retro ‘Starcade’ marathon on August 28th

Twitch has nailed down the start of its Starcade marathon… and unlike many of its other marathons, it won’t just involve playing episodes back to back. It’ll stream the arcade-themed game show on Shout! Factory’s channel starting August 28th at 2PM…

Read more

From SitePoint: Building a Multiplayer TicTacToe Game with Meteor

Meteor is a popular, full stack web framework that makes it very easy to prototype your ideas and get from development to production really fast. Its reactive nature and the use of DDP, make it a great candidate for building simple, multiplayer, browser games.

In this tutorial, I’ll show you how to build a multiplayer TicTacToe with Meteor, using its default front-end templating engine, Blaze. I will assume that you have played around with Meteor a bit, and of course, that you feel comfortable coding with JavaScript.

If you have zero experience with Meteor I’d recommend you first follow the TODO app tutorial on the official Meteor site.

You can find the code for the completed app in the accompanying GitHub repo.

Creating the app

If you don’t have Meteor installed you should follow the instructions on their site according to your OS.

Generate the Scaffolding

Now with Meteor installed, open your terminal and run the following command:

meteor create TicTacToe-Tutorial

This will create a folder with the name of your app (in this case TicTacToe-Tutorial). This new folder contains the basic file structure for an app. There’s actually a sample app inside.

Navigate to the folder:

cd TicTacToe-Tutorial

And now run the app:

meteor

I know, I know… that’s a terribly hard-to-remember command, and you’ll be using it a lot, so you should start memorizing it!

If everything went fine now the console should be building the app. After it’s done, open your web browser and go to http://localhost:3000 to see the app running. If you have never done so before, I’d recommend you play around with the sample app. Try to figure out how it works.

Let’s take a look at the file structure. Open your app’s folder. The only things there that we care about (for now) are the client folder and the server folder. The files inside the client folder will be downloaded and executed by the client. The files in the server folder will only be executed on the server and the client has no access to them.

These are the contents in your new folder:

client/main.js        # a JavaScript entry point loaded on the client (we won't be needing this)
client/main.html      # an HTML file that defines view templates
client/main.css       # a CSS file to define your app's styles
server/main.js        # a JavaScript entry point loaded on the server
package.json          # a control file for installing NPM packages
.meteor               # internal Meteor files
.gitignore            # a control file for git

Building the board

A TicTacToe board is a simple three by three table; nothing too fancy, which is great for our first multiplayer game, so we can focus on the functionality.

The board will be downloaded by the client, so we’ll be editing files inside the client folder. let’s begin by deleting the contents on main.html and replacing it with the following:

client/main.html

<head>
  <title>tic-tac-toe</title>
</head>

<body>
  <table id="board">
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
  </table>
</body>

Don’t forget to save your files after making changes! Otherwise, they won’t be acknowledged by Meteor.

Now let’s add some css to our board. Open the main.css file and add the following content:

client/main.css

table
{
  margin: auto;
  font-family: arial;
}

.field
{
  height: 200px;
  width: 200px;
  background-color: lightgrey;
  overflow: hidden;
}

#ui
{
  text-align: center;
}

#play-btn
{
  width: 100px;
  height: 50px;
  font-size: 25px;
}

.mark
{
  text-align: center;
  font-size: 150px;
  overflow: hidden;
  padding: 0px;
  margin: 0px;
}

.selectableField
{
  text-align: center;
  height: 200px;
  width: 200px;
  padding: 0px;
  margin: 0px;
}

We’ve also added a few extra ids and classes that we’ll be using later on in this tutorial.

Finally, delete client/main.js, as we won’t be needing it, and open the app in the browser to see how it looks.

This is fine and all, but is not an optimal solution. Let’s do some refactoring by introducing Blaze Templates.

Creating a Template

Templates are pieces of HTML code with their own functionality that you can reuse anywhere in your app. This is a great way to break up your apps into reusable components.

Before creating our first template, we’ll add two more folders inside the client folder. We’ll call one html and the other one js.

Inside the html folder, create a new board.html file with the following content:

client/html/board.html

<template name="board">
  <table id="board">
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
    <tr>
      <td class="field"></td>
      <td class="field"></td>
      <td class="field"></td>
    </tr>
  </table>
</template>

Now, on the main.html folder replace the content inside the body tag with the following code:

client/main.html

<head>
  <title>tic-tac-toe</title>
</head>

<body>
  {{>board}}
</body>

This will insert our template with the property name="board", inside the body tag.

But this is the same hard coded board that we had before. Only now, it’s inside a template, so let’s take advantage of the template helpers to build our board dynamically.

Using helpers

We’ll declare a helper in the board template that will provide us with an array with the same length as the dimensions we want our board to have.

inside the js folder create a file called board.js with the following content:

client/js/board.js

import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';

Template.board.helpers({
  sideLength: () => {
    let side = new Array(3);
    side.fill(0);

    return side;
  }
});

Now, we’ll use this helper in the board’s template HTML to repeat one single row for each element in the array provided by the helper. To help us with this, we’ll use the Each-in Spacebars block helper.

Replace the content inside the board.html file with the following:

client/html/board.html

<template name="board">
  <table id="board">
    {{#each sideLength}}
      {{#let rowIndex=@index}}
      <tr>
        {{#each sideLength}}
        <td class="field" id="{{rowIndex}}{{@index}}">
          {{{isMarked rowIndex @index}}}
        </td>
        {{/each}}
      </tr>
      {{/let}}
    {{/each}}
  </table>
</template>

Notice that we’re looping through the array twice, once for the rows and once for the columns, instantiating the corresponding tag (tr or td) as we go. We’re also setting their id properties as the @index of the row + @index of the column. What we get is a two digits number that will help us identify that element, with its position on the board.

Check out the app at http://localhost:3000 to see how it’s looking so far.

UI

Now that we have a good looking board, we’ll need a play button and a tag to show information on the current game.

Let’s begin by creating the ui.html file inside the html folder… you know the drill. Now, add the following content to it:

client/html/ui.html

<template name ="ui">
  
{{#if inGame}}

{{status}}

{{else}} {{/if}}
</template>

As you can see we’re using the #if Spacebars block helper and the inGame helper (that we haven’t yet defined) as a condition. There’s the status helper inside the p tag too. We’ll define that later also.

How does it work? #if the inGame helper returns true, the player will see whatever’s in the status helper. Otherwise, we’ll simply show the play button.

Don’t forget, for this component to be displayed we need to add it to our main client template:

client/main.html

<head>
  <title>tic-tac-toe</title>
</head>

<body>
  {{>ui}}
  {{>board}}
</body>

Logging in

We won’t be dealing with any login UI. We will install a very useful package called brettle:accounts-anonymous-auto that will automatically log in all users anonymously into our app.

Head over to your console and run the following command:

meteor add brettle:accounts-anonymous-auto

Now, when you open the app for the first time after adding this package, it’ll create a new user, and every time you open the app on the same browser it’ll remember you. If we’re not keeping any data from said user, it might be better to just remove them when they log out. But we’re not going over that in this tutorial.

Building the Game

Finally, we’re going to start building the game itself! Let’s go over the functionality we’ll be implementing, to have a clear view of what’s coming next.

We’ll need functionality for:

Continue reading %Building a Multiplayer TicTacToe Game with Meteor%

Read more

From Engadget RSS Feed: Atari partners with LGBT Media to make more inclusive games

Atari is making good on its promise to stake part of its strategy on LGBTQ apps. The company has formed a partnership with LGBT Media, the company behind the social app LGBTQutie, to reach more of the community. The deal will see LGBT Media …

Read more

From Cult of Mac: Street Fighter IV: Champion Edition gets three new characters this week

Street Fighter IV: Champion Edition landed on iOS last month and, true to its promise, it’s already introducing updates designed to keep the gaming experience fresh. This week, the game will introduce fan favorite characters Evil Ryu, Guy, and Gouken, all of whom will be available to players as free downloads. While Evil Ryu is […]

(via Cult of Mac – Tech and culture through an Apple lens)

Read more

From Engadget RSS Feed: ‘Sonic Mania’ is a wonderful balance of nostalgia and novelty

If you’ve played Sonic the Hedgehog on your phone, Xbox 360 or PlayStation 3 in the last half-dozen years, you have Christian Whitehead to thank. In 2009, he created an unofficial proof of concept iPhone port of Sonic CD using a custom-built game eng…

Read more

From Cult of Mac: Classic Sega platformer Ristar is reborn on iOS

What better way to close out the week than by reliving the glory days of 1995 with Ristar, a newly-released iOS port of the classic Sega Genesis game? Released as part of the retro Sega Forever collection, the free-to-download game is a classic side-scrolling platformer in the Sonic the Hedgehog mold — only with less […]

(via Cult of Mac – Tech and culture through an Apple lens)

Read more

From Engadget RSS Feed: ‘No Man’s Sky’ gets basic multiplayer a year after debut

Such was the lack of concrete information as to how the final consumer release of No Man’s Sky was going to play, many gamers felt cheated by the distinct absence of multiplayer features. Developer Hello Games has gone some way to giving the people w…

Read more

From ExtremeTechExtremeTech: DeepMind AI Moves on from Board Games to StarCraft II

Google’s DeepMind AI branch created a computer that can win the deviously complex game Go. Now, DeepMind is moving on to its biggest challenge yet: StarCraft II.
The post DeepMind AI Moves on from Board Games to StarCraft II appeared first on ExtremeTe…

Read more