Game Programming :: Make The Program Know When A Black Stone Is Surrounded?

Oct 23, 2009

I'm not positive if this should be here or in graphics so I'm sorry if I'm posting it in the wrong section.I'm trying to make a program for the game Go. Now before getting upset that I want to make the game go I just want to say that I have looked for months for this specific thing and I still have yet to find it. I want to make something to simulate go so that two people can play on the same computer. The problem I ran into was capturing stones. Stones are captured when surrounded and then they are taken from the board. The problem is that I don't know how to make the program know when a black stone is surrounded.

I have thought of a grid detecting but the possibilites on a 19x19 area are too high for anybody to sit down and program. I have also thought of using picture boxes and the edges to detect other pictures, but there are ways for stones to group together and the opponent must surround all stones to capture them.

View 3 Replies


ADVERTISEMENT

Game Programming :: Dice Rolling Program - When Using Rnd Fucntion How To Make It 1-6 Only

Dec 17, 2008

So my question is, I'm wiriting a VERY basic dice rolling program for my computer programming class in high school. I'm using a randomize function to generate numbers but I only want it to do numbers 1 - 6....how do I do this?

Dim x As Integer
Randomize()
x = CInt(10 * Rnd())

Dim Y As Integer
Randomize()
Y = CInt(10 * Rnd())

That is my code for my x and y (each die) to generate code, but how do I make it do 1 - 6 ONLY? Develope a game that in which a player rolls two dice. Each die has 6 faces. Each face contains 1, 2,3,4,5,6 after the dice have come to rest the sum of the spots is calculated, if the sum is 7 or 12 on the first throw, the player wins. If the sum is 2,3, or 11 on the first throw, the player loses, and the house wins. If the sum is 4,5,6,8,9,10 on the first throw the sum becomes the player's point. To win, a player must roll the dice until the plater rolls the point value. The player loses by rolling a 7 before rolling the point. I also have another question, How would I set this up to keep up with points and stuff? and the part that says "The player loses by rolling a 7 before rolling the point." I have no clue what to do on that. I'm not asking for code hand outs. I'm just asking what functions and such I'd use to write the code.

View 6 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 :: 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 :: How To Make Pic Follows Another One

Jan 5, 2011

When my picHero enter a room where a picEnemy exists I should make the picEnemy follows picHero no matter how it moves up, down, right, left and as picHero is moving 5 px i want to make the picEnemy moves 4 px. I've tried to do use a condition as
Code:
if(picEnemy.location.X <> picHero.location.X) then
location = new point (picEnemy.location.X+4, picEnemy.location.Y)
picEnemy.location = location
endif
Also for the Y axis, but it didn't work.

View 18 Replies

Game Programming :: How To Make A Picture Box Bounce

Dec 19, 2009

Im New To VB and i was wondeing how do you make a picture box bounce from the sides of the form.

View 8 Replies

Game Programming :: How To Make Question Box (msgbox)

Jul 8, 2010

I am making a game in vb.net and was wondering how to make question box eg. if a person clicks on a button he gets a message boxs which asks him a question he has to answer. the msgbox should have a text box or something for input and if their answer is the same as the one i have specfied then the message box says correct. if not then says it is wrong.

View 6 Replies

Game Programming :: Make A Manabar That Will Drain?

Jan 8, 2010

I'm trying to make a manabar that will drain, using this code

Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub

[Code]...

View 7 Replies

Game Programming :: Make An Object Move?

Aug 13, 2009

something like this

pctObject.horizontalPosition += 5

I just dont know the right syntax

View 2 Replies

Game Programming :: How To Make Ghosts Chase PacMan

Mar 22, 2011

I am having some trouble working out how to make the ghosts chase PacMan. I have made all the code and stuff work with needing a grid maker thingy. I have do in all by placing the walls (pb's) myself and also with the pelets (food). Though I have a problem with getting the ghosts doing their job, they only just change image with a timer tick. Any simple way of making the ghosts chase you?

View 4 Replies

Game Programming :: Make A Button Spawn An Object?

Dec 20, 2009

I have a button named cmd_Grunt and a picture box named pb1_Grunt. I want to click the button and have a picture box created.

"Public Class Form1
Dim grunt = (50)
Private Sub cmdGrunt_Click(ByVal sender As System.Object, ByVal e As

[Code].....

This is the code I have so far. I get an error message, "Expression expected." It wants the expression between "CreateObject" and "('pb1Grunt', grunt))".

ie cmdGrunt_Click(CreateObject HERE ('pb1Grunt', grunt))

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

Game Programming :: Openfiledialog Breaking Program ?

Apr 10, 2009

I have used the openfiledialog on numerous occasions, and it has never caused a problem. (This is also happening to savefiledialog as well...) Put simply, its breaking my application..

Code:

Private Sub LoadMapToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadMapToolStripMenuItem.Click

[CODE]...

Even this bare minimum code, is causing most of my application to stop working. I have an onpaint method which should be drawing my map, it starts throwing exceptions(file not found), I checked my paths they are correct, I have a listbox linked to a picturebox, clicking a image' name in the listbox, loads the corresponding image to my picturebox, this stops working too..The program isn't hung, I can navigate my listbox, open menu's etc,.. It's breaking everything that has to do with images. I would post code, but, it's quite extensive, and the problem seems to be centered on the opensave dialogs.. (again, I have used this same code without trouble, so many times I have lost count, I'm at a loss as to why its acting up now...) Well, for now I created my own open file dialog, its a little crude compared to the real one, but, mine works..(ie, a standard dialog control, Ok, Cancel, with a ListBox loading the file names..)

View 2 Replies

Game Programming :: Make An Hpbar That Changes Color With Respect To Percent Health?

Dec 22, 2010

does anyone know how to make an hpbar that changes color with respect to percent health?ive been trying to come up with an algorithm that would give me r g b values depending on how much the character has left (%).

Supposedly if the character is near death or has low hp, the algo would out put r=255 g=0 b=0 and if mid health r=0,g=255,b=255 (or watever yellow is), and if full g=0. but i need a smooth transition

View 2 Replies

Game Programming :: Make Snake In VB For Major Year 12 Project In Australia?

Apr 3, 2008

im trying to make snake in visual basic.net for my major year 12 project in Australia and i cant get it to work?

View 5 Replies

Want To Make Text Based RPG Game Will 'upgrade' As Programming Knowledge Grows

Dec 12, 2011

Well this is a re-post now as nobody replied in the gaming section, and i believe this question could go as a normal VB question, therefore I'm asking in this category instead.I have decided to pick up on programming and want to make a text based RPG Game i will "upgrade" as my programming knowledge grows.I got some ideas that i think i should use, but i want you guys' opinions on it.I assume I'll use different classes for each monster, which will have properties.Should those monsters then be inside a list of all possible monsters, or would i have a monster class which i would use and generate the enemies when needed? And would i use the same approach on items and character stats?

View 4 Replies

Game Programming :: Make A Matching Card Game In VB 2010 - Show Cards For 10 Secs Then Change Cards To (AppPath & "Cards Ed.png")

Apr 19, 2012

I need to make a matching card game in VB 2010. i have generated my cards but now need to show the cards for 10 secs then change the cards to (AppPath & "Cards ed.png"). then when a user clicks on the card the card will flip over.*How would i set a timer to turn all my cards into*(AppPath & "Cards ed.png") after 10 secsbut still have the values from the array and when i click the cards they flip over (from red card to numbered card)

Code:
Private Sub Place()
Dim Counter As Integer = 1
For Row As Integer = 1 To Int_Grid_Size

[CODE]..........................

View 2 Replies

Game Programming :: Make For Loop Stop Once Username And Password Have Been Found Correctly

Feb 24, 2011

I have a login in system that i'm creating for a game. I have this code for checking to see if the username and password are correct in the text file.[code]I want to know how to make the for loop stop once the username and password have been found correctly.Also, where would I put a message box saying that the username or password are not correct if they don't match up or they're not in there at all?

View 3 Replies

Game Programming :: Creating A Hangman Program Using VB 2008 Express Edition?

Nov 30, 2008

Basically i am creating a Hangman program using VB 2008 Express edition and need some help.I would like some help on when a user is entering a letter for the word how can i make it so for example if the target word is "MAX" and they enter "M" i would like the lblstatus to update as "M--" obviously i would want it to be able to do it with all 3 letters.

View 2 Replies

Game Programming :: Program Is Designed To Generate A Random Hand Of Cards Out Of Our List?

Aug 19, 2008

Below is the code that we have been working on. We have bolded the parts which we are unsure about - they are producing errors. (its near the bottom)The program is designed to generate a random hand of cards out of our list of them. This program is a smaller version of what we hope to have in the full one - ie. It tries to get a random hand of 3 cards out of a possible 5.

The part we are having errors with is getting the images to display on each of the 3 'picturebox' objects using a loop (so we don't have to type each picturebox individually).

[Code]...

View 8 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 :: 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







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