RPG Help (Visual Basic 2005)
Hey, I'm kind of new to the whole programming thing (it's been six months since I made my first game: Naughts and crosses) and to start with I've been using Visual Basic (since I heard it was like... the easiest).
Anyway, I managed to make a very large text based RPG, and then a very small graphical one (like, three 200*200 maps). Anyway, so far the only way I've been able to do it is by having a line of code that goes something like this
'If player.top = 0 Then
Image1.visible = false
Image2.visible = true
player.top = 200'
Or alternatively
'Button1_click....
player.top = player.top + 10
image.top = image.top + 10'
I was wondering, before I start on a new (hopefully more succesful) project if there was a better way to do this, is there a sort of 'image variable' or is there a way to do something to the effect of 'picture1.image = map1.jpg' (that line of code doesn't work.)
Quote:Original post by Timus
picture1.image = map1.jpg'
picture1.Image = New System.Drawing.Bitmap("map1.jpg")
"Parameter is not valid."
I'm guessing I'm doing something wrong, I have 'map1.jpg' in the same folder as the sln file.
I'm guessing I'm doing something wrong, I have 'map1.jpg' in the same folder as the sln file.
Quote:Original post by Timus
"Parameter is not valid."
I'm guessing I'm doing something wrong, I have 'map1.jpg' in the same folder as the sln file.
Put it in the same folder as the .exe file. (should be "[sln folder]\debug\")
[Edit] This is not the right way of doing it. It's just for you to get it working asap. The "right" way would be to have the contents (images, for example) included in your project and declared as content to the VS. Then the VS would move that folder to your debug or release folders.
However, I always think it's better to get it to work, learn the precise part you're trying to learn and leave the rest for later.[/Edit]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement