|
-
Oct 15th, 2003, 06:11 AM
#1
Thread Starter
Frenzied Member
Level files for BreakOut game...
Hi.
Anyone know if there's and easy way of creating level files for a breakout game. Right now I am entering all the coordinates of the blocks into a text file, and takes for ever just to make one level!
Please say there is an easier way....
my level file has the following format:
PHP Code:
xx // number of blocks
xx yy //coord of block
PS: the // comments doesn't exist in the real level file
-
Oct 15th, 2003, 06:32 AM
#2
how many variations of blocks are there?
if there are less than 255 (which I assume there are) then I would just store a marker for each potential block (one marker being for no block present).
eg:
assuming the format is:
width
height
one line of blocks
one line of blocks
...
and the block markers are:
A = space
B = standard block
C = indestructible block
the file could be:
5
3
BACAB
BBBBB
ABCBA
alternatively, you could write a level editor program to let you just draw the level files.
-
Oct 15th, 2003, 06:53 AM
#3
Thread Starter
Frenzied Member
I only have one type of blocks at the moment, so I will only need to set the coordinates....
And I think it would be easier to write the level manually than to write an editor for it
-
Oct 15th, 2003, 07:01 AM
#4
you might have only one type of block at the moment, but will you ever add more? if yes, it's best to allow for it now.
in terms of writing a level editor - how many levels are you going to create? if you use a file format like the one I suggested & it's more than 3 or 4, I would recommend doing an editor.
-
Oct 16th, 2003, 04:30 PM
#5
Addicted Member
if there are less than 255 (which I assume there are) then I would just store a marker for each potential block (one marker being for no block present).
255? wow what a keyboard, mine only has 96 different characters!
(because you're using characters in the level file)
I'm not tring to be an a$$ it just comes natural. I was just curious how you got 255.
N
-
Oct 17th, 2003, 04:12 AM
#6
that's a poor keyboard!
There are 256* characters in the Ascii chart, not all of them can be done directly on a specific keyboard key, but more than half can (note 'a' <> 'A').
To see more than just the ones on the keyboard just go into Character Map (under programs-accessories if it is installed), or search VB help for Ascii 
(and yes - I know that using ones that aren't on the keyboard would make it harder, but it's irrelevant for this game).
*256 characters allows 255 blocks, as one must be an empty space.
-
Oct 17th, 2003, 08:40 PM
#7
Addicted Member
ill count my keyboard and you tell me what im missing to make mine 'poor'.
alpha w/ shift = 52
numbers w/ shift = 20
misc characters w/ shift = 22
grand total: 94, guess i miss counted before.
255/2 > 94 so what are the ones im missing to be more than half?
and yes it is relivate seeing that not all ascii characters can be represented in a text file
we're splitting hairs here but i thought it was important to correct you when you said that. who knows if someone will find this thread, make a breakout game with ascii as level files and expect to easily make levels by hand.
NOMAD
-
Oct 20th, 2003, 03:52 AM
#8
Originally posted by NOMADMAN
[B]ill count my keyboard and you tell me what im missing to make mine 'poor'.
It was a joke, hence the 
(by the way, you forgot tab, and Alt-Gr versions!)
and yes it is relivate seeing that not all ascii characters can be represented in a text file
we're splitting hairs here but i thought it was important to correct you when you said that.
true - there are about 10 to 15 characters you cant put in a text file, and over a hundred more that you can't use by pressing a specific keyboard key.
who knows if someone will find this thread, make a breakout game with ascii as level files and expect to easily make levels by hand.
I don't see a game like this needing that many variations, as this style of game only needs 5-10 different types of blocks, maybe 5 colours of each (if different colours are used).
if for some reason there were more variety required, binary files would be much better.
-
Oct 20th, 2003, 05:01 AM
#9
-
Oct 20th, 2003, 06:03 PM
#10
As for the 'over a hundred more that you can't use by pressing a specific keyboard key [combination]', try using Alt+NumpadKey, NumpadKey, NumpadKey. NumpadKey being 0-9 on the number pad
(Ex. Alt+2, 1, 3 = ¨V [won't show up correctly here]).
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|