informa
2 min read
article

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.

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?

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more