Adding Features To A Pong Game?
Apr 16, 2010
I actually found a fairly good pong tutorial on this site which I've linked to at the bottom of this post. I used the code as my base and I'm starting to implement my own new features. I'm currently working on making the ball move faster after each hit of the paddle, but I can't get it working! I thought it would be as simple as adding 1 to the 'speed' variable during the test to see if the ball has hit the paddle. Doesn't work! I also tried various other methods, including adding an extra timer to the form and having the speed increase a certain number every tick on the timer. Didn't work! Is there some special way that I need to reference that variable in order to manipulate it? Code below.
[Code]...
View 1 Replies
ADVERTISEMENT
Mar 22, 2009
I successfully coded my up and down key so they move a paddle in a game of pong, however, when I press and hold up or down, the paddle will movie but has a delay before it starts to move. Is there anyway to remove this key press delay easily?
View 5 Replies
Oct 8, 2011
I am currently creating the classic Pong game in VB.Net. I have a few questions regarding angle of approach and rebound.
For example if the ball hits the wall at roughly a 30 degree angle then it should roughly bounce off the wall at ~30 degrees. This is my first query, how would I achieve this as I cannot figure out how. It is currently bouncing the ball off the wall by altering ballXspeed and ballYspeed by 5 or -5.
My second query is that of the ball hitting the paddle, if the ball is to hit to top 0% - 5% of the paddle it will bounce off at a different angle opposed to if the ball hit the paddle in the 15% - 20% zone of the paddle.
Here is my code in its entirety:
Public Class Form1
Dim ballXSpeed As Single
Dim ballYSpeed As Single
[CODE]...
I understand that you cannot do the work for me and I don't expect you to. Would it be possible for help with the pseudo-logic or a particular area. I forgot to mention that the ball currently bounces off the paddles at a random angle.
Hence:
ballXSpeed = -5
ballYSpeed = New Random(DateTime.Now.Millisecond).Next(-10, 10)
View 1 Replies
Oct 3, 2011
Im new to VB. how do I get to add the score.my code is
[Code]...
View 6 Replies
Jul 14, 2011
I am trying to create a pong game. I have read and understood the tutorial on this website which I have also read the topic on this forum that has asked about using the keyboard in pong.This is the type of code they used which works:
Private Sub frmPong_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyValue = Keys.W Then
[code].....
View 1 Replies
Jul 23, 2008
I know how to make a single picturebox, but I need to make more different pictureboxes. Example: I want to make a picturebox every time snake and food crash (I'm making snake with pictureboxes, yes). But for that, I need a code that will make a new picturebox with different name every time they crash. For example When they first crash, the code should make a picturebox called snakepart(1) next time they crash it should make snakepart(2). Something like that.
View 1 Replies
Mar 29, 2009
I am creating a game for my 2nd year of uni. I have no idea why my lecturer wants me to create a game in VB.net using Direct X and not C# XNA but he does, so i have to abide by his rules.I am in no way mathematically advanced enough to create my own newtons physics so i wanted to get an engine to go into my VB.net code.Is this even possible?, im totally new to all of this physics stuff.does anyone know of any VB.net engines out there? and how do i link this engine into my code?
My game is
A 2D blob of water has to navigate itself up and down a set of obstacles, if it falls from a specific hight then it will explode and loose a life. It needs to be able to jump a determined hight also.
View 1 Replies
Dec 28, 2009
I don't want to actually MAKE the pong easter egg, but for anyone with Dreamweaver, try typing 'dreamweaver' into the color selection box to play a round of pong.The bit that I want to know how it works is the bit at the end once you lose.After your loss, it will immediately play a small tune, whether or not your volume is on. In fact, it plays whether or not you have speakers, which makes me think the sound card itself is playing the tune.How can you achieve a similar effect, playing notes without sound or speakers, in vb.net? I would imagine this requires P/Invoke, seeing as there is no obvious way inside the framework.I don't need a whole song, a simple beep or the ability to change frequency of the beep will suffice.
View 1 Replies
Nov 11, 2009
i'm trying to connect to irc but im completly stuck at sending a PONG back when i get a PING.i have tried to put an if statement checking if StreamR.readline = PING and then sending PONG + the value after ping back, but i just cant seem to get those numbers from ping.
[Code]...
View 6 Replies
Oct 16, 2011
I am making a maths game, that has 10 questions, all of different forms. There's a button on the first forum saying, 'subtraction' addition and that. I need. Stop watch to start when you click one of those buttons , and stop once all questions have been answered, and the time shown.
View 10 Replies
Feb 4, 2011
I've been working on my game for a while, in a non-online multi-player state it is complete. My goal is to add LAN or Internet Play support.My game is coded in Microsoft Visual Basic 2010 Express, It relies heavily on timers.Currently you play against the AI, and there is a Local multiplayer mode, using mice, controllers or the keyboard.At the moment, it is a two player, (Or 1 player against the AI) game, from my understanding the standard Client-to-Server option wouldn't very efficent, the best choice would be a peer-to-peer system.That being said, a lot of the stuff could be done client side, like for instance, the particle engine and Dynamic Rendering.[code]
View 1 Replies
Aug 24, 2011
I'm ready to start adding sound to a 3D game and I'm looking for a decent Free library.it would not require DX and be something like:
dim MySound as SoundLib.Sound
MySound = SoundLib.LoadSound("soundfile.wav")
SoundLib.Play3DWorld(Location.X, Location.Y, Location.Z, VolumeModifier, MySound)so far all Im finding is expensive, C#, old, or not .NET compatible.
View 9 Replies
Dec 22, 2009
In interface-based programming we normally define a set of functions inside an interface, and use that interface as a contract between 2 or more modules.What happens when we need to add more features to the system?How do we handle such system evolutions ?
View 2 Replies
May 31, 2011
I am thinking of giving mono develop a try. I have some questions. Visual Studio 2008 Professional has options for creating controls and services. This is not available in Visual Basic 2008 Express. This relationship between the different editions, is there something limiting like this with mono develop? I figure since it's open source, everything is implemented like Visual Studio 2008 Pro.
Another question. Does anyone have experience with mono. Is it a production level serious environment for commercial work? Is there something I should know about it?
Any mono developer that has anything good or bad to say, please drop a post in here. I would like to get as much info as possible from vbforums. This has always been the best help site for me using Visual Basic Express.
The most important thing, to reiterate is if I can make Windows Services with Mono Develop and if it supports full threading features that are limited or not available in express.
As a last question, what is the story on managed directx for mono. On Linux, there is no such thing, so would you plan an opengl library to start with? or does that work out in a different way?
View 5 Replies
Nov 6, 2009
[Code]...
list of URL for the web pages requested by the user should be maintained. The user should be able to navigate previous pages requested by clicking on the links in the History list. On the browsers start up, the History list should be loaded to the browser.
View 1 Replies
Apr 6, 2010
add history features in the web browser
View 2 Replies
Nov 11, 2009
I have a large .NET source tree (185 C# and VB projects, of which 60 are apps or websites) that i want to create a wix setup for. The general idea is to have 1 setup msi and to make each executable a feature, and to have each app be installed in a separate directory. like
%progfiles%/company/app1
/app2
/app3
[code].....
Some libraries are used by multiple apps, so the DirectoryRef would have to be pointing to multiple directories, and multiple DirectoryRefs (with different ids) would have to be pointing to the same directory (found directory alias trick), both of which seem impossible.I get the distinct impression I'm going about it the wrong way, or that I'm missing some deeper insight. (No suprise as my wix-fu is a full 3 days old)
View 1 Replies
May 21, 2010
Is there a way to disable visual basic 10 language features in VS 2010.our Dev team has moved to Visual studio 2010, but we still have to keep backwards compatibility with Visual Studio 2008. is there a way to disable the new language features to avoid any issues.
View 1 Replies
Jun 21, 2009
I was creating GTA SA save editer in c++ but due to less features in c++ I converted my whole code vb.net
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
[Code]...
View 2 Replies
Nov 2, 2011
I even have it set up so I can filter through the DataGridView by sorting though a specific company in the database. However, now I want to link specific cells from the DataGridView to other VB features such as a text box and check box. I am a bit lost as to the coding. In the DataGridView, there are numerous columns that contain a check box and I need them to correlate to actual check boxes I have in the form. I can do it through binding the check box on the form to the data source and it works but if I run a filter or sort through the company, the check boxes from the DataGridView no longer carry over to the actual check box on the page.
View 10 Replies
Jan 25, 2004
I am more interested in the "Pan" feature. I haven't seen much on this so far.
View 5 Replies
Feb 23, 2009
i wanted to know what are all the GUI features available in VB.NET for creating a nice UI. The requirement is that, we have screens which were developed in VC++, and now we wanted develop the same screens from scratch, Is it just the way of Drag & Drop all the controls which were present in VC++ screens or something else is available there ?
View 1 Replies
Apr 26, 2010
how I can control the access of various modules of a program, based upon Active Directory group. The program uses windows authentication to avoid login, but the user ends up having to enter his or her password a second time in order to continue.
Public Function GetGroupMembership(ByVal username As String, ByVal password As String)
Return GetGroups("LDAP:mycomp", username, password)
[Code]......
View 2 Replies
Oct 19, 2010
Private cs As New SqlConnection("Data Source=ANKIT-PC;Initial Catalog=mrks_analysis;Integrated Security=True")
Private da As New SqlDataAdapter("select * from sbs", cs)
[Code].....
i used the above mentioned command to get data from db to my datagrid.
Currently the complete grid is editable.
i want that the Sno field to become non editable + and the rest rows i want a combobox from which user selects the data and which gets stored in db.
View 5 Replies
Mar 20, 2009
I am making my own custom tabbed browser and now i want the ExecCommands list. to add the copy or cut etc features.
View 5 Replies
Oct 6, 2011
I have a service installed. I would like to install this service (but with different features) twice on the same server but cant as the second service recognises it as the first. How could i avoid this?
View 5 Replies
May 3, 2010
I like the new intellisense enhancements for finding members, however, there are 2 problems i have;
1) You can't resize the intellisense window when it pops up? This one is really annoying.
2) There seems to be a fixed font for the intellisense list? Why does it not match the rest of my code window like it used to? I've noticed the same with tooltips.
View 2 Replies
Mar 27, 2011
I am looking for a way to obtain some additional features on a treeview. Both, to show as to be able to input some data with a particular hierarchical structure For that on each node I need next to the nodetext a entrypossibility to input some data or to make a selection. This input possibility should be either a textbox, a combobox or a chechbox. An example of what I wisch is almost this article, except that the comment column is only a fixed text, and that I need there a input control like a textbox, or combobox.
View 4 Replies
Aug 19, 2010
I using vs2008/vb. I want to provide my users with the ability view files in a specified directory and allow them to drag-drop to e-mail. I don't want to allow them to delete files in the directory or to even change directories. Is there a way to restrict the filedialog boxes to not allow deletes and directory changes?
View 3 Replies
Apr 21, 2010
I made an application that requires you to log-in to be able to use the search features and profile. How would I write the code to be able to log-out without closing out the application and just return to the log-in page?
View 6 Replies