Aligning Player Movement with Camera

In a game with a static camera (looking down at the level) it is important to align the character movement with the camera. Failing to do so creates a distorted input feeling as the input and the actions of the player character don’t correspond to each other. To achieve a correct movement, the directions have to projected from the screen onto the scene.

Wrong movement along axis of the coordinate system.
Wrong movement along axis of the coordinate system.

Naive implementations of player movement use the axis of the coordinate system as directions. Left and Right correspond to the [1,0,0] direction and Up and Down to the[0,0,1] direction. This implementation is correct and usable as long as the camera is correctly aligned to this axis. If the camera is not aligned the movement directions no longer correspond to the perceived directions of the player (see image above). To correct this we have to extract the directions from the camera.

Corrected movement
Corrected movement along projected directions.

To compute our new directions we unproject three points from camera space to world space. Most framework/engine have built in functions to do this ( godot, opengl, unity ). We have to preform 3 unprojections for the points: (0,0), (1,0) and (0,1). By substracting the result of latter two from the former we obtain two 3D-Vectors that represent our new directions. To receive planar movement direction set the height value (mostly y) to zero and normalize the vectors.


 var p0 = cam.project_position(Vector2(0,0))
 var pH = cam.project_position(Vector2(10,0))
 var pV = cam.project_position(Vector2(0,10))

 camH = pH - p0
 camV = pV - p0
 camH.y = 0
 camV.y = 0
 camH = camH.normalized()
 camV = camV.normalized()

camH is the horizontal movement direction and camV the vertical. Instead of using the axis of the coordinate system ([1,0,0] and [0,0,1]) as movement directions, use camH for left/right movement and camV for up/down movement.

Pasta Arugula Salad

This is my favorite salad. It’s suitable for most occasions and can serve as a main or side dish. It takes around 20 minutes to prepare.


The ingredients (in a copyable fashion):

  • 500 g Pasta
  • 250 g Mini Tomatoes
  • 250 g Mozzarella
  • 125 g Arugula
  • 100 g Green Pesto
  • 2 Tablespoons Honey
  • 2 Tablespoons Mustard
  • 1 Handful Grinded Parmesan Cheese

Cook the pasta as described on the package (al dente). While the pasta is cooking you can cut the mozzarella and the tomatoes. I divide the tomatoes once or twice, depending on their size. The mozzarella is cut into pieces roughly the same size as the tomato pieces.

Add everything to the bowl, except the arugula! It takes a long time mix everything up if you add the arugula directly. Mix the ingredients until everything is coated than add the arugula and mix it again.

Giving Pathfinder Professions More Meaning!

I wanted to add additional mechanics to professions in Pathfinder to give them more meaning. At the moment the only usage of a profession is to earn some money. Occasionally some professions can be used in other ways; for example fixing a cart. These additional mechanics should give players more incentive to pick a profession, instead of spending their points on perception.


Preparing a Lavish Meal:

To prepare a Lavish Meal you need one pound of fresh ingredients per small or normal creature to feed. Additionally you need spices worth at least 1 gp. per person. It takes one hour to prepare the meal. If you want to feed more than 10 people it takes an additional hour per 10 people. You need a fire, or any other sufficient heat source, a pan and a pot.

Everyone eating a full Lavish Meal is healed. The amount of HP recovered depends on the Profession(Cooking) throw of the cook. A normal Lavish Meal heals 2 HP. You can only benefit from a Lavish Meal once per day.

The DC Profession(Cooking) to create a Lavish Meal is 20. For every 5 by which your check result exceeds the DC, the meal heals additional 2 hit points.


Find Weak Spot:

You can analyse wooden objects, e.g. wooden doors, to find their weak spots to break them more easily. If you know the weak spot of an object the Strength DC to break it is lowered by one point. Additionally the objects hardness is lowered by one point.

It takes 1 minute to find a weak spot. You can use the bonus as long as you can see and access the found weak spot. Once you found one, you can describe it to other persons to allow them the same bonus. You have to stand next to the person, when she is breaking or attacking the object.

The DC Profession(Woodcutter) to find a weak spot is 20. For every 5 by which your check result exceeds the DC, the Strength DC to break the object and the hardness are lowered by an additional point.


Splendid Drink

To prepare a Splendid Drink you need herbs worth at least 2 gp. per small or normal person. You can create at most 10 drinks with one Profession(Brewer) throw. It takes 30 minutes to prepare the drink. The drink has to cook for 4 hours before it is usable. You do not have to tend the drink while it is cooked. Splendid Drinks can be filled into flasks, waterskins or similar containers. A Splendid Drink has to be used 1 week after its creation or its effect is lost.

The DC Profession(Brewer) for brewing a Splendid Drink is 20. A Splendid Drink grants a +1 bonus to any skill check for 10 minutes. For every 5 by which your check result exceeds the DC Profession(Brewer), the drink grants an additional +1 bonus on skill checks. Tasks that take longer than 10 minutes, e.g. crafting, do not benefit from Splendid Drink. A Creature can only benefit from a Splendid Drink once per day.


Prepare Letter of Recommendation

It takes 1 hour to create a Letter of Recommendation. You need parchment and ink worth at least 1 gp. and a quiet environment with a suitable surface to write on.

A Letter of Recommendation gives you a +2 bonus to one diplomacy throw against a merchant or an official instance, e.g. a mayor or town guard. The person the Letter of Recommendation is used against will keep it, regardless the result of the diplomacy throw. You can only use one Letter of Recommendation per diplomacy throw.

The DC Profession(Scribe) to create a Letter of Recommendation is 20. For every 5 by which your check result exceeds the DC, the diplomacy bonus granted by the Letter is increased by two points.


Spare Horses:

While driving a curt you can use Spare Horses to travel longer. You need to drive the cart or wagon the full 8 hours to uses be able to use Spare Horses. You can also use the skill when the cart is pulled by other animals than horses.

Spare Horses allows you to travel 1 hour longer before the horses get exhausted. The DC Profession(Driver) of Spare Horses is 20. For every 5 by which your check result exceeds the DC, you can travel an extra hour before your horses get exhausted.


Support Research:

You can support an ally, including yourself, in his research. You need access to library or a book collection with at least 100 books. You have to support your ally for at least 1 hour. A person can only be supported once per knowledge check.

The DC Profession(Librarian) of Support Research is 20. A person you support in his research gains a +2 bonus on his knowledge check. For every 5 by which your check result exceeds the DC Profession(Librarian), the target gains an extra +2 bonus to its knowledge check.


Test your Luck:

Your are used to risk everything for the chance of winning some coins. Even outside the tavern you can test your luck. By testing you luck you gain a luck points applicable to skill, attack and saving throws.

Test you luck is a move action. If success you gain luck points. You have to use the luck points in the next round or they are discarded. Luck points are applicable to skill, attack and saving throws. You have to apply the luck points before throwing the dice. You can split up you luck points, for example using 1 point for an attack roll and 1 point for a skill check.

The DC Profession (Gambler) of Test your luck is 20. If you succeed you gain one luck point. For every 5 by which your check result exceeds the DC Profession (Gambler), you gain an additional luck point. Once your fail the skill check profession (Gambler) you can’t use Test your Luck for the rest of the day. Additionally your next skill, attack or saving throws is performed with a malus equal to the luck points you gained that day. You can’t do a useless check to dismiss the malus.


How to prepare a Campaign without rail-roads

I posted this on reddit a while back, just adding it here for completion.

When I plan a campaign, I separate the planning phase in two parts:

  1. Planning the main story arc
  2. Preparing for a session

Planning the main story arc

First figure out in which world you play want to play. Who are the big players? Kings, Gods, established heroes, etc. .
Create a small list of attributes for every important NPC. The list should contain their motives, morales, personality. The lists will help you to stay consistent and to act upon the PCs actions quickly.

As you won’t be able to tell what will happen in the course of several sessions only make a rough plan of events that will happen.
Set up an initial list of events that will occur if the party of heroes would not exist. Example: the evil guy tries to summon an evil monster in roughly 10 days.
This timetable will give you a rough framework for your campaign, without rail-roading the story. After each session you should revisit the timetable and figure out how the actions of the heroes have changed the course of history. Example: If the PCs killed a commander of the evil forces, the raid on a village in 2 weeks can’t take place.This fixed timetable also means that the players can miss certain events if they are to slow or ignore a story plot. E. g. If the party needs four weeks to stop an event something else will happen without a chance for the PCs to intervene. With the timetable and rough descriptions of the event you got an overall story arc that is not written in stone and can be changed by the players.

Preparing for a session

When planning a session take a look at the timetable to see what is up next. Think through what can happen in the next bit of the story and possible actions of the PCs. You will never find all possible decisions, so don’t even bother writing it down ;).
When you got a rough overview for the session, you can start to prepare.

Create groups of enemies fitting into the scene. Create local maps of villages, dungeons and other sites you want to use. Figure out how the enemies will behave.
Example: 2 groups of goblin guard the mage tower. On a small balcony hovers an all-seeing-eye warning the mages if it sees anything unusual. The door to the mages bedroom is trapped with Trap X. etc. .
If you have difficulties improvising, spend more time describing details of the sites the heroes visit. Have a lot of stuff ready you can use if needed.

At the end you should have a detailed description of the places the party will visit. From that point on the players decide. Listen to their actions and look up what could happen.

Example: They sneak through the fields -> give the goblins and the eye a perception throw and act upon it.

If you notice that it will get to boring, use the assets you created to add more into your world. Maybe 2 goblins decided to plunder the kitchen, and they notice the group.

Hopefully I gave you a rough idea how I plan my campaigns.


  1. Have a rough story arc for the campaign.
  2. Create detailed descriptions of sites and enemies for every session and only act upon the actions of the party

Create tileable textures with GIMP

The input material

I took photos of the grass in my backyard to create a grass texture. The camera was held at shoulder height pointing down. I cropped the image into a 1:1 image. Try to keep the image as big as possible. Do not scale it into your desired dimension yet!

Original image of grass

Make it tileable!

There are two methods to make the image tileable/seamless.

The easiest way to create a tileable texture is to use the “Make Seamless” tool (Filters->Map->Make Seamless).

If you aren’t satisfied by the results of the Make Seamless filter you can also do it by hand.
Start by applying an x/2, y/2 offset by using the Layer->Transform->Offset tool.
This will offset the image in such a way that the opposite border match each other perfectly, but it only shifts the problem. You should notice that there are two lines, one horizontal, one vertical, were the image doesn’t fit together. You can remove the visible borders in various ways, e.g. using the clone and blur tool.

Texture made seamless

Removing the midrange frequencies

At this point we cloud use the texture, but we will go one step further. The image still contains midrange frequencies, that we want to remove. The midrange frequencies will produce ugly tiling effects if the texture is repeated often.

Start by duplicating the seamless texture and apply a tileable blur (Filters->Blur->Tileable Blur) onto the duplicated version. Choose a high radius, roughly 10% of the images size. This will create a layer containing the mid and low frequencies.

To preserve the low frequencies create a new texture below the two existing. Use the Color Picker with a big radius to select an average color of the texture and fill the new texture with this color.

We now have one layer containing the mid and low frequencies, one containing the low frequencies and one containing all frequencies.

To create a layer containing the high frequencies set the mode of the blurred layer to “Grain extract” and move it above the original layer. By Merging these two layers you gain a new layer containing only the high frequencies. After merging set the mode of the resulting layer to “Grain merge” and merge the two remaining layers. This creates our final image containing the high and low frequencies but no mid frequencies.

The finished grass texture

Note: I scaled the images to save bandwidth

Pathfinder Loot Generators

These are all tables of wondrous items in the Ultimate Equipment book.
The content falls under the Open Game License (OGL).

Minor Items

Random Item Type

Medium Items

Random Item Type

Major Items

Random Item Type