Announcement

Collapse
No announcement yet.

Newton vs the Lazynots

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    really nice work so far, i know you probably have your own gameplay ideas and future plans but after watching the videos a bunch of ideas popped into my head and i thought i would just spurt them here anyway if thats ok with you ;P

    i imagine at a later date you could craft some really nice possibly larger maze spheres, but have sort of thematic look look to them (like a little planet of sorts, but as if a maze was carved into it) maybe a tropical maze sphere, a scifi one etc

    perhaps each world in addition to being a maze could have puzzles or goals or things to collect and do perhaps under pressure of a timer, and after completing whatever you need to in that maze (even just getting to the end) you finish on a pad that sort of beams you across to the next maze

    Comment


      #32
      Originally posted by McTavish View Post
      This is looking really great nowadays man but ...

      It looks kind of easy ? like theres only really one way to go ever ?
      As you can see in the image bellow the maze will be randomly generated and I will also try to connect some paths so it will have more then one way to go and an infinite number of mazes... well it's not infinite but it's big.


      Originally posted by Bawsson View Post
      really nice work so far, i know you probably have your own gameplay ideas and future plans but after watching the videos a bunch of ideas popped into my head and i thought i would just spurt them here anyway if thats ok with you ;P

      i imagine at a later date you could craft some really nice possibly larger maze spheres, but have sort of thematic look look to them (like a little planet of sorts, but as if a maze was carved into it) maybe a tropical maze sphere, a scifi one etc

      perhaps each world in addition to being a maze could have puzzles or goals or things to collect and do perhaps under pressure of a timer, and after completing whatever you need to in that maze (even just getting to the end) you finish on a pad that sort of beams you across to the next maze
      Thanks for sharing your ideas Bawsson. I thought I knew how I want to game to play like but as I move forward with the project I'm changing my design plans. Jumping from maze to maze will be done using the mouse, not with a beam. Although the idea is nice it's a little too futuristic for the style I want for the game.
      I will add stuff that you can collect to make you go in areas of the maze that you normally wouldn't go if the goal is just to reach the other end.
      And I plan to add enemies as well. I Pac-Man like clone might be more fun then rolling around in the maze looking for an exit.

      Anyway... here is an example of what my buildMaze functions does (in case you can't tell from the name... it's randomly building a maze).
      It's on a 2D plane atm, I'm working on wrapping it around a sphere (I also have to make it scroll horizontaly)

      Comment


        #33
        Hey Andrei,

        How are you doing, not spoke in a while! Like your latest project, some pretty cool original stuff. In a couple of months I should be able to show off my own UDK ventures.

        Comment


          #34
          Hey lookin good there Andrei, should be quite interesting to see where this ends up. Care to share your random maze generator source?

          Comment


            #35
            Looks good. I'm trying to do something similar (not wrapped around a sphere) to learn UDK, but I'm still trying to figure out how to make the player character into a rolling ball.

            Comment


              #36
              Originally posted by Psycho_Sam View Post
              Hey Andrei,

              How are you doing, not spoke in a while! Like your latest project, some pretty cool original stuff. In a couple of months I should be able to show off my own UDK ventures.
              Hi Sam. I'm doing great. Having fun with unreal script atm but can't wait to start making some models too I want to do this the right way though... so I promised myself I won't work on models until I have a working prototype that is fun to play.
              Can't wait to see what you have been up to

              Originally posted by zoltanjr View Post
              Hey lookin good there Andrei, should be quite interesting to see where this ends up. Care to share your random maze generator source?
              Sure.

              Code:
              simulated function bool buildMazeDFS(int prevPosH, int prevPosV, int currentPosH, int currentPosV)
              {
              	//if I'm changing the edge 
              
              	local int i; // used to move around in arrays and for loops
              	local int j; //used for the 4-var array that keeps the N, E, S, W for the Rand function
              	local int unvisitedTiles; //counter
              	local int idx_i;
              	local int idx_j;
              
              	j = 0;
              	unvisitedTiles = 0;
              	i = currentPosH + mazeSizeH*currentPosV;
              
              	TileStructArray[i].tileState = true; //making the current tile visited
              	TileStructArray[i].tileType = true; //makeing the current tile a floor
              
              	//Make the tile between the current tile and the previous tile a floor as well
              	//I'm on the same row
              	if(currentPosH == prevPosH)
              	{
              		if (prevPosV < currentPosV)
              		{
              			TileStructArray[(i-mazeSizeH)].tileState = true;
              			TileStructArray[(i-mazeSizeH)].tileType = true;
              		}
              		else if (prevPosV > currentPosV)
              		{
              			TileStructArray[(i+mazeSizeH)].tileState = true;
              			TileStructArray[(i+mazeSizeH)].tileType = true;
              		}
              	}
              	//I'm on the same column
              	if(currentPosV == prevPosV)
              	{
              		if (prevPosH < currentPosH)
              		{
              			TileStructArray[(i-1)].tileState = true;
              			TileStructArray[(i-1)].tileType = true;
              		}
              		else if (prevPosH > currentPosH)
              		{
              			TileStructArray[(i+1)].tileState = true;
              			TileStructArray[(i+1)].tileType = true;
              		}
              	}
              
              	//Putting in an array all the posible directions to go to
              	//Searching "N"
              	if((currentPosV-2) >= 0 && TileStructArray[(i-2*mazeSizeH)].tileState == false) 
              	{
              		nextDirArray[j].posH = currentPosH;
              		nextDirArray[j].posV = currentPosV-2;
              		j++;
              		//Building the fndArray
              		fndArray[fIdx_add].prevNodeH = currentPosH;
              		fndArray[fIdx_add].prevNodeV = currentPosV;
              		fndArray[fIdx_add].currentNodeH = currentPosH;
              		fndArray[fIdx_add].currentNodeV = currentPosV-2;
              		fIdx_add++;
              	}
              	//Searching "S"
              	if((currentPosV+2) < mazeSizeV && TileStructArray[(i+2*mazeSizeH)].tileState == false)
              	{
              		nextDirArray[j].posH = currentPosH;
              		nextDirArray[j].posV = currentPosV+2;
              		j++;
              		//Building the fndArray
              		fndArray[fIdx_add].prevNodeH = currentPosH;
              		fndArray[fIdx_add].prevNodeV = currentPosV;
              		fndArray[fIdx_add].currentNodeH = currentPosH;
              		fndArray[fIdx_add].currentNodeV = currentPosV+2;
              		fIdx_add++;
              	}
              	//Searching "E"
              	if((currentPosH+2) < mazeSizeH && TileStructArray[(i+2)].tileState == false)
              	{
              		nextDirArray[j].posH = currentPosH+2;
              		nextDirArray[j].posV = currentPosV;
              		j++;
              		//Building the fndArray
              		fndArray[fIdx_add].prevNodeH = currentPosH;
              		fndArray[fIdx_add].prevNodeV = currentPosV;
              		fndArray[fIdx_add].currentNodeH = currentPosH+2;
              		fndArray[fIdx_add].currentNodeV = currentPosV;
              		fIdx_add++;
              	}
              	//Searching "W"
              	if((currentPosH-2) >= 0 && TileStructArray[(i-2)].tileState == false)
              	{
              		nextDirArray[j].posH = currentPosH-2;
              		nextDirArray[j].posV = currentPosV;
              		j++;
              		//Building the fndArray
              		fndArray[fIdx_add].prevNodeH = currentPosH;
              		fndArray[fIdx_add].prevNodeV = currentPosV;
              		fndArray[fIdx_add].currentNodeH = currentPosH-2;
              		fndArray[fIdx_add].currentNodeV = currentPosV;
              		fIdx_add++;
              	}
              
              	if(j == 0) //No more directions available to go to
              	{
              		//Check for every 2*i on odd rows array items and see if all of them are visited
              		for (idx_i = 0; idx_i < mazeSizeH*mazeSizeV; idx_i+=mazeSizeH*2)
              		{
              			for (idx_j = 0; idx_j < mazeSizeH; idx_j+=2) 
              			{
              				if(TileStructArray[(idx_i + idx_j)].tileState == false) 
              				{
              					unvisitedTiles++; //if the tile is not visited increment unvisitedTiles
              				}
              			}
              		}
              
              		if (unvisitedTiles == 0) return true; //no other path available
              		else
              		{
              			unvisitedTiles=0; //reset unvisitedTiles
              			fIdx_rem++; //go to the next saved direction
              			//if the next array item is visited jump to the next one
              			while (TileStructArray[(fndArray[fIdx_rem].currentNodeH + mazeSizeH*fndArray[fIdx_rem].currentNodeV)].tileState == true && fIdx_rem <= fIdx_add)
              			{
              				fIdx_rem++; //look for an unvisited tile to generate the maze from
              			}
              			//`Log("Sending: " $ fndArray[fIdx_rem].prevNodeH $ fndArray[fIdx_rem].prevNodeV $ fndArray[fIdx_rem].currentNodeH $ fndArray[fIdx_rem].currentNodeV);
              			buildMazeDFS(fndArray[fIdx_rem].prevNodeH, fndArray[fIdx_rem].prevNodeV, fndArray[fIdx_rem].currentNodeH, fndArray[fIdx_rem].currentNodeV); //recursively call the buildMazeDFS() function
              		}
              	}
              
              	else
              	{
              		j = Rand(j); //randomly chose one of the directions available from the current tile
              		buildMazeDFS(currentPosH, currentPosV, nextDirArray[j].posH, nextDirArray[j].posV); //recursively call the buildMazeDFS() function
              		//I must RETURN only if there are no nextDirArray available
              		return true;
              	}
              }
              Keep in mind that it gives some warnings and since I'm a 3D artist... it might not be the best way to do it... but it works
              EDIT: There are also some class vars and structs. If you have any questions let me know.
              Code:
              struct native Tile 
              {
              	var bool tileState; // FALSE: Not Visited; TRUE: VISITED
              	var bool tileType; //FALSE: Wall, TRUE: Floor
              
              	structdefaultproperties
              	{
              		tileState = false
              		tileType = false
              	}
              };
              
              var array <Tile> TileStructArray; //all the tiles in the maze, floors and walls
              
              struct native nextDir
              {
              	var int posH;
              	var int posV;
              };	
              var array <nextDir> nextDirArray; //used to build the path
              
              struct native futureNextDir
              {
              	var int prevNodeH;
              	var int prevNodeV;
              	var int currentNodeH;
              	var int currentNodeV;
              };
              var array <futureNextDir> fndArray; //holds all the possible directions in the game
              //using fIdx to move around in fndArray
              var int fIdx_add;
              var int fIdx_rem;
              
              var int mazeSizeH;
              var int mazeSizeV;
              Originally posted by Oaf View Post
              Looks good. I'm trying to do something similar (not wrapped around a sphere) to learn UDK, but I'm still trying to figure out how to make the player character into a rolling ball.
              All I had to do to make that work was to use a KActor and AddForce:
              Code:
              KActorVar.StaticMeshComponent.AddForce(vector);

              Comment


                #37
                Hmm...I'm panning on making a ball game to so that line might be helpfull If I know how to use it.

                Nope, could you make it clear how to on us newer users?

                Comment


                  #38
                  sweet, excellent work

                  Comment


                    #39
                    I made some more progress with my little project (check the first post on the first page)
                    I have some problems at the moment with the player not getting Touch events. I get touch events between the white dots and the walls of the maze but not from the red ball. The classes are almost identical. The difference is the method of spawning... I hope I can figure this out soon so I can implement the score system and implement more end game conditions.
                    After that comes the enemies and power-up part.

                    Cheers,

                    Andrei

                    Comment


                      #40
                      This looks great. A lot more original than my Pac Man clone.

                      Comment


                        #41
                        Originally posted by mikepurvis View Post
                        This looks great. A lot more original than my Pac Man clone.
                        Thanks. Your PacMan project looks really cool too.
                        When I started looking into UDK I wanted to try a Pong clone but somehow I ended up with a maze, and the PacMan gameplay fits perfectly with this... so I'm going with it.
                        Thanks for sharing your knowledge on the blog. I will help me a lot once I start adding enemies.

                        Comment


                          #42
                          I added enemies and power-ups.
                          Watch the new video here: http://www.youtube.com/watch?v=CnymCd9gDeU&hd=1
                          The game starts with a fixed number of enemies and every 5 seconds a random enemy replicates and drops a power-up.
                          The power-ups are Mist (you become invisible for 3 seconds to the enemy), Shock wave (you push away all the enemies that you touch) and Electric Shock (you kill the enemies you touch).
                          At the moment you have to use keys 1,2 and 3 to trigger the power-ups but I want to change that. Most of my friends that played the game said it was hard to keep track of what power-ups were available and didn't know what key to push to avoid being killed by the enemies. I'm thinking of doing it like in Pure: you have a bar that fills up, if it's full and you pick up a new power-up you get the next level of power (Mist - ShockWave - ElectricShock). This way you only have to use Space to trigger the current power-up.
                          The down side of this is that you don't have the current freedom to trigger the power-up you want. I noticed, for example, that I like to trigger the Kill power-up every time I'm close to more then 3 enemies. This way I know I can kill a lot of enemies with a single power-up. And if I have an Electric Shock and Mist and there's an enemy in my way I can use Mist because I don't want to waste a powerful power-up on a single enemy. So the strategic part of the game suffers a little because of this.
                          Overall I'm not happy with either... I hope to find a better way to make it easy to use but flexible at the same time.

                          I also have a cool story and a name for the game but I will reveal that later (probably after I have an official site for the game).

                          Comment


                            #43
                            New video of my game running on iPod Touch 4G http://www.youtube.com/watch?v=b2VL7UhvXro

                            Comment

                            Working...
                            X