Darkside
Neophyte
2 Posts |
Posted - May 19 2005 : 9:05:42 PM
|
Hey All, I'm new to this website, and I think it's a great website. Most of you guys are probably pro VB coders, but I am still reletivily newbish compared to you all. So, I am trying to code a game like this one:
http://www.addictinggames.com/hellfire.html
I pretty much got the player's movement and shooting down, but I still have to do collision detection of the enemy and vise versa. But the thing is does anybody know how to code the enemies and their actions and their shooting?
Also, does anybody know how to like prevent the entire game to freeze, when I press right in Key Down. Whenever I press the right arrow key, the player moves to the right, but like the bullet movement and my downward motion(Gravity) has froze. They don't run until I let go of the arrow key. Anybody know how to solve this?
P.S. I am just using VB.Net I am not using any stuff like DIrectX or Direct Draw or anything. (Basically no imports)
Thanks.
|
|
masterbooda
Swordmaster
277 Posts |
Posted - May 20 2005 : 05:08:51 AM
|
The problem is, we need some code or some example of the code you are using. There is nothing even the most expert coder can do for you until you produce some code. But I can infer from what you have typed, that you mainly have loop problems. It sounds to me like when the key is pressed, it stops right there and only processes what that key is doing. You need to put a break in that loop to allow the rest of your code to run. But I don't know if you are using some key event for key down or what, I really need to see more code to help you out...sorry.
peace out...
|
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Darkside
Neophyte
2 Posts |
Posted - May 20 2005 : 11:10:14 AM
|
Well, as of now. I don't have any code. I just want a 80 by 50 image to move around the 800X600 screen. It will also be capable of shooting. |
|
|
Threshold
Squire
USA
44 Posts |
Posted - May 20 2005 : 12:11:41 PM
|
"Code" is what programmers call the stuff that you write in your program to make things work. You have to have some code if you've got an error. The only way something can go wrong is if you have something to begin with. That something must be your code and that's what we need. |
Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun." |
|
|
sdw
Warrior
USA
160 Posts |
Posted - May 21 2005 : 1:33:39 PM
|
quote: But the thing is does anybody know how to code the enemies and their actions and their shooting?
Create an array of classes/UDTs, whatever floats your boat, to create the enemy template. Iterate the the array every frame to perform each bad guy's think process. During the process you update his position, determine if it's time to shoot, calculate whether he's dead--everything. You would conrol the bad guys, or sprites, much the same way I assume you're controlling your bullets. After certain events or circumstances, you create a bullet or add a bad guy to the appropiate containers (the arrays).
quote: Also, does anybody know how to like prevent the entire game to freeze, when I press right in Key Down. Whenever I press the right arrow key, the player moves to the right, but like the bullet movement and my downward motion(Gravity) has froze. They don't run until I let go of the arrow key. Anybody know how to solve this?
Like the others have said already, we need to see some code :) |
|
|
|
|