Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again)
Need Help With RPG Game(Again) Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Go Back  Xtreme Visual Basic Talk > > > Need Help With RPG Game(Again)


Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2005, 12:05 AM
War5master War5master is offline
Newcomer
 
Join Date: Jun 2004
Posts: 21
Default Need Help With RPG Game...


Well im making a game and using a tutorial to do much of the coding but im learning alot and i have been using VB for about 6 months now and im trying to finish my first rpg. I have learned alot of debugging and how to use it properly but its not helping me find a problem that i have came up to. So far i have made items, monsters, the map(outside and dungeon(each 100,100). All the tiles and graphics are 50 x 50. I have made myself graphics by copying them of runescape and using them on my game for testing. Now my problem that im having is that i have done a CreateItem procedure where it does all the stats and information on the items. Then i have the DrawASquare and DrawMap procedures which take the graphics from the graphics form i made and put them onto the map. They are scattered around in a random order. The problem is im having problems matching up the correct item name and information with the item graphic.

I have 6 different types of armor and 6 different weapons
I have 4 different parts of each armor, Helmet, Legs, Plate, and shield along with a weapon to match its type.

My 6 different types of armor, Bronze, Steel, Mithril, Addy, Rune and Dragon
Bronze - Brown
Steel - Silver
Mithril - Blue
Addy - Green
Rune - Light Blue
Dragon - Red/White

And my 6 different types of weapons(all swords)
Bronze - Brown
Steel - Silver
Mithril - Blue
Addy - Green
Rune - Light blue
Dragon - Red/White

So if someone could tell me how to make it so that the item information(name,icon,stats,..etc.) and the item graphics match?

Also i know the game isnt finished, still lots of work to go such as masking, monsters on map, attacking monsters, items in inventory, items in use, potions exp, lvls, quest, more maps, town etc. Also for any of u wondering im using Marks rpg game tutorial but i modified it to fit my needs
Attached Files
File Type: zip New Folder.zip (24.0 KB, 26 views)

Last edited by War5master; 07-20-2005 at 12:47 AM.
Reply With Quote
  #2  
Old 07-20-2005, 07:22 AM
simonle's Avatar
simonle simonle is offline
Centurion
 
Join Date: Dec 2004
Location: UK
Posts: 162
Default

You could use a type....

Code:
Public Type ItemDetails 'Must go on module ItemName as string Picture as string 'add all the information you need End Type Dim Item as ItemDetails 'Use it like this... Item.ItemName = "Dragon"
Reply With Quote
  #3  
Old 07-20-2005, 12:19 PM
War5master War5master is offline
Newcomer
 
Join Date: Jun 2004
Posts: 21
Default

Quote:
Originally Posted by simonle
You could use a type....

Code:
Public Type ItemDetails 'Must go on module ItemName as string Picture as string 'add all the information you need End Type Dim Item as ItemDetails 'Use it like this... Item.ItemName = "Dragon"
I qot a question, Where would you add in the Item.ItemName = "Dragon"
And also what information would you enter in for the picture?

Last edited by War5master; 07-20-2005 at 12:28 PM.
Reply With Quote
  #4  
Old 07-20-2005, 03:42 PM
StressedGeezer's Avatar
StressedGeezer StressedGeezer is offline
Junior Contributor
 
Join Date: Apr 2004
Location: Cambridge, England
Posts: 259
Default

This is pretty basic but should give you some idea

Code:
Public Type ItemDetails ItemName As String'Name of item ItemType As Integer'1=armour,2=weapon etc ItemImageGroup as integer'Image number ItemImage as integer'Image number HitPoints as integer X as integer Y as integer Inplay as boolean End Type Dim Pickup(1 to 100) As ItemDetails Dim Item(1 to 100) As ItemDetails public sub CreateItem(N as integer, S as string,T as integer, G as integer, I as integer, H as integer) pickup(N).ItemName=S pickup(N).ItemType=T pickup(N).ItemImageGroup=G pickup(N).ItemImage=I pickup(N).HitPoints=H end sub public sub MakeList() CreateItem 1, "Bronze Sword", 1,1,1,10 CreateItem 2, "Steel Sword", 1,1,2,20 CreateItem 3, "Mythril Sword", 1,1,3,30 CreateItem 4, "Bronze Mace", 1,2,1,8 CreateItem 5, "Steel Mace", 1,2,2,16 CreateItem 6, "Mythril Mace", 1,2,3,24 CreateItem 7, "Bronze Helmet", 2,1,1,20 CreateItem 8, "Steel Helmet", 2,1,2,40 CreateItem 9, "Mythril Helmet", 2,1,3,60 CreateItem 10, "Bronze Shield", 2,2,1,40 CreateItem 11, "Steel Shield", 2,2,2,80 CreateItem 12, "Mythril Shield", 2,2,3,120 end sub public sub SpawnItem(N as integer, X as integer, Y as integer) Dim CS As Boolean Dim i as integer dim ItemLimit as integer ItemLimit=100 While CS = False i= i+ 1 If Item(i).InPlay = False Then 'item(i)=pickup(1)'Create a bronze sword 'item(i)=pickup(8)'Create a steel helmet 'item(i)=pickup(12)'Create a mythril shield item(i)=pickup(N)'Create your own object Item(i).X=X Item(i).Y=Y item(i).inplay=true CS = True End If If i>= BulletLimit Then: CS = True Wend end sub

I havent tested it but it should work. Use "CreateList" only once, to create the objects. Use "SpawnItem" to put them onto the map - just remember to set "item(i).inplay" to false when you are done with the item, and only manipulate them if their "item(i).inplay" is set to true.
Use "ItemType", "ItemImageGroup" and "ItemImage" to figure out which image to draw - the groups refer to different types of objects (TYPE=weapon/ armour, GROUP=Swords/Maces, or Helmets/Shields (depends on TYPE), IMAGE=Bronze/Steel/Mythril weapon/armour)
__________________
Geezer

Last edited by StressedGeezer; 07-20-2005 at 03:56 PM.
Reply With Quote
  #5  
Old 07-20-2005, 03:51 PM
War5master War5master is offline
Newcomer
 
Join Date: Jun 2004
Posts: 21
Default

do u want me to delete everything such as my previous createitem and item procedures and stick with ur coding or do u want me to edit the other ones somehow.

If u want me to delete the others ones then i have to rewrite most of my work so that it can work with your coding so im confused about how to make those subs work with the rest of the project.

Last edited by War5master; 07-20-2005 at 04:48 PM.
Reply With Quote
  #6  
Old 07-20-2005, 07:08 PM
DubbleClick's Avatar
DubbleClick DubbleClick is offline
Contributor
 
Join Date: Mar 2005
Location: Tennessee
Posts: 511
Default

Well, I have to say it would be better NOT to just delete your own code, then paste someone elses code in your game...

Try to re-write it in your own way... so you know exactly what you're doing. That's the only way you're going to learn/get better. Just pasting someone elses code doesn't do a lot for you.

His point was to "give you ideas" (though he went to the extreme I say).
Reply With Quote
  #7  
Old 07-20-2005, 07:46 PM
War5master War5master is offline
Newcomer
 
Join Date: Jun 2004
Posts: 21
Default

Quote:
Originally Posted by DubbleClick
Well, I have to say it would be better NOT to just delete your own code, then paste someone elses code in your game...

Try to re-write it in your own way... so you know exactly what you're doing. That's the only way you're going to learn/get better. Just pasting someone elses code doesn't do a lot for you.

His point was to "give you ideas" (though he went to the extreme I say).
o alright
Reply With Quote
  #8  
Old 07-21-2005, 09:39 AM
noi_max's Avatar
noi_maxNeed Help With RPG Game(Again) noi_max is offline
Still asleep...

Retired Leader
* Expert *
 
Join Date: Nov 2003
Location: IronForge
Posts: 2,694
Default

I'm thinking some kind of file-based database to keep information about all of your items is a good idea.

Whether you use simple File I/O, or say an Access database. Something along those lines.

Stored in the database would be all the needed information about the item, including the item class (Weapon, armor, etc..), its stats and the x/y location from where to draw the graphic from, if you're working with a sheet.

This beats hardcoding all of that information in the code itself. All you need is a routine that will grab the info from a file.
Then maybe have a seperate file to store information about what your character has in his/her inventory.
__________________
~ Jason

Use [vb][/vb] tags when posting code :) || Search the forum and MSDN|| Check out the Posting Guidelines
Reply With Quote
  #9  
Old 07-21-2005, 10:32 AM
DubbleClick's Avatar
DubbleClick DubbleClick is offline
Contributor
 
Join Date: Mar 2005
Location: Tennessee
Posts: 511
Default

I dunno.... Putting stuff like that in files make the game easy to "hack", thus taking almost all the fun and "adventure" out of it.

If I ever did anything like that, the file would be encrypted at minimum.

I don't think there's anything wrong with coding all your items into the executable. Just gotta be efficient how you do it.

You may want to have a string array with all your "metals, armor, weapons...etc."
Then associate them with byte arrays or something.

e.g.
Code:
ID As Byte '0 = Money, 1 = Weapon, 2 = Armor, 3 = Food....etc. Metal() As String Weapon() As String Metal(0) = "Bronze" Metal(1) = "Iron" Metal(2) = "Steel" ...etc. Weapon(0) = "Long Sword" Weapon(1) = "Mace" Weapon(2) = "War Hammer" ...etc. 'Your item ID's should be made up of a byte array or something. 'First byte indicates item type (Weapon, armor, money) 'second byte indicates "Metal", '3rd byte is array number of your "type" So your bytes would be something like 01 02 00 A1 = "Steel Longsword of Dragon Slaying" 01 = "Weapon" 02 = "Steel" (This comes from an array of it's own) 00 = "Long sword" (This comes from an array of it's own) A1 = "Dragon Slaying" (This comes from an array of it's own)
With everything in their own arrays, you can randomly create THOUSANDS of unique items in your game.

Just another goofy idea.
Reply With Quote
  #10  
Old 07-21-2005, 11:05 AM
War5master War5master is offline
Newcomer
 
Join Date: Jun 2004
Posts: 21
Default

o thx for those ideas ive been trying different things and seeing which one would work better with my game and im gonna try these

again, thx for the ideas and help really appreciate it
Reply With Quote
  #11  
Old 07-27-2005, 08:19 AM
Leade's Avatar
Leade Leade is offline
Junior Contributor
 
Join Date: Jul 2005
Location: Wherever i fall over
Posts: 222
Wink Basic RPG Creator (Leade SDK 1.0)

I had done a little something using operators, which is alot faster than the other methods.

i think you all should realy like this if you have any problems let me know and i will guide you through them or fix it.

It's pretty basic because it's from Leade SDK 1.5

Leade
Gretcorp Multimedia
Attached Files
File Type: zip module.zip (1.9 KB, 10 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again) Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again) Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
 
Need Help With RPG Game(Again)
Need Help With RPG Game(Again)
 
-->