Sine Wave Scroller in Monkey2

Today’s little code, sine scroller in Monkey2. In the previous post you can download the code and data files for plain scroller. In this project same data files are used. Let’s take a look at the video:

The scrolling isn’t very smooth in the video, but try the code:

The idea is to build a string (“scrollString”) which characters are drawn one by one to the screen in order to achieve the sine wave effect.

Feel free to use this code.

Simple text scrollers in Monkey X and Monkey2

I coded today simple text scrollers in Monkey X and Monkey2. When the old school bug had bitten me I coded among other things the following:

This night it’s time to just simple text scrollers code.

Let’s take a look at the result of the Monkey X code:

The source code:

For the font I’ve used my Font 2 PNG and its data file. Notice, that the update rate is only 15, change that to 60.

 

For the first time I made a text scroller in Monkey2 too. The result is in video below:

As you can see, the code is a little different:

In order the get coding going, you may download both the projects with all the data files. Password to download: scroller

Later it’s time to again for sine wave scrollers… 🙂

Have fun!

New Memorable Ladies Bundle release

Memorable Ladies and Memorable Ladies Lite have been given new soul: Each level begin with some parts of the model picture showing up. The parts that are not showing up form a figure. In addition Memorable Ladies has one new level, 13 levels in total.

This is how Memorable Ladies looks like, when the level begins:

I have removed the feature, that shows for a short time all the numbers and the game ends, if mistake-value is 20 or if the player runs out of time. 15 marks in total for each level to use to mark numbers the bonuses have shown.

The games are now more playable and enjoyable.

Video of Memorable Ladies v3.00:

Same new spirit has been given to Memorable Ladies Lite v2.00. See the video:

The games don’t have an installer, they come as zip archive.

Itch.io page for details:

I hope you like the games!

Recently published to Android: Calculus

I published recently initial version 1.0 of a calculus program called Calculus to Android. I have plans to publish PC version too, when the program is developed further.

The program differentiates and integrates user given polynomial and simplifies all the fractions. The coefficients can be 4 digits long. I haven’t given a limit to amount of terms in the polynomial, the available memory is the only limit.

The coefficients can be fractional too — and of course negative or positive. Next version will be out soon, which will improve some features of the program and add some features too. I’m not aware of any actual bugs in the program at the moment.

See below a demonstration video of the program (in the video Calculus is compiled to PC and used with the mouse):

Calculus is free educational program.

Notice that when integrating the polynomial, Calculus doesn’t give the integral constant.

Order the Chaos II now at itch.io

For some reaon my AV-system deleted the otc2.exe-file even though the file is clean. It had been protected by the Enigma Protector licensing system, that adds virtual system of its own to the exe. It seems that my AV considered this behaviour as some kind of virus… This is why I had to do playable demo version of the game (3 levels and the practice level) in addition to the full version. Neither of these use the Enigma Protector anymore.

When my next “serious” (not a game) PC program sees the daylight I am going to use the Enigma Protector again. I probably need newer version, though my latest version is so old, that I must pay for the latest version. Before that I must make sure that my AV’s false positive problem doesn’t cause problems.

Order the Chaos II comes without an installer as an zip-archive.

Here’s the contents of the full version as they appear in my system:

The file “Order the Chaos II.exe” starts the game.

Let’s see one screenshot of the version 1.06:

You can find the demo and the full version here:

The ending scenario is worth seeing! 🙂

Memorable Melodies v1.3 available

Memorable Melodies v1.3 is written in Monkey2 programming language. Now it is tested to be working properly on newer Android devices!

Remember there is a cheat in the game: Tap at the upper right corner of the screen and all the mistakes are cleared.

In the code now MusicState() isn’t tested at all, instead the duration of the played music.

Do try it! 🙂 It’s free witout adds.

 

 

Inside the Julia Set – Voxel Fractals

Today it was fractal day for me… As a result two voxel fractal landscape demonstrations with the Monkey2 programming language. The demonstrations are based on an example program that comes with Monkey2.

The first experiment is below:

I’ve used my Fractals program to generate the 2D fractal and the Monkey2 program renders 3D landscape of it. The fractal is the famous “dragon” shape of the Julia set.

Below the second experiment:

Looks a bit better… The little dot in the 2D fractal shows the location where we’re going inside the Julia set.

Take a trip inside a fractal… 🙂

Online games back up

With a little compromise the online games are back up. The codes have been updated, but there have been and is factors beyond my control regarding my online games.

When the games were embedded on a WordPress page everything was ok, but soon the plugin I used had a bug in its update, that caused only errors when loading the online games. The bug was soon fixed, though.

I would really want the games to be embedded on a WordPress page, but some settings with my ISP at the moment prevent the games to start from WordPress page. We have tried to work to get the games running on a WordPress page, but at the moment that doesn’t work.

My Online Games.

Tile Scrolling with Maps Made with my Map Editor

Little tutorial on scrolling a map/world made with my Map Editor.

First, the source code in full:

Quite straight forward, but some words about the code.

In the Map Editor dat-file, the first 4 byte integer declares the width of the map, the second the height of the map in tiles. The size of the map is read first, then the map itself.

The scrolling is made with touch screen in mind.

The meaning of the Abs(…)-sentence is, that in which direction in the touch screen the finger is being moved most and then the map is scrolled into that direction.

The 256 color shapes of the world are from an Ultima IV remake and are free to be used. The original project is “xu4”, if my memory servers me right.

The source above is places to public domain as license for it.

Please, if you make a game (in any programming language) utilizing my code, show me, what you have achieved. I’m big fan of games of this kind of genre.

 

For the end a video regarding this post. At the beginning of the video there’s some scrolling:

 

 

Embedding HTML5 output of Cerberus X to WordPress pages

The first thing you need is Code Embed plugin.

If your HTML5 output code loads files, something must be changed in the JavaScript-code. Find the following piece of code:

The URL of the data drawer must be changed. If you have the data drawer at the root of your www (public_html) drawer, change the “path.slice” line like this:

If you’re working offline with some server program and have a testsite to experiment with, the path can be found as follows:

The y-coordinate of the mouse need also some adjustment, if the page has scrollbar: The y-start depends on the position of the scrollbar.

Find the following function:

The y-coordinate is correct with following change:

With the touch screen no additional changes need to be done.

While working with WordPress, the “tool/status” bar of WordPress changes the y-coordinate too, but the visitor on your page doesn’t have that page with the “tool/status” bar of WordPress. 🙂

You’ll probably want to remove the console from the page, too. Just remove all the references to splitter and console from the CerberusGame.html.

I almost forgot, in CerberusGame.html use absolute path to find the JavaScript-file. For example src=”https://yoursite.com/drawer/program.js”. Perhaps at first is good practice to try with all the contents of the default CerberusGame.html, so that you see that everything is working.

This should help.

As an example in practice, you might want check my online games corner.

Good luck!