How can you design a level for a side-scrolling shooter?

Started by
11 comments, last by mk.jr.fan 10 years, 8 months ago

Sorry for the late reply (I thought the thread died).

So the way your describing it makes it sound like I would need to make a 2d array that holds every coordinate possible for the whole screen and then when drawing the bullets it would add one to each pixel that it hits and then afterwards I can just pull up a screen that shows the total outcome.

Now would it be smart or efficient to look into a way in which when I run the program I can have another screen pop up and that one will show just the heat map? The other way I could do it is when I press a button it will pause the game and show the heat map.

Advertisement

So the way your describing it makes it sound like I would need to make a 2d array that holds every coordinate possible for the whole screen and then when drawing the bullets it would add one to each pixel that it hits

Almost, but not quite. The thing we're interested in is how long a particular pixel has not contained any bullets or enemies. You can do that in several slightly different ways. The way I suggested was to increment every pixel on every frame, and when drawing enemies and bullets, setting those pixels in the array to zero.

Now would it be smart or efficient to look into a way in which when I run the program I can have another screen pop up and that one will show just the heat map? The other way I could do it is when I press a button it will pause the game and show the heat map.

You should be able to see the data in real time. Having to pause is not effective or convenient.

You could indeed use a side-by-side view, where the heatmap is visible beside the normal game view, but think I would rather draw a transparent heatmap on top of the normal view, so it's easy to identify exactly which areas are problematic.

Well the first idea was mainly going to be used to test if it was possible to do with my skill set (which it is). Now I was wondering would it be better to not go pixel by pixel, but instead make the dots go by the size of the bullet (mainly just the height, the width would equal the height)? This way I could clearly if the player could be hit or not by placing the player in that area.

Also,the way you described it on post #10, are saying that where ever the bullet is located set that pixel value zero? Then the higher the pixel value the colder that area is?

This topic is closed to new replies.

Advertisement