RPG type game.

Cabose

Active member
Joined
Oct 18, 2006
Messages
39
Programming Experience
Beginner
Hi,
I was wanting to make an rpg type game and was wanting to know if anyone could help me start out. Maybe help me a little with being able to use the arrow keys and have a sprite move with scrolling areas (couldnt think of a word for it.) That would be great help to get it started.

Thanks,
Cabose
 
if you want to code it all yourself you can, but I heard there is a program called gamemaker .net. I think It's similar to rpgmaker, but uses .net framework instead of ruby. You should try it.
 
well its going to be for a semester project in my programming class at college and i was wanting to get a starting code or some help to get it started so i can get as much done as possible by the end of semester.

Thanks,
Cabose
 
do some research on keypress, or just search the forums for it. This will get you started on assigning commands to keys. EG: up- moves character up - m brings up menu, Enter- Talk. You should create some classes for items, armor, etc. which can hold all the information nessecary. Eg. Armor - Name(String),Defense(integer), MagicDefense, Cost, Etc. You should then create arraylists to store these classes in. Once you've done that you can access them easily later. As far as a scrolling screen, I can't think of something off the top of my head, but I'm sure it won't be that hard. You should also create a lot of 'switches'. These are essentially global booleans. These will be useful for determining when something has changed. EG: You need to get a key before you can open a door. This could be done by giving your 'character' an 'item', and checking if it is there when you try to open the door. You could also create a a 'switch' or boolean, which is simpler. If you need help with anything specific, I'll try to help out. My advice, before you try to code something, ask yourself, what do I need this to do, and how can it be done. I've wanted to start making a rpg in vb, but I just don't have the patience for such a long project.
 
Ya i understand. I got my character to move and everything and i decided to not use a scrolling background and just change the background when i reach an edge. But a problem i am having is that my character i cant get the picturebox to display the transparency correctly so it has a white where the transparency is so it doesnt show up on the background correctly. also i have it change pictures depending which way i am pressing but it doesnt show the animation correctly. Any help will be appreciated.

Thanks,
Cabose
 
What file type is the picture? Do you have fireworks? Whenever I need something transperant I edit it with fireworks than export it as a Gif. Gif's show transperancy. What exactly do you mean when you say it doesn't show the animation correctly? Are talking about a turning or walking animation, or just the fact that the picture isn't changing? If the picture isn't changing most likely the problem is simply; there's something wrong with that section of code. Could you either put that section of code in your next response, or attach it in a zip file? I'll try to help you out.
 
its an animated gif. Its also a walking one. every now and then it will work right and walk. but a lot of the times it just doesnt want to show the animation for some reason. I'll zip up the project and upload it for you. That one doesnt have a bg picture but if you run it and hit the enter button the bring up the game over picture it will show the picturebox having a gray background. I cant seem to get it to be fully transparent. As for the transparency and the animation (I dont know how to do it but...) will turning it into a sprite work?

http://dragonslayers.uni.cc/Files/AdventureofErysia.zip

Thanks,
Cabose
 
Sorry, I can't help you out. I'm running VB.net 2003, and cannot open your file. As far as sprites go, I have absolutely no experience there. If you could post some of your code(The parts that are giving you trouble) I'd be happy to help you in anyway I can.
 
Its not the code that is giving me trouble i dont think... its just the fact that the animation doesnt always want to work when its supposed to. Every now and then it will work just fine but most of the time it doesnt want to work. also i am still having trouble with getting a fully transparent image. here i'll post my code for you for what i have so far.

VB.NET:
Public Class Form1
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.Left Then
            If PictureBox1.Image.Tag = "left" Then
            Else
                PictureBox1.Image = My.Resources.charleft
                PictureBox1.Image.Tag = "left"
            End If

            Dim i As Integer
            i = PictureBox1.Left
            If i <= 0 Then
                MsgBox("at end")
            Else
                PictureBox1.Left -= 3
            End If

        ElseIf e.KeyCode = Keys.Up Then
            If PictureBox1.Image.Tag = "up" Then
            Else
                PictureBox1.Image = My.Resources.charup
                PictureBox1.Image.Tag = "up"
            End If

            Dim i As Integer
            i = PictureBox1.Top
            If i <= 0 Then
                MsgBox("at end")
            Else
                PictureBox1.Top -= 3
            End If
        ElseIf e.KeyCode = Keys.Right Then
            If PictureBox1.Image.Tag = "right" Then
            Else
                PictureBox1.Image = My.Resources.charright
                PictureBox1.Image.Tag = "right"
            End If

            Dim i As Integer
            i = PictureBox1.Left + PictureBox1.Width
            If i >= Me.Width - 3 Then
                MsgBox("at end")
            Else
                PictureBox1.Left += 3
            End If
        ElseIf e.KeyCode = Keys.Down Then

            If PictureBox1.Image.Tag = "down" Then
            Else
                PictureBox1.Image = My.Resources.chardown
                PictureBox1.Image.Tag = "down"
            End If
            Dim i As Integer
            i = PictureBox1.Top + PictureBox1.Height + 33
            If i >= Me.Height - 3 Then
                MsgBox("at end")
            Else
                PictureBox1.Top += 3
            End If
        ElseIf e.KeyCode = Keys.Enter Then
            Me.BackgroundImage = My.Resources.gameover
        ElseIf e.KeyCode = Keys.Escape Then
            Me.Close()

        End If
    End Sub

    Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        If e.KeyCode = Keys.Up Then
            PictureBox1.Image = My.Resources.charupstop
            PictureBox1.Image.Tag = "up stop"
        ElseIf e.KeyCode = Keys.Left Then
            PictureBox1.Image = My.Resources.charleftstop
            PictureBox1.Image.Tag = "left stop"
        ElseIf e.KeyCode = Keys.Right Then
            PictureBox1.Image = My.Resources.charrightstop
            PictureBox1.Image.Tag = "right stop"
        ElseIf e.KeyCode = Keys.Down Then
            PictureBox1.Image = My.Resources.chardownstop
            PictureBox1.Image.Tag = "down stop"

        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        My.Resources.chardown.Tag = "down"
        My.Resources.charup.Tag = "up"
        My.Resources.charleft.Tag = "left"
        My.Resources.charright.Tag = "right"

    End Sub

End Class

Thanks for all the help,
Cabose

also if you have msn add me xgfxdesignsx@gmail.com it maybe easier to get this worked out. also i have aim and yahoo both are itachi61088.

Thanks again
 
I can't find the source of your problem, however you could make your ifstatements more effecient.

Instead of
if picturebox1.tag = "left"
else
BLAHBLAHBLAH

you should do
if picturebox1.tag not = "left"
BLAHBLAHBLAH

or
if picturebox1.tag <> = "left"
BLAHBLAHBLAH
 
hahahaha lol i didnt think of that lol. (i'm such a noob lol) thats why i am having problems. It works correctly sometimes but not all the time
 
Back
Top