Jump to content

  • Log In with Google      Sign In   
  • Create Account

Best design choice for horizzontal scrolling maze boundaries generation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Makers_F   Members   -  Reputation: 761

Like
0Likes
Like

Posted 13 October 2012 - 12:46 PM

Hello,

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

Posted Image
(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
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
}


What is not clear to me is how should i write the (random) generation of the maze.
What i mean is:
  • 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,...)?
What will make it more controllable? What will give be the best choice in case i want to allow the player to
  • 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)
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 Posted Image )

Edited by Makers_F, 14 October 2012 - 06:12 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS