Red Block Making Not Working-Snake?

Mar 11, 2009

I 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 Replies


ADVERTISEMENT

Process Of Making A Snake Game Using .NET?

Jul 23, 2010

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?

View 2 Replies

Snake Game Food-Making?

Mar 3, 2009

I just started a snake game. This is what I have so far:

View 2 Replies

VB Drawing Application Not Working Correctly - Run In Is Just A Gray Block

Dec 10, 2009

I'm a college student just starting out programming in VB and am having a lot of trouble trying to get my drawing program to work. Currently i am using Microsoft Visual Basic 2008 Express Edition and whenever i try to debug my program the window it's supposed to run in is just a gray block. I'm not too sure if this is the right place in the forum to post this so if it is just let me know and ill move it. c:

[Code]....

View 2 Replies

Creating A Form That Will Block The Functionality Of Keyboard And Mouse But Apparently It Is Not Working?

Nov 3, 2011

I'm creating a form that will block the functionality of keyboard and mouse but apparently it is not working.

Here is my

Public Class Form1
Declare Function BlockInput Lib "User32" (ByVal fBlockIt As Boolean) As Boolean

[code]....

View 5 Replies

Game Of Snake & Ladder. Vb?

Feb 17, 2009

[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 Replies

Make A Snake Move?

Apr 2, 2009

Okay i only need to know how in the world do you make the snake move towards one direction at the beginning?

View 7 Replies

Project For School (snake Game)

Dec 6, 2010

Iam 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..

View 6 Replies

.NET Snake Game Freeze When Hold A Key Down?

Dec 24, 2011

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]...

View 3 Replies

Snake Game Freeze When Hold A Key Down?

Apr 8, 2012

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 Replies

Drawing Grid - Moving Snake To Square?

Apr 7, 2009

I am setting up a snake game, I just like to know a few things. Do I require a GRID? and the grid needs to be the same size as the square obviously but how do you go about moving the snake to the square. I mean why do I even require a grid? Why cant I move the snake by its own size. Just need some clarification of the steps I should take to make my snake game. I would like to do this from scratch.

View 2 Replies

VB Snake Game Troubles With Array And Growing?

May 26, 2010

im 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]...

View 13 Replies

VS 2010 Snake Length Wont Increase?

Aug 15, 2011

I have a problem with snake game. I never tried to make a game with VB, but now i tried to make snake from this tutorial:So i added food to this snake game, and when i taking food, it increases score, but length cannot be increased and i don't know why. This code is in timer to check if snake head is on the food:

If p(m).X = food.Location.X And p(m).Y = food.Location.Y Then
score += 25
food.Visible = False

[code]....

View 9 Replies

Game - Make The Snake Grow When It Hits Food

May 30, 2010

I am simply trying to make the snake grow when it hits food, however, I am at a stand still.

[Code]...

View 2 Replies

VS 2008 Creating A Snake Game - PictureBox2 Touches PictureBox15?

May 21, 2010

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.

View 6 Replies

Forms :: Making Inactive One Form While Working On Another Form

Feb 12, 2010

suppose i have two forms form1 and form2

and i clicked on button which lead me to the form2

i want i shouldn't be able click on form1 untill and unless i close the existing form window(i.e form2)

View 2 Replies

Game Programming :: Make Snake In VB For Major Year 12 Project In Australia?

Apr 3, 2008

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

Making Inactive One Form While Working On Another Form

Feb 12, 2010

suppose i have two forms form1 and form2 and i clicked on button which lead me to the form2..i want i shouldn't be able click on form1 untill and unless i close the existing form window(i.e form2)

View 1 Replies

Designing Software - Making A MPC Sampler - Drum Machine - Making A Sound Directory ?

May 16, 2012

I'm a huge music person (got my own lil record thing going) but I'm wanting to design a program that would make music in my way. I have a decent amount of background knowlege of Visual Basic and Java I'm just wondering how could I execute this whole project. The Project is making a MPC Sampler. MPC is a drum machine; a machine with buttons that once you press it that it will play a sound from a drum (ex: snare, kick, tom, ect.) . So I would want to make some pads on my program that each have their own sound. Total of 16 pads. Which the design wouldn't be hard to make nor would the functionality of it having the play back sound (in my opinoin it wouldn't be hard atleast). But the thing is I wanna map out these pads to number keys on the number pad or keyboard. I'm not so sure how to do that. But that's all the easy stuff...

Also finding information is making a sound directory. What I mean by this is that I want to make a User Interface that will open up a file directory of sounds and the user can select what "kick" or "snare" sound he may want for the kick or snare pad. I don't know how to do that or even know what to search; neverless I don't know if this whole project idea is a good idea for Visual Basic or another programing language.

Also LATER ON I am wanting to add a record and export function that alows users to..well...record and export their beat or instrumental ha. That doesn't seem too too complex (mainly due to the fact that all it needs to do is record the users key strokes and then show them and play the sounds, but obviously it would get more complex than that.)

Here is an image of one of many MPCs but one with a directory - [URL]

View 5 Replies

Variable Is "Nothing" (Snake Game) - Preserve All Previous Coordinates

Jun 4, 2011

[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.

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

Game Programming :: Snake Game. How To Set Boundaries

Dec 9, 2010

I 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

UnhandledExceptionEventHandler Samples From Msdn Working, In My Code Not Working?

Sep 3, 2009

I found on msdn samples and modified (add Thread.GetDomaind.UnhandledException)

<SecurityPermission(SecurityAction.Demand, Flags:=SecurityPermissionFlag.ControlAppDomain)> _
Public Sub Main()
' Add the event handler for handling UI thread exceptions to the event.[code].....

View 1 Replies

VS 2008 Cannot Seem To Get A Working Filter In Working Order

Jun 18, 2009

It appears that my favorite thing in the world is tackling projects that are beyond my current knowledge and abilities. I have a little project that I am working on which is a simple image viewer stocked with (upon completion) your standard Load..., Next/Previous, Zoom In/Out, Actual Size, and Full Screen capabilities. However, I am running into a few snags:

(1) I've been able to get my "Load..." button to display a file dialog box, but I cannot seem to get a working filter (with which only image file types are allowed to be selected) in working order.

(2) I have a PictureBox object (entitled PictureBox1) that displays the image selected via the file dialog box, but it loads images in their full size (1:1/100% zoomed) state without scrollbars, etc. to allow me to navigate the loaded image. I would like to have it load the image, initially, to fit within the dimensions of PictureBox1 and from there be able to zoom in/out via my "Zoom In/Out" and "Actual Size" buttons and be able to scroll if the zoom level is beyond the dimensions of PictureBox1.

(3) It dawned on me that I haven't the faintest idea how to get my "Next/Previous" buttons to allow the user (me) to navigate, in succession, the images contained in the folder in which the currently loaded image is stored. [code]

If it is deemed that this thread is inappropriately requesting help, I ask that it be locked/deleted quickly as I recognize that this is a large community with many discussions going without need of unwelcome posts.

View 9 Replies

API For Block Tab Key?

Jun 3, 2011

i have problem in vb.net window base application.i want to block TAB key from the keyboard.PI code or any useful hint to do that.

View 1 Replies

Block If Without End If?

Jul 6, 2009

I assume i have more number of If and less End If i cant find it where its going wrong?

______this is the code below _________________________________

Private Sub CommandButton2_Click()
Dim app As Object
Dim Slide As Object
Dim ppApp As Object

[code]....

View 2 Replies

Block The Alt Key?

Nov 26, 2009

im doing a login i have finish it but you can close it by using alt+f4 so i need to block the alt key im using vb 2008

View 5 Replies

Add To Me.Controls Within With Block

Jul 20, 2011

How can i add this to Me.Controls within the With block. [code]

View 4 Replies

Block Registry Changes?

Nov 7, 2006

I am looking for a way to block registry changes unless I choose to allow them to be made. So basically if an application tries to make a change my program would display a dialog with information of the change and I can either click Allow Change or Disallow Change.

Only thing is I am not sure how I go about stopping a registry change before it happens.

View 5 Replies

Block The Window Key Using VB?

Jun 11, 2009

it is possible to block the window key using vb.net...

View 1 Replies







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