Snake Game Food-Making?
Mar 3, 2009I just started a snake game. This is what I have so far:
View 2 RepliesI just started a snake game. This is what I have so far:
View 2 RepliesI am simply trying to make the snake grow when it hits food, however, I am at a stand still.
[Code]...
I am currently in the process of making a snake game using VB.NET... I was just wanting to gather ideas on how to do the body of the snake..Currently I have a class called SnakeBody which contains the following code:
[Code]...
I guess what I am asking is if Dim body As PictureBox a logical thing to put in my class. As in, I am not sure if that is the correct thing to do? To create the actual body of the snake I will have an array of these SnakeBody objects. If `'Dim body As PictureBox is valid How do I reproduce the same picturebox everytime my snake eats something?
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 RepliesI read the boundary thread and I think im still lost on how to do this but my goal is to set boundaries so the snake doesnt just keep going off the screen, also how to set a boundary up so the snake cannot hit itself (like in the original snake game)
View 4 Replies[URL].. to helping me in this game >>> plzi want some changes in that game >>* set the game as full screen .. not only form ..* change automatic moving to maneul...after throw a nurd, and change the players command colour for from defult"gray" to red and blue ...ect.* add textbox or lable or masgbox to add Questions "i've it"... as hiddenwhen nurd stop set as shown and the Questions change every time with nurd
View 2 RepliesIam doing a project for school (snake game) Ok here is the code:
[CODE]:................
Snake.image is the head of snake and snake2.image to snake27.image are the rest(body...) So i want create a code that (if snake intersect snake2 to snake27 parts) then timer1.stop I have tryed with:
CODE:
But it doesnt work..
I'm trying to make the classic Snake game in VB.NET, but if I hold a key (any key) during the game, after a few seconds the game freezes until I release the key. I've tried lots to fix this, but nothing works, maybe because I don't understand the problem.I'm assuming that when I hold down a key, the Form1_KeyDown function gets called, and when, after a few seconds, the key goes into "I'm being held down" mode, that function is constantly called, so the timers don't get a chance to update. But like I said, I'm probably wrong.
I've been struggling with this for a while. I think this is all the necessary code, please let me know if it isn't.
[Code]...
I'm trying to make the classic Snake game in VB.NET, but if I hold a key (any key) during the game, after a few seconds the game freezes until I release the key. I've tried lots to fix this, but nothing works, maybe because I don't understand the problem.'m assuming that when I hold down a key, the Form1_KeyDown function gets called, and when, after a few seconds, the key goes into "I'm being held down" mode, that function is constantly called, so the timers don't get a chance to update.
View 10 RepliesI am currently working on a snake game. I am trying to make a red block appear every time you eat food a red block appears. If you hit the red block, you die. For some reason, food works, but the red blocks never appear
View 6 Repliesim making a game for my assignment of snake. Vb10 Im coding 90% by teaching myself. Was just wondering if anyone has any idea how to help me. Im stuck with the array for making new pictureboxes and moving them to extend the snake here i some of the code.
Private
SnakeHead.Left = SnakeHead.Left + xDifference
SnakeHead.Top = SnakeHead.Top + yDifference
If SnakeBody(1).Left <> SnakeHead.Left And
SnakeBody(1).Top <> SnakeHead.Top Then
[Code]...
we were asked to create a game.Me and my friend decided to go ahead and make the game 'Snake' (I think you all know this one)Since we never had any teaching on how to do it we looked already made games and used the same code (we found this one on a Youtube tutorial so I think it was alright to copy it).We picked it because it seemed pretty easy and we can tell what each thing does in the code.I also like fooling around so I changed all he values and stuff so I understood better what was going on.The game goes great but sometimes when the snakehead touches the food it doesn't 'eat' it and I don't know why :This is the part of the code that takes care of eating the food.(PictureBox2 is the snakehead, PictureBox15 is the food)
[code]...
I just don't know why does happens. The PictureBox2 touches PictureBox15 but nothing of what I typed above happens.
im trying to make snake in visual basic.net for my major year 12 project in Australia and i cant get it to work?
View 5 Replies[Code]...
The problem is I need to preserve all previous coordinates so I ReDim Preserve but I need to do it to the Class. And I try this and the NodeCoords variable is set as "nothing" when i am debugging realtime.
Have attached the code so far and would like to be able to rotate my car sprite through 360 degrees and have it move in diagonal fashion.
View 19 RepliesMy sister owns a small business, and (as a cashier) she is currently using hand written invoices for receipts and records. She knows I have some basic programming knowledge, and would like me to make her a program that would make it easier on her. Ultimately, it's going to log sales, and anything else to make taxes easier on her, which she is also doing manually at this time.
That will probably be a few weeks from now, for now what I want is to be able to have a Category, Subcategory, and Product system using ListView boxes. Ie. In the first ListView will be general categories, ie "food". Under the category "food", there will be the subcategories "pizza", "fish", and "pasta". Under the subcategory fish, there will be the products "salmon", "trout", and "cod". The user can highlight cod, click "add item" twice. The first time adding it to the receipt ListView box with a quantity of 1, the second time changing the quantity to 2.
Now the idea here is to make the contents of the ListView boxes depend on the selection in the preceding ListView box. If the user chose the Pizza subcategory, he would have the products "cheese", "pepperoni", and "mushrooms" in the product list box. If he chose "beverages" on the first ListBox (general category), he would get different choices entirely.
Of course these are not the items being sold, but they serve as good examples. I have a decent start on the program but have run into a few roadblocks. In each ListBox, there will be an "Add *" selection (activated by double click), which * will be the ListView it in. For example, they could go to the food category, double click the "Add Subcategory to food category" list item, bringing up a dialog asking for the subcategory name. They could then, in that subcategory, double click an "Add product to * subcategory" list item, bringing up a dialog asking for the item name, price, and flags such as taxability (some things such as services are non taxable). In addition, I want the user to be able to double click an existing item, removing it from the list.
I have a good start on the program, the interface is mostly done. My next step is to create some form of database to store the categories, subcategories, and products she adds. I could probably get it to work in runtime, but it would be a shame to have to redo it every time she restarts the program But this is where the roadblock is. I don't know what to do at this point, I've spent hours on Google before coming to this site. I will include the source so you can see where I'm at, at the moment.
Recently I had the urge to make my own 2d game editor and I don't know where to start and I have searched the web but my results were not
View 5 RepliesI am making a Game Trainer in vb.net, this is the current code I have.
Imports System.Runtime.InteropServices Public Class Form1
[Code]...
I can read from the memory address fine, but when I try to write to it nothing happens, no errors and the value does not get written. What am I doing wrong?
Alright, well im making a launcher for a game i play. and i want to make it so it says how many users are online. and im not sure how to code that out??
View 25 Replieswould like to make a solitaire game in visual basic however do not know where to start. Could someone please give me some direction and help as to how to build this?
View 5 RepliesI am working on a game using Visual Basic.NET and XNA. I am having trouble making the map scroll with the player. I can move the map at a square at a time(32x32) but I don't like the way it looks. I want to move at a fluid rate if possible. I want the player to be able to walk half-way through a square then see a half-square to either direction your moving. IE: Walking left, walk half-way through a square then to the far left of the map see half of the next square going to be drawn. But I don't want just half-way, I want to be able to just have fluid movement where you can walk to an 1/8th of the square and see the next 1/8th on the other side of screen if possible... To open this project and view you must have Windows Phone SDK installed can get it from Microsofts website......Note:Only up and down movement have been added into the game.
View 2 RepliesI can currently make a dialog1 pop up, then the user clicks "Yes" for dialog1, then dialog2 pops up, and if the user clicks "no" instead of "yes", dialog2 reappears again. I've got a headache now, but I will re-look over my code to see if there are logic errors.
I originally had dialog2 and form1 (the form1 was acting as dialog1). But The thing was that I do not how to give properties of a dialog to a form (i.e. not make the user be able to click other windows while this form is open) IF I could have code that says Me.bringtofront (which I have tried) didn't work though. If I apply this command to a form I get an error:
code: Form1.showdialog()
error: Please make form1 not visible. something a long those lines. But what I don't understand is form1 was never open.
What do the standard lines of code do?:
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
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]...
I am trying to make a Chess multiplayer game in Visual Basic. Its a two player which will be played in a normal way and not even over LAN. So far, I am done designing the board.
My logic is: First, on clicking any square, the click event handler will check whether a piece resides on that square. If not, then it checks if a piece is to be moved to that square. If both are negative, then it does nothing.
Now, the problem with this is, how do I code the click events? Also, I have represented the board using a 2dimensional array. But how do I update the positions after every move? And how do I check whether legal move is being executed? One more thing I want to add is whenever a piece is clicked, the possible legal squares should be highlighted.
For this, what I did was, for every click event on any square it checked if there was a piece. If there was a piece, then it highlighted all possible moves for that piece using If-Else-If logic, but it turned out to be too cumbersome and too long. And another problem which arose was, how do I know that if the user clicks an empty square to move the piece there?
I am using Visual studios 2010, And what I am trying to do is make a card game, and I have some ideas for how to put a lot of it together however I am having trouble getting started with making the cards to begin with.So I need something to call to represent the cards with numerical values with ace being 1 and king being 13.
View 4 RepliesWell the thing is im making a tool for a game(No hack)the display is like this Name : [here a text box] Time : [Here can be laber or textbox] [start] [stop] [reset] in the first textbox the user who is using the program have to put a player name and in time when they click start in the second textbox or labe it should start countingdown from 1 hour 1:00:00.Stop only stop the time but let the time where it was and reset to reset the time.so when the time get to 0 something should pop up with the name of the player that the user put in the text box like MsgBox Frolox's time has finish or something like that but it have to appear in top of everything.
View 16 RepliesWhere should i start? any tutorials out there? I only know the basics of VB and how to works.
View 5 RepliesI'm doing a pacman game and im stuck on how to make the pellets. This is the code i have so far.I was thinking of maybe making a picturebox for every pellet and then make an if statement that if pacman goes on a pellet it disappears and he gains a point. But this would be a VEERRRYYYY large if statement and im sure there is a better way to do it.
View 3 RepliesI am making a crosshair(for a game) which needs to be absolutely topmost!//. This can only be done if the form's topmost property is true, and the next second false, and then true...etc..
But is there a possibililty to make sure your form is absolutely topmost.. Or make another program/application not topmost so that yours is.
My questions is only about the topmost not about the rest of the application because I have made everything already.
Uhm, I am making a Launcher for a Game Called Cabal, and it will be for Private Servers. The thing is, that it is so easy to Hack/cheat on Pservers, and because the files for Cabal we use are old, we dont have good protection against hackers. One of the things is, that when a player presses CTRL+***+*** or something, they acivate a GM command, which is only allowed for GM's. I need to prevent that, and I also need to prevent people from using Cheat Engine. I am also planning on using Update Funcion, so if a player tries to change the CabalMain, so the Version will change (Which must not happen. If they change it to a specifik version, they can use GM commands)If there is any Anti-Hack out there, which is free, please link it. I have google'd for 1 hour. And more, and just did not find anything.
[Code]...