Jump to content



0

Collision (updated actually DO need help)


5 replies to this topic

#1 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue Jul 29, 2008 1:52 PM

Sorry.. edited post. I got it to work. I wasn't indenting my if then statement for collision.

Edited by yuppicide, Tue Jul 29, 2008 2:18 PM.


#2 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue Jul 29, 2008 2:17 PM

Alright since I've opened this post up I actually do need help with collision..

I can't figure out how to get it to work.

I have tried several things with no luck.

One of the things I've tried

 if collision(playfield,player0) then reboot

I put this right after my joystick routine. This causes garbled image on the screen and the game just sits there.

I've also tried putting t=1 in the beginning of my game. Then I wrote

 if collision(playfield,player0) then t=t-1

 if t=0 then reboot

Same garbled output.

The next thing I've tried is

if collision(playfield,player0) then goto deaths

then later on

deaths
 reboot

All three freeze game with same garbled output. What am I doing wrong?

Attached Files


Edited by yuppicide, Tue Jul 29, 2008 2:19 PM.


#3 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Jul 29, 2008 2:21 PM

Can you post your .bas file?

Oops. I see you just did that.

Edited by Random Terrain, Tue Jul 29, 2008 2:22 PM.


#4 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Jul 29, 2008 2:41 PM

After playing around with your code, I get the same result. It seems Superchip games don't like reboot. I guess you'll have to reboot the way we used to before we had reboot, where you jump to the beginning of the program with a goto and start the game over that way.

I haven't used Superchip RAM or gone over 4k so far, so I don't know a whole lot about this area yet.

#5 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,236 posts
  • begin 644 contest

Posted Tue Jul 29, 2008 4:17 PM

The problem is that Superchip RAM is not cleared at boot, and you'll get a screen of random data if you do a drawscreen before you do any playfield drawing commands. What seems to be happening is you're constantly rebooting. Try a pfclear at the beginning of the code or make sure one of your playfield: commands gets executed before the first drawscreen.

#6 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue Jul 29, 2008 7:49 PM

Thanks guys that PFCLEAR did the trick. Things are coming along nicely and I'm learning some things good.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users