Jump to content

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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...