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.

2D All the way! / Trouble with Game

Author
Message
Nataku
22
Years of Service
User Offline
Joined: 12th Dec 2003
Location: Mesa, Az
Posted: 15th Jul 2004 09:05
In a game I am making, I am having trouble having the enemy fire at the ship the user controls. Any ideas of how to make it work?

"Where ever you go, may lady luck be with you."
zenassem
23
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 15th Jul 2004 13:59
I need more of a description of what the game design is like.


Nataku
22
Years of Service
User Offline
Joined: 12th Dec 2003
Location: Mesa, Az
Posted: 15th Jul 2004 14:54
It's a game that you are a ship flying around at the bottom, shooting up to the top of the screen at enemy ships. It's alot like the game galaxian for the ti-83+.

"Where ever you go, may lady luck be with you."
ToXic
23
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Australia
Posted: 15th Jul 2004 15:03
Its a bit hard to "make it work" if you do not supply the code you
are working on, we need to look at your code so we can find your
problem.

ToXic.
zenassem
23
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 15th Jul 2004 15:06 Edited at: 15th Jul 2004 15:07
Ok, Now many of those types of games the enemy didn't have to much artificial intelligence, and I imagine you want to give your game a more feel of intelligence.

What we need to do is give the perception of intelligence, yet keep it reasonable. Obviously we as programmers could program the game so that the enemy always hits the ship. But this is not that good or fun for the player. The same would hold true for most games; picture a hockey game where the goalie saves every possible shot, or a computer ai that scores everytime it shoots; not good. So how do we level things out without making the AI to complex for the given situation. I believe a possible answer is this

Let the computer enemy know the coordinates of the player ship, but in earlier levels make it so that the player gets a chance to update his/her position/firing... say, 7 times for every one time the enemy gets a chance to upate it's targeting. As the game increases in levels you can bring down the number of times you process the users input compared to the computers targeting routine say 6 times, 5 times, 4 times. To add more realism have a small percentage of error introduce into the computers ability to target the player, or you could have certain ships that have a better chance of accuracy. You could also decrease the accuracy for the enemy ships depending on a basic distance form the player and/or angle of attack.

I'm not exactly if this is what you are asking, or do you need specific code to sow how to have a bullet travel from the enemy to the target and then check for collsion?


Nataku
22
Years of Service
User Offline
Joined: 12th Dec 2003
Location: Mesa, Az
Posted: 28th Jul 2004 05:04
Well, things changed. The computer I had my code on crashed, and so now I get to spend the time rebuilding it. Thanks for the help anyway. By the time I'm ready again for the enemy shooting, it will be many months down the line.

"Where ever you go, may lady luck be with you."

Login to post a reply

Server time is: 2026-06-11 14:48:29
Your offset time is: 2026-06-11 14:48:29