Game Programming :: Making A Picturebox For Every Pellet?
Nov 22, 2010
I'm doing a pacman game and im stuck on how to make the pellets. This is the code i have so far.I was thinking of maybe making a picturebox for every pellet and then make an if statement that if pacman goes on a pellet it disappears and he gains a point. But this would be a VEERRRYYYY large if statement and im sure there is a better way to do it.
View 3 Replies
ADVERTISEMENT
Jun 3, 2011
Have attached the code so far and would like to be able to rotate my car sprite through 360 degrees and have it move in diagonal fashion.
View 19 Replies
Jun 18, 2011
I can currently make a dialog1 pop up, then the user clicks "Yes" for dialog1, then dialog2 pops up, and if the user clicks "no" instead of "yes", dialog2 reappears again. I've got a headache now, but I will re-look over my code to see if there are logic errors.
I originally had dialog2 and form1 (the form1 was acting as dialog1). But The thing was that I do not how to give properties of a dialog to a form (i.e. not make the user be able to click other windows while this form is open) IF I could have code that says Me.bringtofront (which I have tried) didn't work though. If I apply this command to a form I get an error:
code: Form1.showdialog()
error: Please make form1 not visible. something a long those lines. But what I don't understand is form1 was never open.
What do the standard lines of code do?:
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
View 2 Replies
Jan 14, 2010
Hey I am making a GDI++ game in vb.net. Now what I want is the monster(picturebox) to go after the player(picturebox). There Are No Vertical Walls. Only The Edge of map barriers. For example to get to the player the AI would have to go to the end of the ledge and either jump off and fall to the lower ledge or take the ladder down. There is no jumping, only falling and going up and down ladders and across the horizontal ledges. So How Can I make this pathfinding system?
View 18 Replies
Jan 20, 2011
I want a picbox to move across a screen then back to where it started (for a space invader game:
the following code is what I have for this task.
Code:
Private Sub AlienMovement_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlienMovement.Tick
If Alien1.Location.X > 20 Then
[Code]....
I can't make it < because thats not logical, can't make it = becasue that doesn't work, can't make it > becasue then it will only bounce back once. Is there another variable I could use?
View 5 Replies
Jul 2, 2009
I have been making an rpg that i have been programing to be event driven, so the last step at this point is the items... i tryed using dictionary to store all the items but this kinda failed(Im not shure if dictionary is good idea for something like this any way). well i know how to hard code the items but i dont want to do this(Event Drivien is better). So any ideas on how i could store the items?
View 5 Replies
Nov 11, 2011
when a tank cannon shoots, what I want is make the shell come out on the tip of its cannon. The same thing when the cannon is facing on a different angle.I only know the rotation thing but not these trigonometric function I am looking for.
View 3 Replies
Jun 24, 2011
I've tried so many ways to get rid of picture boxes for my space invaders game, yet it's not working. The bullet hits the alien, the alien goes invisible (which it should) but it doesn't go to a new location or get disposed. And the bullet then intersects with it again but because it's invisible the user just see the bullet reset out of no where and the score gets added which it shouldn't.
Code:
If Bullet1.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet2.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet3.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet4.Bounds.IntersectsWith(AlienArray(0).Bounds) And AlienHitArray(0) = False Then
[code]....
So, basically my question is how do I remove aliens (pictureboxes) off the board or disabled the picture box in space invaders when they are hit. (my bullet collision works fine).
View 8 Replies
Jan 2, 2011
how to make a collision between the player object and the wall which is a picturebox
i can move the player object (which is also a picture box) with the arrow keys and i've made it move inside the form border, but the porblem is how to make it stop when it touches the wall (picture box) if im moving left and the left border of the player touched the right border of the wall then it should stop and only the up, down and right keys will be working!!!
View 12 Replies
Jul 29, 2008
I have been working with Visual Basic 6 for over a year and have just recently to move up to .net. I have never had problems viewing picture boxes that were on one form thought another.My old code read something like:frm1.img1=frm3images.treeThis would take the image of the tree from a form that is not viable and place that image in the imagebox.
View 10 Replies
Jun 17, 2011
How do I go about doing this? I have currently made this code, but sometimes points are created on the boundaries of this picture box, which I do not want. I want all new random points to be within the bounds of this large playarea (picturebox). Foodarea is my big picturebox which i want all fruit to spawn WITHIN not outside on it's edges.
[Code]...
View 12 Replies
Jun 19, 2009
I am working on a TCG card game and I am having some trouble of thinking how to find the Properties of a Picturebox that was created at RunTime through a Click Event.
Here is the Code I have This is the Sub that I have to create the Pictureboxes...
Code:
Private Sub CreatePictureBox(ByVal name As String, ByVal x As Integer, ByVal y As Integer, ByVal height As Integer, ByVal width As Integer, ByVal picture As String)
Dim PB As New PictureBox
[Code]......
View 2 Replies
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
Oct 3, 2011
Im new to VB. how do I get to add the score.my code is
[Code]...
View 6 Replies
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
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
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
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
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
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
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
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
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
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
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
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
May 14, 2012
basically i'm trying to move the Player by rotation.I have a perfect rotation system that works with a custom picturebox control that supports rotation that i have.
View 4 Replies
Jun 10, 2012
So I pretty much built the game, that was the easy part. I am having trouble entering a name on my first form(startup) and keeping track of the score on second form(game) and displaying it both combined on the first page with the current users score. Also the way it set up now if you are running the game for the first time it says can't find LowScores.Text. Start Up
CODE:
CODE:
View 6 Replies
Jun 6, 2011
I just finished my own snake game, and I need some recommendations on how to make this game better.If you see a problem, please tell me.The only problem with this game is that I can't get the code to get longer, other then that its good.EDIT: Sorry I meant : The only problem with this game is that I can't get the SNAKE to get longer, other then that its good.
View 4 Replies
Nov 16, 2008
I have been making a game similar to mario for learing perposes. I got the sprite to move left right up down but I still have no gravity nor can I jump. But i need to know how to make it so that my sprite dosent go through objects?
View 3 Replies