How To Create Simple Points System For Game

Mar 30, 2012

I am creating a points system for a game, this is the code I have but it isn't working as I want it to.
Dim intScore As Integer = 10
Dim intNumOfGames As Integer = 0
intNumOfGames += 1
intScore = intScore - 2
The user will start will a score of 10, but everytime they click the button the user should lose 2 points off the score. But my code above that doesn't happen, when the user clicks the button it only happens once leaving the user with 8 points throughout the game.

View 1 Replies


ADVERTISEMENT

Simple Scoring System For Game

Mar 30, 2012

I am creating a game which has a simple score system which I don't understand why it isn't working the way I want it to. When loading the game the User starts with 10 credits and for every time they run the game it costs 2 credits

This is my code for this below
Dim intCredits As Integer = 10
Dim intGamesPlayed As Integer = 0
intGamesPlayed += 1
intCredits = intCredits - 2

It has no errors but it doesn't take away the credits each time the game is played besides the first time. So when I run the game it will go to 8 credits, and it will stay on 8 credits even if I run the game again.

View 9 Replies

Make A Simple Inventory System For Video Game?

Nov 3, 2011

Im still a bit newb to coding in Vb but Im trying to figure out how to make a simple inventory system for my video game. I need it to do a few simple things and Ive never made a inventory system before so im a bit lost on how to approach it.

Functions Needed:

Player has 40 pb that act as the visual inventory or display the item in that slot.

[URL]

I set up my armor menu to allow drag an drop of the item but again not sure how to even get the inventory system created to finish the armor menu to allow the object to be dragged into its box and remove its self from the player inventory.I think I need to make a array for 39 or 40 in my adventurestorage class. That part Im pretty certain of but how do I set that part up? I have over 200 images that need to act as a item that can be dropped into the inventory.

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

Create A Simple User Tracking System?

Nov 17, 2010

I'm trying to create a simple user tracking system so whoever has the program open can see who else has the program open. I know how to retrieve the username and everything. What I was doing was updating (loading and saving) a listbox with a text file on the network with the usernames in it. I can't get it to work right and I think its because the simultaneous opening and saving of the same text file by multiple users. I know this isn't technically the best way to go about doing this but it seemed like it should be the easiest. I don't want to make a huge project out of this because it isn't that important, it would just be nice.

View 7 Replies

Create A Scoring System Game?

Aug 6, 2009

how can i create a scoring for system for my Maths quiz game made using VB.My quiz game can generate automatic numbers / questions and shows a message box whenever the user gets the answer right or wrong. i.e.when the user presses the check answer button, a message appears stating that he/she go it right or wrong. Then the user can press the next question button to get a new question.

View 8 Replies

Game - Float Points Away?

May 15, 2010

I'm building a card game called 11-UP. See the game here.I've gotten to the point where I need to make scores show up when the selected cards have a sum of 11. For example, if the card is worth 200 points, then "200" should become visible for about a second and then "float away".

I know I can do this with a timer and the location property. I was thinking of creating an array of 22 timers, one for each card. When the selected cards have a sum of eleven, I enable the timers for each selected card. The timer makes the "score" for that card appear, then move up a few times, then vanish.

Does anyone have a better way to do it? Maybe with only one timer?Also, how could I make the "scores" become more transparent as time advances? I'd like to make them not only float away, but also "disolve."

View 13 Replies

Game Programming :: Cant Figure Out How To Plot Gps Points In Directx

Mar 10, 2010

i think this is the right place to post this.i am just learning vb and have spent the last week trying to figure out directx. im using visual basic 2008. i have installed directx i got it to render a blank screen but i cant get it to draw anything. what i have is a program that collects gps coordinates and i want to plot them to screen. i got it to work using gdi+ but i wanted a 3d view. i want a view like a tomtom(without Map) and draw a line where i have been.

this is what i have for creating a vector to plot i think it is creating the vector ok. when i stop in debug and mouseover there is data in it (ie x,y,z Coordinates). i think it is drawing i think i just am not "looking at it"

[Code]...

View 1 Replies

Game Programming :: Waving Lines - Beginning And End Points?

Jul 25, 2010

I am designing a game, in which you have to connect some lines, these lines are defined by the beginning and end points. I would like them to wave, yet always keeping the edges on the two points, also, when you connect 2 lines, I would like them to appear to be one continuous line, which contains the beginning, end, and the point of connection between the lines. To do this I've tried bezier curves, with a random point, always changing, but I noticed that bezier curves only works to 4 points, and the line does not always passes through the points themselves...

View 2 Replies

Build The Shortest Path Between Any 2 Points In This List - Develop Some AI Code For A Game ?

Aug 17, 2010

I'm trying to develop some AI code for a game I'm creating. I have a list of x,y coords and I need help figuring out what I can use/do to build the shortest path between any 2 points in this list. I would like to build a function that I can pass a list of valid X,Y coords to use when generating the path, start point, end point, and have it return a list of points, which would be the shortest path between the start and end point, using the list of points supplied. I have looked at A* and Dijkstra's, but am having problems implementing the algs in code, as all this seems graph based.

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

Loop Through Points In A System.drawing.rectangle?

Sep 6, 2010

Looking for something like:

dim rect as system.drawing.rectangle
For each point in rect
Debug.print(point.name, point.value)
Next

View 2 Replies

Game Programming :: Simple File Error

Aug 16, 2009

I am making a little game for my friend in Visual Basic 2008. It uses 3 files (gamedataidname.txt, gamedataidlevel.txt, gamedataidgold.txt).

When the play button is clicked, I wrote some code to check if the file exists and display the content of the 3 files. This part works fine. But then I have a 'Else' statement to create the files.[code]...

View 6 Replies

Setting Short Function By Setting Poker Game Points?

Aug 23, 2010

I need help and wondering if you can help me to get my first project...it's a hobby and wondering if you can get me code for this so i can see how it does it* Evaluate( ) Prints the evaluation of the hand to the evaluation Label.

o If IsFlush( ), prints "flush; "
o calls SetPipArray( )
o Uses a For Loop to go through pipArray. For each element, uses a Select Case statement to

[code]....

View 9 Replies

Make A Simple Program That Detects If A Game Closes?

Feb 10, 2011

I'm trying to make a simple program that detects if a game closes, and when it does, it shuts down the computer.

View 1 Replies

VS 2010 - Make A Simple Text Based Rpg Game?

Nov 9, 2011

[code]...

Yup,not PHP but it's the same for readability)As you may imagine I want to make a simple text based rpg game, but that's not an important fact.The buttons btn1 to btn3 are already created at the designer, and there are going to be other procedures which will assign values to their text property according to the game context (main menu, combat, shopping, training, etc.) you're at.Ok, so what I want to do with that procedure I pasted is to parse the text of ANY of those buttons when I click them, and according to its value select a case which will trigger another appropriate procedure (now there are only msgboxes as placeholders for testing only).My problem is that I dont know how to refer to the originating class of the handled event! I mean, let's say I click btn2. I'll want to immediately get the text property of that button only and use it as the value for the select case tree. I suppose I need to put something at that ?I wrote there, but I don't have any idea. The first time I was so naive to put me.text in there, and of course it returned the form name. Is there's something to do this thing...? I thought at first it would be a very simple task, but I'm going nuts searching for a solution so it's like if it was not possible, but I find hard to believe that, because this would be very useful, right? By the way, what I want to achieve is not needing to make a separate procedure for each button and to avoid as well the need to move any game option to another procedure if later on I want to rearrange the menus, because I expect the game to have more than three buttons actually.

View 2 Replies

Making A Simple Game - Multiple Hotkeys - Simultaneously Go Up And Left

Jun 9, 2011

I'm making a simple game. I want simultaneously go up and left.

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
' If e.KeyCode = Keys.Z Or e.KeyCode = Keys.Up Then

[CODE]...

Left, right, down and up work. now diagonal.

View 1 Replies

Write A Simple Game On Which The Player Has To Pursuit Some Figures On The Screen?

Oct 16, 2009

I'm currently trying to write a really simple game on which the player has to pursuit some figures on the screen. Since i'm just writing the prototype version i'm using a Panel wich i redraw 1000 times per second. Now, i want that every level is similar but not the same as past level, so i created a Level Class that contains the game objetcs of Player Class and the Figure Class, wich are the ones that have all the movement subrutines. So, with a Timer, 1000 times per second, i get the input from a joystick, pass it to the player objetc and update the position of the figure object. All this stuff is reported to an internal Panel that every level object has, wich i refresh and then pass it ByVal to the panel that the player actually sees. The problem i have is that after the first level ends, when the second level starts running, i can see the last frame of the fisrt level flashing behind the figures and it makes the game run a bit slower after every level. I tried keeping a copy of the inicial state of exterior panel and use it to clean the one i'm using on the levels but it didn't work...

View 11 Replies

Create An Array Of Points?

Oct 2, 2009

I'm trying to create an array of Points but can't seem to get it right.

I can create an array of Integers just fine.

Dim MyArray() as Integer = {1,2,3,4,5}

View 3 Replies

Create A Rectangle For Two Points (vector)?

Nov 15, 2011

I am wanting to create a rectangle for two points (vector). I need a function that takes two points and a length and calculates a perpendicular point from line (vector) AB, to a given length.

I found this code, however it doesn't seem to work.

[Code]...

View 2 Replies

Create Back-up And Restore Points?

Jun 5, 2011

How to make back-up and restore point? what I want to happen is when I click the button back-up. It will generate a back-up of database in access on the current date. And if I click the button restore. the system will restore the last back-up point. So that when there is a file accidentally deleted, the system can retrieve it again.

View 1 Replies

Create Line Between Two Points And Save?

Mar 14, 2009

currently i dont have any code to show but i am curently creating an application on a windows mobile 5 device and wondered how i can plot a route manually....ie what i want to be able to do is use the stylus to touch somewhere on the screen and plot that as point A, then touch the screen somewhere else and plot that as Point B (in some sort of database) so that i can review that route afterwards

View 1 Replies

Offset The Points In A Polygon Without Having To Change Each One Individually The Points Are In An Array?

Apr 20, 2010

is there a way to offset the points in a polygon without having to change each one individually the points are in an array

View 2 Replies

Converting DLL's Created With Intermediate Language To Create Entry Points Within A DLL

Nov 16, 2009

In need of some desperate help. Has anyone had any experience with a software product called Pres? The programme provides a function (userhook) that can run externally created dll's as the programme offers no COM support. The basic requirements for the dll are as follow.

1, The dll requires a public function named UserInstruction

2, The UserInstruction must have 5 parameters. The first and second of type long, the third a double array and the fourth and fifth parameters required type is a string.

This all seems pretty simple. But as .NET doesnt support exporting functions within a DLL to allow direct public access to the function through third party software it becomes tricky. After doing some research it seems as though this isn't possible in .NET. The only way I can see to do this is to convert the dll to Intermediate Language and play around with it once this is converted and then convert the IL code back to a DLL. I found this on the following site [URL]..After trying this when I try to use the DLL via Pres I am still getting no joy.

View 1 Replies

Block System For Simple Web-browser

Jan 23, 2010

[code]Close to no real programming skills (PhotoShop artist turning Visual Basic Beginner)This is a snippit of the code used in my browser. Basically the items that are in the list box are loaded from a text file hidden in the installation directory so a manager (or such) will be able to edit which websites are navigate-able.Here comes the problem though, I have not been able to get it to work correctly it will not block any of the listbox items. If I can remember it will only block the site which is selected.How can I re-code it to make the program block all the items in the listbox instead of just one.(Also if not too much trouble how can I make something that will enable and disable the code)BTW this isn't a commercial program or anything just a project I have been working for ever at home.

View 9 Replies

Creating Simple POS System For Bakeshop?

Jun 21, 2010

i want to create a simple POS system, can you tell me how can i hide group of buttons/ controls on the first load of a form and then group of controls will just show after a button is clicked or selected. Also i want to have a display (on same form) of what is selected by the user.

View 3 Replies

Develop A Simple Inventory System?

Mar 13, 2009

I am trying to develop a simple inventory system. I now have all the database set up and would like to know if there is any code that I can refer to that alert users when the stock is low (e.g pop out window informing users that stock is low or change the number of stock in the database table into different colors).

View 16 Replies

Simple System.Text.RegularExpressions Request?

Jan 10, 2010

after searching for around a half hour or so, I found that the regularexpression API could do what I need.Basically, I needed to only allow letters, numbers, and symbols in my textbox. The problem was, I could stick alt codes in there, even with a keycode case check

View 2 Replies

[2008] How To Make Simple Login System

Feb 2, 2009

i know how to make a simple login system but im not sure how to script it. I make a txt stored at a website. And i will open it with a invisible textbox (to login, only username requed). Then when i have a logon screen. And if i write like:"ABCUSER""SUSER"And make a if like: If 'text in login screen' equals line 1 or 2 in invisible textbox, then ...etc

View 14 Replies







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