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


ADVERTISEMENT

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

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

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

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

Circular Motion In VB?

Dec 24, 2009

I have to make a learning object program for a school project and i am doing it about circular motion and satellite orbits.how i can get a object to orbit around another object in visual basic, allowing the orbit radius to vary as the user inputs values?

View 2 Replies

Sub Slow Motion Display

May 15, 2009

i'm trying to make a checkbox which when its checked it pasues me the dispaly of the animation which i've done by application.DoEvents etc??what i'm doing wrong?

[Code]....

View 1 Replies

Wpf - Motion Animation In Silverlight?

May 21, 2011

I have a project in WPF/VB.net 2010 that I want to create an alternate version of in Silverlight. However, it uses heavy amounts of animation, especially motion animation. Most of this animation takes advantage of storyboard double animations for either translate transforms or canvas left/top changes. Can I convert this project over to Silverlight?

View 2 Replies

Developing A System Will Be Able To Detect Motion?

Dec 13, 2009

i am developing a system will be able to detect motion. up to now i am able to stream the video that is connected to my PC to VB.NET. Now i want to switch between the webcam if there is more than one webcam connected to the system. For example, the user of the system will be able to chose any webcam that is connected to the system. I am able to detect all the webcam and display those devices into a ListView. But i don't know how to change the steaming video when the user select the device. Now the video screen show the image form the default webcam.

View 1 Replies

Display Text In Slow Motion?

Jun 24, 2010

How to Display Text in slow Motion.

View 16 Replies

VS 2005 A Motion Detection System?

Nov 18, 2010

my advance project for the final semester of software engineering is an intruder detection system which is based on motion detection. I'm using a web camera in order to capture the images sequently and let them to process for further checking to see the difference.

first of all i want to know, is this possible in vb.net (image processing)? if it is possible, please give me some ideas about this to start.i have a brief imagination about the structure but i'm not sure about the success

View 4 Replies

VS 2010 Mouse In Motion Events?

May 31, 2011

I'm trying to make a way to navigate around a custom grid. Basically, I'm implementing the drag-copy feature from Excel. Right now, you click on a cell grid and can drag around the grid. Anything in the drag area gets a green tint. Once you release the mouse button, whatever was in the first cell selected is copied to all the others that are tinted. That works pretty nicely, but it works only for the cells visible on the screen. I can live with that, but decided that if you dragged over the scroll bars or the column or row headers,then the grid should scroll (if there is anywhere to scroll).

That's where the problem arose. It turns out that scrollbars don't raise the MouseMove event (at least not as far as I can see), and the MouseEnter and MouseHover events are not fired as long as the mouse button is held. Interestingly, the MouseLeave event does occur when the mouse button is held, just as the MouseMove event is occuring for all the cells. That's pretty annoying. Why do some mouse events get raised when the mouse button is down while the others don't? Also, I suppose, is there any way around this?

View 2 Replies

Incorporate A PIC (to Handle Wireless Motion Sensors)?

Dec 18, 2009

how to incorporate a PIC with VB.

I`m trying to find out the steps needed to achieve that, i`m i correct?

1) i need to find a PIC that is suitable for my project (to handle wireless motion sensors)?

2) I need to write the code for the PIC? (does the manufacture of the PIC provides an environment to write the assembly language?)

3) Then i need to write the vb code?

4) Finally to use a serial port to create a communication between VB and PIC. Also are their any all ready made PIC`s that can support VB code direct without the need of writing the assembly code?

View 16 Replies

VS 2008 Form.show In Slow Motion

Sep 2, 2011

im using visual studio 2008 for my thesis. i have this mdi parent form as a container in my program and buttons in it to show different childforms. i am just wondering is it possible to show the childforms in slow motion manner, from left of the container to the center?

[Code]...

View 3 Replies

VS 2008 Form.show In Slow Motion?

Apr 27, 2011

VS 2008 form.show in slow motion

View 4 Replies

VS 2008 Physics And Realistic Motion In 2 Dimensions?

Apr 14, 2011

I'm making a game where the main character is a white blood cell. Right now I have a circle. 360 points. I want my character to squish against walls, jiggle while moving, etc... but I'm just at a loss as to how to even start doing this. What's the best way to implement that kind of 2-d physics?

View 4 Replies

VS 2010 Useing Webcam To Detect Motion

Nov 10, 2009

I am new in VB.NET. I want to use VB.NET to develop a program that will use a webcam to detect motion and trigger an alarm form PC.

View 9 Replies

Webcam Motion Detector - Compare The Two Images?

May 19, 2008

im creating a program which detects motion according to how much difference does the two images have. take note images come from a live webcam stream. the problem is how to compare the two images.

description of the program

a sensitivity text box will be placed on the program where it will compare with the computed difference of the two images. i have a program in vb6.0 that compares images like this

Private Sub Timer1_Timer()
'getting picture from camera
SendMessage mCapHwnd, GET_FRAME, 0, 0[code].....

now i cant translate this in vb.net i have included what i have now

View 2 Replies

VS 2005 After Overriding WndProc For Motion And Closing App Doesn't Close

Feb 14, 2010

I made a Vista Aero -style form for XP, but when using it, the application won't close. The FormClosed and Disposed events fire, but not the HandleDestroyed event. I tried to get around that by handling the Disposed event and calling Me.DestroyHandle(), and it worked, but not if the user resized the form so that it caused an IndexOutOfRangeException in BlurImage().The code is attached.

View 2 Replies

'True' Control Transparency - Control With Motion Graphics (simplicity, A 'video Player' Control)

Dec 29, 2010

Here's my situation: I have a control with motion graphics (for the sake of simplicity, a 'video player' control) in my project. Think of a PictureBox with constantly-changing images. In front of this will sit a second control (such as a second PictureBox of the same dimensions). The topmost PictureBox will be drawn to in its Paint event.

I need to draw very few elements, and the bottom control is updated much more frequently than I need for this drawing. So these elements are drawn to the topmost control. Think of a news broadcast, where they have live video in the background, with a news channel logo, news ticker, and sometimes gradient visible in front.

I'm trying to create that 'foreground' control, and the closest I believe I have gotten so far is the following:

Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Drawing.Drawing2D

[CODE]...

The 'Opacity' property in the code above is a sort of "scaling factor." The image drawn to the top control may, in different parts of the image, have any alpha value from full transparent to a full 255. This 'Opacity' property is applied to the entire image being drawn, scaling the alpha values of each pixel.

See the following pictures for description:

[URL]
[URL]
[URL]

View 9 Replies

Panel Scroll - Kinda "lags" With A Kinda "motion Blur"

Jun 10, 2010

I have a scrollable panel that has a "list" of controlls. However when you scroll, it kinda "lags" with a kinda "motion blur" Does anybody have a solution to my problem?

View 1 Replies







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