Jump to content
IGNORED

Problem increasing AI speed with score increase


Recommended Posts

Hello!

 

I'm a batari newbie here, and I'm hoping that someone can provide some insight on the problem I'm stuck on. Essentially the program has player1 sprite follow player0 around the screen. Points are scored by "dragging" player1 over the ball in the center of the playfield. Points are subtracted when player0 and player1 collide. I would like to increase the speed of player1 sprite as the score increases (ideally incrementally every 100 points). I have been trying to do this with the statement "if score>100 then b=3" where b is one of the variables that controls the speed of the player1 simple AI. The lower the value of b (from 1-10) the faster player1 moves toward player0. My issue is that the if statement never seems to change the value of b to increase the speed. I've tried moving the statement to different locations in the main loop, calling the b variable in the loop and prior to the loop, etc.

 

I would highly appreciate any advice!

 

EDIT:

I *think* I figured it out? It looks like check to against the score I will have to break out the 6 digits into 3 sets of 2 and check them individual. Anyways, hello and salutations from a crusty old Atari enthusiast eager to learn about making stuff with these great old machines!

 

- RobotSword

 

 

mytest.bas

Edited by SwordRobot

I can't compile the program and am a fellow n00b here as well but it looks like you're only adding 1 to the score for each collision.   Do they happen enough to trigger the 100 score threshold you set in a timely fashion to notice the speed increase?  

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