New Beyond the Gates of Antares Units Available From Warlord Games

Tabletop Gaming News - 29 November 2016 - 7:00am
The holidays are a good time to get together with family. The Boromites are certainly family-centered in Beyond the Gates of Antares. Their new releases include the matriarch and patriarch of the family. But they’re not the only ones getting new figures. The Isorians are getting something special as well. As I mentioned, the Boromites […]
Categories: Game Theory & Design

Adaptive music in competitive games - by Denis Zlobin Blogs - 29 November 2016 - 6:45am
An article describing a way of using vertical re-orchestration to create highly dynamic music for all kinds of games where 2 or more side compete to each other.
Categories: Game Theory & Design

Feeling the Frustration of "Fun Pain" Game Design - by Josh Bycer Blogs - 29 November 2016 - 6:44am
Today's post looks at the use of fun pain mechanics, and why they do more harm than good to a game's long-term success.
Categories: Game Theory & Design

Uncharted: the Curse of Archetypes in Video Game Storytelling - by Yuvan Wickramasinghe Blogs - 29 November 2016 - 6:39am
Ever wondered why Nathan Drake can wise crack while shooting down wave after wave of enemies? Here's your answer! Kind of... Take a look at why character archetypes make Uncharted the light-hearted, action-adventure game it strives to be.
Categories: Game Theory & Design

Are Linear Games Still "Good" Games? - by Corvyn Kusuma Blogs - 29 November 2016 - 6:39am
A research paper for my Intro to Interactive Entertainment, discussing the ways in which a linear game can still invoke player agency today.
Categories: Game Theory & Design

Fantasy Flight Previews the U-Wing For X-Wing

Tabletop Gaming News - 29 November 2016 - 6:00am
There’s a lot of ships in the Star Wars universe with movable parts. X-Wings and B-Wings first come to mind, but there are many others. Until now, all the figures for the X-Wing Miniatures Game didn’t have movable parts. Well, with the release of the U-Wing (I’m going to name mine Patrick), that will change. […]
Categories: Game Theory & Design Replacing a vocabulary listing

Planet Drupal - 29 November 2016 - 5:00am

In a recent Drupal 8 project, one of the site's vocabularies had several thousand terms in it (representing airports), which caused its admin listing page to run out of memory before it could render. I wanted to solve this without affecting any other vocabularies on the site, and improve the listing itself along the way to be more useful, with filters to make searching it much easier. The original listing is not a view, and loads much more than it needs to. Here's the customised page for airports that I wanted to head towards:

Categories: Drupal

Message Token Filter

New Drupal Modules - 29 November 2016 - 2:06am

This module provides an input filter that replaces tokens for Message entities. This is meant primarily as a solution to the issue in which tokens inside links are messed up by input filters when sending a message. By using this module you can keep your favorite filters for messages.

Block (Core)
Image (Core)

Categories: Drupal

The RPGnet Newsletter: RPGnet Newsletter #79

RPGNet - 29 November 2016 - 12:00am
SF reviews, board reviews, the FF, and more.
Categories: Game Theory & Design

Observations From A Gamer's Chair: Mass Combat

RPGNet - 29 November 2016 - 12:00am
Dealing with Large Scale Battles in roleplaying games.
Categories: Game Theory & Design

GameDev Protips: Two Core Principles Of Success For Game Designers - by Daniel Doan Blogs - 28 November 2016 - 10:22pm
Principles of success for game designers.
Categories: Game Theory & Design Blog: AGILEDROP: Drupal Camps in South America

Planet Drupal - 28 November 2016 - 10:21pm
Famous beach Copacabana and football are the most frequent associations when we think of South America. Well, there are plenty more things there, that's for sure. Drupal Camps are one of those. In our world tour we already touched continents like Europe, North America, Asia and Africa. In the exact same sequence are continents listed from one with the most Drupal Camps (Europe) to the one with the least Drupal Camps (Africa). We expected to find South America between Asia and Africa, but for the first time, we were wrong. Our assumptions were so wrong, that it was difficult to process… READ MORE
Categories: Drupal Drupal 8 Views Plugins (Part 2) : The display extender plugin

Planet Drupal - 28 November 2016 - 6:36pm
Let's see how and why to use a views display extender plugin.
Categories: Drupal Views Plugins (Part 1) : Simple area handler plugin

Planet Drupal - 28 November 2016 - 6:36pm
In this series I will show you how to make use of the new Drupal 8 Plugin system, we begin with a simple example : the views area handler plugins.
Categories: Drupal Overview of CMI in Drupal 8

Planet Drupal - 28 November 2016 - 6:36pm
Some notes about the new Configuration management system in Drupal 8
Categories: Drupal Migrate to Drupal 8 from a custom site

Planet Drupal - 28 November 2016 - 6:36pm
Migrate is now included in the Drupal core for making the upgrade path from 6.x and 7.x versions to Drupal 8.

In this article will see how to use the Drupal migration framework to migrate custom sites to drupal 8.
Categories: Drupal Inline Entity Display

Planet Drupal - 28 November 2016 - 6:36pm
Handle referenced entity fields directly in the parent entity
Categories: Drupal

Aten Design Group: Restricting Access to Drupal 8 Controllers

Planet Drupal - 28 November 2016 - 3:53pm

Controllers in Drupal 8 are the equivalent of hook_menu in Drupal 7. A controller lets you define a URL and what content or data should appear at that URL. If you’re like me, limiting access to my controllers is sometimes an afterthought. Limiting access is important because it defines who can and can’t see a page.

Controllers are defined in a YAML file called module_name.routing.yml. Access and permission rules are defined in the the module_name.routing.yml under _requirements. Most of the code examples will be from a module_name.routing.yml file added to my_module in the top level.

Note: There is a lot of existing documentation on how to create controllers in Drupal 8, so I won’t focus on that here.

I’ve outlined some of the most useful approaches for limiting access below. You can jump straight to the most relevant section using the following links: limit by permission, limit by role, limit by one-off custom code, limit by custom access service.

Limit by permission

In this case, a permission from the Drupal permissions page is given. Permissions can be found at /admin/people/permissions. Finding the exact permission name can be tricky. Look for module.permissions.yml files in the module providing the permission.

my_module.dashboard: path: 'dashboard' defaults: _controller: '\Drupal\my_module\Controller\DashboardController::content' _title: 'Dashboard' requirements: _permission: 'access content'

Key YAML definition:

_permission: 'THE PERMISSION NAME'

Limit by role

You can also limit access by role. This would be useful in cases where users of a specific role will be the only ones needing access to your controller. You can define user roles at /admin/people/roles.

my_module.dashboard: path: 'dashboard' defaults: _controller: '\Drupal\my_module\Controller\DashboardController::content' _title: 'Dashboard' requirements: _role: 'administrator'

Key YAML definition:

_role: 'THE ROLE NAME'

You can specify multiple roles using "," for AND and "+" for OR logic.

Limit by one-off custom code

In cases where you have custom access requirements, adding an access method to your controller might make sense. In this example, the page should not be viewed before a specified date.

my_module.dashboard: path: 'dashboard' defaults: _controller: '\Drupal\my_module\Controller\DashboardController::content' _title: 'Dashboard' requirements: _custom_access: '\Drupal\my_module\Controller\DashboardController::access

Key YAML definition:

_custom_access: '\Drupal\my_module\Controller\DashboardController::access

The access method in my controller would look like:

<?php namespace Drupal\my_module\Controller;   use Drupal\Core\Access\AccessResult; use Drupal\Core\Controller\ControllerBase;   /** * Defines the Dashboard controller. */ class DashboardController extends ControllerBase { {   /** * Returns content for this controller. */ public function content() { $build = []; return $build; }   /** * Checks access for this controller. */ public function access() { // Don’t allow access before Friday, November 25, 2016. $today = date("Y-m-d H:i:s"); $date = "2016-11-25 00:00:00"; if ($date < $today) { // Return 403 Access Denied page. return AccessResult::forbidden(); } return AccessResult::allowed(); } }

Limit by custom access service

This is similar to having an access method in your controller, but allows the code to be reused across many controllers. This is ideal when you are doing the same access check across many controllers.

my_module.dashboard: path: 'dashboard' defaults: _controller: '\Drupal\my_module\Controller\DashboardController::content' _title: 'Dashboard' requirements: _custom_access_check: 'TRUE'

Key YAML definition:

_custom_access_check: 'TRUE'

Proving the _custom_access_check service requires creating two files in my_module.

my_module/ (defines the Access service and where to find our Access class)

services: my_module.custom_access_check: class: Drupal\my_module\Access\CustomAccessCheck arguments: ['@current_user'] tags: - { name: access_check, applies_to: _custom_access_check }


<?php namespace Drupal\my_module\Access;   use Drupal\Core\Access\AccessResult; use Drupal\Core\Routing\Access\AccessInterface; use Drupal\Core\Session\AccountInterface;   /** * Class CustomAccessCheck. * * @package Drupal\my_module\Access */ class CustomAccessCheck implements AccessInterface {   /** * A custom access check. * * @param \Drupal\Core\Session\AccountInterface $account * Run access checks for the logged in user. */ public function access(AccountInterface $account) { // User has a profile field defining their favorite color. if ($account->field_color->hasField() && !$account->field_color->isEmpty() && $account->field_color->getString() === 'blue') { // If the user's favorite color is blue, give them access. return AccessResult::allowed(); } return AccessResult::forbidden(); }   }

While the above covers some of the most useful ways to restrict access to a controller, there are additional options. has a couple of good resources including Structure of Routes and Access Checking on Routes.

Categories: Drupal

Drupal Console: Add DrupalConsole to a project using Acquia Lightning distribution

Planet Drupal - 28 November 2016 - 12:30pm
Lightning is a base distribution maintained by Acquia. In this short blog post you will learn how to fix the dependency conflicts when trying to add DrupalConsole to a project using the Lightning distribution.
Categories: Drupal

It takes less than a second to tell humans from androids

Virtual Reality - Science Daily - 28 November 2016 - 12:24pm
It can be hard to tell the difference between humans and androids in such sci-fi TV shows as "Westworld." But in real life, beyond our screens, the human brain takes less than a second to tell between reality and fantasy, according to new research.
Categories: Virtual Reality


Subscribe to As If Productions aggregator