Jump to content
IGNORED

Help me slow down my game


jbs30000

Recommended Posts

OK, so I'm working on making an Atari version of the Tron arcade game (I've completed the tank and light cycle games so far). I'm in the middle of the cone game where you shoot away the rotating blocks and enter the MPC cone.

 

I have 4 rows of rotating blocks, the first and third rotate towards the right, and the second and fourth towards the left, but right now the block rotation is very fast and needs to be slowed down. However, whenever I try a for next loop it doesn't work, and if I use multiple for nexts then the screen flickers horribly. I can't put a drawscren inside the loops as the whole game just freezes and putting one before and one after just slows down moving the player, but the blocks still rotate too fast.

 

All help and suggestions are welcome. Thank you.

 

Oh, and for some reason, when you shoot, if you move your player, the missile changes direction until you stop :?

 

TestBas.bas

Link to comment
Share on other sites

Until someone is awake to help you, I wonder if this thread might be useful:

 

http://www.atariage.com/forums/index.php?showtopic=74267

That's a good thread to detail one of the biggest differences between the 2600 and other platforms. Using an empty loop to consume time is pointless, because the display MUST happen at regular intervals. Instead, you check a frame counter (# of screens drawn) against another value to see if the movement portion of the game should be executed. This other value can be static, or variable amount.

With the game it's based on, you'd probably want it to be a variable amount of frames to skip movement on (so it gets faster as you progress to higher levels). If you already have a level counter set up, this wastes no additional ram...you could just read the check value from a table in rom (using the level # as an index).

Link to comment
Share on other sites

Oh, and for some reason, when you shoot, if you move your player, the missile changes direction until you stop

 

From first glance, it appears that your player movement lines are causing it:

 

 

PlayerLeft

player0x = player0x - 1: missile1x = missile1x - 1

if joy0up then Sprite_PTR = 0: goto West else Sprite_PTR = 1: goto NorthWest

PlayerRight

player0x = player0x + 1: missile1x = missile1x + 1

 

 

 

Since the missile's initial location is already set up when you fire, is there any particular reason that updates are happening on these lines?

Link to comment
Share on other sites

Until someone is awake to help you, I wonder if this thread might be useful:

 

http://www.atariage.com/forums/index.php?showtopic=74267

That's a good thread to detail one of the biggest differences between the 2600 and other platforms. Using an empty loop to consume time is pointless, because the display MUST happen at regular intervals. Instead, you check a frame counter (# of screens drawn) against another value to see if the movement portion of the game should be executed. This other value can be static, or variable amount.

With the game it's based on, you'd probably want it to be a variable amount of frames to skip movement on (so it gets faster as you progress to higher levels). If you already have a level counter set up, this wastes no additional ram...you could just read the check value from a table in rom (using the level # as an index).

Right now I'm keeping things,well basic, no pun intended. For the moment all the games don't get harder, you either win or lose and then go back to the main screen where you can choose to play them again.

After I finish this and the spider game I'll post the whole thing, then go back and rewrite the code for each game, pretty much from scratch to make it more efficient (the tank code is horribly bloated) and to make each level harder.

 

Anyway, I think using a frame checker will help solve another problem I've been trying to figure out. I've been trying to figure out how to time the cone dropping downwards like it does in the arcade game. Thanks.

Link to comment
Share on other sites

Oh, and for some reason, when you shoot, if you move your player, the missile changes direction until you stop

 

From first glance, it appears that your player movement lines are causing it:

 

 

PlayerLeft

player0x = player0x - 1: missile1x = missile1x - 1

if joy0up then Sprite_PTR = 0: goto West else Sprite_PTR = 1: goto NorthWest

PlayerRight

player0x = player0x + 1: missile1x = missile1x + 1

 

 

 

Since the missile's initial location is already set up when you fire, is there any particular reason that updates are happening on these lines?

D'oh! That's code that was supposed to be eliminated earlier on. Guess I wasn't paying enough attention. Thank you.

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