NecroBeatSync + NecroRhythmMover for Construct 2

Not favoritedFavorited Favorited 0 favourites
  • 1 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • A plugin and behavior for music games, beats, bass hits, arrows, shooting mechanics, synced videos, and all kinds of rhythmic madness

    Hi everyone, how are you doing?

    I want to share something I am genuinely excited about, because it opens a very fun door for Construct 2: a system designed to create music games, rhythm games, beat-based mechanics, arrows, synced shooting, objects that move with the music, synchronized background videos, and gameplay where the music is not just decoration, but part of the actual game logic.

    The system is made of two main parts:

    NecroBeatSync -> Main plugin for music, beat detection, sync, and video.

    NecroRhythmMover -> Behavior for sprites that react to the rhythm.

    The nice thing is that both can work together or separately. You can use only NecroBeatSync to detect beats and control normal Construct 2 events, or you can add NecroRhythmMover to sprites so they behave like notes, arrows, rhythm enemies, bullets, platforms, lights, bouncing balls, or whatever strange musical creature your project needs.

    The basic idea is simple:

    The music plays.

    The plugin detects bass hits or beats.

    Construct 2 receives events.

    Sprites do things.

    The player tries to follow the rhythm.

    Everyone is happy.

    The sprite probably is not.

    What can you make with it?

    This system is aimed at games and mechanics such as:

    • Guitar Hero-style note games.

    • Dance Dance Revolution-style arrow games.

    • Rhythm shooters where bullets follow the beat.

    • Platformers where the world changes on every beat.

    • Dance or choreography games using your own local background video.

    • Enemies that attack based on bass hits.

    • Stages that pulse, shake, flash, or spawn particles with the music.

    • Lights, cameras, platforms, obstacles, and backgrounds synced to the track.

    • Weird prototypes where the bass has more authority than the programmer.

    Part 1: NecroBeatSync

    NecroBeatSync is the main plugin. It handles music loading, playback, song time, bass analysis, beat generation, event triggers, and overall synchronization.

    Audio loading

    Music can be used in several ways:

    • Audio imported directly into Construct 2.

    • Audio loaded by name from the Sounds or Music folder.

    • Audio loaded from a direct URL.

    • Local audio for testing and prototypes.

    For rhythm games, the recommended approach is to use your own or properly licensed audio files, such as .ogg, .m4a, or .mp3 files imported into the project. This gives the plugin real control over timing, bass analysis, and synchronization.

    Live bass detection

    One of the main features is real-time bass detection. You can configure the frequency range and detector sensitivity.

    Example configuration:

    Bass range: 20 Hz to 260 Hz

    Sensitivity: 1.01

    Min gap: 120 ms

    Min energy: 0.005

    Whenever the plugin detects a strong bass hit, it triggers:

    NecroBeatSync -> On live bass beat

    From there you can do almost anything: move sprites, fire bullets, make a ball jump, change opacity, activate lights, shake the camera, or start a new game phase.

    NecroBeatSync -> On live bass beat

    -> Ball: Set X to Ball.X + 5

    Result: every bass hit moves the ball 5 pixels to the right. Simple, but powerful. Every great rhythm game starts with one sprite moving strangely while someone says: "Wait... this could be a full game."

    Beatmaps and scheduled beats

    Besides live beat detection, the plugin can also work with beatmaps. This is especially useful for more precise rhythm games where an arrow must reach the hit point exactly when the beat happens.

    • Generate a list of beat times.

    • Trigger events before the beat using an approach lead time.

    • Know exactly when each beat should happen.

    • Evaluate whether the player pressed within the correct timing window.

    NecroBeatSync -> On beat approaching

    -> Create Arrow

    -> Arrow receives TargetBeatTime

    -> Arrow moves toward the hit point

    Events by song second and beat number

    The plugin also includes triggers to execute actions when the song reaches a specific second or a specific beat number.

    NecroBeatSync -> On song second 10

    -> Text: Set text to "Now the fun begins"

    NecroBeatSync -> On scheduled beat number 4

    -> Platform: Set angle to Platform.Angle + 90

    NecroBeatSync -> On live beat number 4

    -> Enable movement mode

    This makes it easy to build song phases:

    Second 0 -> Intro

    Second 10 -> Arrows begin

    Second 30 -> Boss appears

    Beat 4 -> Movement starts

    Every 8 beats -> Pattern changes

    Synchronized background video

    Another useful feature is synchronized background video. The idea is to use your own local video as visual background while keeping the audio under NecroBeatSync control.

    background_video.mp4 -> Visual video, muted

    track.ogg -> Real audio controlled by NecroBeatSync

    Game -> Construct 2 running on top

    The audio is the master. The video follows. If we do it the other way around, arrows start arriving late, players get angry, and the poor plugin gets blamed for everything.

    Available video functions include:

    • Load background video from URL.

    • Load video by name.

    • Set video muted.

    • Set video opacity.

    • Set video fit: cover, contain, stretch, or original.

    • Set video layer mode: behind canvas, over canvas, browser background, or custom rectangle.

    • Play video synced.

    • Pause video, Stop video, Seek video, and Sync video now.

    • Show video, Hide video, and Destroy video.

    NecroBeatSync -> On video loaded

    -> Set video muted

    -> Set video fit cover

    -> Set video layer mode behind canvas

    -> Show video

    Built-in debug text

    To avoid guessing what is happening internally, the plugin includes a debug text expression.

    System -> Every tick

    -> Text: Set text to NecroBeatSync.DebugText

    The debug output can show values such as:

    Loaded: 1

    Playing: 1

    Time: 12.35

    Energy: 0.042

    Average: 0.030

    Threshold: 0.035

    LastBeat: 12.08

    LiveBeatCount: 24

    This helps a lot, because in Construct 2 there are two kinds of bugs: the plugin is not working, or the plugin is working perfectly but the event sheet is wrong. The second one happens suspiciously often.

    Part 2: NecroRhythmMover

    NecroRhythmMover is a behavior for sprites. While NecroBeatSync controls the music and beat logic, NecroRhythmMover helps objects react to the rhythm more directly.

    It can be used for:

    • Arrows and music notes.

    • Balls or characters that jump on the beat.

    • Enemies that attack at rhythmic moments.

    • Bullets and synced shooting.

    • Lights, effects, platforms, and obstacles.

    • Sprites that need to arrive exactly at a hit point.

    The behavior can handle movement toward a target point, arrival timing, lanes, input windows, and judgment results such as:

    PERFECT

    GOOD

    OK

    MISS

    Usage examples

    Example 1: move a ball 5 pixels on every live beat

    NecroBeatSync -> On live bass beat

    -> Ball: Set X to Ball.X + 5

    Example 2: first 3 beats jump, from the 4th beat it moves forward

    Global number BallMoves = 0

    Mouse -> On any click

    + NecroBeatSync -> Is loaded

    -> Set BallMoves = 0

    -> NecroBeatSync: Reset timeline counters

    -> NecroBeatSync: Play from 0 seconds

    NecroBeatSync -> On live bass beat

    + NecroBeatSync.LiveBeatCount <= 3

    -> Ball: Jump 32 px for 0.22 sec

    NecroBeatSync -> On live beat number 4

    -> Set BallMoves = 1

    NecroBeatSync -> On live bass beat

    + BallMoves = 1

    -> Ball: Set X to Ball.X + 5

    Example 3: arrow rhythm game

    NecroBeatSync -> On beat approaching

    -> Create Arrow

    -> Arrow: Set lane

    -> Arrow: Set target beat time

    -> Arrow: Move to hit point

    Keyboard -> On Left pressed

    + Arrow is in left lane

    -> Arrow: Judge input

    Example 4: rhythm shooter

    NecroBeatSync -> On live bass beat

    -> Player: Spawn Bullet

    NecroBeatSync -> On every 4 scheduled beats

    -> Enemy: Spawn SpecialBullet

    NecroBeatSync -> On song second 60

    -> Create Boss

    Example 5: rhythm platformer

    NecroBeatSync -> On live bass beat

    -> Platform: Toggle visible

    NecroBeatSync -> On every 4 scheduled beats

    -> Spikes: Set Y to Spikes.Y - 32

    Keyboard -> On Space pressed

    + Player is inside hit window

    -> Player: Jump

    Important parameters

    Parameter Description

    Bass range Defines the frequencies considered as bass. Example: 20 to 260 Hz.

    Live detector sensitivity Controls detector sensitivity. Lower values detect more; higher values filter more.

    Min energy Prevents tiny noise from being counted as a beat.

    Min gap Minimum time between detected beats to avoid counting the same hit multiple times.

    Sync offset ms Corrects timing offsets between music, gameplay, video, and events.

    Approach lead time Time before the beat when a note or arrow should appear.

    Video sync tolerance Allowed margin before the video is corrected to the audio time.

    Video offset Visual offset of the video relative to the audio.

    Forum closing text

    So that is the idea. With this plugin and behavior, you can create something as simple as "every beat moves a ball" or something much more complete, like an arrow rhythm game with music, synced background video, hit judgment, visual effects, and beat-based patterns.

    EMAIL:CONSTRUCT2@PREVFORM.CL

    DEMO:https://necro-beat-sync.netlify.app/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)