Grid Based Puzzle Board Game Block Removal Algorithm?
Jan 26, 2010
the rules are that same coloured blocks of two or more can be removed by clicking on them. blocks then slide down from above. if a column is empty columns other columns move in from the sides.when someone clicks on the green blocks in the bottom row the columns should slide in from the sides. columns to the left of the black line slide right and on the right of the black line slide left. so in this case only the two rightmost columns should slide from the right to the black line after removing the green blocks.The problem i am having is in designing a suitable algorihm to do the collapsing after the removal. my current approach is to test each column from left to right to see if it is empty. if it is empty then i slide whatever column is to the left (if left of the black line) or to the right (if to the right of the black line) over the blank column and repeat this in the direct i am sliding from
View 1 Replies
ADVERTISEMENT
Jun 29, 2011
I am trying to make a turn-based board game that will be run on multiple computers. I am writing the game logic and design in VB. I searched for a little and could not find the information I was looking for. One question I have is, will I need a server if there will only be 2 players. Also, what language should I use to write the server side code.
View 1 Replies
Aug 6, 2009
What I want it to do is, as I'm typing the word, that it highlights it on the board using the button(x,y).doclick sub which highlights it. Right now my implementation finds the first letter, then keeps trying each letter until it meets the 8 corner condition (ie it is neighbored to the last one) but this does not always work. If there are say 2 "G"'s on the board and I want the bottom one, this will not work. Can somebody give me an example of psuedocode
View 1 Replies
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
Mar 18, 2009
I am making a variation of the board game Trivial Pursuit. I am having trouble moving my piece around the board. The board is a circle divided into 32 squares, that are coloured. I am wondering how to get the players pawn to move around the board if it is a circle. They have to move according the the number they role on the dice. I have the dice rolling and finding numbers, but its the moving i'm having trouble with
View 1 Replies
May 13, 2010
I am creating a program in which there is a listview control with many items contained in it. It also has checkboxes for each of them. I am trying to get it so that when you check the checkbox next to an item, it removes the item from the list. I am using this code:
Private Sub ListView1_ItemCheck(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles ListView1.ItemCheck
ListView1.Items.RemoveAt(e.Index)
End Sub
When I run this however, and check an item, it gives me this error (I am checking the first item in the listview, which would mean the index is 0): InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index
I've have been testing this code out for both the listview events ItemCheck and ItemChecked. How is 0 out of the index range? Wouldn't it be the first item in the listview, in which case it should remove the item.
View 3 Replies
Jan 9, 2010
I'm in the process of making board game created into a pc game. It will be a 2-d basic board game. What I'm looking for, how to move pixels a certain space. I'm not all certain on how the game is played but right now I'm just wondering how to move a picture certain number of spaces. This will most likely be based on a dice roll I'll create later.
View 6 Replies
May 10, 2011
Alot for the algorithm for Feistel cipher ( block ciphers ) but I did not find any . .
View 1 Replies
Mar 14, 2012
So i am working on a GUI for a game (just some messing around in VB.net tho) and i came across the following problem. The board of my game consists of a 70*35 grid of RectangleShapes on which i can move around. When i start my program it renders the board from right to left on the screen and i have serious lag when i try to move around on it. I know you'd normally use double buffering to reduce flickering, but that didn't do anything (unless i'm doing it wrong).
This is my code:
Code:
Dim player As Player = New Player
Dim board(70, 35) As RectangleShape
#Region "Initialisation"
[CODE]...
View 6 Replies
Aug 20, 2011
I am trying to design a highscore board that displays scores in order based on the label (after countdown timer) from another form.i want it to ask the player's name and automatically assign the name to the score and stay together even when being shifted (eg when a new score appears)currently i have designed a form to display in order, numbers typed into a text box.this is my coding so far
Public Class Form1
Dim lstInt As New List(Of Integer)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load[code]....
View 11 Replies
Jun 18, 2010
I added a pathfinding algorithm to my DynamicBitmap. Can anyone offer suggestions on ways to improve it?I attached the DynamicBitmap in a text file (copy/paste to a class). Here's some code for a Form that shows how to use it.[code]......
View 1 Replies
Aug 29, 2009
I'm making a user control, and I manually draw the text string, but I can't seem to keep it centered. I need it to stay centered no matter what the font, or string length.
View 1 Replies
Oct 18, 2011
I am using logging application block for EL 5.0. I defined listener like below.
<add name="FlatFile TraceListener" type="Microsoft.Practices.EnterpriseLibrary.
Logging.TraceListeners.FlatFileTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging"
[Code].....
View 2 Replies
Nov 23, 2010
I'm trying to load several grids based on the Type values in my xml file. For example my xml file is in the following format:[code]How do I accomplish this when in the load event of my windows form?
View 2 Replies
Apr 28, 2009
I am trying to update a table based on row selected in a grid (C1TrueDBGrid1.Columns(1).Value), but I am getting the following error:
Update unable to find TableMapping['Table'] or Data Table 'Table'
Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|AOPT2002org.mdb;Persist Security Info=True;Jet OLEDBatabase Password=testaopupdate"
[Code]....
View 3 Replies
Dec 18, 2009
I have a Link Table containing the ID field of several tables, how do I load the grid from the Link_Table based on the ID field of several tables loaded to the grid? [code]...
View 9 Replies
Jul 3, 2011
How to change vb .net datagridview row color based on grid checkbox value. Having bound DataGridView. BindingSource as data source. called DGV. I m using this code under cell_formatting event
[Code]...
View 4 Replies
Feb 4, 2009
I have a datagridview that's taking a while to load because my table contains almost 5000 records. How can I provide an easy way for clients to filter the grid based on a product name. I was thinking of having labels with each alphabet on my form and when they click a label it filters the bindingsource according to the chosen alphabet. this seems like an awkward solution though.
View 2 Replies
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
Mar 25, 2010
is there a tutorial for making a Text Based Game In Visual Basic?
View 2 Replies
Jan 9, 2011
Suppose I have a table with columns userdef1, userdef2 userdef6 and I have another table that defines these fields. i.e UserDef1 = "MyName" etc
What would be the best approach for retrieving these values and updating the column headers?
View 1 Replies
Nov 19, 2010
I have a DataGridView with 3 columns (metric_key, metric_name, metric_value).There are for example, 6 ROWS in this table (6 different metrics), added programmatically (DGV is not bound in any way)
Now, when I assign values in my grid I do:
dataGridView1.item("Metric_value",0).value = "value of the metric in row 0, in the column named "metric_Value".
[Code]...
View 1 Replies
Mar 20, 2011
Im working with a DataGridView with an imported CSV file where the values are delimited with (,).. The grid works perfectly fine. My ultimate goal is to hide the grid out of view from the user and access the data in the grid based on the coordinates of the grid specified i.e (The cell in column 5, row 6 contains the value "Taco") and I want to save that value to a variable...Eventually I want to loop through all the values of a column and save them to individual variables to be later used. So far, this is what I have...
Dim sReader As New StreamReader("book1.csv")
Dim Record() As String
For x As Integer = 0 To 17[code]....
Presently, that will only display the data in column 0, row 0 in those labels...
Note: 17 in the for loop is the amount of columns in the data i provided.. that number will never change.
View 1 Replies
Dec 11, 2009
I have this lambda expression Me.SubcriperGrd.ItemsSource source.Where(Function(p As subscripers) p.Navn Like navn)
where i should filter the grid data based on the typed input in a txtbox
It returns the result when i type the full name but it doesn't filter the data as i type along in the txt field
View 2 Replies
Jun 1, 2010
i'm creating a game for a college assignment based on Yahtzee, and so far everythings going smoothly but i've run into a hitch! Basically, after each roll of the dice i want to be able to retrieve the number of the dice wich apeared in each picture box. But how would i go around retrieving that type of data from a picturebox?
View 6 Replies
Dec 16, 2010
I am reading the memory from a game and I have managed to find the x,y,z values of the player (z is irrelevant). Now I am trying to make some sort of a waypoint system and I thought it would be best to make a small coordinate based map that will act as a birds-eye view of whats going on ingame. But I don't know where to begin creating this thing, since it needs tons of xyz values.Just throwing this in here since I've already made the thread:I also want a small circle to represent the player that will turn, facing waypoint 1 and move in a straight line towards it.
View 1 Replies
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
Mar 18, 2009
I am just for learning purposes trying to develop a one player text based game.
I have a rich text box (GameWindow)
I have a text box (InputWindow)
I have a button (InputButton)
and a bunch of labels that aren't really important
I have two questions first is easy probably. How do i get InputWindow to respond to me hitting enter when text is in it?
[Code]...
But if i plan to have more that is only going to increase the size and code needed and im sure there is an easier way i just don't know how to do it.
View 1 Replies
Jun 10, 2012
I often think of classes and modules as "global" variables or variables you can use any where in your solution/project. can you make global timers? I basicly want to make a farming like game but the plants will grow based on a timer. So if the player closes that form the timer needs to still tick. So can I make global timers so the timer would not have to start over if the form is closed and reopened?
View 4 Replies
Apr 20, 2010
I have a grid containing rows flagged with different priorities. I want to color the high priority rows red, low ones blue, etc. I'd like to set the shade based on a mathmatically calculated gradient rather than arbitrarily assigning colors to specific priorities. How can I extract a single color from a single point along gradient?
View 1 Replies