BP Forums
Small Role Playing Game Tutorial - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: Video Tutorials (https://bpforums.info/forumdisplay.php?fid=22)
+----- Forum: Request a Video (https://bpforums.info/forumdisplay.php?fid=25)
+----- Thread: Small Role Playing Game Tutorial (/showthread.php?tid=577)



Small Role Playing Game Tutorial - Moldraxian - 07-20-2012

Would it be possible to create a small role playing game in visual studio 2010?


Re: Small Role Playing Game Tutorial - brandonio21 - 07-20-2012

Hm, are you talking about something like the original Fallout? Or more of a text based game?


Re: Small Role Playing Game Tutorial - Vinwarez - 07-20-2012

I think he wants a text-based roleplay game. If so, I would suggest using Console Application.

In the beginning you should have something like this:
[code2=vbnet]Module Module1
Sub Main()
Console.Title = "My Text-Based Roleplay Game"
Console.WriteLine("Hello, there. What is your name?")
Console.Write("My name is ")
Dim Name As String = Console.ReadLine()
Console.WriteLine("That is a nice name!")
'TODO: Continue conversation to make a character.
Console.ReadLine()
End Sub
End Module[/code2]
Just continue the conversation to complete a character creation and then move on to making the actual game. You could use bunch of IF statements to determine what will happen after the player makes decisions. For example:
[code2=vbnet]Module Module1
Sub Main()
Console.Title = "My Text-Based Roleplay Game"
Console.WriteLine("You were walking down the dark street in midnight.")
Console.WriteLine("When all of a sudden, a man with the mask over his face")
Console.WriteLine("pulls out the pistol on you and attempts to rob you.")
Console.WriteLine()
Console.WriteLine("What will you do?")
Console.WriteLine("1) Try to run away.")
Console.WriteLine("2) Attempt to kick the thug to take his pistol.")
Console.WriteLine("3) Give the cash to thug.")
Dim Decision1 As Integer = Console.ReadLine()
Console.WriteLine()

Select Case Decision1
Case 1
Console.WriteLine("The thug starts shooting at you. A second later, you've been shot in the head.")
Case 2
Console.WriteLine("You succeeded punching the thug in the nuts, but failed to take the control over the pistol.")
Console.WriteLine("You've been shot near the heart area and you are bleeding out.")
Case 3
Console.WriteLine("You gave the money to thug, he punched you in the face which made you faint.")
Console.WriteLine("A few hours later, you woke up in the hospital with the broken nose.")
End Select

Console.ReadLine()
End Sub
End Module[/code2]

Hopefully this gave you an idea on how to make a small text-based roleplay game. If you don't want text-based RPG, then ignore this post.

And yeah, I know this is in Request a Video section, but I wrote a small tip, not a whole RPG.


Re: Small Role Playing Game Tutorial - Moldraxian - 07-22-2012

Well I am very new to programming so any ideas such as the text based is good practice. I am just wondering if there is a way to make visual things happen such as like, movements of objects and such.


Re: Small Role Playing Game Tutorial - brandonio21 - 07-22-2012

Of course there is! Anything is possible in the world of programming!


Re: Small Role Playing Game Tutorial - brandonio21 - 07-23-2012

I'd like to alert you that a simple RPG text based game made in VB.NET has been added to my list of tutorials that I need to create. It should be made in the next couple of weeks or so, so look out for that!


Re: Small Role Playing Game Tutorial - Moldraxian - 07-24-2012

Thank you! Me and my friend would be amazed to get experience on simple game creation.