#### Archived

This topic is now archived and is closed to further replies.

# VB6 RPG

This topic is 5838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I''m making a simple but cool RPG in VB6, any tips?

##### Share on other sites
yes

Maybe you should be a bit more specific. First of all, how well can you code etc etc.

/MindWipe

"If it doesn''t fit, force it; if it breaks, it needed replacement anyway."

##### Share on other sites
I''m OK at coding, I can do basic things like move objects, store variables... What I suck at is making the user able to save their game, as in writing to a file. I need some help with that. I can, however, use modules very well.

##### Share on other sites
quote:
Original post by gamechampionx
I''m OK at coding, I can do basic things like move objects, store variables... What I suck at is making the user able to save their game, as in writing to a file. I need some help with that. I can, however, use modules very well.

You''ve got to be kidding.

You can move objects? That is ok in any game that no one will ever look at. Look up BitBlt

You can''t write to a file? Look up Open, Close, Input, Output, Sequential, Binary, Random, FreeFile

You can use modules very well? What the hell is that supposed to mean?

Sorry to be harsh, but i think you need to spend about another year learning VB before making a game of any real merit at all.

/me feels a bit guilty about yelling at the n00bie...
Simple game written in VB which is pretty neat. Full source included. CLick the aliens as many times as yo can, dont let them hit the ground.

-----------------------------
Damnit Dave, I would have a link to Graphics Wars here, but you haven''t put it up on GDNet yet!
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Democracy is where you say what you want and do what you''re told.

##### Share on other sites
quote:
Original post by gamechampionx
I''m OK at coding, I can do basic things like move objects, store variables... What I suck at is making the user able to save their game, as in writing to a file. I need some help with that. I can, however, use modules very well.

Okay, if you cannot even write to files, then you should not even be attempting an RPG, or any game for that matter.

Learn the basics of Visual..Basic, such as file input/output, arrays, types, etc, etc..all of that stuff you''d have in an RPG.

Then look into some API functions, like BitBlt.

I would not want to imagine someone ever making an RPG with actual form objects. I shudder at the thought of it..It would be impractical, ineffecient, and damned near impossible.

##### Share on other sites
I wouldn't recommend using the GDI for an RPG - at least no one of any moderate complexity graphics-wise. DirectX would be much better IMO.

Also, you might want to check out my tutorial - http://rookscape.com/vbgaming/vbrpgtut/vbrpgtut.php

Breakaway Games

Edited by - Machaira on February 23, 2002 6:01:53 PM

##### Share on other sites
Hey, I''m only uising this as a learning experience. By the way, I need help with moving text around, I''ts horribly choppy, even using an interval of 1 on a timer object. Need help! By the way, I don''t mind constructive criticism, I''m going to try to work on writing to files as I make my game. Any help from anyone would be appreciated.

##### Share on other sites
Actually, I just learned how to write to a file, and I''m getting bretty good at it.

##### Share on other sites
quote:
I would not want to imagine someone ever making an RPG with actual form objects. I shudder at the thought of it..It would be impractical, ineffecient, and damned near impossible.

I did it! With form objects, GDI calls, and some array manipulation. And yes, it was highly impractical, ineffecient and, well, very close to damn impossible.

##### Share on other sites
If you want to do any game programming, I''d really look into doing it with DirectX. Like everybody else said, doing it with forms and objects will likely drive you insane.

If you just want to learn VB, then try thinking of a usefull utility and making it. Making a game is a good accumulation of everything you have learned, but not something you should start out doing right away.

##### Share on other sites
Maybe you should try writing a text rpg first. This way you get the basic game logic and then you will feel more confortable messing with graphics stuff

##### Share on other sites
What are GDI calls, and why would you need to use arrays for? Anyway, why is it so hard to make an RPG with form objects. I really need help with making tilesets, though, how is it done?

##### Share on other sites
You need a array for the map.

Make a simple 2d array:

integer as Map(100,100) (If I remember VB right?)

and then make a map editor to change those 100x100 tiles.
Save the map, load it in the game and make some freaking quest in it

/MindWipe

"If it doesn''t fit, force it; if it breaks, it needed replacement anyway."

##### Share on other sites

dim MyMap(100,100) as integer close but no cigar :D

i used VB for about 2 years, still give it evil glances every so often, but i used to love it , anyway, nuff about that If i was you i''d start off learning to an intermediate level non game specifics, like.. file access, data manipulation, data types, that sort of thing. Machairas'' rpg tutorial is a must try, haven''t looked at it yet, but any tutorial is a help

DarkStar

##### Share on other sites
hey, here is a website dedicated to developing RPGs in VB... although half the time i can''t access the site, i dunno if they have a crappy server or what... but if you go there and it is actually working they have some things that would help you a lot...
good luck.

--- krez (krezisback@aol.com)

##### Share on other sites
quote:
Original post by gamechampionx
Hey, I''m only uising this as a learning experience. By the way, I need help with moving text around, I''ts horribly choppy, even using an interval of 1 on a timer object. Need help! By the way, I don''t mind constructive criticism, I''m going to try to work on writing to files as I make my game. Any help from anyone would be appreciated.

Let me be the one voice in your favor here gamechampionx . I think it''s great to pick a goal and work toward it and learn along the way. That''s how I learn best. And an RPG is, I think, a good choice because it can be as simple or complex as you want it to be. You might only get as far as drawing a 10x10 array of tiles and moving a character around on that map, but you will have learned many important things in the process, and you can continue to build on it if you choose. Let me take a risk by saying, VB is not a bad language for RPG games and GDI/VB graphics calls are not a bad interface to do RPG graphics with. As a matter of fact, if you''re going to make a graphical game in VB using GDI/VB graphics, RPG is the way to go because it doesn''t require frequent screen updates and the character can move 1 whole tile at a time, keeping things simple.

1) Are you trying to scroll text? Maybe you should leave smooth animation features until later and finish the basics. But if you really want to scroll text now I can take a look at what you got and recommend an alternative. I just made a simple VB program that scrolls text and it seems to be pretty smooth, so you''ll have to show me what you''re doing.
2) If you''re going to save large hierarchies of data to a file, may I suggest using user defined types. It doesn''t deal with verifying the file format, but it''s relatively easy to implement. For instance, if your file needs to contain a player position and an array of map tiles, you can create 3 user defined types. The following code defines the types, initializes them with some data, saves the data and re-loads the data. (You may want to make your types public instead of private if you''ll be using them accross modules.)

Private Type Player   X As Integer   Y As IntegerEnd TypePrivate Type Map   Title As String   Tiles(0 To 99, 0 To 99) As ByteEnd TypePrivate Type FileData   PlayerData As Player   MapData As MapEnd TypePrivate Sub Form_Load()   Dim MyFileData As FileData      With MyFileData      With .PlayerData         .X = 50         .Y = 50      End With      With .MapData         .Title = "My First Map"         .Tiles(0, 0) = 1         '' Fill in more map here      End With   End With      '' I hard code the file number as 1 because I know that I will only have   '' one file open at any time and I want VB errors to notify me if I forgot   '' to close a file.  Others like to use FreeFile to get the next available   '' file number.   Open "TestFile.dat" For Binary As #1      Put #1, , MyFileData   Close      Open "TestFile.dat" For Binary Access Read As #1      Get #1, , MyFileData   CloseEnd Sub

"All you need to do to learn circular logic is learn circular logic"

##### Share on other sites
another idea is to use a relational database for storing your stuff. they are ideal for RPG type things, and with VB it is fairly easy to use them (Microsoft Windows comes with JET i think, and there are both controls and API for dealing with a database built right into VB). VB also comes with VisData (at least the older versions did) for building the database.