Looking for Multiplayer in Phaser and Ended up Getting Music Featured!

Hey there.

I was looking around for how to code a multiplayer game using Phaser. This will be coming much later before the GameplayCoder produces a real time, multiplayer game. Nonetheless, exciting times ahead!

During my search, I found Dynetis Games, a game development studio run by Jérôme Renaux.

Jérôme wrote a tutorial on making a multiplayer game with Phaser, also using Socket.io, Node.js, and the Express module.

Having played around with the tutorial, this looks promising. He also has more advanced topics like communication between the server and clients, interest management, and synchronizing clients. This is all useful material and I’ll definitely be coming back to these.

Jérôme also made a simple RPG, hack-and-slash, multiplayer game called Phaser Quest, which you can play here if you want. The game is 100% free, requires no signup, and it can be completed in about a half hour (or much less, if you’re good).

He was asking for music contributions for the game. Since I’m a creator of music myself, and I’m pretty good with OpenMPT, a music tracker, and I’ve made music for my own two Flash games, Blast Force and Laser Stryker, I thought I’d take some time to make some music for Phaser Quest.

I decided on making 8-bit-sounding chip tunes, to match the old-school retro look of this pixel art game. Using an NES style format, that is, songs with only five channels: two pulse wave generators, a triangle wave, a noise channel (you know, “PSCHSCHSCSHCSHCH!!”), and a samples channel.

Man, I tell ya, when you’ve only three melodic channels (the two pulse waves and the triangle), that really forces you to be creative. Due to these constraints, creating chords that often use four or more notes, such as major sevenths and minor sevenths, suspended sevenths, and even more challenging with five-note chords like a dominant 9sus4 chord

Here are some examples of the aforementioned chords, all in the key of C:

Major seventh chord
Minor seventh chord
Suspended seventh chord
Dominant 9sus4 chord

I’ve identified seven areas in Phaser Quest for which I’d write the songs.

1. Intro
Lemme innerduce y’all to Phaser Quest!

The intro is very short, and friendly tune. This tune is played on the first screen, where you create your character or resume from a previous game. Inspiration came from music I wrote for a previous game coded for a client, Sprinter.

2. Town
Your adventure starts in this town, with your fellow neighbors, a serene environment, and of course, a buncha giant rats. Unlike most RPG games, yes, you can actually get killed by monsters in town. This game’s playin’ hardball. I love it!

Wanting to do something different than the often serene tunes heard in RPGs (especially those using a medieval theme), this is another friendly tune, but with an upbeat vibe to it.

3. South Shore
That dude in the shades is diggin’ it.
4. Forest
The forest, in my opinion, is the first challenging of the game, especially with them ogres, a buncha overgrown, stankin’ ass brutes.

North of the town is the forest. Here you’ll find a slower tune. The main rhythm is short and repeated a few times, each time, it ascends by a minor third, and switching between major and minor tonalities.

5. Desert & Graveyard
You’d better make sure your equipment is strong enough. That’s all I can say.

These two areas use the same tune, with a moderate speed rhythm. This area, especially the desert, is the first difficult area in the game, in my opinion, because of the ogres and especially, the armored skeletons. Because of these relatively strong monsters and harsh environment, the song has a melancholy feel to it. I got inspiration from this song from Tecmo’s Ninja Gaiden 3 for the Nintendo Entertainment System (NES), stage 2-1 theme.

6. Death Valley
The best song in the game, if I do say so myself.

This place reminded me of the music used in Acclaim’s Ironsword, Wizards & Warriors 2, fire elemental. I really like the part that starts 17 seconds into the tune. I liked it so much, that I used that segment and built an entire song around it, using it as the bridge of the song. The first half builds up to it using rather quirky chord patterns and a melodic riff to go along. There are even some influences of jazz in this tune as well. 😎

7. Skeleton King’s Chamber
The King’s guarded by his two lieutenants. Interesting enough, when you defeat the King, you get the strongest weapon and armor in the game. I’d think you’d get these two items BEFORE you get to the king. Unless there’s some monster that comes after the King who is stronger, there isn’t much use for these two items. But, you can look at them as prizes for beating the King. Dat red armor does look cool, tho.

The final area of the game reminds me of the River of Flame from Diablo II.

I got inspiration to make this “dark epic” tune from level 28 of Doom 2. I also added in some other ominous-sound elements. But to balance out all this gloom and doom, I also got inspiration from the escape theme of Metroid, which in my opinion, is a back-and-forth between urgency and heroism (you just defeated Mother Brain, after all). The tune finishes with a really twisted composition – I figured why not get a little crazy here.

So, those are the songs I contributed to Phaser Quests’s cause. Once the has been updated with all the songs, I’ll let you guys know.

In the meantime, give these tunes a listen and let me know what you think!

Thanks, and talk to you soon.

– C. out.


[Gameplay] – Block Breaker

Play Block Breaker here!

Hey there,

I’m currently in a Unity course over on Udemy called Complete C# Unity Developer 2D – Learn to Code Making Games. It’s a great course on 2D game development in Unity created by Ben Tristem and Rick Davidson.

Block Breaker is one of the games you build in this course. One challenge in the course was to do what they call “extreme tuning”, meaning tinker with the project and explore around what you’ve been learning.

However, I decided to go rogue with this concept, and produced the following version of Block Breaker, with lots of changes audible, visual, and of course, gameplay changes (see what I did there?) (:

Sound Effects

What’s up, guys.

Brickout now has the sound effects added! I also snuck some of my jazzy musical skills into many of the sound effects.

A short video with the sounds is below. Things got a bit crazy around the 1:00 mark in the video! I think I’ma keep this aspect of the game design, though. Then it got really boring, trying to hit that LAST brick… dammit!  >:D

But, I’m happy that with 41 sound effects added, most of them are done now. (:

Playing sounds using Phaser and its SoundManager class was easier than I thought! I still need to implement callback notifications when a sound has finished playing, because I will need that functionality a little later.

After watching the video, share your opinions in the comments below. I’m curious to know. Thanks!

– C. out.

Tools I Use

Hey.

I want to fill you in on the tools and resources I use when I’m coding games. This is not an exhaustive list.

Coding Editors/IDEs

  • FlashDevelop
    My current go-to IDE for all things ActionScript 3. I also like how it can download and configure updates of the Adobe AIR and Flex SDKs.
  • Adobe Flash CS/Animate
    I don’t use this for coding, but for managing assets. While I’m not an artist, graphic designer, game designer, I find its visual editor very easy to use and mostly intuitive.
  • Brackets
    Been using this free editor for a little while. I use it for JavaScript when coding HTML5 games using Phaser.

Programming Languages/Engines/SDKs/Runtimes

  • Adobe AIR
    Despite Flash being retired soon, Adobe AIR is still at large. AIR is not the same thing as Flash – they both happen to use ActionScript 3 and many of the same APIs (with AIR having access to many more of them, partly due to it being able to target desktops). Plus, Adobe AIR can be used to target mobile (Android and IOs) from the same code with minor changes.
  • Adobe Flash
    Yes, I know Flash will no longer be updated or distributed by end of 2020, but until then, hey, it’s still being used.
  • Phaser
    I only care enough about HTML5 and JavaScript because of Phaser and it’s capabilities for game making. I don’t give a damn about web development.
  • Unity
    While I haven’t used Unity to make any games yet, I found a good course on Udemy for it.

Graphics

  • Paint.NET
    I use this for editing of bitmap files. Another simple and intuitive tool to use.

Project Management

  • Trello
    A free online tool for keeping track of my progress, especially when working on larger projects. I use it in a Kanban style, and I’ll have three major categories for tasks: Backlog; Work In Progress; and Ready for Testing. Once the client has tested the latest updates and all’s well, I will archive all the tasks in the Ready for Testing category, and start anew.

Source Control

  • GitHub
    Using Git as the version control system.
    You can find me here, hint, hint.
  • Bitbucket
    I also use Git here, but have tried Mercurial.

Audio

  • Wavosaur
    Simple tool for editing audio files.
  • Audacity
    Not as easy to use as Wavosaur, but it has more functions, particularly in terms of effects you can apple to sounds.

Music

 

So, that’s pretty much the jist of what I use. If you have any questions about anything here, let me know in the comments!

– C. out.