Jump to content
IGNORED

Enemy random movement


boski

Recommended Posts

This game is still in the relatively early stages of development. I want to get the enemy movements down, though, before I go any further. I've got a three level playing field, and I want the enemy to patrol it. Whenever he hits the edge of the screen, I want him to reappear at a random side of a random level. So six possible outcomes. Unfortunately, he only wants to appear at about three of the options, and he often gets stuck. I can't quite figure this one out, so if someone could take a quick look for me, I'd really appreciate it. Thanks!

balloon prot.bas

Link to comment
Share on other sites

Ok this should be a good example to get things going properly, your guy has 16 possible exit locations actually.

Also I would not bother with the background as multicolored playfields look far nicer I think :)

but to each his own.

 

Hope this helps!

 

[edit]There are a couple typos in there, nothing major.

Change 
 if !GFXtimer then goto skip_enemy_reverse 
to
 if !GFXtimer{1} then goto skip_enemy_reverse 

That line is meant to slow down the motion of the enemy to every 3 frames

balloon.bas

balloon.bin

Edited by ScumSoft
  • Like 1
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...