This is a pretty old game that has been implemented a lot of times… I’d like to know how to do
the map. Usually you would make the map a lot of small peaces, but this is not… ?
Should the map just be the pixels then?
This is a pretty old game that has been implemented a lot of times… I’d like to know how to do
the map. Usually you would make the map a lot of small peaces, but this is not… ?
Should the map just be the pixels then?
Just store a boolean[width][height] based upon the x and y coordinates and store true if the pixel is “marked”.
It might be a bit quicker to draw it if you store the big rectangles instead, but I doubt you’ll run into speed issues.
Mike
This is basically what I’m making for the Android And ironically enough, I’m having speed issues
If you run into speed issues you can either
a) draw the background to a picture only when it changes instead of every frame
and/or
b) use direct byte access to the image when looping through the booleans and update the color when they are true (false just means keep the background color)
and/or
c) calculate the least number of rectangles necessary to draw the filled pixels once you complete a filled area