RHillFake Posted June 13, 2014 Share Posted June 13, 2014 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 Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 13, 2014 Share Posted June 13, 2014 (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. 1 Quote Link to comment Share on other sites More sharing options...
John_L Posted June 18, 2014 Share Posted June 18, 2014 Either this... acceleration = force(time, position) / masstime = time + timestepposition = position + (timestep * velocity)velocity = velocity + timestep * acceleration or this... acceleration = force(time, position) / masstime = time + timestepposition = position + (timestep * (velocity + timestep * acceleration / 2))newAcceleration = force(time, position) / massvelocity = velocity + (timestep * (acceleration + newAcceleration) / 2) should help with calculating gravity Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.