Your last mentioned idea gives my code more honour than it deserves. ^^

What I actually thought of, is a row of small examples in the wiki with copy and paste code that you can start right from the SED without any assets required.

The code should be as small and easy to understood as possible.

I tried something with jumping, but it is still to cumbersome (beside the fact that you can't use it with collision detection yet):
Code:
//JUMP with SPACE, MOVE with A and D or the curser keys!

#include <acknex.h>
#include <default.c>

var jump_rel_height = 100;
var jump_abs_height = 0;
var jump_mode = 0;

function jumper()
{
	while(1)
	{
		if(my.z <= 0)
		{
			my.z = 0;
			if(key_space)
			{
				jump_mode = 1;
				jump_abs_height = my.z + jump_rel_height;
			}
		}
		if(jump_mode == 1)
		{
			vec_lerp(my.z, my.z, jump_abs_height,0.05);
		}
		if(my.z >= jump_abs_height-0.5)
		{
			jump_mode = 0;
		}
		if(jump_mode == 0)
		{
			my.z -= 30 * time_step;
		}
		my.y += ((key_a - key_d) + (key_cul - key_cur) + (joy_1 - joy_4));
		wait(1);
	}
}

function main()
{
	level_load("");
	ent_create(SPHERE_MDL, vector(0,0,0), jumper);
	camera.x -= 500;
}



This was an attempt, because of the discussion about a constant jump height within different frame rates.

EDIT:
Just want to appologize that I don't answer all of your suggestions, your post is packed with them!

At least a few answers:
- I don't delete the blocks because I don't like the approach where one has to start always from the beginning. It is a design decision.
- You are right with the while loops, but in this case it has almost no impact on my system.
- The impact_event results probably in an absolute different gameplay, while I like especially this 'fly' through those blocks in a row.

On the idea of small games for the sample folder:
At least there should be a link to the section with game scripts on the Acknex Resources...

Last edited by Pappenheimer; 10/02/11 14:28.