Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Level editing in Breakout

Author
Message
Smirkenorff
22
Years of Service
User Offline
Joined: 16th Feb 2003
Location: United Kingdom
Posted: 20th Feb 2003 20:09
I am making a Breakout clone, and have got the main game working, but I'm not sure how to edit the levels efficiently. I have made it so that the template level is 10 bricks across and 12 bricks up (which, by the way, gives a pathetic 18 FPS). I have a boolean array (0s and 1s) for bricks hit, and have filled it within an 'if level=1' command with the bricks that are automatically miissing at the start of each level. However, I'm not sure how best to fill the array. For/Next commands are only practical if I wanted to chop away portions, leaving square sections of bricks, but how should I fill the array if I want to choose each individual brick, so that they make up more intricate patterns? Would I have to use a data command? And if so, please explain how, because the data command keeps whooshing over my head every time I try to learn it.

In other words, how can I fill random, programmer-defined entries of a boolean array with the value, '1' without taking up thousands of lines of code?

Login to post a reply

Server time is: 2025-08-08 20:39:16
Your offset time is: 2025-08-08 20:39:16