Yearly Archives: 2013

Game Maker – Basic Looping Background Music Player

Have you played a game with no background music/sounds? In most cases it makes the game feel quite dead. So in developing my game Multi I needed a basic looping background music player of sorts which filled the following requirements:

  • Tracks needed to be played one after another starting from the first track to some n number of tracks.
  • Through this iteration of tracks, tracks must only be played one time.
  • On reaching the end of the final track the first track would again be played creating an infinite loop.

For clarity purposes heres a diagram:

track_loop

Following the blue arrows from Track 1, tracks are listed in play order from left to right then restarting from the last to the first. Put simply I wanted to have a looping background music player. With this in mind, I began the project with some research and found this post on Steam Community.

The basic summary of what’s suggested in the above link is:

  1. Combining all your tracks into one long track with a program like Audacity, then play that and loop it.
  2. Running a queue of songs using Game Makers alarms, then looping it.
  3. Using simple logic based checks, play one song after another then repeat to form a loop.

All the above are valid methods which have advantages and disadvantages, but for the foundation of this music player I went with option three.

Building the Music Player

To start create a persistent object. Name is whatever you want, it doesn’t need a sprite either, but it will be need to be placed in the room you want your music to start in. If this object is not persistent and the music player gets reinitialized at any point, it will lose its place and start from (track 1) the beginning again. For a looping music player this is not what we want.

Now give the persistent object a create event, and add this code:

OK the first line makes sense, it starts the loop, but what’s with that counter? Good question.

Continue reading Game Maker – Basic Looping Background Music Player

Chowder the Storm Crab – League of Legends Champion Design

Hey everyone this is my first time posting a champion on the forms. So here is an idea of mine and I’d really like to know what the community thought of it. Any and all feedback is welcome!

Chowder, The Storm Crab v3.2

Index

1. Appearance
2. Lore
3. Characteristics
4. Abilities
5. Abilities Notes
6. Capabilities
7. Countermeasures
8. Change-Log

1. Appearance

Here’s this great art by radiationboyy. It captures the bulky, powerful, yet lumbering sea crab style that I envisage for Chowder. As a small addition though I would add some chains to his claws for a better fit with his lore and Q.

phalanx_crab_concept_by_radiationboyy-d25fk1h

I do not own this art, for the original posting please follow the link below.

2. Lore

Worth their weight in gold, the deadly Storm Crabs of the Guardian Sea were a short-lived Noxian delicacy. Taken from the depths of the Guardian Sea to the bustling Ivory Ward Marketplace, such a prize brought Noxus’s lowly fisherman much needed respect.

Some say the crabs had learnt the ways of the storms when Runeterra was young, that’s why they lived in the heart of a seemingly endless one. Hearing the tales of the Storm Crab hunters, a promising young Noxian saw an opportunity to magnify his strength and end an indulgence that he saw as a sign of weakness. Arranging two ships he set off, and after two perilous weeks on the sea the storm was in sight.

He brought death, overseeing the systematic destruction of the Storm Crabs. When all the crabs were either slain or captured, he left, leaving the remaining petty work to his crew of weaklings. The crew gorged themselves on crab. Arguing amongst themselves about how to cook the last Storm Crab one dish stuck, Chowder, that crab took it as his name and as a reminder.

Having watched the annihilation of everything he knew and held dear drove Chowder insane, a mighty storm was brewing. With new found strength Chowder broke free of his chains, and with maddened frenzy shredded whatever was in his path, including the ship.

With nothing left Chowder roamed the seas indiscriminately destroying, soon becoming a threat to the trade routes of Blue Flame Island. Fizz the savior of Bilgewater sought out this new menace. On finding the it Fizz was capable enough to stave off its attacks long enough to communicate with the monster.

On Hearing Chowders tale and learning of his desire to find the young Noxian soldier, Fizz informed Chowder that what he sought could be found on the fields of justice. Thus Chowder joined the League of Legends to find and destroy that young soldier that started it all.

Continue reading Chowder the Storm Crab – League of Legends Champion Design

Game Maker – Dynamic Teleport

When searching for a teleport system in Game Maker, I often find the following  suggestion. When object A collides with object B at position (x,y) change object A’s position to (x_new,y_new). This works perfectly if you require a fixed position teleport system.

Though, what if you wanted (given any character position) to be able to teleport to a location that is not pre-defined. A dynamic teleport. What do you do? I asked myself this, and here’s a simple solution that I used for my puzzle platformer Multi.

multi-title-screen

First lets define a few terms and variables:

  • Ideal Teleport – A teleport  which results in the character being where you most want in a regular scenario.
  • Teleport – A boolean variable that determines whether the character can teleport or not. It is reset with the use of an alarm.
  • Teledist – A fixed integer that determines the position change of the ideal teleport. I used the value 96 pixels.
  • Par_solid – The fundamental solid object of my game (I did not use Game Makers solid variable, this article explain why.

It also helps to know  the basics of Game Maker Language’s (GML), and how one of its functions place_meeting works. If not I suggest you check out this great post in the Game Maker forums by Torigara.

Continue reading Game Maker – Dynamic Teleport

Planning in Games

At University my final year project involved building a plan recognition agent for the board game R.I.S.K. Since then, reading about plans in games is a past time of mine, and AiGameDev is a great place to do that.

planning-in-games-aigamedev-logo

For those of you with an interest in A.I. in games, AiGameDev is one of the best resources I’ve come across. Whilst browsing through their impressive collection of articles I came across a gem on planning in games written by Alex J. Champandard.

Check out the full article here!

Reading this article and watching this video was a joy. It reminded me of nights spent learning about STRIPS and HTN’s from Game Developer magazine. So if your interested in planning in games, this is definitely a great place to start.

The Creature A.I. of Black and White

Black and White is where my interest in A.I. in games started. (A little context) Black and White is a god game designed and created by Lionhead Studios under the directive of Peter Molyneaux. In Black and White you are a god born of the prayers of people, free to do whatever you please through the islands of the game.

In your journeys you are eventually given a creature. A tiny little thing, it behaves just like a child – curious yet inexperienced and frightened of the big bad world. Similar to a child you can teach it, it will then think and act based on what  was taught by you. Invest enough time and your creature can become your ultimate agent. It was a fascinating example of A.I. in games.

black-and-white-creature
The Creature Cave

Black and White’s Artificial Intelligence was designed and implement by Richard Evans, and in my opinion it was the creature feature in particular that elevated the experience of certain aspects of the game. Employing sophisticated A.I techniques, it gave deeper meaning to your relationship with the creature, you felt responsible for it (well at least I did) having to train and look after it while it grew up.

Notable features related to the creature included:

  • Leashes – Which gave the player some behavioral control of the creature.
  • Creature Combat – Where creatures would fight autonomously when not commanded by the player.

A battle from Black and White: Creatures Isle. The Crocodile is controlled entirely by the game.

AiGameDev, who listed it as the most influential AI game, summed up the technical innovations as:

  • The gameplay is focused on the interaction with a large AI creature which can learn from examples, and takes reward and punishment.
  • The design integrates artificial life within the context of a strategy game.
  • The engine uses a solid AI architecture, rooted in cognitive science, known as belief-desire-intention (BDI).
  • Machine learning techniques such as decision trees and neural networks are used with great success.

If you are interested in learning more about the innards of Black and Whites creature A.I. then check out this great paper by James Wexler.

Two Great Books on Game Design

If you interested in learning more about game design, here are two great books you should definitely check out.

A Theory of Fun

Written by Raph Koster, A Theory of Fun Given was a great gift from a friend. It’s exactly what it says it is ‘A Theory’ about Fun. After reading it I’d describe it as actually quite light reading; a short and colorful book filled with plenty of pictures that’s well worth a read for those new to game design.

theory-of-fun

Art of Game Design a Book of Lenses

Written by Jesse Schell, The Art of Game Design is a comprehensive look into exactly that The Art of Game Design (it’s a good sign a book does what it says). I’m actually reading it at the moment, and so far it’s a joy particularly because of the authors writing style. The book is giving me an holistic look  into game design that’s changing my perception of how I look at everything surround games. Another book well worth your time.

the-art-of-game-design