Jump to content
IGNORED

Pitfall background?


Rabbit 2600

Recommended Posts

How does one go about making a detailed background like in Pitfall? Having things in the background but not having the player collide with it?

 

Most of the background scenes are drawn using the background (COLUBK) and the playfield, changing the colors from line to line as needed, and with the players thrown in at certain spots for greater detail-- such as the tree limbs. The player does collide with the playfield, but the program simply ignores those collisions. In fact, since the ground is drawn with the playfield, the player is almost *always* colliding with the playfield.

 

A collision doesn't "do" anything-- if you want something to happen when two things collide, you have to check for that collision and then tell your program to do the "something" when the collision occurs, but not do it if the collision doesn't occur. So if you don't want collisions between the player and the playfield to do anything, just don't bother checking for that type of collision.

 

On the other hand, you might want the collisions between the player and the playfield to do something when the playfield represents one thing, but not when the playfield represents something else. For example, if you're doing a "jumping" platform game with gravity, you might want the player to die if he falls and hits the ground at a certain speed (i.e., from a certain height), or you might want the player to "fall" unless he's colliding with the playfield (i.e., standing on the ground), etc.-- but you might also be using the playfield to draw background stuff and you don't want that stuff to affect the player. In that case, you'll need to do something like check the vertical position of the player and ignore the collisions if the player's vertical position doesn't coincide with where the ground is, or else-- if it's possible that the player might be colliding with some background stuff even though he's at "ground level" but there's a hole in the ground-- use pfread to check the area where the ground is to see whether those playfield pixels are on or off.

 

It's actually easier to do these sorts of things in assembly with a custom kernel, because with a custom kernel you could clear the collision registers from line to line, and check for collisions on a line-by-line basis (or more likely a zone-by-zone basis). But you can't do that with batari Basic's builtin kernels, so you have to find other ways to do it, like taking the vertical positions of things into account, or using the pfread function.

  • Like 1
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...