Skip to Content


Code Karate: An introduction to Git (part 1)

Planet Drupal - 20 January 2015 - 7:18am

If you are not already using Git on your Drupal websites or projects, now is the time to learn.

Categories: Drupal

Blog: Think twice about using incentivized video ads

Social/Online Games - Gamasutra - 20 January 2015 - 7:17am

Crossy Roads made $1 million through Unity Ads' incentivized video ads, but don't assume, "Gamers love incentivized video ads! They want us to give them more!" ...

Categories: Game Theory & Design

Drupal core announcements: Drupal 8 beta 5 on Wednesday, January 28, 2014

Planet Drupal - 20 January 2015 - 6:36am

The next beta for Drupal 8 will be beta 5! Here is the schedule for the beta release.

Tuesday, January 27, 2014 Only critical and major patches committed Wednesday, January 28, 2014 Drupal 8.0.0-beta5 released. Emergency commits only.
Categories: Drupal

The free-to-play opportunity in VR

Social/Online Games - Gamasutra - 20 January 2015 - 4:02am

If a developer is in the privileged position to have investment allowing them to run in the red for a few years, focusing on free-to-play games is an interesting strategic bet. ...

Categories: Game Theory & Design

Universal Truth Number Three (pt.3) - by Hardy LeBel Blogs - 20 January 2015 - 1:58am
Part Three of the series about depth and data design in Halo: Combat Evolved. Please join the conversation at
Categories: Game Theory & Design

More Thoughts on Formalism - by Frank Lantz Blogs - 20 January 2015 - 1:04am
What does 'formalism' mean? What does it matter? If you answered "no" to both of these questions then this blog post might not be for you.
Categories: Game Theory & Design

Troy’s Crock Pot: “Five Room” Raid on the Bacchanal

Gnome Stew - 20 January 2015 - 12:01am

In the spirit of “you can never have enough five-room dungeon posts,” here’s a 5-step mini-quest using the fifth edition Dungeons and Dragons Monster Manual.

For reference, check out these past posts by myself and Matthew J. Neagley on the utility and craft behind the five-room dungeon. This one will use the Moose layout, though it can be adapted to the Evil Mule.


Family and friends of Dionysus worshipers approach the PCs, requesting they intercede in a planned bacchanal, orchestrated by wicked maenad Calepida.

They beg the PCs to rescue their mothers and daughters before they are transformed into murderous maenads through the manipulations of Calepida and her rumored ally, an incubus called Tomestedes.

(The villagers have a secret motive: they don’t want to have to fight off their own daughters and mothers if, in their berserker rage, they storm into village looking for sacrificial victims).

A brief investigation reveals the bacchanal will be held in a glade beyond a wild vineyard in the nearby countryside.

1. Entrance. The Vineyard.

Calepida doesn’t want the bacchanal interrupted, so she’s awakened the rows and rows of small viney plants and employed a scarecrow as guardians. Lurking in the vineyard is a more lethal vine blight.

Awakened shrubs (2d12).

Vine blight (1).

Scarecrow (1).

2. Satyr’s Riddle

Daladex, a satyr, was the leader of this Dionysus sect until displaced by Calepida. Because he thinks she is distorting worship of the agricultural mysteries, he is relegated to the periphery.

Daladex has the means to counter the charm Calepida has woven on the adult females of the village, which causes them to go into a murderous rage. His panpipes can, one at a time, undo the frenzy spell that turns them into murderous berserkers. But he hasn’t the courage or the means to confront Calepida directly, nor her incubus ally.

The goal of this encounter is to use persuasion or other social skills to either have Daledex join the party or allow a PC with musical talent to borrow his pipes to play the charming melody themselves.

Satyr (1).

3. Forest Maze

The straight lines of the vineyard’s fences and posts give way to wild forest, a veritable maze of greenery, shrubbery and trees. It is possible to follow the traces of the Dionysus worshipers.

The real threat in the maze of forest overgrowth is the minotaur skeleton that roams the area.

Minotaur Skeleton (1).

4. Incubus on Watch.

Tomestedes enjoys the revels for what they are, but does not participate. He will wait until after wanton destruction to select a victim from among the charmed females to bestow a draining kiss. For now, he takes up a position near the entrance to the glade, guarding against interlopers.

Tomestedes, incubus (1).

5. Bacchanal feasting grounds.

The glade is a place of music, feasting, dancing and frolic. By the time the PCs arrive, Calepida has worked the women into a berserker frenzy and is prepared to unleash them to attack the village (and anyone who gets in their way).

Calepida, druid (1). Wears ring of protection +1.

Berserkers (2d12). (When not berserking, they revert to commoners).

Reward: 450 gp worth of gold, equipment and supplies provided by the village in gratitude for neutralizing the maenad threat and returning proper Dionysus worship to the satyr.

Categories: Game Theory & Design

Lawful GM: Welcome to Lawful GM

RPGNet - 20 January 2015 - 12:00am
An introduction to law and politics.
Categories: Game Theory & Design


New Drupal Modules - 19 January 2015 - 10:04pm
Categories: Drupal


New Drupal Modules - 19 January 2015 - 10:03pm
Categories: Drupal


New Drupal Modules - 19 January 2015 - 10:02pm
Categories: Drupal

VM(doh): Be Careful with Large Select Lists on Drupal Commerce Line Item Type Configuration

Planet Drupal - 19 January 2015 - 2:26pm

Recently, we were debugging some performance issues with a client's Drupal Commerce website. After doing the standard optimizations, we hooked up New Relic so we could see exactly what else could be trimmed.

The site is using different line item types to differentiate between products that should be taxed in different ways. Each line item type has a field where administrators can select the tax code to use for that line item type. The options for the select list are populated via an API call to another service provider. The call for the list was using the static cache because it was thought that the list would only be populated when needed on the line item type configuration page. In reality, that's not the case.

When an Add to Cart form is displayed in Drupal Commerce, it also loads the line item type and the line item type's fields. When loading the fields, it loads all of the options even if the "Include this field on Add to Cart forms for line items of this type" option is not enabled for that field. In this case, it resulted in 90 HTTP calls to populate the list of tax codes every time someone viewed a page with an Add to Cart form.

The solution was to actually cache those results using Drupal's Cache API. You can see the improvement:

Categories: Drupal

HHVM (HipHop Virtual machine) utils

New Drupal Modules - 19 January 2015 - 12:15pm

This project aims to serve for users of hhvm + drupal configs.
As you might know phpinfo() is not accessible on hhvm by design.

Currently it has implemented only hook_requirements for ability to view aka phpinfo() data at sites where is hhvm only environment.

Categories: Drupal

Don't Miss: Overcoming Impostor's Syndrome

Social/Online Games - Gamasutra - 19 January 2015 - 8:12am

"You realize that you don't deserve to be here. You do not belong. You see amazing, talented people with more experience and talent, and you know you aren't qualified to work in their industry." ...

Categories: Game Theory & Design

GovBR Barra

New Drupal Modules - 19 January 2015 - 4:29am
Categories: Drupal

InternetDevels: The module for changing login/registration form view

Planet Drupal - 19 January 2015 - 2:16am

While developing a site, we have been often faced with the task of changing the way the login form (authorization unit) is displayed. Previously, in such cases a css file was used. InternetDevels team has simplified this task by creating a “Сustomize login form” module. This tool allows to change the view of the site's authorization/registration/"Forgot your password?” forms using administration tool.

Read more
Categories: Drupal

As the game market floods, are publishers back in style?

Social/Online Games - Gamasutra - 19 January 2015 - 1:00am

Some data from a recent Game Developers Conference State of the Industry survey has got me thinking about trends in self-publishing. ...

Categories: Game Theory & Design

Web Omelette: Creating a custom Views field in Drupal 8

Planet Drupal - 19 January 2015 - 12:10am

In this article I am going to show you how to create a custom Views field in Drupal 8. At the end of this tutorial, you will be able to add a new field to any node based View which will flag (by displaying a specific message) the nodes of a particular type (configurable in the field configuration). Although I will use nodes, you can use this example to create custom fields for other entities as well.

So let's get started by creating a small module called node_type_flagger (which you can also find in this repository):

name: Node Type Flagger description: 'Demo module that flags a particular node type in a View listing' type: module core: 8.x

In Drupal 7, whenever we want to create a custom field, filter, relationship, etc for Views, we need to implement hook_views_api() and declare the version of Views we are using. That is no longer necessary in Drupal 8. What we do now is create a file called in the root of our module and implement the views related hooks there.

To create a custom field for the node entity, we need to implement hook_views_data_alter():

/** * Implements hook_views_data_alter(). */ function node_type_flagger_views_data_alter(array &$data) { $data['node']['node_type_flagger'] = array( 'title' => t('Node type flagger'), 'field' => array( 'title' => t('Node type flagger'), 'help' => t('Flags a specific node type.'), 'id' => 'node_type_flagger', ), ); }

In this implementation we extend the node table definition by adding a new field called node_type_flagger. Although there are many more options you can specify here, these will be enough for our purpose. The most important thing to remember is the id key (under field) which marks the id of the views plugin that will be used to handle this field. In Drupal 7 we have instead a handler key in which we specify the class name.

In Drupal 8 we have something called plugins and many things have now been converted to plugins, including views handlers. So let's define ours inside the src/Plugin/views/field folder of our module:


<?php /** * @file * Definition of Drupal\node_type_flagger\Plugin\views\field\NodeTypeFlagger */ namespace Drupal\node_type_flagger\Plugin\views\field; use Drupal\Core\Form\FormStateInterface; use Drupal\node\Entity\NodeType; use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\ResultRow; /** * Field handler to flag the node type. * * @ingroup views_field_handlers * * @ViewsField("node_type_flagger") */ class NodeTypeFlagger extends FieldPluginBase { /** * @{inheritdoc} */ public function query() { // Leave empty to avoid a query on this field. } /** * Define the available options * @return array */ protected function defineOptions() { $options = parent::defineOptions(); $options['node_type'] = array('default' => 'article'); return $options; } /** * Provide the options form. */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $types = NodeType::loadMultiple(); $options = []; foreach ($types as $key => $type) { $options[$key] = $type->label(); } $form['node_type'] = array( '#title' => $this->t('Which node type should be flagged?'), '#type' => 'select', '#default_value' => $this->options['node_type'], '#options' => $options, ); parent::buildOptionsForm($form, $form_state); } /** * @{inheritdoc} */ public function render(ResultRow $values) { $node = $values->_entity; if ($node->bundle() == $this->options['node_type']) { return $this->t('Hey, I\'m of the type: @type', array('@type' => $this->options['node_type'])); } else { return $this->t('Hey, I\'m something else.'); } } }

We are defining our NodeTypeFlagger class that extends FieldPluginBase (which is the base plugin abstract class for the views field many plugins extend from). Just above the class declaration we use the @ViewsField annotation to specify the id of this plugin (the same one we declared in the hook_views_data_alter() implementation). We also use the @ingroup annotation to mark that this is a views field handler.

In our example class, we have 4 methods (all overriding the parent class ones).


First, we override the query() method but leave it empty. This is so that views does not try to include this field in the regular node table query (since the field is not backed by a table column).


The second method is the defineOptions() method through which we specify what configuration options we need for this field. In our case one is enough: we need to specify the node type which we want flagged in the Views results. We set a sensible default as the article node type.


The third method, buildOptionsForm() is responsible for creating the form for the configuration options we declared earlier. In our case we just have a select list with which we can choose from the existing node types.


Lastly, the render() method which is the most important and which deals with output. We use it to actually render the content of the field for each result. Here is where we perform some business logic based on the currently set node type option and flag with a message whether or not the current result is in fact of the type specified in the configuration.

The $resultRow object is an instance of Drupal\views\ResultRow which contains data returned for the current row by Views and the entity object at the base of the query (in our case the node). Based on this information we can perform our logic.

Keep in mind you can use depedency injection to inject all sorts of services into this class and make use of them in your logic. Additionally, you can override various other methods of the parent class in order to further customize your field.


There you have it. A small custom module that demonstrates how to create a custom Views field (plugin). Relationships, filters, sorters and others work in similar way. I will be covering those in later articles. Stay tuned.

var switchTo5x = true;stLight.options({"publisher":"dr-8de6c3c4-3462-9715-caaf-ce2c161a50c"});
Categories: Drupal

Thoughts on the free-to-play opportunity in VR - by Ethan Levy Blogs - 18 January 2015 - 10:21pm
In this thought experiment, I make some predictions about the game market on virtual reality platforms, how it will change over time and whether developers should make their games free-to-play or premium based on the state of consumers' VR adoption.
Categories: Game Theory & Design
Syndicate content

about seo