Game Programming :: Image Rotate To Follow Mouse Position?

Sep 13, 2011

In a game i am making, as the mouse cursor i have crosshairs (like those in FPS games) and i would like an image box to change images as the mouse moves so that it appears that the character in the picturebox is following the mouse cursor.

i thought i would do something along the lines of first finding out which side of the picture box its on (left or right) then finding out exactly where with some maths equations and then assigning 1 of 60 pictures so that it appears that the picture is rotating.

View 1 Replies


ADVERTISEMENT

(GAME)rotate Image Facing Mouse Cursor, Move Image From Point A To Point B?

Jun 21, 2010

i want to work on a shooting game,and i already have a code for the rotation of the image but i have a few problemFirst problem(for the tank /ship): i want the image to AUTOMATICALLY rotate facing the mouse cursor,i know how to rotate but but i dont know how to convert the location of the mouse to an angle that the image will face,,

View 1 Replies

Game Programming :: Use Mouse Hover Event For Getting The Same Image Back After Hovering?

Nov 20, 2009

I am using VB 2008 Express. I am creating minesweeper game with picture boxes. I want a box in the grid to glow & I have created Different images form that. I want that whenever we hover over the box , it glows & I have used the visible property. I have set the property as false of all the glow boxes.

[Code]...

View 1 Replies

Game Programming :: Way To Make Screen Follow Sprite?

Nov 18, 2008

is ther any way to make my screen follow my sprite? I want the visable area of my game to change when my sprite moves past this X value 284 but i can not figure it out ill post my VB Express code below

Code:
Public Class Form1
Dim Y As Integer

[code].....

View 2 Replies

Find Out The Mouse Coordinate To Make Image Follow Mouse?

Mar 6, 2012

I am try to make a character that follows the mouse, but I cannot find any way in vs 11 to get the mouse coordinates? It is a vb application, could someone please help me out? I tried pointer.location, pointer.margin, but still cannot do it.

View 5 Replies

Game Programming :: Get Mouse Coordinates When Click On A Mouse Button Inside A Listbox?

May 24, 2008

I was wondering if there is anyway I can get mouse coordinates when I click on a mouse button inside a listbox? I know how to do it in the form but when I click inside a listbox nothing happens.

View 9 Replies

How To Get One Image To Follow Mouse Cursor

Dec 11, 2007

I have a short little program that has an image follow my mouse cursor. But the problem is that the image keeps drawing itself over and over. I only want 1 image following my mouse.

Public Class Form1
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Dim myBitmap As System.Drawing.Bitmap
Dim myGraphics As Graphics
[Code] .....

View 8 Replies

Image Follow Mouse Pointer?

Apr 17, 2012

i want to make a custom mouse cursor but I found that can be hard so I want to go the next best route. I want to see how you make an image follow the mouse pointer. I assume it would use some kind of image = mousepinter new point (x, y) or somethign like that. Suggestions or samples? In the end i want to take this code snippet and make a duck hunt game and a whack a mole type game

View 10 Replies

Game Programming :: Picture Box Not Following Mouse

Dec 15, 2010

I am making a game where a car picture box has to follow a mouse. to start the game you click the car but when i click the car the car moves down away from the cursor. then it starts following the cursor but is still about 2 cm below the cursor and a little to the side.

[code]...

View 3 Replies

Game Programming :: Change Mouse Cursor?

Apr 5, 2008

I'm making a map engine for another game I'm working on.... I would like to make my mouse cursor be a 32X32 pixel rectangle. This would make it easier to place my tiles which are all 32x32.

View 4 Replies

Game Programming :: Faster Image Drawing On Form?

Aug 12, 2011

I'm writing a game in VB 2005 Express and at the moment it involves using the drawimage method to first draw a background and then various sprites onto my form every time a timer ticks. It's all double buffered so there's no flicker or anything but it just goes very slowly, how to speed it up. I've come across the term blitting (bitblt), which seems like it would be useful, but haven't been able to work out exactly what it is, whether it can be used in this version of vb, how to use it etc.

Here's my code (or at least an approximation of the relevant bits seeing as the whole thing is rather long):
Public Class Form1
Dim BackgroundImg as Image 'plus all of my sprite images declared
Dim Mybuffer As BufferedGraphics
Dim MyContext As BufferedGraphicsContext
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code] .....

View 6 Replies

VS 2010 Image And Mouse Position

Jan 17, 2012

I have a photo(Img1.bmp) with drawing of my book library.Each area on image (A1, A2, ...) have books. url...I like when i put my mouse in a specific area on image (Img1.bmp) and licking this area (eg B1 or C2 or ...) identify this area.

View 15 Replies

Making A Simple Image Editor And Added Zooming And Drawing With Mouse Position Like A Pencil?

Sep 11, 2009

Im making a simple image editor and I added Zooming and Drawing with mouse position like a pencil. My problem is When I zoom the image and try to draw on it, everything becomes offset and the lines i drew are not even close to the mouse. Here is My code ( Just add a button1 and Picturebox1 with an image)

Public Class Form1
Dim pen1 As Pen
Dim x1, y1, x2, y2 As Integer
Dim gr As Graphics

[code]....

View 4 Replies

Make A Picturebox Follow My Mouse?

Oct 27, 2009

I'm making a minigame where the user moves their mouse around a picture and a little image of a stick figure follows that image. I've got part of it to move, but it only moves up and down. I've tried to change the code to go by width and height but it wont go into debugging even though it shows know error.[code]...

View 4 Replies

TextBox To Follow Mouse Cursor?

Dec 19, 2011

how can I make a TextBox follow the mouse cursor on a simple form?

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

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

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

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

Game Programming :: Game With Jumping While Moving And Sensing Colour

Feb 4, 2011

So here is my problem. I have a vb game with animated sprites and all, and the character even jumps. However it only works in the y direction. So if i'm moving, he stops in place and jumps, instead of jumping forward. I was wondering if someone knew how to make him move at the same speed forward during the jump.

[Code]...

View 2 Replies

Game Programming :: High Score List For A Who Wants To Be A Millionaire Game?

Apr 19, 2011

I currently have a who wants to be a millionaire game that I have made in visual basic 2010. Each question is in its own form. Form1 opens at the start, and question 1 is opened by a button click on Form1. The user has to click on the picture box at the side to show the text for the question each time. If they answer incorrectly, it displays a message box, opens an input box asking for their name, and goes to the form with the high score list, Form17.

Upon opening Form17, I want the scores to load and be displayed in the list box. The high scores are saved in a text file at C: est.txt . Upon clicking menu or end, the high scores are saved to the text file.

View 2 Replies

Game Programming :: Writing A Video Poker Style Game ?

Apr 1, 2009

I m writing a video poker style game. the form consists of the player's 5 cards, a deal button, a hold button for each card, a button to select amount to play that hand. im using Visual Basic 2008 Express Edition.

View 10 Replies

VS 2008 Make A PictureBox Follow Mouse?

Mar 25, 2009

How Can I make a PictureBox follow my mouse when a MouseDown happens? When I click the left button of the mouse on the picture I want it to move with the mouse until the MouseUp.

View 2 Replies

Game Programming :: Code For 3 Of A Kind In Yahtzee Game

Apr 18, 2010

im struggling to work out the code for 3 of a kind in my yahtzee game, i think that if i can work this out i can sort my everest of the full house code!

can someone tell me where ive gone astray?

code:

View 8 Replies

Game Programming :: Create A Picture Shuffle Game?

Jun 4, 2012

I am all new to Visual Basic 2008, I am trying to create a picture shuffle game, the problem is I cant seem to be able to move one picture from PictureBox1 to PictureBox2 onClick, here is a Code I written earlier:Sub ChangePicture(ByRef P1 As PictureBox, ByRef P2 As PictureBox)

[Code]...

View 1 Replies

Game Programming :: Create A Zombie Style RPG Game

Sep 11, 2009

Is there any visual basic 2005/2008 RPG games with the source code available for download.Could you possibly reply to this post with a link to the website with the game.Or is there a template i could use to try create a zombie style RPG game text or graphical.

View 2 Replies

Game Programming :: Developing A Game To A School Project

Jun 3, 2010

I am developing a very simple game in visual basic 2008: a roulette. And yet I found problems in develop it.My question is this: I have an image ,containing all the roulette's numbers and I want to associate the spaces of the different numbers to different buttons, so that which time I click in a certain number on the image it dos some action.How can make this association of the different spaces in the image and different buttons?

View 3 Replies







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