SwordRobot Posted November 29 Share Posted November 29 (edited) 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 November 29 by SwordRobot Quote Link to comment https://forums.atariage.com/topic/376640-problem-increasing-ai-speed-with-score-increase/ Share on other sites More sharing options...
LatchKeyKid Posted November 30 Share Posted November 30 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? Quote Link to comment https://forums.atariage.com/topic/376640-problem-increasing-ai-speed-with-score-increase/#findComment-5575314 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.