Sign in to follow this  
Foufs

Enemies and side scrollers

Recommended Posts

Foufs    140
Hey, I have been working on a 2D side scroller and I got to the point where I move my character around and the map scrolls with him woo! Now I was just wondering about something.. the map is just a bunch of 0s and 1s at the moment, but when it comes to the time to implement enemies, how do most side scrollers achieve this? Do they have them right in the map... like 3 = enemy? or do they have some sort of random enemy generator that generates enemies? Thanks, Fouf.

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
Do they have them right in the map... like 3 = enemy? or do they have some sort of random enemy generator that generates enemies?
Either should work, but I imagine it's more common to place them explicitly than to position them randomly. If you want to make it a little unpredictable but not completely random, you could have a mix of random and non-random placement, or you could specify spawn points in the level file and then spawn enemies using a randomly selected subset of the spawn points.

Really, it's up to you - I don't think there's any particular 'right' way of doing it.

Share this post


Link to post
Share on other sites
BeerNutts    4401
If you really want to make it easy, you should create a tool which creates your levels. then you would have your background, and you could scroll around in your background, and places your enemies where they should go.

In the end, it will be much faster to do this, then trial and error, guessing where enemies should go in your map file, running the game, and seeing your off by a few tiles or something.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this