Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Sunday, 8 September 2013

Tutorial: Comic Panels

Panel setup is a really difficult thing for us photo manipulators. As we don't draw our own material, we're slaves to how the photographer originally shoots the subject. With this lack of control we have more constrains in terms of setting up the panels. We need to setup our panels based on the source material, rather than setting up the panels and then drawing the material on top.

With that in mind, I'll take a fairly different approach to panel setups. Here's what I learn from working on The Taming.

Saturday, 7 September 2013

Tutorial: Speech Bubbles

Sometimes in MC photomanip, we come across a set of pictures that demands a more structured narrative, thus picture series are born. Every one has their preference in the style of picture series, mine is in comic styles as the dialogues are much easier to follow and more complex exchanges can happen.

I started my picture series The Taming last week, and learnt a few tricks that I'd like to share with you! Starting with Speech Bubbles!

Saturday, 24 August 2013

Plastic Mask Tutorial

Couple weeks ago I came across this fantastic tutorial of applying a plastic mask effect to a portrait. Couldn't really believe my luck to find it on a mainstream website. Anyhoo I started experimenting with the effect with mixed results.

The downside of the tutorial is that it uses Cinema 4D to render the mask, which may not be super accessible by everyone. Luckily I remembered a piece of software I played with years ago called DAZ Studio (a free alternative to Poser). I recall it be faster than poser, less resource hungry, and came with a £0 price tag. So let's see if we can achieve the effect!

Saturday, 10 August 2013

Advanced Tentacle Tutorial

So yesterday I showed you how to use the Shear filter to create some basic tentacles. Today, let's explore another method to give us more flexibility in creating tentacles.

Friday, 9 August 2013

Veins and Tentacles tutorial

A couple of fellow collective members had asked for tutorials on the veins and tentacles effects from my last manip, so here it is!

Friday, 26 July 2013

Schedules

SymCity is meant to be a sandbox game that allows player to explore the world at their own pace. To add variations to the world, it has to evolve with the player's exploration. The most obvious choice of variation is to modify the world with events - and naturally scheduled events plays a fundamental role.

The concept of schedule event is simple:

Player's actions advances time, and at designated times, events will be triggered: locations become accessible; character moves to different location etc.

There're different ways of doing this depending on the scale of the game - you could have nested conditions setup in your game if it's fairly linear. I suspect a lot of story driven RAGS games with "day" counters use this approach, by defining specific times when certain events will be triggered.

For a sandbox game, this is just won't do.... So let's try something else. For my approach to this problem (credits to Anonymous's suggestion as well on TPoC blog earlier this year), we'll need:

Time_now - A time variable.

This is a Date Time variable, so we can do simple operations like "add minutes" or "add hours" to it. This is basically what day and time it is in the game world.

Schedule_List - A multi-dimensional array that keeps track of the schedule.

The MDA holds the scheduled time, threshold time, schedule pattern, timer name and variable name. The list is always kept in ascending order. More explanations later.

Active Timer: Schedule-Checker - Checks the Time_Now against Schedule_List

As the schedule list is in ascending order, this timer just does a while loop to see if the first "scheduled time" on the array is due for processing, if so, it calls the next timer:

Inactive Timer: Schedule-Trigger - Manipulates the Schedule_List array

This is where the magic happens. This timer checks the "threshold time" to see whether we still want to execute the associated event. This is due to the nature of some actions / events potentially taking up several hours - by which point we might not actually want to execute the event anymore.

If we want to execute the event - then we simply execute the timer by name stored in the array, and supply suitable variable to it.

Next we need to remove the top item from the Schedule_List array, because it's been expired (whether we triggered the event or not). But first we have to determine the next scheduled time and threshold time, using the schedule pattern.

Since this next part is purely to manipulate the array data, I do it by javascript. Read the schedule pattern, calculate the next scheduled time and threshold, push it to the end of the array, sort the array and return it. Now we have the next scheduled event on the top of our list!

RAGS Code below.

Timer Schedule-Checker:

Variable: Set (Javascript): aStr1, [true if Time_Now > Schedule_List(1)(0)] Loop: While: aStr1 Equals True Timer: Execute Timer: Schedule-Trigger Variable: Set (Javascript): aStr1, [true if Time_Now > Schedule_List(1)(0)]

Timer Schedule-Trigger:

Variable: Set (Javascript): aStr1, [true if Time_Now > Schedule_List(1)(1)] //passed threshold time yet? Variable: Comparison: aStr1 Equals False Variable: Set: TM_[v:Schedule_List(1)(8)], [v:Schedule_List(1)(9)] Timer: Execute Timer: [v:Schedule_List(1)(8)] Variable: Set (Javascript): Array: Schedule_List, [pop the first schedule, refill the schedule time if next available time exists, set threshold time, push back to array, sort and return]

Note 1: I actually cheat a little with my array by having titles on the first row, so rather than calling picking Schedule_List(0)(0) for the first scheduled time, I pick Schedule_List(1)(0) which is actually the second row.

Note 2: Rather than setting and retrieving Timer Custom Properties, I opted for using variable variables for quicker variables setting. All Timer's variables are named TM_[Timer Name]

I realised after writing this post that I should probably allow empty thresholds, and if threshold time is empty, then execute the event regardless. But hopefully this gives you some ideas of how to schedule events in your RAGS game.

I'm not releasing the code for this because the Javascript to calculate the next scheduled time is highly specific to SymCity's needs (I took some shortcuts) - so it's not a fully featured javascript function. If you're able to tweak it to your needs, you can probably code it from scratch (it's 2000 characters long); if you can't, then it's probably best you avoid it.

If you really want to play with scheduler but are not confident in coding the "next scheduled time" with javascript, you can always just build a list using actual time and skip the schedule pattern.

Hope this is of use to some of you guys :)

Saturday, 20 July 2013

Compass Demo

So back in development of TPoC, I asked myself: What kind of features would I like in the game? What would be the best way of doing things? And one of my bug bears was navigation.

The compass never really did anything useful, and I always found it hard to remember paths to different locations. I've seen other developers using various ways of tackling this problem, map inventory, player portrait map etc. But nobody seemed to have played with the compass itself.

Soon after exploring the RAGs designer I came across the line of code that lets you change the compass image:

Media: Set Main Compass Picture

Now considering the Compass is much bigger than the Room Picture (just above the up down compass), it seems logical to me to update that with a map, where the green dots indicates the direction you're heading towards.

So here's the code:

Player > Actions > On Player Enter
Condition: Multimedia: In Group > ![room.name].png > Compass
On Success: Media: Set Main Compass Picture: ![room.name].png
On Failure: Media: Set Main Compass Picture: <Default>

What the code above does is that it first checks whether the compass image exists based on the room's name. I added the ! in front because [room.name].png or [room.name].jpg would be more sensible choice for the actual Room Image. Now RAGS doesn't have a command that checks if an image exists in your media library at all, so I've picked the Multimedia: In Group as a solution. All you have to do is to add the compass images into your game, and put them in a Group - I've named mine Compass - and check if the image exists in that Group.

If the image is found (On Success) then replaces the default compass. If not, you don't want to do nothing, as the last compass image would be left behind, defeating the point of intuitive navigation that you're trying to create. So you set the Compass Picture to <Default> to reset it to normal.

When I used this for TPoC, I decided to make the map exactly representative of the zone / room I'm in. The problem of jumping from one zone to the next was the sense of continuity.giving little feedback when you move around the world as the map would flick from one zone immediately to the next.

To compensate for this, I've "zoomed out" a little with the current version, which gives more of a sense of actual movement when you navigate the world.

The demo code is here, feel free to have a play!