Creating Game & Struggling With High Score Code

May 7, 2012

I am creating a type of pacman game, I have entered the code for everything else, but I am struggling with the code for the high score,[code]

View 2 Replies


ADVERTISEMENT

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

VS 2010 Simple High Score System For Tetris Game?

Feb 12, 2011

I just finished making a Tetris game in VB.NET, and I wanted to add a high score system to the application. So, when a user completes their game, they have the option of submitting it as a high score, which will compare their score against the previous high scores, then place it accordingly. I was thinking of an XML approach of doing this, where the user's name, rank, score, level, and number of lines cleared will be stored in tags. Here is what I thought the XML might resemble:

[Code]...

So the program will have an array to store all the previous scores. It will read through the XML, and copy the the score data into this array. Then, when the time comes to submit a score, it will compare this score against those previous scores, and find the proper position for that score, and then save it into the array. At the end, it will then copy all the score data from this array to the XML, replacing the <Level>, <Lines>, and <User> tags in the process.I am however having trouble implementing this, as I have no experience with XML files and everything I've read has been very confusing.

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

Creating File To Record And Display Best Score From Each Game?

Nov 2, 2010

To clarify - I'm building a simple game in visual basic and I'm trying to create a simple file to record and display the "Best Score" from each game. Actually there are four levels in this game (each one is on a different form) - I'm trying to save the best score from each level to display in a separate Game Stats form. Therefore I creating a datatable on one form, but then trying to get all my other forms to access it.

But now I get a new DBNull error message in part of code not of my making - NewGameDataSet.Designer.vb
Error Message = "The value for column 'BestScoreEasy' in table 'GameTable' is DBNull."
Does this mean I need another New Statement somewhere?

View 3 Replies

Code For Making A Score On A Game Of Rock, Paper, Scissors On Vb2008

Oct 23, 2009

What is the code for making a score on a game of rock, paper, scissors on vb2008 and how do you make sure it works?

View 1 Replies

Calculate New High Score?

Apr 27, 2009

I need to calculate the high score and am having trouble storing a value that represents the previous high score, and the comparator funcion.

Public n_sErrorTitle As String = "Entry Error"
'Count the number of entered scores
Dim intCount As Integer

[code]....

View 3 Replies

Making A High Score?

Apr 1, 2010

how can i save a high score in toolstrip textbox or listbox?

View 7 Replies

VS 2010 - How To Save High Score In Application Settings

Jan 17, 2011

I am working on a simple game and wanted to save the high score in application settings. Research upon failure has shown that user is read/write but the program doesn't store it between runs.

View 7 Replies

VS 2005 Create A HALL OF FAME (High Score) System?

Aug 14, 2009

Im creating a quiz game although i was wondering if any one can teach/tell me how to create a high score system.For example when the user clicks say button1 (which is stop quiz) an input box will appear asking the user to input their name and then press okay. It then gets the current score from the text box (which is just an integer in a text box indicating how many they got right) and saves it to an Text file or something.and when the user goes back to the main menu, he/she can select "Hall of Fame" which then brings up the highscores (in a new form) of previous users scores.

View 10 Replies

High-Score Table : Sorting Values From 2 External Text Files?

Mar 7, 2011

Program : my game is a frogger port, you make the frog cross the road until you run out of lives. When you die, you are asked to enter your name and the name is appended to the end of file called names.txt, the final score is appended to the end of a file called scores.txt.Using the System.IO functions, i read the contents of each text file, and load the contents into two separate strings (one for names, one for scores. These two long strings are then broken down using Split() command, transferring the pieces into an array. (again 2 arrays - one for names, one for scores). The contents of both arrays are then loaded into 2 listboxes, 1 for scores, 1 for names.

Problem: i can sucessfully load the contents of both files, and display them side by side - but i want to re-arrange the scores so that they are in descending order. While doing this, i need to make sure that the player name matches up with the score - so the order of the names being displayed would have to be changed aswell. After spending many, many hours trying to do it myself i have had to give up - i'm clueless. My first issue is converting the score array into integers so that the array could be sorted, the second problem is then sorting the names so that the scores and names match up.

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

Carver-parallel (range Code) - Allow User To Enter A Score And The Program Returns A Grade Based On The Score Entered

Apr 14, 2012

Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......

[Code]....

View 2 Replies

Get Score From Game

Dec 13, 2009

is there any way yo get the score of one player in counter strike? one of the player on the computer. not all the players. i know that when you are looking att server info, then you can see all the player and there scores. is there anyway to replicate that function?

View 14 Replies

Game Programming :: Sorting High Scores?

Sep 10, 2009

I am Writing a Program in Visual Basic 2008 for my High Schools Advanced Higher Coursework Project... The Game its self runs perfectly and i can display the highscores. i just need some help showing 10 hi-scorers and in ascending order.Currently i am using this code for viewing them.

Code:
Private Sub HiScores_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TmpHiScore As String 'Temporarly stores the data in file "HiScores.lol".
Dim intTempo As Integer = 1 'Stores the length of variable TmpHiScore.

[code]....

The hiscores them selfs are stored in a personalised text document and they are all on the one line. the format of this is NAME:SCORE,NAME:SCORE,NAME:SCORE and so on!

View 3 Replies

Game Programming :: Access DB As A Score Table?

Mar 29, 2010

I have to use an access DB as a score table and having a few problems.I have the table showing in a data grid fine what i now need to do is find a way of updating it depending on the score someone gets.anyway here is what I have so far and what I want to do is if player scores say 1000 that his/her score then will be put in that place then the others move down....

Code:
Imports System.Data.OleDb
Public Class highScores
' Full path to database must be given if not in Debug/BIN folder

[code]....

the score table opens on a new form and the score is held in a var on form 1 called lol score just a quick edit I have put 2 buttons on the form to load the data in the grid to start with but this will load automaticly and the name will be entered into either a txtbob or an inputbox?

View 1 Replies

Game Ranking Based On Time And Score

Oct 9, 2010

I am creating a point system for a game. What i have right now is that fastest time with highest score gets a higher ranking.

But i can't seem to create this, what i did was to sort the time first from lowest to highest. Then sorted the points from highest to lowest.

Now my problem is, when i display the results. This is what i get.

RANK TIME SCORE
1 0:56 5
2 0:60 4
3 0:37 2

[Code]....

View 2 Replies

Game Programming :: Alogrithm - Attempting To Get High Scores Into The Correct Order

Sep 16, 2009

I am attempting to get hiscores into the correct order but.. I am having troble with some of it.. I have this for my sort alogrithm

Code:

For i = 0 To Howmany
For j = i + 1 To 9
If ArrScore(i) < ArrScore(j) Then
temp = ArrScore(i)

[CODE]...

The hiscores text file looks like this:

Code:

Stuart:120,LoL:192,Computer:112,LoL:113,

The immediate window looks like this when its run.

Code:
0 1 , Stuart , 120
0 2 , LoL , 192
1 2 , 120 , 120
2 3 , Computer , 112
2 4 , LoL , 113
3 4 , 112 , 112

View 3 Replies

Game Programming :: Creating A Card Game For VP?

May 21, 2010

I am trying to create a card game on microsoft visual studio 2008. But i am finding it tricky to get the right codes for the generating button. The button wiill display three random playing card suites and when all three match the user is declared the winner.

View 5 Replies

Array (parallel) - Allow User To Enter A Score And The Program Returns A Grade Based On The Score Entered

Apr 14, 2012

Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......

[Code]...

View 1 Replies

Add The Score To Label Control That Keeps Score For Character X

May 10, 2010

I am writing a noughts and crosses game and I want to be able to keep score everytime each character wins a game, I have written a sub routine to handle this but it seems to count up in 5's and 10's??I have used a global variable like this Dim i As Integer = 1 then declaired that variable in my sub like this i += 1 (I thaught that this would just add 1 everytime X won a game)then used the variable i to add the score to the label control that keeps the score for the character X.My question is, am I using the correct syntax (+=) for the variable.

View 2 Replies

Using GetCurrentMethod In (supposedly) High-performance Code?

Sep 23, 2009

For logging purposes, some methods in our application include the following line:Dim Log As ILog = GetLog(Reflection.MethodBase.GetCurrentMethod().DeclaringType)I have what might be described as an irrational fear of reflection, which I try to keep in check. However, calls like this in methods that are executed potentially a hundred times a second concern me. I don't know as much as I should about reflection; but from looking briefly over the documentation, it looks to me like I could replace the following with:Dim Log As ILog = GetLog(Me.GetType())My question is three-fold:Does Me.GetType() actually return the same Type as GetCurrentMethod().DeclaringType? Does Me.GetType() actually do anything differently from GetCurrentMethod().DeclaringType, or is it doing the same thing under the hood?

View 3 Replies

Way To Make A Score Keeping Mechanic Via Having Code

Oct 6, 2010

I am having trouble with creating a score keeping mechanic. I am designing a maths game for junior school students.My school teacher taught us a while ago, a way to make a score keeping mechanic via having code looking like this: Dim Score As Integer.

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

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

Create "a Windows Form Game Called Yahtzis Which Uses Five Dice And Three Throws To Create A Score"?

Oct 18, 2010

i am suppose to create "a windows form game called Yahtzis which uses five dice and three throws to create a score" .

The problem is that i don't even know how to start it can anyone shed some light.

View 2 Replies







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