Graphics And Blackjack Game?

May 3, 2011

I'm making a blackjack game for class. Your PlayingCard class totally rocks! I think I said that already Anyway, my board is set up very simply; the player and the dealer have hands with a limit of 5 cards, which I drew as picture-boxes. "sigh" I thought I had this all thought out; the LOGIC of the game was easy in C# console, but applying graphics just adds a whole other dimension to EVERYTHING!

1) Do I need to create an object for each picture-box?

2) How do I tell the program to use cards and their values created in the PlayingCard class to the picture-boxes?

Public Class FRM_BlackJack
'Global Variables
Dim PlayerCards(4) As PlayingCard.Hand

[code]....

View 2 Replies


ADVERTISEMENT

How To Make BlackJack Game On VB

Dec 1, 2011

I am making a simple blackjack game for school.It involves using object arrays and for next loops.I have 5 labels for the player, and 5 labels for the dealer. I have both their totals displayed on the form. I also have a deal, hit and stand button. I also need to follow the rules of if the dealer >= to 17 they must stand and if the dealer is < 17 they must hit. Does anybody have any suggestions on how i can code the dealers turn.I already made it so the player clicks hit and when he/she is done clicks stand. This is my stand button so far:

lblTotalDealer.Show()
lblD1.Show()
Dim itemarray2() As Label = {lblD1, lblD2, lblD3, lblD4, lblD5}

[code].....

View 14 Replies

Using Images In VB For A Blackjack Game?

Apr 29, 2011

My classmates said I was crazy when I told them I was re-making my old blackjack game in VB.It's actually been going a lot easier than it was when I was doing it in C#, though. I'm hitting some snags, which are commented on in the code. The basic logic is mostly right.My main question is how would I add images to the game? Where would I put them? How would I make sure the suits are randomized, too?

New Code:
Public Class FRM_BlackJack
Private Sub FRM_BlackJack_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 6 Replies

IF Function - Blackjack Game - Change Value ?

Apr 2, 2011

I am having trouble with a blackjack game I am creating. I have buttons 1 - 13 (A-K) I have 5 Textboxes which when the above buttons are pressed displays the values in the textboxes. I also have one more textbox which adds up the values of the above 5 textboxes to give your Black Jack Total. The problem I have is if an Ace (11) is in one of the textboxes and the Total Value exceeds 21 i need to have the Ace (11) change its value to 1 instead.

textbox 1 - 5 will be the card values
textbox6.text will be the total Value

I have tried......

if textbox6.text > 21 then and textbox1.text = 11 then textbox1.text = 1

This seems to work fine however it only solves the problem of an Ace (11) appearing in textbox1.text so i tried to repeat the code with the other boxes...

if textbox6.text > 21 then and textbox1.text = 11 then textbox1.text = 1
if textbox6.text > 21 then and textbox2.text = 11 then textbox2.text = 1
if textbox6.text > 21 then and textbox3.text = 11 then textbox3.text = 1

[CODE]...

However this does not work and my program freezes?

View 3 Replies

Making A Blackjack Game For Class?

May 2, 2011

I'm making a blackjack game for class. It's been better programming in VB than it has in C#, but I don't know how to link button subs (BTN_Deal_Click or BTN_Deal; I can't decide which one will work) to one another. For example, after the code in BTN_Deal has been run, the program is supposed to wait for the user to click either the Hit or the Stand button.

[Code]...

View 2 Replies

Saving Results In Blackjack Game

Mar 11, 2010

I need a small bit of help with my Black Jack game in VB 2005. Basically I have the game pretty much complete seems to work perfectly, I have two counters set up, one for dealers games won and the second one for players games won which both add up the results and displays them in a text box. I have another form made to display Statistics, for both 'This Session' and 'Overall', but how do I save the Overall score??

[Code]...

View 1 Replies

Using Blackjack Starter Kit For Poker Game?

Jul 7, 2009

I'm sitting here with a print out of the class deck, class hand, and cardgameframework from the blackjack starter kit for visual basic and I'm lost as to where I need to go to use the above mentioned classes. I am looking to create a simple poker game using these classes as a base. I'm not looking for anything fancy, just something functional. Starting off I would like to hit a deal button and have it deal 5 cards into pictureboxes and then give me an option to (mouse click) hold any number from 0 to 5. Once I have clicked the cards to hold, I would like the program to deal new cards into the other pictureboxes. If I could get the program up to that point it would be a great place to start. Can anyone point me in the right direction? Has anyone used the cardgameframework before?

View 1 Replies

Writing A Blackjack Game Program In .net 2008?

Dec 7, 2009

I am writing a blackjack game program in vb.net 2008. The program is designed to play 6 players per game in sequence using a pre existing algorithim (basic strategy). The program will play one game at a time using all 6 players or can be set to play 100 games using all six players and then capture the resulting data generated from each player from every card. When one game at a time is played the program works fine. When the program plays 100 games at a time it drops (loses) the data that is being stored in its string variable arrays.

View 1 Replies

VB 2010 Move The Game Peaces (graphics) Over Another Graphics Which Is The Game Board

Apr 7, 2011

I am trying to do a game application similar to chess, where i need to move the game peaces(graphics) over another graphics which is the game board. using the mouse. How can I do multiple layers of graphics and control their movement(without using direct x, i know nothing about it)? Note: I have visual basic 2010 express, windows xp home

View 1 Replies

VS 2005 Make A Light Version Of A Blackjack Game?

Mar 11, 2010

I'm trying to make a light version of a Blackjack game. The rules I need to use are as follows:

Ace = 1
Normal Cards = 2-10
Color Cards (king, queen, etc,) = 11

The dealer can keep hitting until it reaches 17 or under 21, he must always stay once it hits 17 or over (without busting obviously).

I know the ace normally should be 1 or 11 normally but I don't want to complicate things, I want to get the main thing of the program working first.

Public Class frmMain
'declaration to help generate number
Dim RandomClass As New Random()

[code]....

View 10 Replies

2D RPG Game In VB Out Of Memory After Graphics.DrawImage

Jun 1, 2010

Well currently im programming a game in Visual Basic and I have it to the point where it draws a map on the form, it loads maps to different areas when you walk on the map, and I am doing so by using Graphics. DrawImage which redraws the map on the screen with the character in the new position. It was working quickly and smoothly until now.

I added some more sprites and now it starts to lag badly then it will throw a Out of Memory exception and it will display a big red x across the form. I watched the memory now as i move the character one spot on the forum and the memory increases 100mb's each time. It wasn't doing this before which is weird. I managed to fix the out of memory error using GC.GarbageCollect but I read that this is bad, also the character still lags across the forum. I really didn't want to release the source code until I was finished but seeing as I need help quickly because this is for a project I am working on for Thursday (End of semester Programming 2 Junior year of high school) I don't have many options.

View 8 Replies

Interface And Graphics :: Screen Capture From In Game

Aug 7, 2008

i am wanting to write a program to capture video from in game, the thing is that the video has to be small enough to then broadcast online simultaneously with a three minute delay, i have no idea where to start but am hoping to use VB,

View 6 Replies

VS 2008 Z Axis For Graphics (video Game)?

May 5, 2009

how do i work with the Z axis?If i were to make a video game and i wanted it to be 3D in graphics how is that done?

View 7 Replies

Interface And Graphics :: Create A User Interface In A Game Such As The Application XFire Using VB?

Jan 12, 2010

how to create a user interface in a game such as the application XFire using Visual Basic?

View 3 Replies

Deck Of Cards- Blackjack?

Mar 1, 2009

new to programming and I was wondering how would I make a deck of cards for a blackjack program? I would post some code but I don't know where to start

View 3 Replies

Make A Blackjack Program - Execute A Different Piece Of Code Each Time A Button Is Pressed By The User?

Nov 22, 2010

I am trying to make a blackjack program and I need to execute a different piece of code each time a button is pressed by the user.

View 5 Replies

Rendering Graphics Efficiently - DirectX - Graphics Card And Use Of DirectDraw Or OpenGL

Sep 23, 2011

We have a GIS application that has some performance issues. It creates and sends an image to a web browser. We start with a Bing Maps imager, add complex polygons (complete with transparent fill), save the finished image as a PNG, and send it to the browser.

The idea has come up that we could possibly install a graphics card and use DirectX or OpenGL to improve performance. I believe this would be the case even though we ultimately generate an image instead of sending the data the the screen. I believe our processes could still make use of the API and the hardware acceleration it provides. Our process is not unlike what CGI film makers do to render individuals frames of a film, though we simply render a single image and send it, as opposed to the hundreds of thousands of images needed for a single CGI film.

So my question is: would a powerful graphics card and use of DirectDraw or OpenGL provide us a worthwhile performance boost? It can take us 20-30 seconds to render a more complex map. Which is a long time to wait on a web page...

View 10 Replies

Interface And Graphics :: E.Graphics.Drawstring Length Overflow Page?

Nov 19, 2010

Im working on a project that needs to print a report of one client.Everything went smooth untill i came across my multiline input text data.When i display it in the PrintPagePreview the text go's outside my page. Even when im printing it only the halve of my text is displayed. I googled and looked everywhere but i can't get a clear fix for it.

[Code]...

View 3 Replies

Interface And Graphics :: Passing Bitmaps & Graphics To Subroutines As Arguments

Jan 22, 2011

I used to program with Visual Basic 6, so I have alot of old programs that I'm updating, plus I'm learning the new VB2008 methods. I'm writing a program that replaces the old "BitBlit" function which is no longer supported by Visual Basic 2008. It involves three picture boxes, one holds the sprite bitmap, a second holds the mask (silhouette) of the sprite bitmap, and a third has a background image.

[Code]...

View 3 Replies

Interface And Graphics :: System.Drawing.Graphics.DrawString On Other Window?

Aug 14, 2009

drawing text on a window which is not the current form's window.I remember doing this in Win32 api with getwindowdc(handle) to obtain a DC for the Window, then textout() on the DC.

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

VS 2010 Game Multi-Client - Program That Enables A Game To Have More Than One Instance Running

Nov 18, 2011

I want to make a program that enables a game to have more than one instance running, where it would otherwise be unable to be done. How should I go about this? A sandbox? Hack?

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

Repeat Cards Showing Up In Game And Win Evaluating Code For Poker Game?

Jul 2, 2009

I am working on a poker game and I have the game setup the way I want it in terms of graphics and I have the code programed to deal the cards out exactly how I want them. Granted, the code is very simplistic, but functional for a new programmer like myself. I'm sure there are other more efficient ways to code my game, but I like mine so far because I can at least understand the majority of it. With that being said, here are a few problems and questions that I have.

1. How come when all 12 cards are dealt out I have some cards repeating in the game? For example, I get queen of diamonds in more than one picture box when I only want the card to be dealt once and then removed until the next game.

2. I was hoping to have a button 3 to clear all the boxes, basically resetting the game to the next game. When I hit button 3 it only clears the contents of picturebox 10 and 12.Other notes: I have the deal down the way I want it. It deals the first 10 picture boxes and a second button deals the 11 and 12 picture boxes.

3. I know this is my next step so I want to post it with the code I currently have. I want to start taking my project one step further by evalutating each of the three rows of cards (3 rows of 3 cards each - I'm not worried about the dealers hand (picture box 10, 11, 12 yet). So I want to evaluate a row of pictureboxes against a "pay scale" and display the win in a text box or label next to the 3 card hand. For example, Q of diamonds, Q of Clubs, Q of spades would win 15, etc. ( have a weird feeling I may have to change the names of the cards (I have them named card1, card2, etc. right now) to something that identifies them in order to evaluate the hands.

Here is the code that I currently have. I'm using visual basic.

Public Class Form1
Dim Rndm As New Random
Dim myPB(11) As PictureBox
Dim HiddenCards As New List(Of String)

[code]....

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

2D Platform Game Physics - Game Development | Dream.In.Code?

Mar 11, 2010

I'm trying to make a 2D platform game and I'm pretty inexperienced at programming. I've coded the player to move left and right and jump, but I can't figure out how to prevent multiple jumps while the player is in the air. Anyone know how to do this?

View 8 Replies

Game Of 21 Card Game, Code For Checking Score Is Not Working?

Jan 13, 2012

Check Score: The winner is the one with the highest score less than or equal to 21If both scores(player total and computer total) are over 21, or if both are equal but under 21, the game is declared a draw.

There is something wrong with this line:
If intPlayerCardTotal < intScore And intComputerTotal < intScore Then
MsgBox "Draw"

[code]......

View 6 Replies







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