Game Programming :: Redrawing Rectangles On A Form?

Jul 30, 2008

Redrawing rectangles on a Form? I have a problem repainting my form, I'm creating a "Bouncing block" Type of game , the Ball as a PicturBox, the Bar as A Picture Box And the Breakable "Targets" as An Array of Rectangles created in my forms Paint event using "e.Graphics.FillRectangles(Brush, rectsF)". It Looks a little like this:

Top of my Form(in the MainForm class):
Dim Brush As New SolidBrush(Color.Red)
Dim rectsF() As Rectangle

[Code].....

View 1 Replies


ADVERTISEMENT

Game Programming :: High Low Game - Entering A Name On My First Form ?

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

Game Programming :: Adding Pictureboxes To Form

Jul 23, 2008

I know how to make a single picturebox, but I need to make more different pictureboxes. Example: I want to make a picturebox every time snake and food crash (I'm making snake with pictureboxes, yes). But for that, I need a code that will make a new picturebox with different name every time they crash. For example When they first crash, the code should make a picturebox called snakepart(1) next time they crash it should make snakepart(2). Something like that.

View 1 Replies

Game Programming :: Disposing A Picturebox From A Form?

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

Game Programming :: Dynamically Add Objects To A Form

Dec 27, 2011

Trying to dynamically add Alien objects (Picture boxes) to my game form. The picture boxes are invisible when I run the game. All of the other controls for the picture box seen to work just fine. Movement, Alien Shots ,etc, etc. [code]

View 5 Replies

Game Programming :: Keep Picture Box From Leaving The Form?

Feb 9, 2011

How do I keep my picture box from leaving the form screen and how do I make it 'bounce off the walls" when it hits one edge of the form?

View 4 Replies

Game Programming :: Paint Onto The Form At Different Times?

Dec 6, 2008

im making a 2D game which involves things to paint onto the form at different times. how can i do this? ive tried this

[code]...

View 19 Replies

Game Programming :: Detect A Collision With The Edge Of A Form

Oct 2, 2009

I am currently investigating vb gaming and have set up a test project to move an object; it moves fine. The problem is that when it reaches the edge of the form it continues to move and eventually leaves the form entirely. So my question is how do i work out if my object has touched the edge of the form?

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

Game Programming :: How To Destroy An Instance Of A Form Class

Feb 17, 2009

I am writing a chat application quite similar to MSN and others alike, where you have a main window that can spawn several chat windows.So I have a chat class form (called frmChat) that I just instantiate whenever I need it, with the following code from the main form:[code]In this form I have a button labeled as 'End chat'. I would like not just to close the form, but actually to destroy its instance in order to dispose memory. I tried what would seemed to be to me the more direct and obvious way to do that (see below), but unfortunatelly VB syntax checker doesn't allow me to do that:[code]

View 3 Replies

Game Programming :: Putting Labels (on My Form) In An Array?

Jun 7, 2010

How do I put all my labels in my form in an array???

I have labels on my board game squares and I need them to be in an array.

View 3 Replies

Game Programming :: Way To Minimize Or To Remove Lag Or Delay Of Form

Sep 28, 2010

I have created a game similar to plants vs. zombies or simply called a tower defense game. I have already completed it. but I have 1 big problem. and this is the game is very very lag / high delay. structures , explosions , enemies , projectiles are created using picturebox and declared it using an array and now to my question. Is there any way to minimize or to remove the lag or delay of the form?

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

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

Game Programming :: Game Movement By Rotation Direction?

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

Game Programming :: Snake Game - Get The Code To Get Longer

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

Game Programming :: VB Game Help Sprite Keeps Falling Through Objects?

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

Game Programming :: 2D Platform Game Collisions?

Mar 31, 2009

I'm making a game engine, its coming along pretty nicely, but I'm having trouble with collision detection.. This will be a platform game..I'm using GDI+ for my rendering.My rendering engine, basically draws upon a sprite class I wrote, this class is getting pumped into a collection, then I'm using a for loop to draw the images in the collection..

Code: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Try For i As Integer = 1 To SCollection.Count Step 1 Dim Image As New Bitmap(DirectCast(SCollection.Item(i), clsSprite).Filename)

[Code]...

View 13 Replies







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