New around here

kurt69

Well-known member
Joined
Jan 17, 2006
Messages
78
Location
Australia
Programming Experience
Beginner
Hi everyone I'm new to vbdotnetforums.com and this is my first post in fact. I'm very much a beginner, I've made one fully finished program and attempted a multi user chat program (in VB.NET).

I'm designing a game in vb.net and I know I wont be able to do it all as I'm not skilled enough yet so I have come here for when I need help in the future.

Just for your information I'm developing a side fighting game where you begin training your character and developing him how you want using stats, choosing your skills/spells and etc, then you take him into a LAN or online game and battle co-operatively or versus. My game is inspired by Little Fighter 2 by Marti and Starsky Wong (www.lf2.net).

That's pretty much it, thanks.
 
That sounds like a very ambitious project. Could we get a preview when you get near to having a working model?? Hope i'm not being cheeky. Just sounds like a cool project. Much more interesting that doing database stuff, like what i do all day!!!!!
 
Yeah I'm determined with this project thats why I've came here.. honestly I'm very new to programming and I'm still in high school so I will need help lol. But as for the preview definitely. Doing database stuff sounds like fun... (cough).

At the moment I'm just designing the forms (graphic wise). Cya.
 
Also new around here

Just thought I would say Hi.

Have done a good bit of work in VB 6, but just getting switched over to .NET. Should be an interesting ride.
 
I started when a client of the company I worked for at the time needed someone to take over development/maintenance of a program they developed. The original developer had died suddenly, so I had to learn VB6 in a hurry. I would like to port the program to .NET at some point (I still maintain the program though I have changed jobs). I am also working on a gradebook/class information program (since I am now a community college instructor).
 
Fair enough, I'm still in high school and I think of applications I would like to make and then get to work, but I only know the BARE basics, I have to learn by working out what needs to be done then finding out what the code would be.

Ok anyway I've got a splash screen and the main menu done, I thought I'd just quickly make a test room with 1 sprite in there and see if I could code movement for it but I have had no luck. So I need some help from anybody, shouldn't be hard for anyone proficient.

Anyway this is what I had in mind, declare a variable spriteFacing as a string with left and right as options. Then on the form when Key.Left or Key.Right is pressed in it checks which way the sprite is facing and RotateFlips if needed, then increments the PictureBox location.

So could someone post up a code on how this would be done. Thanks in advanced, sorry if it's a stupid question.


 
right, so you'll need a variable to hold to location of the picture box. In the on keypressed event enter....

VB.NET:
If e.keycode = keys.leftarrow then
check you variable for the direction you sprite is facing, then flip or leave it based of which way it is facing.
'add code to increment your picture box.
else
if e.keycode = keys.rightarrow then
do the same here.

Just a note. When posting a question, start a new thread with a descriptive title and you will get answers faster.
 
Yeah i gathered that i'd need a variable for the picturebox location as well as which way it is facing. But somethings gone wrong this is what I've been working at could you please fix it up for me thanks?

VB.NET:
Private Sub testRoom_KeyLeft(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Dim facing As String
facing = "left"
If e.KeyCode = Keys.Left Then
If facing = "left" Then 'need code for moving sprite here (incrementing picbox location)
Else : PictureBox1.Image.RotateFlip(RotateFlipType.Rotate180FlipX)
'need code for moving sprite here also (incrementing picbox location)
End If
End If
End Sub

Edit: Also I will use a new topic from now on, but I will most likely have a lot of questions so it will be just one new topic. Would that be better?

BTW I have no clue on how to move this picboxs location so could anyone show me an example. Thanks.
 
Last edited:
Any control that inherits the System.Windows.Forms.Control class will have Location, Left, and Top properties (as does the pictureBox). Since it seems you are only moving left and right currently, the Left property is what you need to be concerned with.
VB.NET:
'Move right:
PictureBox1.Left += 1 'or whatever value you want it to move
'Move left:
PictureBox1.Left -= 1
You should start a new thread if the substance of the question is different from previous ones (by that I mean although you will be asking about the game, what you're currently trying to accomplish may be different, got me?).
Having more descriptive titles allows other users to better search the forum.
Happy programming :).
 
Back
Top