Version 1.05 of Order the Chaos games published

Now both Order the Chaos and Order the Chaos II work like charm with touch screen. There seem to have been problem with PCs with slow hard drives to run the games. This should be fixed now. I have tested the games on three different PCs and the games work fine on all of them. The oldest of the test PCs is an old laptop running Windows XP.

The video below gives an impression on the playing experience with touch screen in Ordetr the Chaos II:

The playability is much better than in version 1.03.

The games come with a zip-archive without an installer.

I hope you like the games! 🙂

Touching an Image in Cerberus X

This post is the 3rd in the series of touching an image pixel accurately. The second one is too complicated, now I have kept it clear and simple.

The image to be touch is middle handled (this makes scaling easier) and the image both moves and is scaled real time.

Here’s the source code:

The actual test is made for the original image data, that is left intact. Because the image is middle handled in order to get the top left corner of the image, one must decrease half of the width and height of the image from the x, y of the image. But as the image is scaled the actual graphical top left corner is x – (width / 2) * scale and y – (height / 2) * scale.

When then top left corner of the rectangle is calculated, to this is added the scaled size: width * scale and height * scale. This is taken care of in the if-sentence, when checking if in the rectangle is touched.

When one has the touching point, the point in the image must be “scaled” by the scale factor, see the commented part of the code for this.

In the actual test is tested is the picture’s alpha value in the calculated point <> 0; if it is, the image that has transparent pixels, must have been touched.

Clear and simple. 🙂

Below is a video of regarding this post:

If you want to compile this in Monkey X, just change in the LoadImageData-part “cerberus” to “monkey”.

Update:

In my Memorable Melodies  game is used slightly different code to touch the images, because the images to be touched don’t have “holes”.

New year, new programming language

Blow from the past… Cerbeus X programming language is based on Monkey X, and has dedicated community behind it. With quick look to the language, it seems that fonts are handled in a different way, more advanced way.

Below is Old School XI demonstration made in Cerberus X.

I changed the colors a bit and had to change the light position to a positive value, rest goes like in good old Monkey X programming.

You’ll probably see here some Cerberus X tutorials in the future and practically all my Monkey X tutorials help you to get started with Cerberus X. Stay tuned! 🙂

Let’s have a great year!