Post tutorial RSS Creation of a Point & Click screen - PART 2 : The program

Some "behind the scenes" on the creation of a room in Demetrios! Here we study the code side of it.

Posted by on - Basic Client Side Coding

Let's continue our "behind the scenes" on a room creation, shall we? :)

The next step is implementing the art into the game program.

Even though I'm using a well-known software to create the game (Game Maker Studio), the game engine has been made "from scratch", using the integrated GML programming language.

Game Maker Studio

To define interactions, I am using elements that I've created for Demetrios, which I've named "clickers". They are clickable areas on the screen, defined either by coordinates or a sprite.

They are associated to a label (the text displayed when you hover it) and an icon. (hand, arrows, talk...)

Here's an example taken straight from the game code :

clickerconstructor(0, 916, 1920, 1080, 'PC_EXIT', "PC16_TO_PC15", ICON_BACK, PC_DEPTH - 10);

clickerspriteconstructor(gsp('pc16_tomC'), 'PC_TOM', "PC16_TOM_DIALOG", ICON_TALK, PC_DEPTH - 40);

The first clicker is the area to move to another screen, which is defined by coordinates.

The second one is Tom (a character), which is defined by a sprite.

Tom interaction sprite

Tom interaction sprite

Both have depths, in order to know which one will have priority if their areas overlap.

There can only be one clicker you can interact with at the mouse cursor position, otherwise this would cause nasty effects, such as several things happening at the same time!

These clickers appear when you ask to display hotspots in the game! (SPACE bar)

Clickers / Hotspots

Clickers / Hotspots

Then, we must display the graphics.

The main background covers the whole screen and is displayed directly.

The sky is another background, but this one has a lower depth (so the main background covers a part of it) and it moves at a defined speed.

Finally, we must include the animations.

Again, I have programmed elements for the needs of Demetrios, that I call "generic objects".

I give them sprites (either one frame if static, or several frames if it's an animation), a location on the screen, the animation speed, and whether the animation should stop when reaching the last frame, or repeat it.

Reeds animationReeds animation

In the next parts, I will explain the game dialogs and translations system!

Good news! Demetrios has been greenlit on Steam!

Embedded image permalink

The Kickstarter is also reaching its end, with only 4 days left to support it!

Will the German translation and PS Vita goals get reached?

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.