Jump to content
IGNORED

Expanding Playfield definition for tile games?


jrok

Recommended Posts

I'm trying to write a tile-based adventure game, and was curious if there was any way in bB to use the "playfield:" definition to define the x,y positions of something other than a pfpixel.

 

For example, right now the playfield definitions use "X" and "." to define the on/off state of a pfpixel.

 

 playfield:
XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
X..............................X
X..............................X
XXXXXXX........XXX.............X
..............X...X............X
..............X...X............X
..............X...X............X
XXXXXXX........XXX.............X
X...............................
X...............................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
end

 

But I noticed that you could use just about any alpha-numeric symbol to determine value of the pixel, which will automatically be defined as "off" when compiled. For Example:

 playfield:
XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
X..............................X
X......................a.......X
XXXXXXX...1....XXX.............X
..............X...X............X
..............X...X............X
..............X...X............X
XXXXXXX........XXX........b....X
X........2......................
X...............................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
end

 

So my question is, would a superchip kernel be possible that would allow us to include user defined variables in playfield definitions? For instance, typing letter between a-z on a playfield could determine the starting location of a certain sprite or missile? I imagine such a kernel would have to use up two adjacent variables to perform that sort of function, but if you aren't using pfcolors or pfheights, could those vars be used? Or maybe I'm just thinking about this in the wrong way.

Edited by jrok
Link to comment
Share on other sites

I'm trying to write a tile-based adventure game, and was curious if there was any way in bB to use the "playfield:" definition to define the x,y positions of something other than a pfpixel.

 

For example, right now the playfield definitions use "X" and "." to define the on/off state of a pfpixel.

 

 playfield:
XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
X..............................X
X..............................X
XXXXXXX........XXX.............X
..............X...X............X
..............X...X............X
..............X...X............X
XXXXXXX........XXX.............X
X...............................
X...............................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
end

 

But I noticed that you could use just about any alpha-numeric symbol to determine value of the pixel, which will automatically be defined as "off" when compiled. For Example:

 playfield:
XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
X..............................X
X......................a.......X
XXXXXXX...1....XXX.............X
..............X...X............X
..............X...X............X
..............X...X............X
XXXXXXX........XXX........b....X
X........2......................
X...............................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
end

 

So my question is, would a superchip kernel be possible that would allow us to include user defined variables in playfield definitions? For instance, typing letter between a-z on a playfield could determine the starting location of a certain sprite or missile? I imagine such a kernel would have to use up two adjacent variables to perform that sort of function, but if you aren't using pfcolors or pfheights, could those vars be used? Or maybe I'm just thinking about this in the wrong way.

You can define the characters that mean "on" and "off," as described in the batari Basic help documentation, but right now there's no special compiler feature that lets you use different characters to mean different things than "on" and "off." It sounds like an interesting idea, but I'm not sure how that functionality could be added to the compiler.

 

Michael

Link to comment
Share on other sites

You can define the characters that mean "on" and "off," as described in the batari Basic help documentation, but right now there's no special compiler feature that lets you use different characters to mean different things than "on" and "off." It sounds like an interesting idea, but I'm not sure how that functionality could be added to the compiler.

 

Michael

 

Thanks for the info, Michael. I assumed this was pretty set in stone.

 

I've already begun work on a web-based level editor for my game that outputs bB formatted code. I will go ahead and incorporate this functionality into it. I'll try to generalize it as much as possible and shoot out a link when it feels like its reached a good place. I think it could be useful for certain types of Adventure-style games, and probably even for games like Combat with lots of selectable screens.

 

Cheers,

Jarod.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...