Sometimes a mashup can be more about fixing what’s already there: even though Fisso & Spark already did a remix for Hexadecimal’s “Open Your Eyes” it was a departure from their usual breakbeat style. No need to worry, though – the Dirty Beatmeister and his patented Vocal-B-Gone plugin are here to fill that gap.

Ok, hands up everybody who is old enough to remember Missionforce Cyberstorm. Ah, I see. Well, for those of you who have never heard of it, MFCS was a turn-based mech strategy game which took a lot of inspiration from the Battletech board games but got released long before the latter’s Mech Commander, and up until today that remains a genre with painfully few entries.

However, as the indie scene and crowdfunding platforms taught us in the recent past it’s only a matter of time until even the most underserved niche receives its long overdue update. Enter developer toasticus aka Zack Fowler who took it upon himself to breathe life into the genre again with his yet nameless entry. Previous projects he has worked on include Firaxis’ XCOM reboot so he probably knows a thing or two about turn-based strategy games.

Today Zack shared a video showcasing the current state of his game. While that alone should be interesting for (semi) old farts like us, the main reason I mention this is that the video features background music by yours truly.

Bouncing ideas back and forth with Zack has been great fun so far, and I hope we will continue to do so in the future.

Alright, so summer finally has arrived in Germany, bringing with him high temperatures, spontaneous thunderstorms and a great excuse to consume as much ice cream as your body can handle. It’s the perfect opportunity to share another mashup, this time combining British 90’s house pioneers Sunscreem with Spanish breakbeat wizard Colombo.

For my current Unity project I had to convert Kipp Ashford’s Weighted Array script into something I could use in my C# environment. I had a similar solution already working in ISIS but Ashford’s script was much more elegant since it includes a number of useful functions my bare-boned version was lacking.

A clever (or so I hope) use of a hashtable allowed me to trim some of the variables the orginial script had used to keep it as slim as possible.

// WeightedRandomPool.cs// 2013-10-09 by Thomas Touzimsky// http://www.simplypointless.com///// Adds, deletes and returns a random item from a pool of objects based on each item's associated weight//// A conversion of the original JS script by Kipp Ashford// http://blog.teamthinklabs.com/index.php/2011/08/23/grabbing-items-from-an-array-based-on-probability/usingUnityEngine;usingSystem.Collections;publicclass WeightedRandomPool
{// Our pool is stored in a hashtable where// key = (Object)item// value = (int)weightpublic Hashtable htItems =new Hashtable();/// <summary>/// Adds a new item to the hashtable or changes its weight if has been added before/// </summary>/// <param name="item">The object you want to add to the pool</param>/// <param name="weight">The object's weight within the pool</param>publicvoidAdd(Object item, int weight){if(!htItems.ContainsKey(item)){
htItems.Add(item, weight);}else{
Debug.Log("WeightedRandomPool::Add() --- WARNING: Object is already added. Changing weight of object instead.");
htItems[item]= weight;}}/// <summary>/// Changes the weight of an object within the pool/// </summary>/// <param name="item">The object whose weight you want to change</param>/// <param name="nWeight">The object's new weight within the pool</param>publicvoid ChangeWeight(Object item, int nWeight){if(htItems.ContainsKey(item)){
htItems[item]= nWeight;}else{
Debug.Log("WeightedRandomPool::ChangeWeight() --- WARNING: Object '"+ item +"' is not a member of this pool.");}}/// <summary>/// Removes an object from the pool/// </summary>/// <param name="item">The object you want to remove</param>publicvoidRemove(Object item){if(htItems.ContainsKey(item)){
htItems.Remove(item);}else{
Debug.Log("WeightedRandomPool::ChangeWeight() --- WARNING: Object '"+ item +"' is not a member of this pool.");}}/// <summary>/// Returns a randomly chosen object from the pool depending on all members' weight/// </summary>/// <returns></returns>publicObjectGet(){int nSumOfWeights =0;foreach(DictionaryEntry item in htItems){
nSumOfWeights +=(int)item.Value;}int k = Random.Range(0, nSumOfWeights +1);// +1 to make sure we can actually find the last item if it has a weight of 1// since Random.Range never hits the maximum valueforeach(DictionaryEntry item in htItems){// walk the pool one item at a time and see whether its weight is lower than k// if yes, return the current item ; if no, subtract the item's weight from k// if, for example, the pool includes three items with a weight of 40/40/60 and// k = 70, the first loop's result will be negative and k gets reduced by 40;// the next loop's result is positive since k (now 30) is lower than the second// item's weightif(k >(int)item.Value){
k -=(int)item.Value;}else{return(Object)item.Key;}}returnnull;}/// <summary>/// Clears the pool/// </summary>publicvoid Clear(){
htItems.Clear();}}

// WeightedRandomPool.cs
// 2013-10-09 by Thomas Touzimsky
// http://www.simplypointless.com/
//
// Adds, deletes and returns a random item from a pool of objects based on each item's associated weight
//
// A conversion of the original JS script by Kipp Ashford
// http://blog.teamthinklabs.com/index.php/2011/08/23/grabbing-items-from-an-array-based-on-probability/
using UnityEngine;
using System.Collections;
public class WeightedRandomPool
{
// Our pool is stored in a hashtable where
// key = (Object)item
// value = (int)weight
public Hashtable htItems = new Hashtable();
/// <summary>
/// Adds a new item to the hashtable or changes its weight if has been added before
/// </summary>
/// <param name="item">The object you want to add to the pool</param>
/// <param name="weight">The object's weight within the pool</param>
public void Add(Object item, int weight)
{
if (!htItems.ContainsKey(item))
{
htItems.Add(item, weight);
}
else
{
Debug.Log("WeightedRandomPool::Add() --- WARNING: Object is already added. Changing weight of object instead.");
htItems[item] = weight;
}
}
/// <summary>
/// Changes the weight of an object within the pool
/// </summary>
/// <param name="item">The object whose weight you want to change</param>
/// <param name="nWeight">The object's new weight within the pool</param>
public void ChangeWeight(Object item, int nWeight)
{
if (htItems.ContainsKey(item))
{
htItems[item] = nWeight;
}
else
{
Debug.Log("WeightedRandomPool::ChangeWeight() --- WARNING: Object '" + item + "' is not a member of this pool.");
}
}
/// <summary>
/// Removes an object from the pool
/// </summary>
/// <param name="item">The object you want to remove</param>
public void Remove(Object item)
{
if (htItems.ContainsKey(item))
{
htItems.Remove(item);
}
else
{
Debug.Log("WeightedRandomPool::ChangeWeight() --- WARNING: Object '" + item + "' is not a member of this pool.");
}
}
/// <summary>
/// Returns a randomly chosen object from the pool depending on all members' weight
/// </summary>
/// <returns></returns>
public Object Get()
{
int nSumOfWeights = 0;
foreach (DictionaryEntry item in htItems)
{
nSumOfWeights += (int)item.Value;
}
int k = Random.Range(0, nSumOfWeights + 1);
// +1 to make sure we can actually find the last item if it has a weight of 1
// since Random.Range never hits the maximum value
foreach (DictionaryEntry item in htItems)
{
// walk the pool one item at a time and see whether its weight is lower than k
// if yes, return the current item ; if no, subtract the item's weight from k
// if, for example, the pool includes three items with a weight of 40/40/60 and
// k = 70, the first loop's result will be negative and k gets reduced by 40;
// the next loop's result is positive since k (now 30) is lower than the second
// item's weight
if (k > (int)item.Value)
{
k -= (int)item.Value;
}
else
{
return (Object)item.Key;
}
}
return null;
}
/// <summary>
/// Clears the pool
/// </summary>
public void Clear()
{
htItems.Clear();
}
}

Came across a great write-up by Rodrigo Monteiro on the many ways of how to deal with moving characters in a 2D environment and the many obstacles one has to tackle when faced with slopes, moving platforms or ladders.