• Advertisement
Sign in to follow this  

Best design choice for horizzontal scrolling maze boundaries generation

This topic is 1923 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

i'm working on an horizontal side scroller game where the player shouldn't touch the walls while it automatically proceed.

[img]http://www.rockbox.org/wiki/pub/Main/PluginChopper/dump2.PNG[/img]
(not actual content, this is from an old game)

The player must also catch some objects while proceeding into the maze.
I need to pass to the vertex shader 8 key vertices coordinates, and it will take care to interpolate the position for all the remaining vertices.
in pseudo-code the generator should be
[CODE]
update(elapsed_time) {
space = velocity * elapsed_time;
for(i=0; i<8; i++){
verts[i] -=space;
}
if(verts[0]<0) { //out of screen
shifLeft(verts);
verts[7] = generate_new_vert();
}
total_space +=space; //passed to the fragment shader to correctly repeat the tiled texture
// the actual code will be a bit different since the X coordinate of the vertices in the array must match the ones of the vertices in the gpu in order to be able in the shader to use the correct value for the correct vertex, but it's just a matter of a few subtractions and checks
}
[/CODE]


What is not clear to me is how should i write the (random) generation of the maze.
What i mean is:[list]
[*]should i generate what path the player should follow, and create the maze according to it so that the player is almost forced to follow it?
[*]or should i just generate the maze with some random parameters(min-max distance between the maze and the obstacles, max player changing direction velocity,...)?
[/list]
What will make it more controllable? What will give be the best choice in case i want to allow the player to[list]
[*]not to force a single route
[*]guarantee that, whatever route s/he takes, s/he will be able to always proceed (obviously the "correct" way will be easier that the "wrong" way, but the "wrong" one will give more reward)
[/list]
Can you maybe point at an analysis of this types of games and what it takes to make them fun?
(i initially started this project as an occasion to learn openGL and shaders, so i didn't really thought too much into the design of the game, but now that i'm working on it i would like to make at least an interesting game to show to some friends, and maybe a basis for a bigger game [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img] ) Edited by Makers_F

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement