måndag 11 maj 2015

Hotline Miami 2 Level Editor

Jonatan here, I figured I should write a little post about the level editor we're working on for HLM2. It's pretty close to completion, so I wanted to show off some of the features it's got, and maybe get some feedback in case I have forgotten to add something crucial.

Upon starting the editor, the first thing you will see is the Level Options. Here you choose what character you want to design the level for, as well as specifying music and whether the level is a cutscene or not. Enabling cutscene editing means you won't be able to place any enemies. You also get a preview of what enemies are available for the player character you've chosen. Sadly most characters are only able to fight one or two different factions, enabling them to fight all enemies would mean a ton of work for Dennis and the editor would likely take at least another four to six months to finish. 
 
After setting up the basics of the level, you start building. You have bunch of different tilesets to choose from to create the levels flooring, and you can choose to encapsulate the patches of floor you place using the tools below the floor preview. You are also able to use flood fill and the sample tool to easily find what color and sprite sheet a specific tile have.

You also have the option of placing walls, doors and windows independently.

http://3.bp.blogspot.com/-TgPSds_pLmI/VVD3ZiK_KiI/AAAAAAAAASw/LLGTDkmhJz8/s1600/EditorBuild.png
Once you're done with your basic layout, it's time to add furniture and other objects. Since there are tons of assets in the game, we decided to add a search function for this. Basically if you want to add a bed, you enter the search term "bed" and the list will be narrowed down to all the sprites that has the word "bed" in their name. A lot of the sprites have a subset of variations within the sprite, and you can easily browse and choose one with the buttons near the bottom of the screen.

 
After furnishing your level it's time to place enemies. This is very straight forward, simply select the enemy you want to place and click the spot you want to place it in. There are several different types of enemies, with slightly different behaviors and weapons to choose from. 

http://4.bp.blogspot.com/-6IpOWDiPuY8/VVD2ETBLwQI/AAAAAAAAASA/NjXcrqVMDZ8/s1600/EditorEnemies.png

When you're done furnishing your level and have added your enemies you need to place your player character and its escape vehicle in order to be able to play the level. You do this under the Level tab. If you're making a stand alone level that is not part of a campaign you can also add a VHS cover for your level as well as enter the name of the level designer.

This is also where you place floor transitions, which are objects that allows the player to move between floors of a level.

If your level is meant to be a part of a campaign, you can use the campaign editor to string together a bunch of levels with optional intros and outros, as well as add credits if you're a team of designers. Here you also have the option to add a VHS cover for a group of levels (intro, main level, and outro). The intros and outros are not required to be cutscenes, but are named after how the structure in the main campaign works.

So if you want to add cutscenes to your levels, you first have to click the cutscene checkbox in the Level Options dialogue (see first image) in order to get access to the Cutscene Editor. The Cutscene Editor was a challenge to design, and the structure I came up with is slightly more complex than the regular editor.

The workflow consists of adding triggers, then adding frames to which you can attach actions.
The trigger can be an area which triggers the cutscene if entered, there's also character based triggers so that you can for instance create characters which can be talked to if clicked or approached.
Once a trigger is set you can start adding frames. A frame is basically a container for different actions that you want to play simultaneously. Let's say you for instance want a bunch of NPCs to approach the player when the cutscene is triggered, and then start talking to him. To do this you create a frame where the characters walk toward the player, once all the characters have reached their end positions the cutscene will move onto the next frame where you add the dialogue action. After this you can add a stop sequence action which will allow the player to start moving again once the dialogue is done.


You can add multi-step cutscenes by specifying a new trigger after the first sequence has been executed, followed by more frames and actions.

Now, I'd like to make sure people know what they're getting before we release the editor, so that people won't be too disappointed by some of the restrictions we've had to make. So here's a list of things I know people won't be too happy about.

-Not all enemies will be available for all characters, in fact most characters are only able to fight one or two different factions.

-The cutscene editor is not super flexible, you won't be able to freely move or remove actions and frames. Basically you have to create each frame and action in an absolute order. Clicking any of the remove buttons will remove the latest action/frame/trigger. So let's say that you have created ten frames with three actions each, and you find an error in the first frame, then you are basically screwed and have to delete all frames and actions up to that point. 

Triggers are semi-independent of the frames, so you will be able to change the last placed trigger at any time until you add a stop sequence action. If you have several triggers you will not be able to go back and change the first one without deleting all the frames up until that point.

-Adding custom graphics for player/enemy sprites is something we're looking into, but if at all possible it will not be available upon launch.

-You will not be able to use your own music for the levels, this would be too problematic due to the likeliness of copyright infringements, sorry. The music from the first game will likely not be available either due to the fact that we only licensed the songs for one game.

-You will not be able to create levels that has both cutscene content and enemies, due to endless possibilities of game breaking bugs.

-Currently you need to save your level before testing it, or any changes since you last saved it will be lost. I'm definitely gonna try my hardest to see if I can fix this before release, as it is a major inconvenience.

-There will likely be no online highscore boards for user created levels.

Note: We will talk to Abstraction Games when they begin porting the editor to see if they can do anything about these issues.

And finally, here's a preliminary index of all functions/menu options. If you see a crucial feature missing that I haven't already addressed in the text above, please let me know in the comment feel so I have a chance of adding it before release (if possible).

Top menu:

File
  -New Level
  -Save Level
  -Load Level
  -Play Level
  -Create Campaign
  -Quit
Edit
  -Clear Walls
  -Clear Tiles
  -Clear Objects
  -Clear Characters
  -Delete Floor
Level
  -New Floor
  -Next Floor
  -Previous Floor
  -Create Cutscene
Options
  -Level Settings
  -Editor Settings (*)
  -Show Grid
Help
  -About
  -Manual
  -Check Content (check if the level is playable)

Level Tab
  -Place player
  -Place vehicle
  -Place floor transition
  -Add VHS cover
  -Add author info
  -Various mouse and keyboard commands (see image #1)

Enemy Tab
  -Place enemies
  -Select between enemies/factions
  -Choose what weapon enemy has
  -Various mouse and keyboard commands (see image #4)

Items Tab
  -Search field for finding an object to place
  -A list of available objects to place based on keyword entered
  -Preview window
  -Buttons for browsing/choosing a variation of the object's sprite
  -Various mouse and keyboard commands (see image #3)

Build Tab
  -Preview window for the currently selected tile
  -Checkboxes for selecting between tilesets
  -Tile selector for selecting a specific tile within a tileset
  -Capsule button for capsuling a set of tiles with the currently selected wall type
  -Sample button for sampling an already placed tile in the level
  -Flood fill button for replacing a set of tiles with the currently selected tile
  -Wall selector
  -Capsule wall button for drawing a rectangle of walls (a room for instance)
  -Various mouse and keyboard commands (see image #2)

Cutscene Editor Actions
  -Add dialogue
    -Choose what character should be in focus for each line
    -Select what face should be displayed during each line
  -Play sound
  -Play music
  -Stop music
    -Select whether to fade out or stop immediately
  -Stop sequence
    -Select whether this is the end of the cutscene or not
  -Next level
    -Option to choose how fast the level will fade out

Cutscene Character Actions
  -Walk to
    -Here you can create a path with up to six waypoints the selected character will follow
    -Select walking speed (normal/fast/slow)
    -Option to redraw the path
  -Change sprite
    -Select from a list of different sprites
  -Animate sprite
    -Choose if the animation should loop
    -Choose if the animation should pause for a specified amount of time between loops
  -Attack
    -Make the character attack using the currently held weapon (only works for specific sprites)
  -Die
    -The NPCs will automatically die if hit by a bullet or an attack, but you can also manually make 
     them die if you should so wish (only works for specific sprites)
  -Trigger
    -You can make a character trigger the cutscene using this, either by proximity to the player or if
     the player clicks while close. You can also choose the required distance for the cutscene to be 
     triggered.
   -Delete
     -A character that is referenced to in any added action will not be deletable until the action is 
      removed.

Cutscene Frame Tab
   -Add trigger
     -Draw an area which if entered will trigger the current sequence of the cutscene
   -Add frame
     -Adds a new frame to the cutscene
   -Add Action
     -Brings up a menu where you can choose from the different cutscene actions
   -Frame focus
     -Select what character should have camera focus for the current frame
   -Cutscene preview list
     -Displays all the frames and actions you've added
   -Delete Trigger
     -Deletes the trigger set for the current sequence
   -Delete Frame
     -Deletes the current frame and all of its actions
   -Delete Action
     -Deletes the last action added

Cutscene NPC Tab

NPCs
   -Name
    -Enter a name for your NPC that will be used to reference it
   -Sprite
    -Choose a sprite for your NPC
   -All Sprites checkbox
    -If you want to add a non-human interactable
   -Solid
    -If checked the player will not be able to move through the NPC
   -Killable
    -Select whether the NPC should die from player attacks or not (only applies to certain sprites)

Items to pick up (not fully implemented)
  -Name (?)
   -Enter a name for your item that will be used to reference it
  -Visible checkbox
   -In case you want an item to appear at a certain point
  -Active
   -If the player should be able to pick it up right away or later
  -Finish
   -If you want the player to have to pick up the item in order to clear the cutscene

UPDATE1: The Gun Tab in the Level Editor wasn't omitted here because there is some secret to it (we haven't added ALL the weapons from the first game, just a select few),but rather it seems a bit useless as it should be able to fit under the Enemy or Level tab and will likely be removed before release. Also, while you will be able to use the dodging enemies, we will probably skip the prisoners for now as the only character that can fight them is the prisoner/guard version of The Rat.

UPDATE2: Thanks for all the feedback! I've added a couple of features on my to do list. You will now be able to add some environmental effects, like rain, darkness or sunshine to your levels, and I almost forgot the elevators. The limitation for no cutscenes in a level with enemies has been removed, as I figured out a couple of ways to go around it. I'm also going to look at the possibility for creating levels for specific masks/fans as that would indeed be cool to see.

måndag 3 november 2014

HOTLINE MIAMI CAMEO CARDS

So this blog has been dead for a while, which is sad cause we really liked to share our thoughts and behind the scene discussions about our games. The reason that we haven't used this forum as much as we would have liked  is simply that HLM2 has taken up pretty much all our time so we had to compromise. Still we would like to be more active here so I am gonna do a first try to jump start this blog again with some old stuff I forgot to publish waaaaay back in 2013 (felt simple enough for a first post:)
  
The growing interest for the cameos in HOTLINE MIAMI inspired me to create these CAMEO CARDS. Instead of just namedropping all the people appearing in the game I thought this was a much more fun way to do it and being a hockey card horder when I was a kid I can't but love collectible cards! Included is all the musicians contributing with their awesome music, all the mask cameos and the arcade machines

CLICK TO SEE BIGGER VERSION
   
These might be printed in the future and I might also do the cards for HLM2..but no promises!

peace // D

 




torsdag 22 november 2012

CAMEO CARDS TEASER

I've noticed that some people want to know more about the cameos in HOTLINE MIAMI and instead of just putting down a list I made a card series! Once we re-design our site, I'll put these up and add links to everyone if you want to learn more about them. Might be printable in the future so I won't reveal them all just yet. But here are a few (click to see bigger versions)!










COMPLETE SERIES INCLUDE:
Sun Araw, Coconuts, M.O.O.N, Scattle, Jasper Byrne, Perturbator, El Huervo, Elliott Berlin, Eirik Suhrke, Jonatan "cactus" Söderström, Dennis "DpunktW" Wedin, Nigel Lowrie, Mats Ek, Oscar Dragen, Rasmus Wedin, Benjamin Söderström, Brandon Boyer, Wiley Wiggins, You (Lone Survivor), Peter Rasmusson, JW, Rami Ismail, Brandon McCartin, John Graham, Aubrey Serr, Phil Fish and the Arcades.

Stay Tuned ;)

Peace // Dennis

måndag 12 november 2012

Hotline Miami AI

I feel like writing a little bit about the AI in Hotline Miami as I've noticed from reviews and comments that it's not entirely clear how it is supposed to work.

There is basically one enemy behavior in the game, but there are several different variations. It's easy to confuse these as most enemies have the same look. The main enemy (white suit, blue shirt) is actually used as essentially five different enemies, and given certain conditions he can switch between different AI behavior.


Behavior no 1 / Random

This AI makes the enemy walk around totally at random, these enemies are always armed with guns and are hard to predict as they may end up moving between rooms. Any enemy you knock over will switch to this AI when he gets up unless he finds a melee weapon.

Behavior no 2 & 3 / Patroling

This behavior is used in both a melee and a gun wielding enemy, they will turn left when a wall or some other solid object blocks their path. The only difference between the one using guns and the one that has a melee weapon is the way they attack you given the range of their weapons. Knocking out an enemy will give him this behavior if he finds a melee weapon to pick up.

Behavior no 4 & 5 / Stationary

This AI is in guard mode, and will not respond to gunfire, it only reacts to visual contact with the player. If enemy with this AI is equipped with a gun he will try to shoot you on sight, if you retreat he will chase you and then return to his post if he can't find you. The melee version will chase the player instead of shooting him.


Another issue that might be confusing with the AI is how the gun toting enemies will react to seeing you. At some times it might seem they immediately turn around and shoot at you, and in other instances they will need to turn around slowly before they start to shoot. This is intentional and depends on how far away from the enemies you are when you approach them. If the enemy is at a fair distance from the player he will immediately jump around and kill you, this is meant to communicate that it's more risky to approach an enemy this way and should be avoided. The results would essentially have been the same if he had turned around more slowly, but would make it seem like a more plausible way to tackle the situation. Enemies will take about a second to get their guns pointed in your direction if you are closer to them when they first see you, which gives you a better opportunity to kill them regardless of your weapon of choice.

All of this could have been made more clear by giving different AIs different graphical appearances, but that would complicate the way we let enemies be able to pick up weapons on the fly and handle situations in a more interesting and complex way.

One of the things that makes the game fun to play is that we put so much effort into making essentially one basic enemy that is fun to engage for the duration of the whole game without making it feel way too repetitive. And I think this is largely to be attributed to the design decisions we made when designing the AI.


Another issue that has been brought up and criticized by many are the boss fights. The general consensus seem to be that they break the flow of the game and feel out of place. This is also intentional. While we didn't necessarily want people to hate these parts of the game, they are meant as a break from the regular enemies that make up the majority of the gameplay challenge. If the game kept doing the same thing over and over without any dips in fun and flow, then the peaks where you get to the meat of the game would be reduced and start feeling repetitive instead. It's a bit of a trade off but they serve a purpose to the story and makes it fun to get back to the regular gameplay afterwards.

If we make a sequel we will definitely try to experiment with potential boss fights and make them more polished and fun, but it's a hard thing to accomplish in a game like this where you can't simply let your imagination run wild to create engaging scenarios as it is equally (or more) important not to have them clash with the style and tone of the game. I would be very interested in hearing suggestions for different approaches we could have used to tackle this problem, as there are very few good examples out there that we can look at for inspiration (toned down boss fights in top down shooters is something I'm very unfamiliar with).


And I think most people will be glad to hear that we have no plans of ever adding a pure stealth level to any of our games in the future.

tisdag 21 augusti 2012

HOTLIME MIAMI

someone dressed up as an animal runs into a room filled with people, without having a plan on what to do and dies!.... HOTLINE MIAMI

måndag 13 augusti 2012

Adorable Fanart

Adorable fanart from my 10 year old cousin. He really likes the game and told me that he plays it every day, but he hasn't managed to get past the first boss level yet.