Creating Projectile - Make A Space Invaders Rip Off

Apr 10, 2009

I'm trying to make a space invaders rip off, and I'm currently stuck on how to make the missile fire from the center of the player's ship. I have the missiles all in a control array, and they move up the screen fine, they just dont start at the x point of the ship, they start on the left margin.

Dim Line As Integer

If Missile(0).Location.Y < 391 Then

Missile(0).Location = New System.Drawing.Point(Line, Missile(0).Location.Y - 5)

[CODE]...

View 8 Replies


ADVERTISEMENT

Creating A Space Invaders Game That Has A Group Of "invaders" Moving Side To Side?

Dec 2, 2009

Im creating a space invaders game that has a group of "invaders" moving side to side and when i shoot one it gets destroyed, my invaders are in an array. So in order for the invaders to keep moving right until they get to the edge, i made a function that detects which invader is right most. But this was crudly done as I wa trying to make the opposite of my left most function which works. So my rightmost function dosent work

[Code]...

View 19 Replies

VS 2010 Space Invaders Queries?

Oct 15, 2011

I've got everything working except this one problem which I can't seem to get my head around.I've made a function that returns a random number between 1 and 11 (how many invaders there are on a row).I've managed to get this to work, however the invaders will keep firing even if they are visible, so I made a do until loop which says to keep running the random number until it finds an invader which is visible... The problem is that if the whole row of invaders aren't visible, it will get stuck in the loop.

View 13 Replies

Simple 2D 'Space Invaders' Clone In Silverlight

Mar 17, 2011

I want to make a simple 2d game in Silverlight, but it seems like things have changed since the last time I tried to make a game using mode 13h graphics. Can someone give me a run-down of how you'd go about it.I just mean at a high-level, focusing on the silverlight-specific aspects; not general game design.A fictional example might be:'The main game loop shouldn't be a loop, use a DispatchTimer instead. Use a Canvas as the main drawing object; but realize that we don't bother drawing individual pixels - all of your in-game objects should be represented by controls. Be sure to set the 'UseHardwareFlag' to true'.

View 1 Replies

Game Programming :: Space Invaders .NET Compact Framework?

Oct 2, 2008

i'm not very familiar with GDI+, but i managed to create some basic functions of Space Invaders game i try to develop in Compact Framework. I have problems drawing the images (Spaceship, bullets, enemies). The screen is flashing a lot. I use a buffer bitmap in which i draw images to the new positions, and i have 1 line of code that just draws the buffer to screen

[Code]...

i use me.Invalidate inside a timer so every 50msec the game redraw the screen with new positions. Why the buffering does not work?? It can't be the emulator that i preview the program, it is flashing A LOT. Is there any similar code / project that could help me? i'm tring to find a similar project for COMPACT FRAMEWORK but i only find C++ .net examples. i need VB .NET COMPACT FRAMEWORK examples

View 2 Replies

VS 2010 : Space Invaders Alien Loops/arrays?

Oct 2, 2011

Been given an assignment to create a space invaders game. Although there's a long way around, is there a way to make my code smarter.Here's the section to make a row of invaders so far:

Public Class Form1
'number of invaders in a row (horizontal)
Dim numberofinvaders As Integer = 11
'set of invaders (vertical)

[code]....

So what I want to do more precisely is have the value of setofinvaders to change how many rows of invaders vertically in a loop.

View 13 Replies

VS 02 / 03 Checking ".Left" Of Whole Object [Space Invaders]

May 20, 2009

What I mean by "Checking ".left" of whole object" is making something happen if, for instance, a label were to hit an object. Instead of it needing to hit at the objects exact left, it could hit anywhere on the object. Bit confusing...I know...here is an example...

[Code]...

View 5 Replies

Make An Invaders-like Game With VB 2010?

Jan 10, 2010

i am currently trying to make an invaders-like game with visual basic 2010.I've managed to make one alien (picturebox16) dissapear when the coordinates of the arrow (picturebox1) kinda matches the coordinates of the 16th alien, however, the second alien(above it) doesnt dissapear(picturebox4)?

View 2 Replies

Projectile Motion - Make A Game Similar To The Impossible Game?

May 19, 2011

I'm doing a project for school. I'm trying to make a game similar to the Impossible game. I need a square (picturebox) to jump but I want gravity to effect it.

View 1 Replies

Projectile Motion In VB?

Feb 8, 2010

What I'm trying to do is simulate projectile motion in Visual Basic using Visual Studio. Essentially, something like this but without air resistance or mass.

Anyhow, the way I'm doing it is using a PictureBox and drawing the image in (of, say, a circle) every so often with a timer of interval 1 with its x and y properties being variables calculated by the formulas.

I want to know what formulas I can use to assign to x and y so that I get a movement like the one on the example. I've tried a bunch of stuff, with help from wikipedia and other sites, but can't seem to pull it off.

View 4 Replies

Get A Certain Text Inside A Textbox To Equal That Text Space To Space Or Null To Space?

Sep 25, 2011

How would i get a certain text inside a textbox to equal that text space to space or null to space?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Textbox1.Text.StartsWith(Textbox2.Text + " ") And Not String.IsNullOrEmpty(Textbox2.Text) Then
Textbox1.Text = Textbox1.Text.Remove(0, Textbox2.TextLength)
Textbox3.AppendText("a")
End If

Btw: after i finish this step my project will be finished!

View 4 Replies

Drawing Projectile/Missile GIF Image Causes Lag

Nov 18, 2011

Been experimenting using VB.Net to make a game, Got most of it figured out but now my method of shooting missiles causes a terrible lag, This is how i'm doing it now.

Declares Private missiles As New ArrayList()
Dim canFire As Boolean = True

Fire

[CODE]...

Move all the missiles X positions + 1

Try
For Each pic As PictureBox In missiles
pic.Location = New Point(pic.Location.X + 1, pic.Location.Y)
Next
Catch ex As Exception
End Try

I have a timer making canFire true every second. It is a GIF Image, I tested with a PNG image and the lag is barely noticeable. Is there a better way to draw them while still being able to use GIF images?

View 5 Replies

VS 2008 Create Projectile For Cannon Game?

Apr 8, 2011

If I have a starting X/Y position and enter an angle and power, I want to determine the X/Y positions for a cannon to follow. I have seen many sites on this but no straight code to use. Anyone have an example of this? I just want the X/Y posiitons in small steps - not far apart from each other.

View 6 Replies

Make It Have A List Of Space Craft?

Sep 4, 2011

I have the design view started but not finished - but I am not sure how to do it.I am new to VB and dont really know how to do much... I want to make it have a list of space craft. It will be 2 main categories... Jump Ships / Drop Ships. Jump Ships will need to be a random number of them pulled from the list (1+ jump ships) but each one has a number of Drop Ships it can carry. Drop Ships will need to be less than or equal to the number of slots on the combined jump ships. So if it pulls up 1 jump ship that jump ship can carry 1-9 drop ships and then it needs to randomly list that many drop ships from the list of drop ships. Then each drop ship can carry certain types of military units - lets call them A, V, M, I.When it makes the list I would like it to pull a random jumpship (preferably 1-3 from the list), then it needs to check how many dropships that jump ship (or group) can carry and randomly select that many drop ships from the list of drop ships. Then when it has those pulled it needs to add up how many units of I,M,V,A they can carry and post those to either a label or whatever. So right now I have a menu strip which will have exit/info, I have a label and text box to name the unit and then I have a button that will be used in order to generate the unit. I want to use a listbox in order to put the list and have it organized as Jump ships and then drop ships.

Can someone point me in the direction of what way would be best to make the randomness, how best to store the info (it would be nice to be able to add new ships to the lists), and just in general the best way to begin the project? I have a label with the text "Name your unit: " and a textbox (textbox1) which is there for the user to put the name of their unit in, and then I have a button I will use to generate the results. My current thought is to use a list array (not sure that is what it is called) to randomly grab ships (but I do not know how to use the # of drop ships to add to it or anything)..

[Code]...

View 6 Replies

Make A Database To Upload To Hosting Space And Use It With 2008 App?

Dec 26, 2009

I'm new to database design and am using Visual Basic 2008 Express.

View 5 Replies

Make Space Between Spacial Symbol And Other Character Automatically?

Apr 5, 2012

I want code for RichTextBox when I write text it make space automatically before and after some character like Spacial symbol example , I write in RichTextBox this statement :

array()={1,2,3,4}

when I press ENTER this statement change to :

array ( ) = { 1,2,3,4 }

make space between spacial symbol and other character automatically

How I do that In VB.NET 2008?

View 9 Replies

VS 2008 - How To Make Progress Bar To Display Drive Free Space

Aug 22, 2010

I'm trying to make the progress bar to display the amount of free space C: has. I have successfully do so with my code which is:

Vb.net
Try
Dim b As String
Dim c As String
Dim dvr As New DriveInfo("c:")
b = CStr(dvr.TotalSize 1000000)
c = CStr(dvr.AvailableFreeSpace 1000000)
[Code] .....

As a last touch to this code I thought I would add a percent bar so it would look more professional. I did so with:
Dim Per As String = (c b * 100)
The problem is that it displays always zero percent why?

View 5 Replies

Make The Controls Stack And Fill Up The Available Space Left By A Control If The Control Is Hidden Or Removed From The UltraGridBagLayoutPanel?

Sep 8, 2011

I am wondering if anyone has any idea how to make the controls stack and fill up the available space left by a control if the control is hidden or removed from the UltraGridBagLayoutPanel.

Example:

[Textbox 1]
[Textbox 2]
[Textbox 3]
[Textbox 4]
[Textbox 5]

If I hide [Textbox 3] as of now, it will disperse the space left equally and pad the remaining text boxes with the space. However, I would like it to do this...

[Textbox 1]
[Textbox 2]
[Textbox 4]
[Textbox 5]

Where all the text boxes will move up and [Textbox 4] will completely consume the space left by [Textbox 3].

View 1 Replies

Keydown Space/Enter - Use The Space Or Enter Key To Change The Image In It?

Sep 8, 2011

I am using a picture box. I want to be able to use the Space or Enter key to change the image in it. For that, I try to use the keydown function as follow:

Private Sub ChestWindow_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.NumPad1[code]....

is the function which changes the image. It works well when I press '1' on my numeric part of the keyboard as a test.The issue is that when I press Space or Enter, the form containing the picturebox closes. (I've already put the keyPreview property to True)

View 13 Replies

Creating Windows Movie Make?

Mar 24, 2010

how can create a windows move maker like application in vb.net....

if we want to create a media player than we can i add windows media player in our forms is there any way to add windows movie maker in our forms...

View 1 Replies

Make An Alithogram Creating Program

Nov 1, 2011

I need a program that i can make to create alithograms that include uppercase, lowercase, special charecters and numbers.this is for legitimate use as i have read the "Prevent helping malicious code" thats stickied to the top of the board.

View 1 Replies

Make Application More Dynamic In Creating A Classroom?

Jun 14, 2011

I am building a program to keep tract of student signup and classesroom.

1.I have an admin form that gives the admin users the right to create a classroom. This class is available / show up when the student signup. Because of future plans I want the admin to have the right to add / delete and classroom if the class is no longer needed to offering.

When a student signup the available class will show up in a datagridviewer and I have added a check box to select the classes taken.

[Code]...

View 6 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

Creating A Program For Which Will Calculate The Time Taken For A User To Make A Number Keystrokes?

Feb 18, 2012

I am creating a program for which will calculate the time taken for a user to make a number keystrokes. I want to start the timer running from the beginning of the first key stroke and end on the final keystroke. Each keystroke has been linked to a label which will change colour according to whether the key has been pressed. When the keystrokes have been finished I want to save this timespan in a field in a database. To test that the timer is running I have made a messagebox which will show the time taken however it is constantly showing zero and the label for the final keystroke is remaining in the keydown colour.

Public Class Form1
Dim dteStart, dteFinish As Date
Dim span As TimeSpan

[code]....

View 19 Replies

VS 2008 - Creating A Tycoon Game / Make The Player Either A 'job Offer' Or 'share Offer'?

Jul 24, 2009

I am creating a tycoon game where you start at the bottom and go up the business ladder. At the end of the year, the player can either, stay with him current job, get another job or go it alone. I would like to know how I can make the player either a 'job offer' or 'share offer' when they own their own business.

View 4 Replies

<xsd:string> Should Allow Space?

Feb 25, 2010

i have a requirement that my <xsd:string> should allow space.it should not validate the space. but naturally it will not allow space. but i need it should allow space.

View 1 Replies

Add Space Every 5 Characters

Jul 21, 2010

i want to add a space every 5 characters of a string. My code below able to do that only for those character in the beginning. For those at the back, it never insert the spacing.

[Code]...

View 4 Replies

Get Space Taken By A String?

Jun 9, 2012

I would like to get the width of some text drawn by GDI+ in an Integer so that I can adjust the position of a cursor.

I used:

"lCursor = g.MeasureString(vInputText, Font)"

In which 'lCursor' is the offset for the original location of the cursor. But apparently the output of MeasureString is not integer and can't even parse it to integer.

View 10 Replies

How To Create A Name Space

Jan 27, 2010

i tried to create a namespace but its giving error .Warning 5 Namespace or type specified in the Imports 'one' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.i opened a new class file ie class1.vb in that i cretaed namespace.[code...]

View 7 Replies

How To Remove Space

Mar 4, 2009

1.Are exceptions used to indicate error rather than returning status or error codes.i need to remove the space between 1. and Are.So how could i remove the space? sugestions and samples are most appriciatable.

View 2 Replies







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