Jump to content
IGNORED

playerx:


yuppicide

Recommended Posts

Is it possible to do something like playerx: and I'll specify if x is 0 or 1? What would I need to do this? player{x}:?

If I understand your question, you want to declare player data but it could be for any player, then later you want to be able to say which player the data is for. In other words, you want to declare the player data generically, and share it for both players (or either player).

 

Yes, you can do that, but not in the way you described. There are two ways to do this:

 

(1) Go ahead and declare the data for player0 (or player1, if you prefer). Then set the playerpointer and playerheight for the specific player you want to use the data with.

 

(2) Declare the data using a data statement, rather than a player statement. Then set the playerpointer and playerheight for the specific player you want to use the data with.

 

I've already posted examples of how to do the first method, and I may have posted examples of the second method, too. Just search the batari Basic forum for information about sharing player data, or sharing sprite data. And I'll work up a few more examples and post them in this thread.

 

Michael

Link to comment
Share on other sites

I did a search, but so far turn up nothing but this thread lol.

 

I'll tell you what I am trying to do.. I'm designing a demo Marquee Mark and The Funky Bunch. It's a scrolling marquee maker.

 

The whole program resides in bank2, so you'd be free to use bank1 for your game. By just changing a few settings you'll have a title screen with scrolling letters.

 

Settings will include:

 

- Color - Self explanatory..

- Speed - Self explanatory..

- Scroll Type - The way your message goes across the screen.. there will be 3 or 4 different types.. such as scroll left, wavy, circles, etc.

- .. and your message of course.

 

What the program will do is have the letters stored in bank2 as playerx: statements. This way the program can set x to either 0 or 1 so it can draw two letters on a screen at a time. I could make it draw more letters at a time if I read up on those multisprite tricks I suppose, but for now just two letters. They will be evenly spaced apart. As one letter flies out of the "display area" a new letter will show up.

 

I will have the program on "gosub h i t h e r e s e a", which would call up those routines in bank2 to draw those specific letters.

 

I currently have made one font, but will have other fonts you can cut and paste into the code for a different look.

Edited by yuppicide
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...