Game Is Generating Enemy Bullets From Already Killed Enemies?

Nov 24, 2009

I am creating a game for my class, it is above the level that I know a bit, but I have learned a lot from creating it.My problem is that when my user (doctor) sends out a bullet and it hits the enemy (the enemies are generated into a collection), the picturebox is disabled and no longer visible, but that picturebox spot in the collection for all the enemies is still there.

So when I generate a bullet and shot it from a random enemy in the enmCollection, sometimes that random enemy is one that is already been killed.I tried using enmCollection.Remove(..) whenever the collision with the enemy and a bullet occurs, but it gives me an overflow error or another error.

I've been trying for a day now.Everything in the game works correctly except for this.

[Code]...

View 2 Replies


ADVERTISEMENT

Game Is Generating Enemy Bullets From Already Killed Enemies

Nov 26, 2009

I am creating a game for my class, it is above the level that I know a bit, but I have learned a lot from creating it.

This is how it it works:

-Every time a timer ticks a picturebox is created and displayed on the form, the picturebox is added to a collection. These enemies then move down the form

-My character fires bullets, and when they hit the enemy the enemy and the bullet gets disabled and removed, but not from the collection

-I have another timer that when it ticks, a random number is generated between 1, and the enemy collection count, so that a enemy missile can randomly come out of an enemy

This all works, but after the enemies are hit and removed from view, bullets still get generated from spots where the enemies once where, so to me that means that the destroyed enemies still remain in the collection.

If I try to remove the picture box from the collection I get an error.

View 3 Replies

Making A 2D Game That Has A Player (me) That Shoots Bullets (pictureboxes) And Kills Other Enemies?

Apr 22, 2011

I am making a 2D game that has a player (me) that shoots bullets (pictureboxes) and kills other enemies. The problem is that when there are many bullets on the screen it gets very slow because it has to move every picturebox.

View 11 Replies

Make The Enemy Shoot Bullets?

Apr 13, 2012

I am currently making a game like the worlds hardest game but with a difference. I have made 9 levels so far and am doing the boss level and i cant figure out how to make the boss shoot "bullets".there are two types of bullets the boss can shoot bullet1 - moves in a constant speed to the left after being shot bullet2 - moves in a constant speed to the left after being shot and follows the player on the y-axis The boss only follows the player on the y-axis(I have done this)The boss only shoots bullet1 until his health is below 50 then he increases the rate at which he shoots and randomly shoots bullets between bullet1 and bullet2The only way to win this game is to collect coins which randomly appears in the map, after you get the coin you decrease the bosses health by 5 (I have done this)If the player touches bullet or the boss then the level restarts (I have done this)

View 5 Replies

VS 2008 - Protect Objects From Enemy Trying To Capture In Game

Jul 25, 2009

I am making this game where you have to protect objects from the enemy trying to capture them. I have a loop where a number is randomized from 1 to the current level the person is on. If that number is 50 then a new enemy is created and sent out to get an object. But my problem is if the level is getting higher and higher then the game will get easier and easier. I want it to get harder and harder.

View 8 Replies

Game Programming :: Getting Bullets To Manually Shoot By Pressing A Spacebar?

May 26, 2011

up to now I've have been running my bullets on automatic fire, through 4 separate timers.My Nxt major task is to make my space bar shoot bullets. I have tried attempting to code the spacebar, for the first bullet. I was thinking that when the spacebar is pressed it turns on a timer, thus the bullet is fired. Then when the bullet hits the top of the screen or an alien the timer is turned off and bullet location is reset. Now the bullet1 no longer fires.I find the logic complicated but it should work.

my variables:
Code:
Public BulletMovement As System.Drawing.Point

[code].....

View 7 Replies

Started Digging Into Worst Enemy SQL?

Aug 12, 2011

I've recently started digging into my worst enemy SQL. So far so good, was just curious how I would go about refreshing a gridview control which is tied to a sqldatasource. So you see if I wrote a new field in my database, how do I refresh the gridview to get that recent change?

View 2 Replies

Make Multiple Enemies Without Creating A Bunch Of Pictureboxe?

Nov 13, 2009

I have got one picture box to appear from a random point at the top of the form and move down the screen.

But how do I create an infinite amount of these enemies that will travel down the form?

The only way I know how is to just create a bunch of picture boxes and hide them all, and then each time a timer clicks one of them is visible, and starts traveling down the screen. There must be an easier way.

View 1 Replies

Know If Process Is Killed?

Apr 27, 2012

I am using registry to check if a user has successfully waited out the time limit, but this can easily be bypassed by killing the process in task manager.Is there a way to see if it has been killed?

View 4 Replies

Detect When A Process Is Killed?

Apr 11, 2010

Is it possble to detect if a process is killed? 'Cause I want to make so if a user shuts down the process "mspaint" (paint), two more paint will open.

View 3 Replies

Log When An Application Is Killed Through The Task Manager?

Jul 21, 2009

I was wondering if there is a way to log into a database when an application was killed using the task manager?

View 13 Replies

Close Another Application When The Main Process Has Been Killed?

May 3, 2011

I have a vb application(1) which is made to launch another software(2) with specified parameters, but i wanna keep my application opened as long as the 2nd one is opened too, and I also want to close the second one automatically if mine has been force closed by the user in windows taskmanager, on the desktop, or in any way.

So I need something which detects if windows is closing the program and kill the second application auto.

I would like to avoid the task manager block, because that isn't necessary for this i guess.

View 7 Replies

Copy Text With Bullets In OpenXml?

Oct 12, 2011

Text needs to be copied from 1 wordprocessing document to another wordprocessing document. The source document is not always accessible when inserting the text in the target part. The text is serialized and retrieved later on.

They way I currently do this is by copying the paragraphs elements and then appending them into the other document. This works fine unless bullets are involved. The bullets are not copied from the source to the target document.[code]...

I know that bullets are stored in the NumberingDefinitionsPart of the MainDocument part but my problem is how do I know which AbstractNum and NumberingInstance to insert in this NumberingDefinitionsPart?

View 1 Replies

Make My Character Shoot Bullets?

Nov 18, 2009

I have my character moving across the screen, I have enemies that randomly came at the character, and I have it so when the enemy collides with the character you loose a life.

But how do I have the character shoot bullets.

I know how to do the keypress, and make the bullets move with a timer. But I don't know how I can create an infinite amount of bullets that can fire.

View 4 Replies

Make Use Of Bullets In Labels And Textboxes?

Mar 22, 2010

How can I make use of Bullets in Labels and Textboxes? I want the user to enter text into a Textbox and after he/she is finished hit the Enter key, then a Label must display a Bullet followed by the text entered in the Textbox. Hendri Bissolati (Novice programmer)

View 3 Replies

VS 2010 - Way To Prevent My Program From Being KILLed In The Task Manager?

Mar 24, 2012

i created a windows blocker to prevent users access, and only give access to the computer for a certain time if they pay....In the block state taskmgr can not be accessed also no other method can close the blocker. but once the computer is unblocked for use it become vulnerable only to the taskmgr since i have to give access to the taskmgr when the program is not blocking access. Is there anyway to prevent my program from being KILLed in the taskmgr or is there a way to restart the blocker if the user KILLs the program?

View 14 Replies

RTB - Some Bullets Turn Yellow Other Stay Black

Jun 18, 2009

While using SelectionBullets in a RichtextBox I am experiencing some issues with FontColor and the SelectionBullets Color. For example I am selecting the entire text in the RTB and set it to FontColor Yellow - the font color itself is fine; the problem: some Bullets turn Yellow, some stay black. Would there be a way to have those Bullets permanently colored in black?

View 1 Replies

Made A Listbox, And Also A Custom Class Called "Enemies"

Mar 26, 2010

So I made a Listbox, and also a custom class called "Enemies". I used a Bindingsource to Bind "Enemies" to the Listbox. "Enemies has three properties which are: "Name as String, Health as String, and Dead as Boolean".The thing I need is when I add a Enemy to the listbox, I want the BackColor of the item to either be Red or Green, depending on if the Item.Dead property is false or true.

View 2 Replies

Write A Little Program That Checks For A Process - ,,Cheat Engine" Is Running The Process Is Getting Killed?

Oct 13, 2009

i am trying to write a little program that checks for a process and kills is.here is the

Dim p As Process = Process.GetProcessesByName("Cheat Engine")(0)
p.CloseMainWindow()[code]...

My problem is it�s woking ,yes if the programm ,,Cheat Engine" is running the process is getting killed.But if the program is not running my program crashes.

View 5 Replies

Game Programming :: Make A Game In VB In Which Character Can Move Around, Jump, And Kill Things?

Apr 2, 2008

im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?

View 4 Replies

VS 2010 Game Multi-Client - Program That Enables A Game To Have More Than One Instance Running

Nov 18, 2011

I want to make a program that enables a game to have more than one instance running, where it would otherwise be unable to be done. How should I go about this? A sandbox? Hack?

View 3 Replies

Game Programming :: Adding Score To Rock Paper Scissor Game?

Oct 3, 2011

Im new to VB. how do I get to add the score.my code is

[Code]...

View 6 Replies

Repeat Cards Showing Up In Game And Win Evaluating Code For Poker Game?

Jul 2, 2009

I am working on a poker game and I have the game setup the way I want it in terms of graphics and I have the code programed to deal the cards out exactly how I want them. Granted, the code is very simplistic, but functional for a new programmer like myself. I'm sure there are other more efficient ways to code my game, but I like mine so far because I can at least understand the majority of it. With that being said, here are a few problems and questions that I have.

1. How come when all 12 cards are dealt out I have some cards repeating in the game? For example, I get queen of diamonds in more than one picture box when I only want the card to be dealt once and then removed until the next game.

2. I was hoping to have a button 3 to clear all the boxes, basically resetting the game to the next game. When I hit button 3 it only clears the contents of picturebox 10 and 12.Other notes: I have the deal down the way I want it. It deals the first 10 picture boxes and a second button deals the 11 and 12 picture boxes.

3. I know this is my next step so I want to post it with the code I currently have. I want to start taking my project one step further by evalutating each of the three rows of cards (3 rows of 3 cards each - I'm not worried about the dealers hand (picture box 10, 11, 12 yet). So I want to evaluate a row of pictureboxes against a "pay scale" and display the win in a text box or label next to the 3 card hand. For example, Q of diamonds, Q of Clubs, Q of spades would win 15, etc. ( have a weird feeling I may have to change the names of the cards (I have them named card1, card2, etc. right now) to something that identifies them in order to evaluate the hands.

Here is the code that I currently have. I'm using visual basic.

Public Class Form1
Dim Rndm As New Random
Dim myPB(11) As PictureBox
Dim HiddenCards As New List(Of String)

[code]....

View 1 Replies

Game Programming :: Prevent Users Typing In Random Letters In A Text Box-Scrabble Game?

May 4, 2011

I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.

I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.

View 4 Replies

Game Programming :: Spinning Reel - Fruit Machine Game For Windows Mobile Device

Feb 16, 2011

I'm trying to make a simple fruit machine game for windows mobile device.

I can create the game easily enough and flip through pictures in a picture box to display the correct symbol.. but what I'd like to do is do a proper spinning reel, but have no idea where to even start.

What I have is a list of images in an imagelist (or individual files) - what I'd like is them attached to each other and moving downwards, preferably as though it were going around a drum but just them moving would be a start.

View 7 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies

Game Programming :: Pig Dice Game - When Program Runs - Never Goes To Computer's Turn And Does Not Update Users Score Either

Apr 18, 2012

On programming assignment without having any real experience in vb. I guess I don't understand subroutines that well. When the program runs it never goes to the computer's turn and does not update the users score either. This assignment is already in but would like to know what is going wrong. Using VB 2010, and this is windows application.

Code:
Public Class Form1
Dim Myturn As Integer
Dim Computerturn As Integer

[CODE]...

View 6 Replies

2D Platform Game Physics - Game Development | Dream.In.Code?

Mar 11, 2010

I'm trying to make a 2D platform game and I'm pretty inexperienced at programming. I've coded the player to move left and right and jump, but I can't figure out how to prevent multiple jumps while the player is in the air. Anyone know how to do this?

View 8 Replies

Game Of 21 Card Game, Code For Checking Score Is Not Working?

Jan 13, 2012

Check Score: The winner is the one with the highest score less than or equal to 21If both scores(player total and computer total) are over 21, or if both are equal but under 21, the game is declared a draw.

There is something wrong with this line:
If intPlayerCardTotal < intScore And intComputerTotal < intScore Then
MsgBox "Draw"

[code]......

View 6 Replies

Game Programming :: Changing Field Size A Game Should Restart

Apr 30, 2011

Upon changing the field size a game should restart. Upon trying to do so I see the previous grid (e.g. 10x10) displayed on top of the new one (e.g. 4x4). How would I prevent this and indeed start the game fresh?

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved