Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Single enemy works. But multiple enemies screw up upon hit.

Author
Message
Sho Ryu Ken
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 26th Jul 2005 08:47
OK, I need help. First what my game should do as of now, and then what it does.

OK, so the controls are a bit like the old Mega Man game (it's 2D, btw not 3D). Press up (W) to jump, right/left (a/d) to move right/left, down (s) to drop thru platforms, and a button(spacebar) to fire. But it's limited to just one screen; no scrolling stage. The enemies move back and forth and drop from platforms. When they hit the screen edge at the bottom they fly up a random distance and land on the platform below. What the player has to do is shoot the bad guys. Each time they get hit they inflate like a balloon a little and move a bit faster. Inflate big enough and they pop. Thing is, they try to do the same to you. So far, the enemies don't respawn yet, but the player is supposed to. Now here are my problems:

1.) The big problem. Shooting an enemy while others exist causes the enemy shot to quickly inflate to popping point while the others randomly inflate/pop. When only one enemy is left the damage system works normally. The player's damage works fine regardless.
2.)The player doesn't respawn properly. It either acts like normal except it hides the player sprite, or it waits several seconds too many before respawning the player up on a platform above the ground, but it should be ON the ground.
3.)When the enemies are fairly close to the player their shots will go right through the player doing absolutely no damage.

Could someone please look at the code below and help me?

Note: "rollers" are enemies and "damage" is the level of inflation, zero is none and 4 is popped (making 3 maximum inflation). Variables that start with the letter r are related to the enemy manipulation process, and the edata array stores variables for each enemy. The "types" and lives are variables I will implement later.
Also note: I am SonicFreak12, but I picked a different name for the forum, since my usual name didn't fit.
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 26th Jul 2005 10:47 Edited at: 26th Jul 2005 10:48
It would help to see some code. For some reason the link on the right doesn't work.

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
Sho Ryu Ken
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 29th Jul 2005 02:29
Woops... I'm a newb here so that's probably why it didn't show up. Hopefully it works now.
Sho Ryu Ken
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 4th Aug 2005 23:15
OK, maybe I try to post as a snippet...
Sho Ryu Ken
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 8th Aug 2005 03:31
Ummmmmm... Isn't there any way to get help around here?

Login to post a reply

Server time is: 2025-05-22 15:08:08
Your offset time is: 2025-05-22 15:08:08