+atari2600land Posted July 1, 2007 Share Posted July 1, 2007 While taking a break from Halloween Havoc, I tried to make an Adventure-styled world. But I've run into a bit of a snag because it won't recognize rooms 7-9 as actual rooms (see code), even though they have exactly the same coding as the other rooms. Why is this? Here's a map of the world (it's a small world, after all) b equalling 1 or 2 is for programming purposes. adv.bas Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted July 1, 2007 Share Posted July 1, 2007 it won't recognize rooms 7-9 There were two problems: (1) b wasn't always being set to 1 or 2 whenever you switched areas, and (2) the order of some of the ifs caused a to be updated more than once. A simple way to fix (2) would be to just add a goto at the end of each if to jump over the other ifs, but I was able to correct it by just rearranging them a bit. Michael adv.bas adv.bas.bin Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted July 1, 2007 Author Share Posted July 1, 2007 Thank you, Mike. I was just thinking about what, if any, purpose this game might have, and I'm hoping to make a cross between Adventure, Venture, and Skeleton + with this once Halloween Havoc is finished. A title might be "Tons of AdVentureS" Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted July 9, 2007 Author Share Posted July 9, 2007 (edited) OK, now suppose I want player0 to appear in a random room. I tried this: player0: 11110 end decide_c c=rand if c=0 then goto decide_c if c>10 then goto decide_c if c=1 then goto decide_d if c=2 then d=1 : goto main if c=3 then d=1 : goto main if c=4 then d=2 : goto main if c=5 then d=2 : goto main if c=6 then goto decide_d if c=7 then d=1 : goto main if c=8 then d=2 : goto main if c=9 then goto decide_d goto main decide_d d=rand if d>128 then d=1 if d<=128 then d=2 and then put if a=c && b=d then player0x=e : player0y=f (e and f are two values I determined at the start of the game) but if it appeared at all, it would only be in a few of them. What am I doing wrong? Edited July 9, 2007 by atari2600land Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted July 10, 2007 Author Share Posted July 10, 2007 I figured out that problem. I shouldn't be thinking when it's too hot. But now I have a new problem: Mr. Enemy Block is showing up at the top when he's supposed to be in the center of the screen. I think the problem lies in the get_g part. I think I got confused because there's no drawscreen and I'm trying to get a sprite to appear, and well, here. adv3.bas Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted July 11, 2007 Author Share Posted July 11, 2007 Sometimes trying again the next day is a key to success. Not wanting to think *too* hard, I just focused on getting Mr. Enemy Block to stand still on a random screen. Success! I'll work on getting him to move on a day less than 90 degrees. adv2b.bas adv2b.bas.bin Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted July 12, 2007 Author Share Posted July 12, 2007 Update: I managed to get the blue block moving, but there's two problems: 1. Sometimes there's no enemy (blue block) to be found 2. Sometimes the enemy is in the playfield. Could someone look at my code and tell me what I'm doing wrong and how to fix it? blox1a.bas 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.