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


ADVERTISEMENT

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

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

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

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

Get The Points Which Make A Polygon From A Region Which Was Derived From The Polygon's Points?

Jan 31, 2010

how can i get the points which make a polygon from a region which was derived from the polygon's points?

View 1 Replies

Format A Value In Float?

Nov 30, 2011

I am working in windows application, I have one field in sql server which has data type decimal(15,10). When I enter data from application like "123456789012345". It should be convert it in 12345.678901234 when press tab on text box.

View 4 Replies

How To 'getpixel' For 32 Bit Float

May 18, 2010

My program works through each cell in a raster bitmap loooking at the r g b values. Actually I'm just working with greyscale so r = g = b. I use the get pixel method to return the 8 bit value of each pixel (0 - 255). However I'm now working with a single channel 32 bit float bitmap. I can't load it into VB. I tried Dim myBitmap As New Bitmap(OpenFileDialog1.FileName) but this fails with an unspecified error when trying to open a 32 bit tiff.

The question is: which graphics format will allow me to load a 32bit bitmap into VB, and if I succeed will the getpixel method return 32bit float results for the greyscale level for each pixel?

View 14 Replies

C# - Division By Zero: Int Versus Float?

Dec 18, 2010

Deviding an int by zero, will throw an exception, but a float won't - at least in Java. Why a float have an additional NaN info, while int haven't?

View 6 Replies

Can't Round Up Float Number

Dec 15, 2011

I can't round up the decimal number using VB.net

i'm using Cint(12.5) this must be 13 but it is not so i try Round(12.5) but still not roundup what do i do?

View 5 Replies

Cast Float To Integer In ASP.NET?

Nov 3, 2011

I am trying to assign a specific width to my image in asp.net (using vb.net). So I used the next code:

<asp:Image ID="PercentageImage" runat="server" Height="7px"
Width='<%# Eval("votsGraph") %>'
ImageUrl="~/images/bar.JPG" />

So how do i cast this one? (The type of votsGraph is float.)

View 1 Replies

Convert Integer To Float?

Jun 20, 2009

OK so in this hex editor I have, Hex Workshop, when I search for a 32 bit float i type in (lets just say) 1. It then spits it back at me in a 32 bit float, but also as hex.

the 32 bit float for 1 = 3F80 0000

I really cant grasp this idea, let alone put it into my program.

able to convert an integer to a float then to that sort of hex.

View 5 Replies

Layout - Float A Control Like In CSS?

Apr 30, 2011

For example: how could I have 3 pictures aligned to the right all in one row, then when the far right picture is deleted the other two move to the right to fill that space. Edit: I'm looking for this capability for both Windows forms and web forms. I'd be happy right now if I could just get the code for Windows.

View 1 Replies

Cannot Get The Rounded Float Value In Datagridcell To Dataset

Jul 31, 2009

actually when I edit float value in datagridcell , I want only two numbers to be displayed after point(.)....i.e 2.35 instead 2.34567 more over am getting it but the actual thing is that value is not getting update in the dataset , but when I reload the form it shows like 2.34567 only instead i want 2.35...

Public
Sub GridCellValidation(ByRef dgvRow As DataGridViewRow, Optional ByVal FillControls As Boolean = False)

[Code].....

View 2 Replies

Convert 4 Bytes To IEEE 754 32-bit Float?

Mar 15, 2011

I am receiving a data stream which contains 4 bytes of data which need to be converted to a 32-bit float (IEEE 754). This was easy to do in C as I created a union with a 4-byte array and a 32-bit float. Job done. However I have no idea how to accomplish this in VB (pls note I do not code in VB).

View 3 Replies

Converting Text To Decimal Or Float

Feb 20, 2010

I am working on a simple asp.net vb.net code behind page.I need to accept input from an asp textbox control when the user clicks the 'calcButton'. I've set up an event handler for the click:[code]I looked at the msdn page and it says to use ToDecimal.

View 1 Replies

Read A Float Datatype In Structure?

Jan 24, 2007

I have to read some float values in vb 2005 from a binary file created in powerbasic .I have declared one structure to read this .In the structure i am trying to read those vaues in single datra type object but the values returned are like 4.02365-E67 I have tried all the data type but unable to read it properly The structure is

Structure ThirtyminUPD
<VBFixedString(10)> Dim MSymbol As String
Dim MTime As Int16
Dim Mopen As Single

[code]....

View 2 Replies

ReadWrite Float Address Memory?

May 9, 2010

read and write on other process float memory address w/ pointers and offsets

i do have a module well it works with 4bye and long but for some reason it doesnt work with float address

View 10 Replies

VS 2008 Convert Float Value To String?

Jul 26, 2010

how would i go about converting a float value to string?

View 9 Replies

Fix The Difference Between Float And Numeric Field Types?

Dec 27, 2011

I have two dbf tables and must compare them by column (field) types. For example:

Table1: Id (Numeric) | Name (Character) | Salary (Numeric)
Table2: Id (Numeric) | Name (Character) | Salary (Float)

With these two tables program should display message like (types do not match in field SALARY [F <> N]) where F is float and N is numeric.

View 1 Replies

VisualBasic 'single' Same Format As Visual-C++ 'float'?

Feb 3, 2010

Is a VisualBasic 4-byte single precision floating point variable the same format as Visual-C++ float?

I need to send floating point values from an embedded PowerPC written in gcc C++ to a VisualBasic GUI,and want to first test it by simulating the embedded using Visual-C++.software developer

View 2 Replies

.Net2008 - Crystal Report -LINQ To SQL - Float Filed?

May 16, 2012

When i try to make a classes by LINQ to SQL for a database i can see all fields from database ( which contain a int filed and nvarchar(50) and Float but when i try to make crystal report and make a connection from current connection i can only see fields of int and varchar(50) but i can not see float fields

View 4 Replies

Converting Bytes To IEEE Float And Vice Versa?

Dec 6, 2009

I am reading and writing binary data through a serial port and must (a) reassemble the incoming four bytes that make up a IEEE single-precision float into an actual float, and (b) disassemble a float into its four constituent bytes before squirting them through the serial port.

I am using VB.NET 2008. In VB6, I could use the LSET command, as in:

Code:
Private Type typByteArray
B(1 To 4) As Byte
End Type

[Code]....

But of course this code won't work in VB.NET. In C it would be easy to handle situations like this by using unions, but VB.NET doesn't support them.

View 2 Replies

Document Lines Length - Enable As Float Integer?

Apr 16, 2009

I was working on editing a code for a simple text program, but when running the program for multiple lines, the text being read gets too long or too many lines, the computer slows down alot and almost stops functioning. I am using standard integers like document.lines.length or listbox.lines.count. I think these are standard integers and I need to know how to enable them as Long of Float Integers.

I'm assuming I just change
Dim X as integer to
Dim X as long
or Dim X as int16

But I'm not sure as everytime I change something I get cannot convert to double. The code I'm interested in changing is ...
For i As Int16 = 0 To ListBox1.Items.Count - 2

The list box will only get to about 3000 items or so.
and
For iPos = 1 To xy
If Mid(sString, iPos, Len(Text1)) = Text1 Or Mid(sString, iPos, Len(Text2)) = Text2 Then
JJ = TextBox1.GetLineFromCharIndex(iPos)
This read box will read documents above 32,000 lines, which is the reason for not wanting to use Integer.

View 3 Replies

Float A Label (label1) In The Bottom Left Of Form?

Jul 20, 2010

How do i float a label (label1) in the bottom left of form? so if form resizes it still stay in bottom left, though 5px from left and bottom.

View 2 Replies

IDE :: Draw A Rectangle Whose Height And Width Are Float Values?

Oct 22, 2011

I want to draw a rectangle in the form and their height and width must be in float values. I want to display the height and width of the rectangle in the output

View 3 Replies

Unable To Get Rounded Float Value Edited In Datagridcell Into The Dataset

Jul 31, 2009

actually when I edit float value in datagridcell , I want only two numbers to be displayed after point(.)....i.e 2.35 instead 2.34567 more over am getting it but the actual thing is that value is not getting update in the dataset , but when I reload the form it shows like 2.34567 only instead i want 2.35...

[Code]...

View 1 Replies

Text Validation : Make Sure User Has Entered A Number(int/float/double Etc.) Not A String?

Apr 5, 2009

When I read a value from text box I want to make sure user has entered a number(int/float/double etc.) not a string. Is there any function to check it? otherwise how do i validate it.

Language : VB.NET
Version : Visual Studio 2005

View 6 Replies







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