Self Generating Map Help

cBrookscBrooks Member, PRO Posts: 40
Hello guys! I am planning on making a game where you are a car in a zombie infested city and you have to escape. It is 2D and all the controls are is drop a bomb and shoot zombies behind you and jump over upcoming objects. I want the road to keep on generating more road and obstacles by random so the player can get as far as possible and I would also like it to get a bit harder the further you progress into the game. Thanks! (I'm not very experienced so please explain in simplicity) Here is a little thing to show you the layout: c=car _____=road o=obstacle z=zombie ^=where you're meant to jump.

______z___z__z________c___________^o_________^oo____________^o______________^oo_____

Comments

  • FajlajpFajlajp Member Posts: 666
    edited July 2013
    Is it top view or side view?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    check some tutorials on building an endless runner, it a very similar concept
  • cBrookscBrooks Member, PRO Posts: 40
    Its side veiw and I will check some tuts. Thanks!
  • cBrookscBrooks Member, PRO Posts: 40
    Guys I had a look and all I could find were templates that cost $10 that I currently don't have. If you know a free template or would like to explain to me I will be very grateful.
  • Asobu_GamesAsobu_Games PRO Posts: 261
    The best way to learn is by simply getting in there and having a go. :) It's great that you are so ambitious, but why not start with one element of the game. You could try just getting a character to jump on a scrolling road. It doesn't even have to be animated at this stage, it could even just be a colored square for your character.

    For the scrolling background you can make a road tile image (once again this can be very basic art for now) a bit wider than the width of the screen. Make it move from right to left and then disappear after it leaves the screen. Keeping spawning the same road tile every few seconds so they slightly overlap and make the impression of a continous scrolling road. Alternatively you could have a still road and make a dashed center line in the same 'spawn, move, destroy' loop. Though if you have any detail on the road (potholes, rocks etc) the whole road will need to scroll to look right.

    For the character jumping you just need to make sure they 'collide' with the road (or with an invisible hit box on the road) so they don't fall through the road and off the screen. Then set up a rule so that if you touch the screen or a jump button, the character accelerates at 90 degrees (up) and then after releasing the button or after a set time they would accelerate to 270 degrees (down). If the collisions are set up correctly the character should land back on the road and stop decelerating.

    Have a go at this and then you can add more elements/mechanics as you go to your game like obstacles, animations, life bar, weapons, etc. Good luck!
  • FajlajpFajlajp Member Posts: 666
    Do you have all the art ready? Because i will have some spare time so I could help you :) Then you will also learn something by looking what I've done :) Contact me as soon as possible if you are intrested :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Click the link in my signature I have a tutorial called jump and show you how to set up a platformer character to walk, jump et...
  • FajlajpFajlajp Member Posts: 666
    And yes it's free. Just send a pm with link to your images.
Sign In or Register to comment.