Missile-Commander Posted May 22, 2015 Share Posted May 22, 2015 So I'm tinkering with batari for the first time, and have gotten past the ENORMOUS headache of compiling issues to actually be able to make some neat little things. one of my sprites i.e. the player is even animated and looks awesome. I've got a second sprite however, that is making me go crazy. I am 100% new to coding in general, but this is something that I really want to successfully accomplish. Anyway.. the whole thing I want the main player to be able to do is chase mice and "munch" on them to earn as many points as possible before a timer runs out(I'll figure that out later) So far I've gotten my cat to be able to move everywhere flawlessly. the mouse just shows up right now and is chilling out. my question: How can I make it so that when the cat comes in contact with the mouse the player gets their points/ How can I get the mouse to "run away" from the cat and re-spawn when "eaten"? Forgive me for being a complete noob, but I'm at the point where I'm completely stuck, and google has run out of answers. The attached file is what I've come up with so far. Thanks!!!default.bas Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted May 22, 2015 Share Posted May 22, 2015 Have you checked out any of the example programs on the bB page? randomterrain.com/atari-2600-memories-batari-basic-commands.html#example_programs Quote Link to comment Share on other sites More sharing options...
Missile-Commander Posted May 22, 2015 Author Share Posted May 22, 2015 Have you checked out any of the example programs on the bB page? randomterrain.com/atari-2600-memories-batari-basic-commands.html#example_programs I have. The closest thing I've found is the Bresenham movement codes but that's still not what I'm going for. If I could find some way to do the opposite of that movement, where the target is moving away rather than coming closer that would be exactly what I need to continue. In the mean time I'm trying to poke at that code to see if I can reverse it somehow. Quote Link to comment Share on other sites More sharing options...
Missile-Commander Posted May 22, 2015 Author Share Posted May 22, 2015 Any help however, would be really awesome Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted May 22, 2015 Share Posted May 22, 2015 If you want a sprite running away from another sprite without anything fancy, all you need to do is use some if...thens. If the chase sprite x is less than running away sprite x, then move the running away sprite to the right, and so on. Quote Link to comment Share on other sites More sharing options...
Missile-Commander Posted June 6, 2015 Author Share Posted June 6, 2015 ..and I think I love you. Thanks! haha. it feels crazy trying to learn all of this from scratch and actually do it at the same time. It's going to feel SO awesome to play my own game in a 2600 console though. 1,000% worth it. Quote Link to comment Share on other sites More sharing options...
bogax Posted June 7, 2015 Share Posted June 7, 2015 I have. The closest thing I've found is the Bresenham movement codes but that's still not what I'm going for. If I could find some way to do the opposite of that movement, where the target is moving away rather than coming closer that would be exactly what I need to continue. In the mean time I'm trying to poke at that code to see if I can reverse it somehow. set up the move as if it were the cat moving towards the mouse but then apply it to the mouse movement Quote Link to comment Share on other sites More sharing options...
Arenafoot Posted June 24, 2015 Share Posted June 24, 2015 So I'm tinkering with batari for the first time, and have gotten past the ENORMOUS headache of compiling issues to actually be able to make some neat little things. one of my sprites i.e. the player is even animated and looks awesome. I've got a second sprite however, that is making me go crazy. have a ROM yet? 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.