Skip to main content

App and Event

In this page, we'll create our first application in the Portal. Then, we'll create the event, import a pattern into event.


Developer Portal

bHaptics developer portal - Chrome 2024-04-09

First, let's move on to our bHaptics Developer Portal page.

note

If you see a log-in page instead, please sign in to your account, or sign up if you don't have one.

Create the App

In Portal, you can make applications(apps). Each app is corresponding for each game. Let's make new one.

Frame 70 (1).png

  1. Press "Create." Then a pop-up window will appear.
  2. Name the app. Let's name it "Haptic Game" for now. You can always change it later.
  3. Press "Create." Your app will then be created.

Once you've created the app, the app page will appear.

bHaptics developer portal - Chrome 2024-04-09

On the left, there are several tabs available for navigation. Currently, you can see that the Events tab is activated by default.

  • Events: Add, Delete, Manage events.
  • API Key: Browse the history of API Keys used to plug into the game.
  • Deploys: Browse the deployment history.
  • Settings: Review necessary information for linking with the game and manage collaborators.

For now, let's focus on the Events tab. We'll explore the other tabs later.

Additionally, you can see that within the Default category inside the app, there is already a game_start event created. Now, let's understand what events are and how to create them.

note

You can rename the app by clicking the title at the top. Untitled

What is an Event?

In game development, an "Event" refers to specific actions or situations within a game, such as player input (pressing a button), in-game interactions (picking up an item), scripted sequences (cutscenes), or system events (an enemy being defeated).

In the Portal, you will define corresponding events for every action in your game that produces haptic feedback. For example, let's consider a shooting game in virtual reality (VR).

  • Basic Movement
    • Move, Jump, Dash, Climb
  • Gun
    • Take out from holster, Store to holster
    • Shoot
    • Eject magazine, Insert new magazine, Reload
  • Getting hit by a bullet
  • UI interaction
    • Press button, Drag the slider handle

Creating Haptic Events

Let's create an event for "Dashing", a commonly used action in both PC and VR games.

Frame 45.png

First, click the "Create" button, and the Event-Pattern mapper window will open.

01_pattern_manager.png

  • (A) At the top, you can set the basic info.
    1. Select the category. Choose Default.
    2. Name the event. Let's name it dash.
    3. Optionally, you can write a description about the event.
  • (B) On the left, you can browse and import the pattern.
    1. There is a "Preset" tab where you can browse the pre-made patterns. We'll look the "My" tab later.
    2. You can import any pattern you want. We already made the patten named Dash which work nicely with dashing in the game. First, let's search for Dash. Then the result will appear below.
    3. You can preview the pattern by clicking the item.
    4. Press the 'Import' icon. It'll import the pattern.
    note

    You can add more than one pattern to a single event.

  • (C) On the right, You can manage added patterns and save the event.
    1. You'll notice that Dash was added to the list on the right when you import it.
    2. Press "Save" to save the event.

01_add_dash.png

We just created our first event called dash. You probably noticed that a red circle appeared, and the "Save" button at the bottom is blinking. This indicates that there are unsaved changes in the app. Press the blinking "Save" button to save the app.

Naming an event

An event's name can only contain lowercase alphabets, numbers, dashes(-), and underscores(_).

note

We recommend using underscores(_) to replace spaces.

Edit the event

01_edit_event.png

When you hover over an event item, you can see various management functions for event:

  1. Checkbox: Select events to delete them all at once.
  2. Name: Click the event name to copy name to the clipboard.
  3. Clone: Create a duplicate of the event.
  4. Delete: Delete the event.
  5. Preview: Preview the patterns added to the event.
  6. Clicking anywhere else will reopen the Event-Pattern mapper window.

Create the Category

You can create a category to organize events.

01_create_category.png

  1. Press "Category", then the pop-up window will appear.
  2. Press "Create a New Category".
  3. Name the category. Let's name it Shoot.
  4. Press "Save". Then the new category named Shoot will appear.
  5. Press 'Down' icon to change the sequence.
  6. Press 'Close' icon to close the window.

Untitled

We've just created a new category. It will be great to place shooting-related events in the Shoot category when necessary. For example, we can create an event called shoot_rifle_r for shooting with the right hand.


We've created a new app, added a new event within it, and imported a pattern from the library into the event.

Next, we'll learn how to import patterns directly from the Designer instead of the Library and manage the imported patterns within the event.