Ninjah/Tutorial

Posted by Radial543 on July 15, 2007, 10:30 p.m.

Ninjah is a fast paced action-puzzler. The general idea is to get from A to B as quickly as possible with the help of your trusty, if not slightly elastic, ninja rope and your ability to err…. go into slow motion. However, there is a snag. You may only come into contact with blocks the same colour as your belt or you die (for some well explained and thorough reason!). To help combat this strange allergic reaction to the evil, evil blocks, you can change the colour of your belt by hitting the corresponding checkered blocks.

E.G….

Above, you can see the little ninja guy has hit the green checkered changer block, this means he can now safely hit the standard green block just up ahead. It sound's simple enough but the game can get pretty complicated (hopefully not frustratingly so)!

The level editor used to make the levels has been included with the game, so go crazy and make you're own!

If you have any problems/questions just give the developer a shout via Raz@Natomic.com and he'll do his best to get back to you quickly.

- Man I cant wait until this game comes out, looks really good (it is 57% complete!)

site: http://www.evildrbin.com/ninjah/

[Edit]

Some Screens

_______________________________________________________

Now time for a tutorial in Game Maker: Recording Scenes in Game Maker!

Game Maker has no capacity to really record a scene in your game as a movie clip. The best (the only good) way to have Game Maker records scenes at all is to save positions of all objects (alternatively only the moving objects) and this is how to do that.

First initialize an array to decide which objects to save the positions of (those objects who are moving):

//Which objects to draw

nr_obj = 3; //How many objects

obj_d[0] = object0;

obj_d[1] = object1;

obj_d[2] = object2;

obj_d[3] = object3;

And then next thing would be to save their position into (preferably) an external file, just like this:

i = 0;

d = 0;

while(i<instance_number(obj_d[d])) {

//Selecting information

x_id = (instance_find(obj_d[d],i).x;

y_id = (instance_find(obj_d[d],i).y;

file = file_text_open_append(object_get_name(object_index)

+string(instance_find(obj_d[d],i));

file_text_write(file,x_id);

file_text_writeln(file);

file_text_write(file,y_id);

file_text_close(file);

i +=1;

if (i==instance_number(obj_d[d])) {

d += 1;

i = 0;

}

You might want to save other stuff too, like image_single, health, time etc. but this is the basic. It saves the position of all moving object such that you may later recreate the same thing using those variables.

Easiest way to recreate it, and by doing so creating a visual replay of an earlier situation, is by adding the same objects as in the real room, to the review room and then in each of the review objects let them read their positions like this (event):

y = file_text_read_string(file);

file_text_writeln();

x = file_text_read_string(file);

file_text_writeln();

The tricky thing is in the create event, where we will have to open the correct file. To make this easier we created one file per object and we save them as the object name plus their id. The id was to make the file unique in case there are several instances of the same object.

As the different instances in the review room are visually equal it doesn't matter which read from which, as long as two instances doesn't read from the same file. There are several solutions to this, I suppose. The one I came up with is to change the name of the file as it is selected. This will make it unselect able for other instances. So in create event:

file = false;

file_r = file_find_first(working_directory+"*.*",fa_archive)

while(file==false) {

if (string_pos("rev_"+string(object_get_name(object_index)),file_r)) {

file = true

}

if (file==false) {

file_r = file_find_next();

}

if (file_r=="") {

file = true;

show_message("Couldn't find a file for this object");

}

}

Good luck with this script. Another tutorial blog thing, tomarrow [:)].

Comments

Radial543 17 years, 5 months ago

The screenshot is more of a header, that is not actual game play [^^]

Radial543 17 years, 5 months ago

Post…if you want…..

shawn 17 years, 5 months ago

It looks cool mate.

Radial543 17 years, 5 months ago

thx

RoyalSmacketh 17 years, 5 months ago

Nice screenies.

shawn 17 years, 5 months ago

What was with the spam blog?

Radial543 17 years, 5 months ago

Spanm blog??, ohh this game is not mine

shawn 17 years, 5 months ago

no, I mean PM spamming people to look at your blog.

Radial543 17 years, 5 months ago

……

LoserHands 17 years, 5 months ago

Wow. Thats totally unique, and freakishly awesome dude.