Jump to content
IGNORED

Help me please :P


RHillFake

Recommended Posts

Hey guys!

I have a few questions involving Visual batariBasic. 1) How would I make gravity on player0 (the player/sprite1) and only on him? 2)In my game, the player has to avoid the playfield and land safely on player1 (landing pad/sprite2). How would I make it so when you land on it, you win? 3) The music making software doesn't work. How would I fix it?

 

Thanks!

RHillFake

Link to comment
Share on other sites

(1) The simulation of gravity has to be programmed, so if you want only player0 to be affected by the simulated gravity then don't include the other sprites' movements in the program logic for the gravity. As far as how to program simulated gravity, I think there are some threads that discuss this, along with some source code.

 

(2) You'll want to use collision detection to identify when player0 and player1 are colliding, then branch to a "game won" routine when they've collided. You might also want to detect when player0 and the playfield are colliding, then branch to a "game lost" or "spare life lost" routine when they've collided.

 

(3) I'm not sure about this one, but if I remember correctly you need to be sure you're using the right version of the music utility software for the version of Visual Batari Basic that you're using.

  • Like 1
Link to comment
Share on other sites

Either this...

 

acceleration = force(time, position) / mass
time = time + timestep
position = position + (timestep * velocity)
velocity = velocity + timestep * acceleration

 

or this...

 

acceleration = force(time, position) / mass
time = time + timestep
position = position + (timestep * (velocity + timestep * acceleration / 2))
newAcceleration = force(time, position) / mass
velocity = velocity + (timestep * (acceleration + newAcceleration) / 2)

 

should help with calculating gravity

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...